Book Image

MEAN Blueprints

By : Robert Onodi
Book Image

MEAN Blueprints

By: Robert Onodi

Overview of this book

The MEAN stack is a combination of the most popular web development frameworks available—MongoDB, Angular, Express, and Node.js used together to offer a powerful and comprehensive full stack web development solution. It is the modern day web dev alternative to the old LAMP stack. It works by allowing AngularJS to handle the front end, and selecting Mongo, Express, and Node to handle the back-end development, which makes increasing sense to forward-thinking web developers. The MEAN stack is great if you want to prototype complex web applications. This book will enable you to build a better foundation for your AngularJS apps. Each chapter covers a complete, single, advanced end-to-end project. You’ll learn how to build complex real-life applications with the MEAN stack and few more advanced projects. You will become familiar with WebSockets and build real-time web applications, as well as create auto-destructing entities. Later, we will combine server-side rendering techniques with a single page application approach. You’ll build a fun project and see how to work with monetary data in Mongo. You will also find out how to a build real-time e-commerce application. By the end of this book, you will be a lot more confident in developing real-time, complex web applications using the MEAN stack.
Table of Contents (13 chapters)
MEAN Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Implementing the Angular client application


We have reached the point in our project at which we will start integrating the AngularJS application. This chapter will take a different approach at building the desired application. An ideal application should be structured in a modular way, each module addressing a specific functionality.

You are probably already familiar with the component-based approach when building Angular apps. What this means is that we will create small modules that encapsulate specific functionalities. This enables us to add functionality incrementally; imagine adding vertical blocks onto the application.

For this to work, we need to create a main block that glues everything together, pulling all features and modules together. Keep your main app module thin and move the rest of the logic to application modules.

One rule that I like to follow is to keep my folder structure as flat as possible. I always try to reduce the level of the folders so that I can locate code and...