Download the Free Fishpond App!
Download on the App Store

Android App on Google play
Pro Mern Stack: Full Stack Web App Development with Mongo, Express, React, and Node

Already own it?

Sell Yours
Home » Books » Computers » Programming » Object Oriented

Pro Mern Stack

Full Stack Web App Development with Mongo, Express, React, and Node

By Vasan Subramanian

Elsewhere $67.60 $47.19   Save $20.41 (30%)
Free shipping Australia wide
Ships from UK
Order Now for Christmas with e-Gift
Rating:
 
Register or sign-in to rate and get recommendations.
Format: Paperback, 328 pages
Published In: United States, 01 March 2017
Assemble the complete stack required to build a modern web app using React: MongoDB (a NoSQL database) and Express (a framework for web application servers), which runs on Node (JavaScript on the server side), complement React very nicely. This book will also cover many other tools that go into building a complete web application: React Router, React-Bootstrap, Redux, Babel, and webpack. Though the primary focus of Pro MERN Stack is to equip you with all that is required to build a full-fledged web application, a large portion of the book will be devoted to React. The popular MEAN (MongoDB, Express, AngularJS, Node) stack introduced Single Page Apps (SPAs) and front-end Model-View-Controller (MVC) as new and efficient paradigms. But it has its shortcomings such as lack of support for SEO friendly server-side rendering and being too prescriptive by being a framework. Facebook's React is a technology that competes indirectly with AngularJS. It is not a full-fledged MVC framework. It is a JavaScript library for building user interfaces (in some sense the View part). Yet, it is possible to build a web app by replacing AngularJS with React - hence the term MERN stack. What You Will Learn * Discover the details of React, the React Way, and how to get the maximum out of this library * See the basics of MongoDB, Express, and Node, enough to build a web app * Work with other tools complementary to React, including React-Bootstrap and React Router * Use the tools required to build JavaScript based SPAs * Tie all the components together to build a complete web app. Who This Book Is For Developers and architects who have prior experience in any web app stack other than the MERN stack will find the book useful to learn about this modern stack. Prior knowledge of JavaScript, HTML, and CSS is required.

Table of Contents

Chapter 1: Why MERNThis is an introductory chapter that discusses the history of React and MERN and why it's suitable for a variety of web apps. One interesting topic that I will be discussing here is why it was created and what problem it tried to solve. This will give great insights into what kind of apps React is most suitable for, and for what kind of apps it will be a misfit.Chapter 2: Intro to React and Hello WorldThis chapter starts with installation of some basic components: Node, npm, Express, Babel and React. Then, the first pieces of code is written, which brings up the customary Hello World app. All the code at this point is in React (ie, no server side coding). I introduce the basics of React in this chapter.Chapter 3: React ComponentsHere, I'll invent the functional requirements of our sample app that we'll use throughout the book. Then, I'll start off the first important concept of React: components and composition. Using this, we'll build the first cut of the sample app - we'll build the UI to show a list of bugs, a placeholder for a filter to control the list and another placeholder which will become a form to add a bug to the list.Chapter 4: Data from ServerIn this chapter, I will describe how data can be served from the server via APIs. I'll introduce Express and describe how to create REST APIs using Express routes. At the end of this chapter, we'll be serving the data from the server instead of hardcoded data on in our app scripts, and using this data to render our components.Chapter 5: Using MongoDB to save the dataHere, we'll take data handling to the next level and introduce MongoDB. We'll explore how to save and retrieve data from a MongoDB database via the Mongo shell, and later, via the MongoDB Driver from our app server.Chapter 6: Build and Bundle using WebpackWhen we have many components, it is good to modularize the app. It also becomes essential when we start using third party libraries. In this chapter, I show how the app can be split into modules. To manage the dependencies and create a single bundle containing all the front-end code, we will use a utility called webpack. At the end of this chapter, we have a complete stack and the required development tools all in place. Further chapters will improve our sample app by adding more features, which require other libraries and/or features of each component of the MERN stack.Chapter 7: Dynamic Components and InteractivityWe'll take Components to the next level in this chapter. I'll cover how to dynamically update components by manipulating state, how to deal with user interaction and finally how to communicate between components. At the end of this chapter, the user will be able to add a record to the list using a form.Chapter 8: Routing using React RouterRouting is the act of switching between sections of the app using a URL that indicates where we are. In a single page app (SPA) a new URL does not translate to a full page request to the server, the DOM is updated by making lightweight ajax calls. React by itself does not mandate any particular routing mechanism, but fortunately there are other libraries that simplify routing for us. In this chapter, we'll introduce React Router and use that to route between different views in the app.Chapter 9: Forms and Component LifecycleHandling user input via forms the React is a little different from the conventional Javascript / jQuery way. In this chapter we'll explore how user input is captured. We'll explore controlled components and uncontrolled components and which is one is appropriate in which situation. We'll now have proper forms acting as input to adding a new bug, editing an existing one, and setting a new filter.Chapter 10: Using React BootstrapReact Bootstrap is an epitome of how to build reusable React components. By using some existing Bootstrap components to give a polished look to our UI, we'll also learn how to build good re-usable components.Chapter 11: ReduxThe Flux architecture simplifies state handling by encapsulating all the state in what's called a Store. Instead of multiple states within each component, the Flux architectural pattern helps us think in terms of a global state. There are many implementations of Flux, we'll choose the Redux implementation and refactor the app.Chapter 12: Session handlingAny web app will need some authentication and perhaps authorization. In this chapter, I'll introduce sessions in Express, and how to connect a session to say, a Google Authentication sign-on. Now, our app will be protected by only those who we can give access. We'll also be able to restrict who can do what kind of operations in the app.Chapter 13: Server side renderingA React based app is not complete till we take advantage of server side rendering. This lets us render entire pages when required, especially for automated search engine bots such as the Google-bot. At the same time, we keep our human users happy by behaving as a single-page app when requests come from a browser.Chapter 14: Concluding remarks and mern-cliWe'll wrap up and re-cap the important concepts of the previous chapters. This is also an opportunity to introduce mern-cli, a quick way to scaffold and start off a new project.

About the Author

Vasan Subramanian has experienced all kinds of programming, from 8-bit, hand-assembled code on an 8085 to AWS Lambda. He not only loves to solve problems using software, but he also looks for the right mix of technology and processes to make a software product team most efficient. He learned software development at companies such as Corel, Wipro, and Barracuda Networks, not just as a programmer but also as a leader of teams at those companies. Vasan studied at IIT Madras and IIM Bangalore. In his current job as CTO at Accel, he mentors startups on all things tech. While not mentoring or coding (or writing books!), Vasan runs half marathons and plays 5-a-side soccer. He can be contacted at vasan.promern@gmail.com for boquets, brickbats, or anything in-between.

EAN: 9781484226520
ISBN: 1484226526
Publisher: Apress
Dimensions: 23.5 x 15.49 x 1.83 centimetres (0.53 kg)
Age Range: 15+ years
Tell a friend

Their Email:

Sell Yours

Already own this item?
Sell Yours and earn some cash. It's fast and free to list! (Learn More.)

Review this Product

BAD GOOD
 

Related Searches

 

Webmasters, Bloggers & Website Owners

You can earn a 5% commission by selling Pro Mern Stack: Full Stack Web App Development with Mongo, Express, React, and Node on your website. It's easy to get started - we will give you example code. After you're set-up, your website can earn you money while you work, play or even sleep!

 

Authors/Publishers

Are you the Author/Publisher? Improve sales by submitting additional information on this title.

 

This item ships from and is sold by Fishpond World Ltd.