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
JavaScript from Frontend to Backend
JavaScript from Frontend to Backend

JavaScript from Frontend to Backend: Learn full stack JavaScript development using the MEVN stack with quick and easy steps

Arrow left icon
Profile Icon Eric Sarrion
Arrow right icon
Can$32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (11 Ratings)
Paperback Jul 2022 336 pages 1st Edition
eBook
Can$12.99 Can$26.99
Paperback
Can$32.99
Subscription
Free Trial
Arrow left icon
Profile Icon Eric Sarrion
Arrow right icon
Can$32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (11 Ratings)
Paperback Jul 2022 336 pages 1st Edition
eBook
Can$12.99 Can$26.99
Paperback
Can$32.99
Subscription
Free Trial
eBook
Can$12.99 Can$26.99
Paperback
Can$32.99
Subscription
Free Trial

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
Product feature icon AI Assistant (beta) to help accelerate your learning
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

JavaScript from Frontend to Backend

Chapter 1: Exploring the Core Concepts of JavaScript

The JavaScript language was created (in the mid-1990s) to be executed in internet browsers, in order to make websites more fluid. It was originally used to control what was entered into input forms. For example, it was used to do the following:

  • Allow the entry of numeric characters in a field – and only numeric ones. Other characters, for example, letters, had to be rejected in this case. This made it possible, thanks to the JavaScript language included in the browser, not to validate the entry of the form and avoid sending data to the server, which would have indicated an entry error in this case.
  • Check that the mandatory fields of the form were all entered, by checking all the fields before sending the form fields to the server.

These two examples (among many others) show that it is desirable to have a language that checks the validity of the data entered by the user before sending this data to the server. This avoids data transfers from the browser to the server, in the event that the data entered is not correct. For more complex checks, such as checking that two people do not have the same identifier, this can continue to be done on the server because it has access to all existing identifiers.

The goal was, therefore, at the beginning of JavaScript, to have the browser check as many things as possible and then transmit the information entered to the server in order to process it.

For this, an internal browser language was created: the JavaScript language, whose name contained a very popular word at the time – “Java” (even though the two languages Java and JavaScript had nothing to do with each other).

Over the years, developers have had the idea of also associating it with the server side, to use the same language on the client side and on the server side. This allowed the creation of the Node.js server, which is widely used today.

Whether client-side or server-side, the JavaScript language uses a basic syntax that allows you to write your own programs. This is what we are going to discover in this chapter.

In this chapter, we will cover the following topics:

  • Types of variables used in JavaScript
  • Running a JavaScript program
  • Declaring variables in JavaScript
  • Writing conditions for conditional tests
  • Creating processing loops
  • Using functions

Technical requirements

To develop in JavaScript, and write and then run the programs in this book, you will need the following:

  • A text editor for computer programs, for example, Notepad++, Sublime Text, EditPlus, or Visual Studio.
  • An internet browser, for example, Chrome, Firefox, Safari, or Edge.
  • A PHP server, for example, XAMPP or WampServer. The PHP server will be used to execute JavaScript programs containing import statements in HTML pages because these import statements only work on an HTTP server.
  • A Node.js server: The Node.js server will be created through Node.js installation. We will also install and use the MongoDB database to associate the Node.js server with a database.
  • You can find the code files for this chapter on GitHub at: https://github.com/PacktPublishing/JavaScript-from-Frontend-to-Backend/blob/main/Chapter%201.zip.

Let’s now begin our discovery of JavaScript, by studying the different types of variables it offers us.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Get up and running with JavaScript, the most popular web development language in the world
  • Cut through the complexity and focus on the simple aspects of web development
  • Build a simple web application using Vue.js, Node.js, and MongoDB

Description

JavaScript, the most widely used programming language in the world, has numerous libraries and modules and a dizzying array of need-to-know topics. Picking a starting point can be difficult. Enter JavaScript from Frontend to Backend. This concise, practical guide will get you up to speed in next to no time. This book begins with the basics of variables and objects in JavaScript and then moves quickly on to building components on the client-side with Vue.js and a simple list management application. After that, the focus shifts to the server-side and Node.js, where you’ll examine the MVC model and explore the Express module. Once you've got to grips with the server-side and the client-side, the only thing that remains is the database. You’ll discover MongoDB and the Mongoose module. In the final chapter of this fast-paced guide, you'll combine all these pieces to integrate a Vue.js application into a Node.js server, using Express to structure the server code and MongoDB to store the information. By the end of this book, you will have the skills and confidence to successfully implement JavaScript concepts in your own projects and begin your career as a JavaScript developer.

Who is this book for?

This book is for JavaScript developers looking to strengthen their core JavaScript concepts and implement them in building full stack apps. Prior knowledge of HTML and CSS is a must.

