What is scaffolding
Scaffolding is a technique that is supported by some MVC frameworks.
It is mainly supported by the following frameworks:
Ruby on Rails,OutSystems Platform, Express Framework, Play framework, Django, MonoRail, Brail, Symfony, Laravel, CodeIgniter, Yii, CakePHP, Phalcon PHP, Model-Glue, PRADO, Grails, Catalyst, Seam Framework, Spring Roo, ASP.NET etc.
Scaffolding facilitates the programmers to specify how the application data may be used. This specification is used by the frameworks with predefined code templates, to generate the final code that the application can use for CRUD operations (create, read, update and delete database entries).
Express.js Scaffold
An Express.js scaffold supports candy and more web projects based on Node.js.
Install scaffold
Execute the following command to install scaffold.
It will take a few seconds and the screen will look like this:
After this step, execute the following command to install express generator:
Now, you can use express to scaffold a web-app.
Let's take an example:
First create a directory named myapp. Create a file named app.js in the myapp directory having the following code:
Open Node.js command prompt, go to myapp and run npm init command (In my case, I have created myapp folder on desktop)
Fill the entries and press enter.
It will create a package.json file in myapp folder and the data is shown in JSON format.
Output:
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.