How in an ExtJS 4 MVC single web page application we can identify Views?
Is it a good practice to consider each Ext.Window as a View unit? (one folder for each Window in app/view folder)
What is best practice?
How in an ExtJS 4 MVC single web page application we can identify Views?
Share
Using single folder for each Window could be a nigthmare.
The concept is not for each window but for each entity (or model).
Having a folder for each model’s views is the point.
For example, you have 3 entitites (models) in your application, sat Customer, Invoice, Payment your should have 3 subfolders in view main folder, one for each model. Inside each folder are the views used for CRUD for each model: List and Edit. If you have another views for the same model you should put in their respective folder (inquiry, charts, etc.).
I been working in a payroll application and my rule is use soubfolders as packages as I do in Java. I group related views in the same “package” even if is not for only one model. For example, I have a folder for all “catalog” models (depts, jobs, etc.), another for payroll processing and so.
The MVC of ExtJS is very similar to Ruby on Rails.
Regards.