What you will learn

  • Trigger deferred processing with JavaScript
  • Implement Express and MongoDB with Node.js
  • Build components with Vue.js
  • Understand how to create and use modules with Node.js
  • Familiarize yourself with npm
  • Build a client-side application entirely with JavaScript
  • Dive into full stack development with Vue.js, Node.js, and MongoDB
Estimated delivery fee Deliver to Canada

Economy delivery 10 - 13 business days

Can$24.95

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 06, 2022
Length: 336 pages
Edition : 1st
Language : English
ISBN-13 : 9781801070317
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
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Canada

Economy delivery 10 - 13 business days

Can$24.95

Product Details

Publication date : Jul 06, 2022
Length: 336 pages
Edition : 1st
Language : English
ISBN-13 : 9781801070317
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$ 140.97
Responsive Web Design with HTML5 and CSS
Can$56.99
JavaScript from Frontend to Backend
Can$32.99
JavaScript from Beginner to Professional
Can$50.99
Total Can$ 140.97 Stars icon
Banner background image

Table of Contents

13 Chapters
Part 1: JavaScript Syntax Chevron down icon Chevron up icon
Chapter 1: Exploring the Core Concepts of JavaScript Chevron down icon Chevron up icon
Chapter 2: Exploring the Advanced Concepts of JavaScript Chevron down icon Chevron up icon
Part 2: JavaScript on the Client-Side Chevron down icon Chevron up icon
Chapter 3: Getting Started with Vue.js Chevron down icon Chevron up icon
Chapter 4: Advanced Concepts of Vue.js Chevron down icon Chevron up icon
Chapter 5: Managing a List with Vue.js Chevron down icon Chevron up icon
Part 3: JavaScript on the Server-Side Chevron down icon Chevron up icon
Chapter 6: Creating and Using Node.js Modules Chevron down icon Chevron up icon
Chapter 7: Using Express with Node.js Chevron down icon Chevron up icon
Chapter 8: Using MongoDB with Node.js Chevron down icon Chevron up icon
Chapter 9: Integrating Vue.js with Node.js Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(11 Ratings)
5 star 54.5%
4 star 36.4%
3 star 0%
2 star 0%
1 star 9.1%
Filter icon Filter
Top Reviews

Filter reviews by




Marco Rapaccini Sep 12, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a practical door to the giant world of JavaScript.I have almost 6 years of experience working with JavaScript, the programming language that you must know to understand what 'runs' behind a browser.But JavaScript is no more relegated to the browser: it spreaded across the server side, helping backend developers to build APIs, software engines and other amazing stuff just using one language.It doesn't mean that JavaScript is the right answer to everything, but it means that reading a book like this you can get a good idea of what you can and cannot build with it.Personnaly, I never worked enough with Vue.js and I found Eric's introduction easy to follow, so that junior, middle and senior developers can understand clearly how to use Vue.js on a client side project.What is more interesting is that I am going to implement soon into a new work project the concepts that I refreshed or learned in this book, especially the MongoDB part.You can do great things with JavaScript, so this book will be the perfect companion for your infinite journey across the seven seas of code.
Amazon Verified review Amazon
Rafi Dudekula Sep 17, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Disclaimer: I have been given a free copy by Packt. This is a good book, for those developers who are new to JavaScript & quickly want to get up to speed on developing complete interactive/reactive applications. First, you will learn the concepts of JavaScript, then Vue.js is introduced with simple yet realistic examples, then Node.js is covered, and finally, CRUD functionality with MongoDB is explained with examples.As an experienced developer, I found the book useful in terms of reviewing fundamentals from frontend to backend in a relatively short time.
Amazon Verified review Amazon
Verified Purchase Feb 26, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good from front to back.
Amazon Verified review Amazon
Mark Meyer Oct 19, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
So far, I am very happy with this book! Its explanation of VUE in chapter 3 is really good, much better than some others I've waded through. And I typed in the code and it works.The JavaScript chapters (1 and 2) are good for those who are very new to JS or don't know the latest stuff.I'm really hoping that the Node.js part, and how to call Node up from VUE, will be good because that's what I really need. I need to know how to use VUE + Node in a complete system, but not be so overly complicated. Here's hoping!
Amazon Verified review Amazon
Butchy Brannan Jul 11, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a great introduction if you would like to get acquainted with Vuejs, Nodejs with Express, and MongoDB as the database. The book shows you how to use Vue with regards to communication between components, using attributes in components, how to manage the events within the project, and managing the project list.This book touches on the fundamentals but is more focused on learning as you the reader codes along to make the project. Before the project starts the book dedicates the first two chapters to exploring the core concepts of JavaScript. The book definitely should be paired with a JavaScript fundamentals book for better clarity.
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