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
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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

Billing Address

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

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 : 9781788472913
Vendor :
Facebook
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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

Billing Address

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 130.97
Building Enterprise JavaScript Applications
$48.99
Modern JavaScript Web Development Cookbook
$48.99
JavaScript and JSON Essentials
$32.99
Total $ 130.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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.