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
AU$14.99 AU$53.99
Paperback
AU$67.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $24.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

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 : 9781788833912
Vendor :
Google
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $24.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 : Jul 31, 2018
Length: 420 pages
Edition : 1st
Language : English
ISBN-13 : 9781788833912
Vendor :
Google
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.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
AU$249.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 AU$5 each
Feature tick icon Exclusive print discounts
AU$349.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 AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 196.97
Hands-On Full Stack Development with Go
AU$60.99
Hands-On Full Stack Development with Spring Boot 2.0  and React
AU$67.99
Hands-On Full Stack Web Development with Angular 6 and Laravel 5
AU$67.99
Total AU$ 196.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

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.