1. #21
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    can you post pls an example of duplication, I have never got so far, curious to know, thx.

  2. #22
    Sencha User bclinton's Avatar
    Join Date
    Nov 2007
    Posts
    274
    Vote Rating
    6
    bclinton will become famous soon enough

      0  

    Default


    Quote Originally Posted by Thomas Triplet View Post
    Agreed that it doesn't look pretty to mix JS and PHP, but keeping them separate does implies code duplication (duplication of classes, attributes, etc...)
    Combining the PHP and JS would make your client application less flexible since you would be tying the client to the server code. When you keep them separate, your Ext JS client is not dependent on the server code and the server architecture can be changed without rewriting client code.


    Ext JS and CodeIgniter controllers are very different things because they both control the logic of different things. Ext JS controllers handle application events triggered by the user's interaction with the UI while Codeigniter controllers handle data requests/responses. There really isn't any code duplication.

  3. #23

    Default


    Quote Originally Posted by bclinton View Post
    Ext JS and CodeIgniter controllers are very different things because they both control the logic of different things. Ext JS controllers handle application events triggered by the user's interaction with the UI while Codeigniter controllers handle data requests/responses. There really isn't any code duplication.
    ExtJS and CI controllers certainly handle things at different levels, but I still believe that the logic should be unique accross your entire application. If you keep them separate, should you need to add a field to the database, you need to update 1. the database itself, 2. the CI model and 3. your GUI model. It would be nice to automate that kinda thing

  4. #24
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    Quote Originally Posted by Thomas Triplet View Post
    If you keep them separate, should you need to add a field to the database, you need to update 1. the database itself, 2. the CI model and 3. your GUI model. It would be nice to automate that kinda thing
    depends on the app, and it's very rarely when you get the duplication, because the frontend model may be different than the one from backend (build by an ORM or what ever) by fields and by logic. Sometimes the frontend may require a logic which in backend is not needed, sometimes the backend exposes not all fields to frontend and has it's logic, and more than this are different languages, as I said in a previous post, this could be more related to node.js and javascript backends. In Codigniter - ExtJS case automation is not worthing and almost not possible because both frameworks are evolving(and not only), and you'll waste more time and efficiency by trying to automate and avoid duplication of code in models than making a functional , flexible and maintainable app - non sense.

  5. #25
    Sencha Premium Member
    Join Date
    Mar 2010
    Posts
    110
    Vote Rating
    -2
    predator has a little shameless behaviour in the past

      0  

    Default


    keep the extjs code in separate folder, then create your view, include extjs library in it and also your application.js file and you are good to go.

  6. #26
    Sencha User
    Join Date
    Nov 2012
    Posts
    6
    Vote Rating
    1
    richiejaeger is on a distinguished road

      0