Closed Dohko closed 13 years ago
I am not familiar with the rails architecture but I like the direction you want to take this.
I have a few issues with some of it such as the need for more closures to keep variables out of the global namespace. I also noticed you changed the file names for the view models. I want to hear your take on how the view models should be named. Lastly, I would like to try to avoid extending the Mvc object. I would like to hear why you went this route but I don't think it is necessary.
I see you changed how the render function works and that you are now using tabs. Does this help development on the iPhone or is this just your personal preference?
Other than that, I would like to move everything toward the CommonJS approach of plugins. http://wiki.commonjs.org/wiki/Modules/1.1 I think it will really clean up some things and get rid of a bunch of nesting which helps out the debugger. I have had a few times where the nesting was too deep and couldn't debug certain portions of my code.
I was iffy at first as I am very biased to Asp.Net MVC but I think we will go with your structure. You are really moving this toward a framework instead of a simple example. I'll merge in your changes after you respond to this email.
Anyway, awesome work.
John
On Thu, Oct 6, 2011 at 8:28 AM, Morgan FITUSSI < reply@reply.github.com>wrote:
Hi John,
Here my contributions.
Thank you.
Morgan
You can merge this Pull Request by running:
git pull https://github.com/Dohko/Appcelerator-Mvc master
Or you can view, comment on it, or merge it online at:
https://github.com/jlkalberer/Appcelerator-Mvc/pull/1
-- Commit Summary --
- Redesign of the architecture (inspired by Ruby on Rails)
-- File Changes --
D Resources/KS_nav_ui.png (0) D Resources/KS_nav_views.png (0) D Resources/LICENSE (19) M Resources/android/appicon.png (0) M Resources/android/default.png (0) M Resources/android/images/res-long-land-hdpi/default.png (0) M Resources/android/images/res-long-land-ldpi/default.png (0) M Resources/android/images/res-long-port-hdpi/default.png (0) M Resources/android/images/res-long-port-ldpi/default.png (0) M Resources/android/images/res-notlong-land-hdpi/default.png (0) M Resources/android/images/res-notlong-land-ldpi/default.png (0) M Resources/android/images/res-notlong-land-mdpi/default.png (0) M Resources/android/images/res-notlong-port-hdpi/default.png (0) M Resources/android/images/res-notlong-port-ldpi/default.png (0) M Resources/android/images/res-notlong-port-mdpi/default.png (0) M Resources/app.js (112) R Resources/app/controllers/AccountsController.js (39) A Resources/app/controllers/HomeController.js (21) R Resources/app/models/AccountViewModel.js (0) A Resources/app/models/Accounts.js (52) R Resources/app/models/AccountsViewModel.js (0) R Resources/app/models/CreateAccountViewModel.js (0) R Resources/app/views/Accounts/Create.js (6) R Resources/app/views/Accounts/Default.js (23) A Resources/app/views/Home/Default.js (30) R Resources/app/views/Home/DoStuff.js (44) A Resources/config/initializers/mapper.js (1) A Resources/config/initializers/mvc.js (1) A Resources/config/routes.js (20) D Resources/controllers/HomeController.js (30) D Resources/dal.js (23) M Resources/iphone/Default-Landscape.png (0) M Resources/iphone/Default-Portrait.png (0) M Resources/iphone/Default.png (0) M Resources/iphone/Default@2x.png (0) M Resources/iphone/appicon.png (0) A Resources/lib/Accounts/Account.js (13) A Resources/lib/Accounts/Accounts.js (13) A Resources/lib/Accounts/Create.js (8) R Resources/lib/utils.js (4) D Resources/models/Accounts.js (52) A Resources/public/stylesheets/iPhone/global.rjss (3) A Resources/public/stylesheets/iPhone/views/Home/Default.rjss (25) A Resources/vendor/plugins/MVC/install.js (8) R Resources/vendor/plugins/MVC/mvc.js (595) A Resources/vendor/plugins/MVC/render.js (77) A Resources/vendor/plugins/Mapper/install.js (32) R Resources/vendor/plugins/Mapper/joli.js (2) R Resources/vendor/plugins/Mapper/jsAutomapper.js (0) A Resources/vendor/plugins/Redux/install.js (1) A Resources/vendor/plugins/Redux/redux.js (530) A Resources/vendor/plugins/Underscore/install.js (1) A Resources/vendor/plugins/Underscore/underscore.jss (29) D Resources/views/Home/Default.js (45)
-- Patch Links --
https://github.com/jlkalberer/Appcelerator-Mvc/pull/1.patch https://github.com/jlkalberer/Appcelerator-Mvc/pull/1.diff
Reply to this email directly or view it on GitHub: https://github.com/jlkalberer/Appcelerator-Mvc/pull/1
Hi John,
Thank you for your comments. I will try to answer your questions.
First, I was inspired by the ruby on rails framework (files architectures, extensions system in vendor etc...). You should take a look.
I think we should merge the files in lib/Accounts with the file in app/models/Accounts.js.
I am also interested in the use of CommonJS. It would be great to have two types of mother classes: Model and Controller.
I am use tab in iPhone because it's more easy to manage in an iPhone project.
You have done a really really good job but I think we should more easily manage the actions in the controllers (maybe using CommonJS), rendering (more customizable) and Models (also CommonJS and modules).
I hope I could help you. I use the MVC framework in my professional project so I will send you my changes.
If you want to discuss it further, you can join me on gtalk.
Regards, Morgan
When are you planning on implementing these changes? I would love to use RoR structure for this MVC.
As we were already working with the initial implementation of the framework, how would you estimate the impact of using this latest update instead? I'm eager to be up-to-date, but I'd like to know how much I'll have to rewrite my own code before I do so.
Thanks!
The latest commit was just a merge of what you worked on before. I just finished up an Asp.Net project and was going to start working on mobile things again but an urgent flash project came up so I am working on that right now. Anyway, I should be working on mobile things next week so I will be able to actually start cleaning up code and get a new release on the marketplace.
I think that the only thing you are going to want to update is the mvc.js -- I have a few bug fixes that I have added there. I am not sure how much of the framework I am going to change but I know I will at least be moving a few files around and simplifying things.
On Mon, Nov 21, 2011 at 4:30 AM, Wouter Van den Bosch reply@reply.github.com wrote:
As we were already working with the initial implementation of the framework, how would you estimate the impact of using this latest update instead? I'm eager to be up-to-date, but I'd like to know how much I'll have to rewrite my own code before I do so.
Thanks!
Reply to this email directly or view it on GitHub: https://github.com/jlkalberer/Appcelerator-Mvc/pull/1#issuecomment-2814577
Hi John,
Here my contributions.
Thank you.
Morgan