One of my favorite things with Yii is the Gii (Generator).
One of the things I love about Yii (PHP framework) is the GII (generator) Global information Infrastructure.
With a few clicks I could simply add a few models/controllers/views (or all of the above) and then build/customize those.
I just need a few clicks to add some models/controllers/Views (or three of them together) and then build/customize them.
MEANJS uses the Yeoman/yo generator to make this happen. After installing Yeoman generator (which I believe we already installed when we installed MEANJS) via:
MEANJS uses the Yeoman/yo generator to make this possible. After installing the Yeoman generator (I believe we have installed the MEANJS when we installed it) by:
NPM Install-g yo
Now-to-install the MEANJS generator package:
Now start installing the MEANJS Generator package:
NPM install-g Generator-meanjs
(Remember, often when running NPM install-g "ll need to sudo it)
(remember, when executing NPM install-g commands, you often need to use sudo to elevate permissions to execute (commands in Linux))
Basic CRUD
Basic reading and deletion
For those who is not familiar with the concept, CRUD stands for–create, Read, Update & Delete.
These is the basics one needs to present & manipulate data in a website, and a lot of web frameworks generate Cruds a s sort of a first-step.
Let's create our first CRUD:
meanjs:crud-firstmodule
After selecting the Supplemental folder to include in the Angular module, and whether or not, the module should is added to The menu, a bunch of files are generated.
Very Important: The crud-module generates both the Server side & Client files.
The Module Structure was explained thoroughly onbasics of MEANJS.
The Crud-module is the all encompassing, there is also sub generators:
- Angular-module
- Angular-route
- Angular-controller
- Angular-view
- Angular-service
- Angular-directive
- Angular-filter
- Angular-config
- Angular-test
- Express-model
- Express-controller
- Express-route
- Express-test
Those names is pretty self explanatory and so I don ' t see much need to go deeper there.
More information on Yeoman generator specifically used for MEANJS can be foundhere
As can probably notice, this article came out a bit shorter than expected, this is mainly due to time constraints.
I ' d like to continue and develop under MEANJS, as I see a lot of interest on the subject.
There is also a few other frameworks that I started reading on that might is a part of the some future articles (some is Fairly similar).
Bonus Info:meanjs was on the Changelog podcast! , very cool.
Generate "translations" with Meanjs and yeoman generators