PDA

View Full Version : MVC in EXTJS4, folder structure?



koke
11 Mar 2011, 2:40 AM
Hi everybody!



Does anybody know how will the folder structure and extjs4 model-view controller finally be ??



And, could anybody give me information about it, please ??



Thanks a million

sg707
11 Mar 2011, 7:16 AM
Typically it falls into

/controller
/model
/view

Above is not ExtJS4 folder structure, just a general folder structure used for any MVC framework.

scottmartin
11 Mar 2011, 7:35 AM
IIRC, one of the conference videos display the structure when it was presented.

Regards,
Scott.

westy
11 Mar 2011, 7:46 AM
When you call Ext.regApplication is creates a namespace for your application, and the sub-namespaces:
application.models
application.views
application.controllers
application.stores

You can see this in src/Application.js

I've been laying out my code in the same way, in-line with how you generally layout namespaces in another language on disk (i.e. .NET).

I have a few applications spread across repos, and seems to work well. The main application entry point sorts the viewport out, with the other application launch methods wiring up Direct providers and stuff as needed.

Cheers,
Westy

Rbk
11 Mar 2011, 12:10 PM
Hi,

I searched the conference video that shows this structure but can not find it. Please, someone has a link to this video?

Thanks very much

mmartz
11 Mar 2011, 1:15 PM
The slides are on slideshare (http://www.slideshare.net/senchainc/structuring-your-sencha-touch-application).

The video is on vimeohttp://vimeo.com/17705448 (http://www.slideshare.net/senchainc/structuring-your-sencha-touch-application).

rsqw
20 Nov 2011, 1:20 AM
Hi,

Is it possible to create another folder-structure for Extjs4 MVC-application with modules, because if application's controllers count is too large, it will be a headache to write another mvc-component and maintain all my code. In my test-application I cannot create module-structure, because of Ext.Loader. What is the best solution for this?