Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Building Enterprise JavaScript Applications
Building Enterprise JavaScript Applications

Building Enterprise JavaScript Applications: Learn to build and deploy robust JavaScript applications using Cucumber, Mocha, Jenkins, Docker, and Kubernetes

eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Building Enterprise JavaScript Applications

The State of JavaScript

avaScript has not traditionally been considered a backend language; that space belonged to the likes of Java, Python, C/C++, C#/.NET, PHP, Ruby and so on. JavaScript was just a 'toy language' that allowed web developers to add animation to websites in order to improve its aesthetics. But this all changed with the advent of Node.js. With Node.js, developers can now write JavaScript code that executes on the server, as well as the client. In other words, developers can now write both front and backend code using the same language!

This provides huge productivity benefits, as common code can now be shared across the stack. Furthermore, developers can avoid context switching between different languages, which often breaks concentration and reduces output.

It also led to the rise in Isomorphic, or Universal, JavaScript frameworks, such...

Evolution of the web application

When you type a URL, such as www.example.com, into your browser, what actually happens? First, the browser would send a request to one of Example Corp's servers, which retrieves the resource requested (for example, an HTML file), and sends it back to the client:

The browser then parses the HTML, retrieves all the files the web page depends on, such as CSS, JavaScript, and media files, and renders it onto the page.

The browser consumes flat, one-dimensional texts (HTML, CSS) and parses them into tree-like structures (DOM, CSSOM) before rendering it onto the page.

This scheme is known as the client-server model. In this model, most of the processing is handled server-side; the client's role is limited to simple and superficial uses, such as rendering the page, animating menus and image carousels, and providing event-based...

Benefits of Node.js

JavaScript is the language of the browser. There's no denying that. Next, let's examine the reasons why a developer should pick Node.js as the back-end language for their application. Although there are many reasons, here we've boiled it down to two factors—context switching and shared code.

Context switching

Context switching, or task switching, is when a developer is working on multiple projects, or in different languages, at the same time and has to switch between them regularly.

"Doing more than one task at a time, especially more than one complex task, takes a toll on productivity."                     ...

Summary

In this chapter, we described the evolution of web applications from using the client-server model to SPAs, and how advances in JavaScript engines facilitated this transformation. Then, we discussed the benefits of using JavaScript across the stack, focusing on the topics of context switching and shared code.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create production-grade JavaScript applications from scratch
  • Build microservices and deploy them to a Docker container for scaling applications
  • Test and deploy your code with confidence using Travis CI

Description

With the over-abundance of tools in the JavaScript ecosystem, it's easy to feel lost. Build tools, package managers, loaders, bundlers, linters, compilers, transpilers, typecheckers - how do you make sense of it all? In this book, we will build a simple API and React application from scratch. We begin by setting up our development environment using Git, yarn, Babel, and ESLint. Then, we will use Express, Elasticsearch and JSON Web Tokens (JWTs) to build a stateless API service. For the front-end, we will use React, Redux, and Webpack. A central theme in the book is maintaining code quality. As such, we will enforce a Test-Driven Development (TDD) process using Selenium, Cucumber, Mocha, Sinon, and Istanbul. As we progress through the book, the focus will shift towards automation and infrastructure. You will learn to work with Continuous Integration (CI) servers like Jenkins, deploying services inside Docker containers, and run them on Kubernetes. By following this book, you would gain the skills needed to build robust, production-ready applications.

Who is this book for?

If you're a JavaScript developer looking to expand your skillset and become a senior JavaScript developer by building production-ready web applications, then this book is for you.

What you will learn

  • Practice Test-Driven Development (TDD) throughout the entire book
  • Use Cucumber, Mocha and Selenium to write E2E, integration, unit and UI tests
  • Build stateless APIs using Express and Elasticsearch
  • Document your API using OpenAPI and Swagger
  • Build and bundle front-end applications using React, Redux and Webpack
  • Containerize services using Docker
  • Deploying scalable microservices using Kubernetes
