Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)
The document discusses the MEAN and MERN application stacks. MEAN uses MongoDB, Express, AngularJS, and Node.js while MERN uses MongoDB, Express, React, and Node.js. It describes the components of each stack including MongoDB for data storage, Node.js for the application backend, and either AngularJS or React for the frontend. It also discusses how these stacks enable building applications with universal JavaScript and REST APIs for rapid development and scalability.
Introduction to MEAN and MERN stacks for developing modern applications. The inclusion of Stitch expands the functionality.
Discusses key components of MEAN & MERN, featuring JavaScript, backend technologies (Node.js, MongoDB, Express), and frontend technologies (Angular, React).
Highlights reasons for using modern stacks, including metrics like time to market, scalability, high availability, and the advantages of REST API architecture.
Details on the MEAN stack, comprising MongoDB, Express, Angular, and Node.js, with emphasis on REST API functionalities.
Introduction to the MERN stack, highlighting React, and showing practical JSON structures used in applications.
Provides links to tutorials and GitHub repositories related to MEAN and MERN stacks for enhanced learning.
Describes Node.js as a runtime environment for JavaScript, focusing on its asynchronous features and npm integration.
Explains Express as a backend framework, detailing routing, view rendering, and how to structure API responses.
Defines the concepts of REST APIs, explaining client-server interactions via HTTP methods for data management.
Discusses Angular 2 features like reactive app components, data flow, and primary boilerplate files for app development.
Covers ReactJS as a frontend framework, detailing data flow, component lifecycle, and nuances of handling states.
Highlights differences and similarities between Angular and ReactJS in managing app states and UI components.
Brief insights into various REST API client applications in different contexts, including IFTTT and Apple devices.
Emphasizes the advantage of modern stacks that allow developers to concentrate on unique features instead of routine coding tasks.
Reiterates the useful links for tutorials and code repositories on MEAN and MERN stacks for further exploration.
#MDBE17 Express •Runs backend (JS)application •Node.js module •Terms: ‒ route: relative path to a part of the application ‒ view: templates from which HTML pages are rendered ‒ view engine: middleware to render views •2 Extremes: ‒ Render entire page in Express ‒ Provide nothing but a REST API to access resources
22.
#MDBE17 Express routes app.js: var pop= require('./routes/pop'); app.use('/pop', pop); routes/pop.js router.get('/ip', function(req, res, next) { // Sends a response with the IP address of // the server running this service. res.json({"ip": publicIP}); });
#MDBE17 REST API •REpresentational StateTransfer •It's how clients talk to app backends •It's how services talk to services •HTTP(S) •METHOD conventions: ‒ GET: Fetches data ‒ POST: Adds new data ‒ PUT: Updates data ‒ DELETE: Removes data
#MDBE17 ReactJS •Reactive application frontend •JSX ‒babel ‒ Build optimized package for production •Components & Services •Data flows down & events back up •Boilerplate files (fewer than Angular) •Mobile Apps: ‒ React Native
37.
#MDBE17 • Components inherit dataas properties • Components store own data to be rendered as state ‒ setState() • Handler functions passed down to signal changes back to parent Component data flow
#MDBE17 • Developers spendless time on plumbing code • Developers focus more on high- value code that differentiates the experience delivered by their app.