📜 ⬆️ ⬇️

The book "Web development using Node and Express. Full use of JavaScript stack »

image JavaScript is the most popular client scripting language. This is a fundamental technology for creating all sorts of animations and transitions. It is almost impossible to do without JavaScript if you want to achieve modern functionality on the client side. The only problem with javascript is that it does not forgive awkward programming. The Node Ecosystem helps to significantly improve the quality of applications — it provides frameworks, libraries, and utilities that speed development and encourage good code writing.

This book is intended for programmers who want to create web applications (regular sites that embody REST application programming interfaces or something in between) using JavaScript, Node and Express. To read the book, you do not need experience with Node, but you need at least a little experience with JavaScript.

Who is this book for?


Of course, this book is intended for programmers who want to create web applications (regular websites that embody REST application programming interfaces or something in between) using JavaScript, Node and Express. One of the great aspects of developing for the Node platform is bringing in a completely new circle of programmers. The availability and flexibility of JavaScript have attracted self-taught programmers from around the world. In the history of computing, programming has never been more accessible. The quantity and quality of online resources for learning programming (and getting help in case of problems) is shocking and inspiring. So I invite you to become one of these new (possibly self-taught) programmers.

In addition, of course, there are programmers like me who have been working in this field for a long time. Like many programmers of my time, I started with assembly language and BASIC, and then I dealt with Pascal, C ++, Perl, Java, PHP, Ruby, C, C # and JavaScript. At university, I also encountered programming languages ​​of a more narrow application, such as ML, LISP, and PROLOG. Many of these languages ​​are close and dear to my heart, but none of them seems to me so promising as JavaScript. So I am writing this book for programmers like myself, with a wealth of experience and perhaps a more philosophical view of certain technologies.
')
Node experience is required, but at least a little experience with JavaScript is required. If you are new to programming, I recommend you Codecademy . If you are an experienced programmer, I recommend Douglas Crockford’s book JavaScript: Strengths . The examples in this book can be used with any operating system on which Node runs, including Windows, OS X, and Linux. The examples are designed to work with the command line (terminal), so you will need at least some knowledge of the command line of your system.

How this book is arranged


Chapters 1 and 2 will introduce you to Node and Express, as well as the tools that you will use while reading this book. In Chapters 3 and 4, you will begin to use Express and build the framework for the training site used as an example in the rest of the book.

Chapter 5 discusses testing and quality control, and Chapter 6 covers some of the most important structural components of Node, as well as their expansion and use in Express. Chapter 7 describes templating (using the semantic system of web templates Handlebars), laying the foundation for the practical construction of sites using Express. Chapters 8 and 9 cover cookies, sessions, and form handlers, outlining a range of topics that you will need to know in order to build sites with basic functionality using Express.

Chapter 10 explores middleware — the central concept of Connect (one of the main components of Express).

Chapter 11 explains how to use middleware to send emails from a server, and discusses message templates and email-related security issues.

Chapter 12 provides a preliminary overview of commissioning issues. Although at this stage of the book you still do not have all the information necessary to create a site ready for operation, thinking about commissioning now will relieve you of many problems in the future.

Chapter 13 discusses data storage with a focus on MongoDB (one of the main document-oriented databases).

Chapter 14 goes into the details of Express routing (how URLs are matched with content), and Chapter 15 is rejected for discussion of writing an API using Express. Chapter 16 covers the details of serving static content with a focus on maximizing performance. Chapter 17 describes the popular paradigm "model - view - controller" (model - view - controll, MVC) and its correspondence Express.

Chapter 18 discusses security: how to build authentication and authorization into your application (with a focus on using a third-party authentication provider), as well as organizing access to your site via HTTPS.

Chapter 19 explains how to integrate with third-party services. Examples include the social network Twitter, the Google map maps service and the Weather Underground weather service.

Chapters 20 and 21 prepare you for the important point: launching your site. They cover debugging, so that you can get rid of any flaws before starting, and the startup process. Chapter 22 tells about the next important stage - accompaniment.

Chapter 23 concludes the book, which lists additional sources of information in case you want to continue exploring Node and Express, as well as places where you can get help and advice.

Training site


Beginning with Chapter 3, a single example will be used throughout the book - the site of the travel agency Meadowlark Travel. Since I just returned from a trip to Lisbon, my mind was traveling, and the site I chose as an example is for a fictional travel company from my home state of Oregon (western meadowlark - a western meadow troupial - is a symbol of Oregon) . Meadowlark Travel connects travelers with local amateur guides and collaborates with firms renting bicycles and scooters and offering tours of the area. In addition, a database of local attractions is maintained, including historical information and services that take into account the user's location.

Like any case study, Meadowlark Travel is fictional, but it’s an example that covers many of the problems that real sites face: integration of third-party components, geolocation, e-commerce, and security.

Since the focus of this book is the server-side infrastructure, the training site will not be complete — it just serves as a fictional example of a real site in order to give examples fullness and provide the required context. You are probably working on your own website and can use the example of the Meadowlark Travel website as a template for it.

about the author


Ethan Brown is a senior software developer at Pop Art, a marketing agency based in Portland. He is responsible for the architecture and implementation of websites and web services for clients, ranging from small businesses to international corporations. He has more than 20 years of programming experience, and he believes that the JavaScript stack is the web platform of the future.

More information about the book can be found on the publisher's website.
Table of contents
Excerpt

For Habrozhiteley 25% discount coupon - Web

Source: https://habr.com/ru/post/308316/


All Articles