1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    27
    Answers
    2
    Vote Rating
    1
    English is on a distinguished road

      0  

    Default Unanswered: Best Practices for Integrating PHP

    Unanswered: Best Practices for Integrating PHP


    Hi all. New member. I've been tasked with taking a Sencha 1.1 application, and migrating it to 2.0.

    As I've been researching for the last few days, something has begun to concern me more and more:
    There are many pages in this app where values are retrieved from PHP using a hybrid type of page. In other words, a page for a view may be called: "view.js.php", with the Content Type set to "application/Javascript".
    The thinking is that they can then just retrieve values and settings via the php page, and "inject" the values into the page with "<?php echo ....?> tags.

    Is this a good practice? My gut feeling is that it's not a good idea for the following reasons:
    1. Fundamentally, isn't the premise that Sencha is a client-side application - encouraging separation from the server side? I would have assumed that the application runs on the client, and calls (such as JSON queries), are made to retrieve data/configuration variables.
    2. Does this preclude the advantages of Sencha 2's ability to only instantiate/load classes as they are needed because it is looking for "view.js" for example, in the views directory, rather than "view.js.php"?
    I could be wrong about this - I am very new to Sencha - so would appreciate some input from more seasoned Sencha developers.

  2. #2
    Sencha - Community Support Team grgur's Avatar
    Join Date
    Aug 2007
    Location
    Split, Croatia
    Posts
    154
    Answers
    10
    Vote Rating
    24
    grgur has a spectacular aura about grgur has a spectacular aura about

      1  

    Default


    It's a good question and you're not the only one asking about integrating client side app with server side. Some do it for the sake of performance, some due to better familiarity with PHP than JS, and some are just trying to invent hot water. Let's just say that all of the above yield questionable results.

    I understand that there are so many considerations in your particular case, but at the end of the day, you will certainly benefit from doing everything by the book. That means to separate client and server side and have them communicate through JSON objects. As with all other technologies, sticking to the best practices and coding conventions will pay off in the long run (I would say in the short run, too)
    Grgur Grisogono
    Ext JS in Action SE co-author
    Exercising awesomeness at Modus Create - Official Sencha Partner

    Get in touch for Sencha Touch Training
    @ggrgur

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar