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
Hands-On Full Stack Web Development with Angular 6 and Laravel 5
Hands-On Full Stack Web Development with Angular 6 and Laravel 5

Hands-On Full Stack Web Development with Angular 6 and Laravel 5: Become fluent in both frontend and backend web development with Docker, Angular and Laravel

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

Hands-On Full Stack Web Development with Angular 6 and Laravel 5

The Benefits of TypeScript

TypeScript enables you to write JavaScript code. It includes static typing and other features that are very common in object-oriented languages. In addition, with TypeScript, you can use all of the features of ECMAScript 6, because the compiler converts them into readable code for the current browser.

One of the features of TypeScript is that users can create typed variables, like it is done in Java or C# (for example, const VARIABLE_NAME: Type = Value), Not only that, but TypeScript helps us to write clean, well-organized code. That is one of the reasons why the Angular team adopted TypeScript for the current version of the framework.

Before we begin, let's look at what the official TypeScript documentation states:

"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
Any browser. Any host."

In this chapter...

Installing TypeScript

It's pretty simple to install and get started with TypeScript. It is necessary to have Node.js and Node Package Manager (NPM) installed on your machine.

If you don't have them yet, go to https://nodejs.org/en/download/ and follow the step-by-step installation instructions for your platform.

Let's install TypeScript, as follows:

  1. Open your Terminal and type the following command to install the TypeScript compiler:
npm install -g typescript

Note that the -g flag means to install the compiler on your machine globally.

  1. Let's check the available TypeScript commands. Type the following command in the Terminal:
tsc --help

The preceding command will provide a lot of information about the TypeScript compiler; we will see a simple example of how we can transpile a TypeScript file to a JavaScript file.

Examples:

tsc hello.ts
tsc --outFile file...

Writing JavaScript code with static types

The first thing that you'll notice when working with TypeScript are its static types, in addition to all of the JavaScript types, indicated on the following table:

Primitives Objects
String Function
Number Array
Null Prototypes
Undefined
Boolean
Symbol

This means that you can declare the types of variables; it's pretty simple to assign a type to a variable. Let's look at some examples, using JavaScript types only:


function Myband () {
let band: string;
let active: boolean;
let numberOfAlbuns: number;
}

With TypeScript, we have a few more types, as we'll see in the following sections.

Creating a tuple

A tuple is like an organized typed array...

Understanding interfaces, classes, and generics in TypeScript

Object-Oriented Programming (OOP) is a very old programming concept, used in languages such as Java, C#, and many others.

One of the advantages of using TypeScript is being able to bring some of these concepts into your JavaScript web applications. In addition to being able to use classes, interfaces, and more, we can easily extend import classes and import modules, as we will see in the coming examples.

We know that using classes in pure JavaScript is already an option, with the use of ECMAScript 5. Although it is similar, there are some differences; we will not address them in this chapter, so that we do not confuse our readers. We will only focus on the implementations adopted in TypeScript.

Creating a class

...

Working with modules

Modules are very important when developing large-scale applications with TypeScript. They allow us to import and export code, classes, interfaces, variables, and functions. These functions are extremely common in applications with Angular.

However, they can only be accomplished by using a library, which could be Require.js for the browser, or Common.js for Node.js.

In the following sections, we will illustrate how we can use these features in practice.

Using the class export feature

Any declaration can be exported, as we mentioned previously; to do so, we just need to add the export keyword. In the following example, we will export the band class.

In your text editor, create a file called export.ts, and...

Summary

In this chapter, you saw the basic principles of TypeScript. We merely scratched the surface, but we provided you with a solid base for handling Angular applications using TypeScript.

Throughout the course of this book, we will enhance your understanding as we advance with the creation of a web application.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore the latest features of Angular and Laravel to build applications that are powerful, consistent, and maintainable
  • Develop modern user interfaces with a reusable component-based architecture using Angular 6 and Bootstrap 4
  • Learn how to build secure backend APIs with Laravel

Description

