CodeIgniter JS

#1
[eluser]Christophe28[/eluser]
Hi,

I am a front end JavaScript developer with a good knowledge of CodeIgniter. I really like the MVC pattern, so I have done some research for some good front end MVC based frameworks. BackboneJS got great comments from well know JavaScript developers, so I have decided to check out this framework.

However, in my opinion, the philosophy of backbonejs is rather odd. MVC stands for 'Model View Collection' (not controller). A View is not an HTML template, but a reference to a DOM element. The logic of the application (event binding, etc) is defined in the view (???) and a collection is basically a list of models.

I believe it's obvious all logic has there place in controllers. In MVC for JS, the controllers has to become references to DOM elements, and views will become HTML templates (perhaps parsed with a template engine like Handlebarsjs), ideal for creating (real time) single page web applications. Model objects will be initiated from a controller and you can add a listener which listens for data changes in the model and perhaps synchronize with a database.

Therefore I'm playing with the idea to setup a base for a JavaScript framework inspired on CodeIgniter (PHP). I have contacted EllisLab and they told me to post it on the forum.

Anybody interested to at least discuss this topic?

Thanks in advance for any feedback!

Christophe

#2
[eluser]skunkbad[/eluser]
I just think there's a way to overthink the way things are done, and it sounds like that might be what you are doing. I've built some very large applications just using CI and jQuery, and maybe they aren't gonna stand up to the web development nazis, but they work.

#3
[eluser]Christophe28[/eluser]
The main focus of jQuery is DOM manipulation, but the goal of a front end MVC framework is to bring more structure to JavaScript applications. Since front end applications are increasing heavily in size, MVC frameworks will become more and more popular. Both (jQuery and MVC) works very nice together actually.

Thanks for your input.

Christophe


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.