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.
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
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.