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 now! 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
Conferences
Free Learning
Arrow right icon
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
Can$34.98 Can$49.99
Paperback
Can$61.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781788477321
Vendor :
Facebook
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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
$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 Can$6 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 Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 165.97
JavaScript and JSON Essentials
Can$41.99
Modern JavaScript Web Development Cookbook
Can$61.99
Building Enterprise JavaScript Applications
Can$61.99
Total Can$ 165.97 Stars icon

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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.