Estimated delivery fee Deliver to Lithuania

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 29, 2018
Length: 764 pages
Edition : 1st
Language : English
ISBN-13 : 9781788477321
Vendor :
Facebook
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Lithuania

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Sep 29, 2018
Length: 764 pages
Edition : 1st
Language : English
ISBN-13 : 9781788477321
Vendor :
Facebook
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 98.97
Building Enterprise JavaScript Applications
€36.99
Modern JavaScript Web Development Cookbook
€36.99
JavaScript and JSON Essentials
€24.99
Total 98.97 Stars icon
Banner background image

Table of Contents

19 Chapters
The Importance of Good Code Chevron down icon Chevron up icon
The State of JavaScript Chevron down icon Chevron up icon
Managing Version History with Git Chevron down icon Chevron up icon
Setting Up Development Tools Chevron down icon Chevron up icon
Writing End-to-End Tests Chevron down icon Chevron up icon
Storing Data in Elasticsearch Chevron down icon Chevron up icon
Modularizing Our Code Chevron down icon Chevron up icon
Writing Unit/Integration Tests Chevron down icon Chevron up icon
Designing Our API Chevron down icon Chevron up icon
Deploying Our Application on a VPS Chevron down icon Chevron up icon
Continuous Integration Chevron down icon Chevron up icon
Security – Authentication and Authorization Chevron down icon Chevron up icon
Documenting Our API Chevron down icon Chevron up icon
Creating UI with React Chevron down icon Chevron up icon
E2E Testing in React Chevron down icon Chevron up icon
Managing States with Redux Chevron down icon Chevron up icon
Migrating to Docker Chevron down icon Chevron up icon
Robust Infrastructure with Kubernetes Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(5 Ratings)
5 star 80%
4 star 0%
3 star 20%
2 star 0%
1 star 0%
D. Finkenzeller Jun 20, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Just finished my first bash script that sets up a test environment and Elasticsearch DB then uses cucumber to run automated tests on my Javascript code that uses babel and express. Never thought I’d say that. To make things a little harder for myself I’m also going through this book on a Mac; hence why I had to write my own bash script instead of using the supplied version. I’m loving the way the author leads you through the topics and it’s mostly making sense. I’ve not done a great deal of Javascript before and only dabbled in TDD using Pester on PowerShell v3, and my grasp of git was poor. But I’m making great headway even managing to understand where I go wrong and recover without too much trouble.
Amazon Verified review Amazon
erick lestrange Dec 25, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
re editado: el temario de deployment es oro puro, y el de docker tiene muy buena pinta, le doy 5 estrellas porque aunque el repositorio sea un asco, el libro me ha enseñado muchas cosas que no tenia ni idea de como funcionaban como nginx, los pasos que sigue un registro de dominio hasta la ip etc... y eso que vengo de otros idiomases una idea estupenda de libro y aprendes bastante aunque super leeeento en tests y errores pero bueno eso es asi y punto. el problema es que el github es una chapuza horrible, los codigos estan incompletos, el autor ni se pasa a mirar los commits, hay solo unos pocos temas que ni siquiera estan bien numerados etc...hay otras cosas que son malas pero que ya estoy acostumbrado de los libros de packt como por ejemplo que el vocabulario del final del libro sea totalmente inexistente etc
Amazon Verified review Amazon
Just Some Guy Mar 15, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great book, much better than I expected. TL;DR – It's a ~700 page tutorial which will use your existing JS dev skills to teach you everything you really need to properly build and deploy a simple app to Kubernetes.First off, there are prerequisites you really must already know: JavaScript (ES6) and Linux + Shell Scripting (i.e. bash). The book does nothing to explain those, at all, so if you don't already understand them you'll be lost and it'll be really hard to get very far.The author also does only quick intro overviews of the essential JS libraries you'll need – Node, Express, React, Redux – so don't read this to learn those. You'd best have at least a basic understanding of all before you approach this book (his intros aren't bad, they're just not nearly enough).NOTE: I read this in 2022, and so Node 8 and React 16 are already ancient, but that's not really a problem - since those libs aren't actually the emphasis of this book. Here's why...If you have those foundational technologies covered and are ready for more, this book is basically a really long, detailed tutorial. It starts from scratch and builds a basic full-stack app, from start to finish. The app itself is laughably simple, but learning app design patterns is NOT the point of this book. This book is about connecting all the operational pieces a developer needs to create and deploy an app, end-to-end.The author promotes and explains a nice Test-Driven Development workflow (TDD) using Cucumber, Mocha, etc. - helps you get a minimal Elasticsearch database up and running, then pretty much skims over using Node and Express to write a simple API server. None of that is particularly unique to this book (most tutorial books cover those things).Where I think this book shines is that it then does a nice job explaining a bunch of other real-world operational stuff that is required to deploy an app, but isn't strictly about writing code, including:- A pretty good intro to basic Continuous Integration (CI), using both Travis, and then Jenkins- Documenting your API, and making that doc public using OpenAPI and Swagger- Configuring the DNS records to get your domain live on a public web host- Implementing JWT-based Authentication from scratch in Node (not just using some 3rd party auth lib)At every step he includes solid code examples with detailed explanations, and explains various pro/con tradeoffs and gotchas to watch out for (super helpful real-world production tips). He also continuously refactors the TDD test-suite along the way. The bash and package.json scripts he includes are also actually much better than most similar tutorials I've read, so I'm gonna call them out again.He does a pretty fast overview of React and Redux, so you should probably be comfortable with those before approaching this book. He does, however, do a nice job of explaining how to run automated UI tests via Selenium, which is more than most generalist JS books cover.Where this book delivers the most surprising value, imho, is his explanation of Docker and Kubernetes. Those are massive topics, and you should definitely read dedicated books on each if you want to really learn them. But I've read a ton on each, and this book does a much better job than most non-dedicated books I've read at introducing each technology (how it works, why it's important, etc.), as well as how to integrate it into your production stack and deploy an app to a real hosted K8s cluster. Of particular note - the author explains how to set up an Elasticsearch _cluster_ in k8s using a StatefulSet and persistent storage - which is a fairly complex topic which many dedicated k8s books don't even cover, so bravo for that!One final note - although the book is over 700 pages long it does include just tons of screenshots and in-line code samples (all actually useful and nicely formatted, etc.), so it comes down to more like ~450 pages of actual reading. It's a lot to take in, but I was able to breeze through it much faster than I expected.SO - it's now a few years old, but to my surprise and relief, the value of this book definitely still holds up and is worth the ticket price. I give it 5 stars! :-)
Amazon Verified review Amazon
Einar Mar 21, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is packed with useful information on pretty much every aspect of developing a full stack javascript application from start to finish. There's no fluff, just very valuable and thoughtful content on every page written in a very readable style.I'd say it's not for beginners. Rather it's for someone who has gotten his hands dirty with web development or has just graduated CS or something like that and now wants to get to know the tools and best practices.Although I just read it I am already going back to some pages for reference when developing software.Highly recommend.
Amazon Verified review Amazon
Amazon Customer Aug 17, 2019
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
As a novice self-taught programmer, I really appreciate this type of breadth-first book that offers brief coverage of many different tools, jargons, tips and a sneak peek into current practices adopted by professional web developers. With that being said, the kindle version has some annoying formatting issues, and I find it rather deceiving that the free sample didn't have the same issues as the full version.I am currently reading this title on my kindle for Mac on my 13 in MacBook Pro, and unlike in the free sample, the full version starts every section heading on the top left when read in a two-column view, instead of seamlessly following a section that finishes midway through the page with the next one to fill the page. This leads to pages where a very short section only displays on the left column, leaving the right column entirely blank, or sometimes such short sections are split across columns on either side, awkwardly leaving the bottom half-or-so portions on either column blank. This really gets in the way as I try to read through the book. This formatting problem is compounded by the book's plentiful use of subheadings, as even very small subheadings with only a sentence right beneath it displays on its own and takes up the entire page. I really hope they fix the formatting issue as the content of the book seems really valuable for certain cohorts of people.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela