NodeJS CompoundJS and Rails
Blogs20132013-08-14
NodeJS CompoundJS and Rails
CompoundJS is a NodeJS MVC framework, it can be acquired from CompoundJS’s github. It is easy to use and grasp, with high performance. By using it with MongoDB (with jugglingdb to access), pretty good feeling. I am quite impressive with its succinct, smart, well-designed structure: Routing, Controllers and EJS-style Views.
The following is a quick-start:
# install compoundJS globally:
$ sudo npm install compound -g
# initialize app
$ cd ~
$ compound init blog && cd blog
$ npm install
# generate scaffold
$ compound generate crud post title content published:boolean
# run server on port 3000
$ compound s 3000
# visit app
$ open http://localhost:3000/posts
Rails is also good for Agile development, , Gemfile = package.json
rails with mongo_mapper(MongoDB accessor) support.
;
$ rails generate scaffold tpouser user:string --skip-migration --orm mongo_mapper
$ rails generate model Info first_name:string last_name:string phone:string e_mail:string --skip-migration --orm mongo_mapper
$ rails generate model Count contacts:Integer prospects:Integer closings:Integer listings:Integer --skip-migration --orm mongo_mapper