Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

MEAN Web Development - Second Edition
MEAN Web Development - Second Edition
MEAN Web Development - Second Edition
Ebook779 pages8 hours

MEAN Web Development - Second Edition

Rating: 0 out of 5 stars

()

Read preview

About this ebook

If you are a JavaScript developer who is interested in building modern web applications using MongoDB, Express, Angular 2, and Node 5.0, then this book is for you. You only need knowledge of JavaScript development.
LanguageEnglish
Release dateNov 30, 2016
ISBN9781785883675
MEAN Web Development - Second Edition

Read more from Amos Q. Haviv

Related to MEAN Web Development - Second Edition

Related ebooks

Internet & Web For You

View More

Related articles

Reviews for MEAN Web Development - Second Edition

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    MEAN Web Development - Second Edition - Amos Q. Haviv

    problem.

    Chapter 1. Introduction to MEAN

    The MEAN stack is a powerful, full-stack JavaScript solution that comprises four major building blocks: MongoDB as the database, Express as the web server framework, Angular as the web client framework, and Node.js as the server platform. These building blocks are being developed by different teams, and involve a substantial community of developers and advocates pushing forward the development and documentation of each component. The main strength of the stack lies in its centralization of JavaScript as the main programming language. However, the problem of connecting these tools together can lay the foundation for scaling and architecture issues, which can dramatically affect your development process.

    In this book, I will try to present the best practices and known issues of building a MEAN application, but before you begin with actual MEAN development, you will first need to set up your environment. This chapter will cover a bit of a programming overview, but mostly present the proper ways of installing the basic perquisites of a MEAN application. By the end of this chapter, you'll learn how to install and configure MongoDB and Node.js on all the common operating systems and how to use NPM. In this chapter, we will cover the following topics:

    Introduction to the MEAN stack architecture

    Installing and running MongoDB on Windows, Linux, and Mac OS X

    Installing and running Node.js on Windows, Linux, and Mac OS X

    Introduction to npm and how to use it to install Node modules

    Three-tier web application development

    Most web applications are built in a three-tier architecture that consists of three important layers: data, logic, and presentation. In web applications, the application structure usually breaks down to database, server, and client, while in modern web development, it can also be broken into database, server logic, client logic, and client UI.

    A popular paradigm for implementing this model is the Model-View-Controller (MVC) architectural pattern. In the MVC paradigm, the logic, data, and visualization are separated into three types of object, each handling its own tasks. The View handles the visual part, taking care of user interaction. The Controller responds to system and user events, commanding the Model and View to change appropriately. The Model handles data manipulation, responding to requests for information or changing its state according to the Controller's instructions. A simple visual representation of the MVC architecture is shown in the following diagram:

    Common MVC architecture communication

    In the 25 years of web development, many technology stacks became popular for building three-tier web applications. Among those now ubiquitous stacks, you can find the LAMP stack, the .NET stack, and a rich variety of other frameworks and tools. The main problem with these stacks is that each tier demands a knowledge base that usually exceeds the abilities of a single developer, making teams bigger than they should be, less productive, and exposed to unexpected risks.

    The evolution of JavaScript

    JavaScript is an interpreted computer programming language that was built for the Web. First implemented by the Netscape Navigator web browser, it became the programming language that web browsers use to execute client-side logic. In the mid 2000s, the shift from websites to web applications, along with the release of faster browsers, gradually created a community of JavaScript developers writing more complex applications. These developers started creating libraries and tools that shortened development cycles, giving birth to a new generation of even more advanced web applications. They, in turn, created a continuous demand for better browsers. This cycle went on for a few years, where the vendors kept improving their browsers and JavaScript developers kept pushing the

    Enjoying the preview?
    Page 1 of 1