I'm releasing my first piece of code: An ExtJs4 MVC Desktop with Zend Framework Backend and AdminPanel
The development took several months and I'm somehow happy that Sencha didn't release a MVC style Desktop before I did
Some words about the development:
Started with ExtJs3.2 and at this point of time ExtJs and Zend Framework was completely new land for me. After a lot of setbacks I stopped the development and with ExtJs4.0.1 I started again to work on this code.
If you look at the sources (especially the ZF Backend) you will see my missing knowledge about the best technics and how to do stuff.
Because this is a hobby project I didn't work every day on this and spend here and there some hours. With ExtJs4 I had some very frustrating times and after I rethink the "goal" of this project, it got better. Today, every little step is a success and I do not see the complete project as a success, rather than every
bit of code that work or still work after refactoring is "mission accomplished".
About the project content:
After the release of 4.0.1 (I think) there was no MVC example that prove the MVC Framework ExtJs4 is usable for bigger projects.
The released Desktop Example is a lot better than the ExtJs3 version, but I missed the MVC part.
The complexity of this application was a key factor, why I restarted my old project again.
I've reached a little milestone and I thought 'release it', because of the following causes:
- I have to: I'm a GPL User
- I want to: Other should review the code and give me tipps how to improve it
- I should: Because it can help other users, that have problems to find an entry point or having concerns about ExtJs4
What does the project include and what I did:
Using the Non-MVC Desktop example and put it on top of my Zend Framework backend, I managed to convert the functionality from the Non-MVC example to an MVC example. Because the MVC Example does not have a real backend, there were many design decissions to make, how to couple frontend (ExtJs4) and the Backend(ZF), but still be open to other web elements.
Well, the open part is a bit missing or I did not test them, but I managed to setup up a Rights Management System (ACL) that can be used on pure Backend Projects (pure Zend Framework websites) and also be usable in the Webdesktop System with many virtual Modules as I call them (Applications in the Webdesktop).
To control the Access/Rightssystem I developed an Zend Framework driven Admin Website and an Admin Module in the Webdesktop.
Of course you are more interested in the frontend.
In my ExtJs4 implementation I tried to use as many new elements of the new version as possible.
- strict Ext.define / Ext.create / Ext.widget usage (I think I never used Ext.extend or var x = new XYZ)
- Class Configuration System (and using automatic Configproperties setters and getters)
- of course the MVC pattern and what I think that Sencha intent to use it
- all listeners in controllers (2-3 afterRender exceptions, completly without Ext.getCmp())
- views seperated from model / stores / controllers
- model definition with validations and convertions
- some data abstractions uses associations
- sorting and grouping stores
- grids with stores and request through proxies
- grids with roweditor + writer proxy
- forms that use data from records from grids store
- and much more
As I said before, this is only a small milestone. The last two weeks I did a complete code review and placed everywhere @TODO or FIXME tags. I counted more than 220 only in the Frontend part I'm tagging this release v0.1 (alpha).
The next steps:
- Register to github and share the complete code
- start fixing issue
- listening on feedback and new bugs, then try to fix them too
- Unit Testing (Really need help on this Topic, Zend Framework and ExtJs)
- Deploy process (create minified version, maybe with rewriting Sencha SDKs Tools to fit the needs)
- create some Webdesktop Modules
Here is the URL for an online demo version:
Important: In the Demo you have full rights. I didn't include any hacks to assure, that the admin kills himself in the ACL.
With the next release and the updated demo version, I will incude that. So please be aware what you are doing!
Example: Deactive the admin user, deny all access to admin controller for the admin role and so on will break down the whole demo for everyone!!! If you accidently did this or you discovered that someone did this, drop me a PM and I will reenable the system.
There are 2 Users: Admin and demo.users
Differences: the Admin can see and use the AdminModule, the DemoUser only the SettingsModule.
The full source code release (Front+Backend) should be on the weekend. I think I have time for this.
My wish and desires, beside the GPL License:
- If you find a bug, report it (forum or later github)
- If you know something about unit testing and you have some hours left: please explain it too me with examples
- If you know a better way to do something, my ears are open
So, a lot of text till now, but some criticle bugs right now:
- With IE7 the webdesktop is not loading, (IE9 works, I think. No change to test IE6/8)
- misspellings everywhere (english not my first language as you figured out with this text )
GitHub to download the sources:
2011/08/08: Added github
2011/08/09: Restricted the demo for above described reasons (full permissions isn't good for a demo )