How Angular 8 Can Improve Your Customers’ Website Experience

Maximilian Schwarzmüller

Udemy for Business Instructor

June 27, 2019

Angular 8 helps developers create better and more efficient website experiences—efficiencies you’ve likely already experienced in the web apps of high-profile companies. I’ve taught over 250,000 students the fundamentals of Angular and it’s a great option for building websites that resonate with users. Why do I teach Angular?

Angular is an open-source JavaScript framework developed and maintained by Google and named one of the top three web frameworks by developers in StackOverflow’s 2019 Developer Survey. Frameworks and libraries for JavaScript let developers and development teams of all experience levels build web apps that are rich in content and fast to load, crucial features to capture customers’ attention. What’s Angular: All-in-one framework 

Angular 8 is the latest version of Angular, a client-side framework for building modern JavaScript-based web applications. Rather than communicating with a server, Angular is client-side and browser-based—allowing websites to quickly and efficiently render. All user interface updates happen in the browser, instead of re-fetching HTML pages from a server.

Unlike other JavaScript frameworks and libraries like React and VueJS, Angular is an all-in-one, complete framework. Some of the tools built into Angular such as routing, state-management solution, and form validation allow the development team to rely less on third-party solutions. This allows teams to effectively build and scale web apps since packages in Angular allow developers to easily add new features. While primarily seen on web apps, Angular can also be used to build mobile apps when used in conjunction with the mobile-friendly frameworks Ionic 4 or NativeScript.

Many parts of Angular are easy for less-experienced developers to pick up including its use of HTML, CSS, and native web APIs. One piece of Angular that many developers will find challenging is its use of TypeScript rather than native JavaScript. I’ve received student feedback that some features in TypeScript take some time to learn, so keep that in mind when planning out your next Angular project, some teammates may have to learn TypeScript. 

The benefits of Angular

Angular is used across many of Google’s core apps including Google Ads and Google Trends. BMW USA and Microsoft Xbox are just a few of the many other companies using Angular in some their web apps. Generally, in cases where you need a rich user interface with only moderately static content, frameworks like Angular can shine and make building that user interface much easier. You can find more Angular uses on the Made With Angular site, which may serve as inspiration for your next Angular project.

A framework like Angular is useful for development teams because it allows them to spend their time focused on core business logic and creating a great browser-based user experience for a web app. The notion of running code in a browser is borrowed from native mobile apps, where interactions happen instantaneously, without waiting for pages to reload. It’s a great experience for your customer! 

On classic browser-based web pages, when you click a link to a separate page of that website, you’ll likely experience a wait time while that new page loads. Frameworks like Angular bring that fast native app experience to web apps, through the use of single page applications. Single Page Apps are highly reactive, mobile-like web apps, that have no page reloading wait times since the page is based on a single HTML file, while JavaScript controls everything the user sees in the browser. When a button is clicked or a new window appears on the page, there was no request made to a server, that was the JavaScript code being modified and rendered instantly.

In contrast, “traditional” dynamic pages are web pages dynamically generated on the server. Specifically, it’s the HTML code with information on the styles and scripts to attach to the page. The example of a dynamic page most people can relate to is an Amazon.com user profile. The HTML code for all the content you’d find in your Amazon profile including shipping addresses and order history was dynamically generated on the server by the server-side language, such as Node.js. Since each page is communicating with a server as it renders, the user will have to wait for those pages to load in real-time. 

Angular is a whole ecosystem

In addition to Single Page Apps, what makes Angular a stand-out option for front-end development is that it’s not just a JavaScript framework, it’s a whole ecosystem—thanks to the Angular Command Line Interface, a command line tool that simplifies the Angular development process. A command line interface is a text-based user interface (UI) used to view and manage computer files. The Angular command line interface is used directly in the command shell or indirectly through a UI tool like Angular Console. 

Created by the Angular team, the Angular command line interface helps developers get quickly started with their Angular projects by providing easy set-up of the Angular environment through generated components, routes, services, and pipes with a command. As Angular sees new updates, APIs within the command line interface will be frequently updated as well, offering developers more efficiencies. 

Depending on the needs of the developer and their team, the all-in-one ecosystem of Angular could be either an advantage or disadvantage over alternatives like React or VueJS. Built by Facebook, React is a JavaScript library that lets you drop reusable components as needed into a web app. You can also build single page applications as you do with Angular, but you’ll need to bring some extra third-party libraries to handle routing, form validation, or state management. Developers may prefer React over Angular because it’s leaner and focuses only on rendering components to the screen. Another JavaScript framework, VueJS, created by a former Google engineer, brings together the advantages of both Angular and React. It’s a framework closer to Angular (e.g. it includes routing and state management solutions), though with fewer features, yet it offers the flexibility of React. 

What’s new in Angular 8? 

Angular updates don’t typically see drastic changes. Since Angular 2’s release in 2013, the general framework syntax has remained the same. The exception was the move from Angular 1 to Angular 2. The first iteration of Angular uses a totally different syntax and has nothing in common with the Angular 2 framework foundation we now use and which all newer versions are based. Angular 1 is therefore now named “AngularJS” whereas the term “Angular” typically refers to Angular 2+.

New versions of Angular are backward compatible so you won’t have to fully rebuild your existing Angular apps. The Angular 8 update doesn’t involve any major changes, but it does include an opt-in preview of the new rendering engine, Ivy, which sets the stage for Angular 9’s release later this year. Take a look at what’s new in Angular 8:

  • Experimental support for Ivy — Ivy is the name for Angular’s new internal rendering engine, which is a complete rewrite of the compiler and intended to drastically shrink bundle sizes and achieve better build times while remaining compatible with existing apps. Ivy isn’t fully production-ready yet, so while it’s worth testing on your web apps, I don’t recommend applying it to a mission-critical page yet. Ivy will likely be a major and default component with Angular 9. 
  • Experimental support for Bazel — Bazel is a build tool that orchestrates your build process. It was first used internally by Google and is now open-source. It’s a way to more efficiently control webpack and all the other steps required for building and optimizing an Angular project. Because this is experimental support, it’s not fully finished but is worth learning and testing in your projects. Bazel will eventually be integrated into the command line interface, which will allow for more optimizations (faster, smaller bundles) and a faster development process because the new code will be reflected in the browser faster. 
  • Differential Loading — This feature detects which browser a user is on and automatically strips out any parts of Angular that aren’t needed for that browser. When a user visits your page, a small script detects which browser is being used and loads the correct bundles; the developer does not need to build any configuration into the page. With Angular 8, the command line interface now separates bundles for legacy JavaScript and modern JavaScript. The modern JavaScript bundle size should decrease by 7-20% according to the Angular team with absolutely no code changes required on a developer’s end.
  • @ViewChild() / @ContentChild() API Change — A small breaking change was introduced regarding the ViewChild and ContentChild decorators. You now need to add a static flag (in most cases, you can set it to false: @ViewChild(‘…’, { static: false })).

What’s next for Angular 9?

Angular versions follow a six-month release schedule. Since Angular is open-source, changes can also always be viewed in the official Github repository and expected changes can be found in a regularly updated roadmap on Angular.io. We can expect to see Angular 9 officially released around October 2019. 

Though it’s still a bit early to know definitively what changes we can expect in the fall, thanks to Angular.io resources, we should plan for the following changes to Angular 9:

  • Stable support for Bazel so that it will be fully integrated into the command line interface (CLI).
  • Stable support for Ivy which will make it the default view engine.
  • A possible new API in Ivy may be on the horizon for Angular 9 and could slightly change the code developers write. This alternative Bootstrap API would work without modules or Zone.js so that general component syntax and templates all stay the same. We may see things like change detection functioning a bit differently behind the scenes. If this new API is released with Angular 9, it should result in drastically smaller bundles, up to 70-90% smaller! 

How to learn Angular

Angular and other JavaScripts frameworks are great tools for web development and you don’t need to be a senior-level engineer to work with them. A basic understanding of web development and basic Javascript comprehension are the only requirements for joining me in the Angular course

Stay up-to-date on the latest skills needed for building fast, efficient web applications by following my courses on JavaScript, Angular, TypeScript and so much more!

About the author:

Maximilian Schwarzmüller started learning web development at age 13 and is now a professional web developer and instructor with over 600,000 learners on Udemy. Dedicated to ensuring his students receive the latest tech skills, he updated the Angular course to include Angular 8 features just one hour after the official release of Angular 8!

About Udemy for Business:

Udemy for Business is a learning platform that helps companies stay competitive in today’s rapidly changing workplace by offering fresh, relevant on-demand learning content, curated from the Udemy marketplace. Our mission is to help employees do whatever comes next—whether that’s the next project to do, skill to learn, or role to master. We’d love to partner with you on your employee development needs. Get in touch with us at business@udemy.com

Top 10 Tech and Soft Skills Trending in 2019 thumbnail

Infographic

Based on data from 30+ million learners on Udemy, here are the fastest-growing top 10 tech & soft skills in 2019

More from Tech Skills Topic

Tech Skills

Why Google Cloud Platform is on the Rise

Google Cloud Platform (GCP) is Google’s answer to the hardware and software services that make up cloud computing. As the...

Tech Skills

The Future of Databases: Elasticsearch, Data Lakes, and Time Series

When data professionals ask me how to keep their skill sets competitive, I direct them towards the horizon. How is...

Tech Skills

The Best New iOS 13 Features to Enhance Your Apps

This year’s Worldwide Developers Conference in June saw Apple introduce iOS 13, the latest version of its mobile operating system....