-
6 Mar 2012 2:57 AM #1
ExtJS4 MVC application skel
ExtJS4 MVC application skel
Hi All,
Last week our company started with building the first Large MVC application in ExtJS4 (and with large I mean around 50 different screens), one of the things we searched for was a good MVC application that we could use for a quick start. But the only example I could find is the one described in the ExtJS manual. Since I'm from the PHP world, I was used to find some nice Skeleton applications for existing frameworks which can be used as a quick start. So that's why I started with a ExtJS4 MVC Application skeleton
As a start I used the Routed App (from chris scott) because using a dispatch function sounds good in a MVC application.
So at the moment it has the following features:
- Routed Application (https://github.com/christocracy/RoutedApp from Chris Scott)
- Statefull tree menu
- History Support (back and forward support)
- Login box (used the Ex.ux.LoginDialog from Sumit Madan for it)
I changed the routedApp a little bit so it supports the Ext.History feature. It's now possible to use
Ext.History.add('controller/action', true) for history support or just use Ext.dispatch('controller/action')
without history support. At the moment this works for me, and I have no idea if this is THE way. So if somebody experience with other strategy that works better, let me know!
I Also have the following todo items on my list:
- Module support (if possible)
- Add a config file that can be used in the application (with dev/prod support)
- Dashboard like http://docs.sencha.com/ext-js/4-0/#!...al/portal.html
- Translations (not the Extjs way, but something like https://github.com/mitchellsimoens/Ext.LocaleManager)
- Better Crud examples with JSON data files (including stores and models)
- Authentication and Authorization support
- Diffrent navigation layout support
- Add Unit Tests
- Add support for History.js (http://www.sencha.com/forum/showthre...for-History.js)
If you have some other idea's that can be included in this skeleton, just create a feature request on github or mention it here in the forum. Also If you have any examples on how to solve one of the todo's or want to help, let me know! (Because I'm not an ExtJS expert yet
The skel only works with ExtJS 4.0.7 at the moment, I tried with ExtJS 4.1 B2 and B3, but with both versions the app is broken
It looks like some events are not called, but I still have to look at it. It's also possible that the code I wrote is not correct 
You can find the code on github: https://github.com/sndpl/extjs4_mvc_skel
And a live demo at: http://extjs.dbpatch-project.com (username admin with no password)
-
3 May 2012 12:39 PM #2
I'm also looking for something like this - a skeleton template ...
Thanks for the start ... I've been doing the same thing - piecing stuff together and trying to get it to work.Donnie Martin - noob cake
Ext JS 4.1 & Architect 2.0 - Ajax/LAMP
"My email address is older than you, not kidding"
-
3 May 2012 1:34 PM #3
Hi there,
If you don't mind me asking, What kind of application are you working on?
I am building an Open Source Electronic Medical Record. Is not using MVC but you can prob get a lot of ideas from it :-)
http://demo.mitosehr.org/|:| GaiaEHR |:| A Open Source Software for Electronic Health Records - Lead Developer
-
4 May 2012 10:18 AM #4
Holy mother of all things holy... that's amazing. Thanks for sharing! Sessions... dynamic php router - and even webcam support! Haha, no really!
Can I ask how you put all of that together? The forms and such? Some of those forms and panels are outstanding! The functionality is really good as well - and the layout. Excellent example!
I have several apps developed in Joomla/Fabrik and am moving away from Joomla - running away actually, toward ExtJS 4.1. Your code will be a big help! I hate weekends and going outside anyway.
(Sorry for kind of hi-jacking the thread sndpl)Donnie Martin - noob cake
Ext JS 4.1 & Architect 2.0 - Ajax/LAMP
"My email address is older than you, not kidding"


Reply With Quote