Date post: | 20-Jan-2017 |
Category: |
Technology |
Upload: | iryney-baran |
View: | 262 times |
Download: | 0 times |
Structure of presentation
•What is MEAN stack?•Pros and Cons of using MEAN stack•Show simple app
Structure of Web Application
Web Application
Front end vs Back end
Back end Front end• Never visible to user What user interacts with
directly.• Built with use of server side Interface between user andlanguage and database back end.
What is MEAN stack?
AngularJSOur app’s entire front end
• Open source, maintained by Google• Client side MVC (MVVM) framework• Excellent data bindings• Easy to test
Where to get Angular?
• Extremely lightweight – download/include only what you need
https://docs.angularjs.org/misc/downloading
Node.js Lightweight web server
• Built on Google Chrome’s V8 Javascript Engine• Extremely lightweight and efficient
var http = require('http'); http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n');
}).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');
How to install Node.js
• http://nodejs.org/download/
• Prebuilt installers for Windows, OSX
• Use npm to install packages
ExpressCreates our routes and our API
• “minimal and flexible node.js web application framework”• Abstracts away a lot of low level logic
(e.g. for HTTP requests)• Helps organize your Node app into an MVC structure
MongoDBOur datastore
• The top NoSQL Database• Open Source, maintained by MongoDB• JSON like syntax• Key-value stores
Finally
Advantages of MEAN stack
• there is no programming language to be used with the MEAN stack other than the JavaScript.
• increases productivity and make ease debugging• the objects stored in the database are identical to the
objects the client-side JavaScript deal with.• Support MVC• Fairly new and developing
Disadvantages
• MongoDB may work well for small to mid-sized apps, but less so for large-scale applications (e.g 100′s of millions of users).
Comparing LAMP and MEAN
Simple app with MEAN Technologies: