http://newcome.wordpress.com/2012/04/14 ... c-its-mvm/
Node.js, MongoDB, MVC, MVM, Meteor...
Node.js, MongoDB, MVC, MVM, Meteor...
I feel like this blog post has useful information, but I don't really understand what he means. Can somebody translate a summary of this article... For Dummies?
http://newcome.wordpress.com/2012/04/14 ... c-its-mvm/
http://newcome.wordpress.com/2012/04/14 ... c-its-mvm/
"In order to understand recursion, one must first understand recursion".
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Node.js, MongoDB, MVC, MVM, Meteor...
He is basically saying that the Meteor framework (which is built on top of Node.js) is a game-changer in the same way that Ruby on Rails was for introducing MVC to web development.
Some of the article I don't completely get because I am not too familiar with Meteor (I have only read the high-level feature lists and a couple of articles, but was scared away by how fast it is developing currently), but I definitely see his issues with Node and even Express (a quasi-MVC framework for node). I have been building my application in node and socket.io as a single-page application with no client-side framework, and I am feeling some of the pains he is talking about.
Maybe some definitions would help:
Node.JS: You probably know this one. It is an asynchronous, event-based JS execution engine that has been the basis for many major projects lately, such as Express, Socket.io and now Meteor.
MongoDB: A very popular NoSQL database. Instead of dividing your data up into relational tables and querying for them, you store all your data related to one thing in your app as a Javascript object directly into the data store. I love MongoDB!
MVC: Model-View-Contoller. This is a pattern that Ruby on Rails popularized for web development. A web request comes in and hits a Controller, which determines how to route the request. It then uses a Model, which the data is all grouped into to create a data set for the request, and then it uses a View to assemble it all into an HTML page for the user. MVC went a long way towards making web applications more maintainable and manageable since before MVC, everything was just dumped into the same file on a page-by-page basis.
MVM: Model-View-Mapper? Not too familiar with this one, but it seems it is a newer pattern (or really a back-pattern, aka a pattern made after the fact to describe something already in the wild) to more accurately describe client-side "MVC" frameworks, which really aren't true MVC usually. These are designed to make single-page-applications (SPAs) easier to make and to provide more structure (something I am really feeling the pain of right now for not using).
Meteor: This is a very new node framework that is under heavy development, but it is already getting the attention of tons of people. It is trying to solve the problem mentioned in the article about having state represented both on the server and on the client when you are actually using the same language in both places (Javascript). It just seemed like there had to be a more elegant solution, and Meteor is trying to provide that. It provides live, automatic updating from the server to the client. I am going to be keeping an eye on Meteor
Some of the article I don't completely get because I am not too familiar with Meteor (I have only read the high-level feature lists and a couple of articles, but was scared away by how fast it is developing currently), but I definitely see his issues with Node and even Express (a quasi-MVC framework for node). I have been building my application in node and socket.io as a single-page application with no client-side framework, and I am feeling some of the pains he is talking about.
Maybe some definitions would help:
Node.JS: You probably know this one. It is an asynchronous, event-based JS execution engine that has been the basis for many major projects lately, such as Express, Socket.io and now Meteor.
MongoDB: A very popular NoSQL database. Instead of dividing your data up into relational tables and querying for them, you store all your data related to one thing in your app as a Javascript object directly into the data store. I love MongoDB!
MVC: Model-View-Contoller. This is a pattern that Ruby on Rails popularized for web development. A web request comes in and hits a Controller, which determines how to route the request. It then uses a Model, which the data is all grouped into to create a data set for the request, and then it uses a View to assemble it all into an HTML page for the user. MVC went a long way towards making web applications more maintainable and manageable since before MVC, everything was just dumped into the same file on a page-by-page basis.
MVM: Model-View-Mapper? Not too familiar with this one, but it seems it is a newer pattern (or really a back-pattern, aka a pattern made after the fact to describe something already in the wild) to more accurately describe client-side "MVC" frameworks, which really aren't true MVC usually. These are designed to make single-page-applications (SPAs) easier to make and to provide more structure (something I am really feeling the pain of right now for not using).
Meteor: This is a very new node framework that is under heavy development, but it is already getting the attention of tons of people. It is trying to solve the problem mentioned in the article about having state represented both on the server and on the client when you are actually using the same language in both places (Javascript). It just seemed like there had to be a more elegant solution, and Meteor is trying to provide that. It provides live, automatic updating from the server to the client. I am going to be keeping an eye on Meteor
The indelible lord of tl;dr
Re: Node.js, MongoDB, MVC, MVM, Meteor...
Thank you Jack, that was a very helpful breakdown, I appreciate it. Think I am going to add MVC to my learning agenda, as I plan for my game to "live update" pieces of the page without having to reload the entire page.
"In order to understand recursion, one must first understand recursion".
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Node.js, MongoDB, MVC, MVM, Meteor...
MVC alone won't help you with that, as typical MVC frameworks (CodeIgniter, Symfony, Zend, etc.) are all 100% server-side. Although I believe everyone doing server-side development work should learn an MVC framework since it makes things so much more structured. But to update parts of the page without reloading the whole page, you can do that with AJAX.
The indelible lord of tl;dr
Re: Node.js, MongoDB, MVC, MVM, Meteor...
AJAX alone, or AJAX in conjunction with Jquery/Javascript?
"In order to understand recursion, one must first understand recursion".
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Node.js, MongoDB, MVC, MVM, Meteor...
AJAX is a Javascript technique, not a stand-alone technology. So you at least need regular Javascript to use AJAX, but jQuery sure makes JS simpler, all around.
The indelible lord of tl;dr
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Node.js, MongoDB, MVC, MVM, Meteor...
Jquery ajax is far easier.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Node.js, MongoDB, MVC, MVM, Meteor...
It really is. A full, complete AJAX call with full error detection and callbacks is around..what...80 - 100 lines of code in vanilla JS. With jQuery you can do it in around 5 lines.
The indelible lord of tl;dr
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Node.js, MongoDB, MVC, MVM, Meteor...
whoa... That sounds awesome.
"In order to understand recursion, one must first understand recursion".