Angular, considered as one of the most popular and powerful frontend frameworks, has undergone a major overhaul to embrace emerging web technologies so that developers can build cutting-edge web applications. This book gives you practical knowledge of building modern full-stack web apps from scratch using Angular with a Laravel Restful back end. The book begins with a thorough introduction to Laravel and Angular and its core concepts like custom errors messages, components, routers, and Angular-cli, with each concept being explained first, and then put into practice in the case-study project. With the basics covered, you will learn how sophisticated UI features can be added using NgBootstrao and a component-based architecture. You will learn to extend and customize variables from Bootstrap CSS framework. You will learn how to create secure web application with Angular and Laravel using token based authentication. Finally, you will learn all about progressive web applications and build and deploy a complete fullstack application using Docker and Docker-compose. By the end of this book, you'll gain a solid understanding of Angular 6 and how it interacts with a Laravel 5.x backend

Who is this book for?

This book targets developers who are new to Angular, Laravel, or both, and are seeking a practical, best-practice approach to development with these technologies. They must have some knowledge of HTML, CSS and JavaScript. Familiarity of PHP is assumed to get the most from this book.

What you will learn

  • Explore the core features of Angular 6 to create sophisticated user interfaces
  • Use Laravel 5 to its full extent to create a versatile backend layer based on RESTful APIs
  • Configure a web application in order to accept user-defined data and persist it into the database using server-side APIs
  • Build an off-line-first application using service-worker and manifest file
  • Deal with token based authentication on single page application (SPA).
  • Secure your application against threats and vulnerabilities in a time efficient way
  • Deploy using Docker and Docker-compose

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 31, 2018
Length: 420 pages
Edition : 1st
Language : English
ISBN-13 : 9781788836647
Vendor :
Google
Languages :
Tools :

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 : Jul 31, 2018
Length: 420 pages
Edition : 1st
Language : English
ISBN-13 : 9781788836647
Vendor :
Google
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 $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 $ 141.97
Hands-On Full Stack Development with Go
$43.99
Hands-On Full Stack Development with Spring Boot 2.0  and React
$48.99
Hands-On Full Stack Web Development with Angular 6 and Laravel 5
$48.99
Total $ 141.97 Stars icon
Banner background image

Table of Contents

12 Chapters
Understanding the Core Concepts of Laravel 5 Chevron down icon Chevron up icon
The Benefits of TypeScript Chevron down icon Chevron up icon
Understanding the Core Concepts of Angular 6 Chevron down icon Chevron up icon
Building the Baseline Backend Application Chevron down icon Chevron up icon
Creating a RESTful API Using Laravel - Part 1 Chevron down icon Chevron up icon
Creating a RESTful API Using Laravel - Part 2 Chevron down icon Chevron up icon
Progressive Web Applications with the Angular CLI Chevron down icon Chevron up icon
Dealing with the Angular Router and Components Chevron down icon Chevron up icon
Creating Services and User Authentication Chevron down icon Chevron up icon
Frontend Views with Bootstrap 4 and NgBootstrap Chevron down icon Chevron up icon
Building and Deploying Angular Tests 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 Empty star icon Empty star icon 3
(3 Ratings)
5 star 33.3%
4 star 0%
3 star 33.3%
2 star 0%
1 star 33.3%
Shlomi Asaf Oct 26, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm an experienced angular developer and I have been searching for a book that will help me to make the step for the full-stack world. I know NG but docker and PHP were not my sting side till now.Have read several but this one really did the trick for me. The writer guides you in a friendly and warm language., which makes the reading experience light and fun.
Amazon Verified review Amazon
Cristopher Barrientos Matamala Nov 08, 2020
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
El libro tiene muchos errores en el código, escribir el código a partir del libro resulta en muchos errores de compilación, porque muchas veces la ruta no es correcta, archivos aparecen con un nombre y luego aparece con otro nombre mas adelante, etc, sin el código fuente es imposible compilar correctamente el código a partir del libro.Para alguien con poca experiencia en ambos frameworks es difícil de seguir.Pero a pesar de todos lo mencionado anteriormente, cumple con el propósito de entregar las herramientas y el conocimiento para crear una app web en ambos frameworks.Lo que mas valoro del libro es los tips de buenas prácticas para realizar en ambientes productivos, además de mostrar como levantar la aplicación en ambiente develop y productivo. Me hubiera gustado que tuviera una sección de unit test en Laravel.
Amazon Verified review Amazon
superuser Jan 19, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
at some point, the text narrows to 1 character per line, centered. looked around the web and found hundreds of sources of this book available for free. buyers remorse.
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.