10 Apr 2013 4:30 PM #1
Building Enterprise Application
I'm trying to come up with the best architecture for enterprise (very large) application.
First of all, I would like to say that I really like the idea of having both back-end and front-end MVC. Everything is well organized and its easy to navigate.
However, when you are dealing with very large applications, it becomes difficult to manually write hundreds of front-end files (models, stores, charts, etc). So now it becomes necessary to auto generate these classes using the back-end. But now you are going back to mixing back-end code with front-end.
What is the best way to achieve this?
11 Apr 2013 10:09 AM #2
Why generate them? Create a template which gets populated with JSON data from the bakend. Your class should know how to interpret the data and render the right component.
11 Apr 2013 10:43 AM #3
Thats is exactly what I'm looking for.
However, how do you deal with models for example. Models require fields mapping so later it could build grids etc. Same goes for charts. Charts require number of lines etc.
I'm sure there is a good/clean way to do this. Perhaps someone has some examples.
12 Apr 2013 11:52 AM #4
If you're going to deliver the class files dynamically could you do a DB query for the data the model will manage and use the response to build the model's fields?