Play by Play: Sharing Code with npm Modules Between Angular Web and Ionic Mobile Apps
Duncan Hunter and Lars Klint
ByCourse info
Course info
Description
Play by Play is a series in which top technologists work through a problem in real time, unrehearsed and unscripted. In this course, Play by Play: Sharing Code with npm Modules Between Angular Web and Ionic Mobile Apps, Duncan Hunter and Lars Klint demonstrate what code you can share between your Angular mobile and webs apps. Learn how to separate out the common code from your angular services and state management into custom npm modules, discover helpful tools and strategies for making npm packages, and how to share your finished npm modules. By the end of this course, you’ll have the fundamental concepts to make custom npm modules and share code effectively between Ionic and Angular apps.
Section Introduction Transcripts
Course Overview
Hi everyone, my name is Duncan Hunter. And I'm Lars Klint. And welcome to our Play-by-Play: Sharing Code with npm Packages Between Angular Web and Ionic Mobile Apps. I'm a software architect from Brisbane Australia where I'm lucky enough to make Angular Applications for a range of different clients. And I'm a freelance solution architect at larsklint. com, Microsoft MVP, international speaker, and expert in Australian outback internet. Yes, really. I've been building software systems from tiny websites to enormous telecommunication systems for the past 20 years. Maintaining logic and functionality between mobile and web versions of your software can be time consuming and error prone. This is where separating out a common code from your Angular services and state management into custom npm packages can help maximize code reuse and reduce your bugs. We'll start with talking about what code you can share between your Angular mobile and web apps. We'll then look at the most popular Yeoman generator to make Angular npm modules that are Angularized to be AOT, or ahead-of-time compilation ready. We'll look at making a simple authentication system to be able to log in and out, a user with AngularFire, and ngrx that can be shared across mobile and web. After this we'll set up the dev environment and npm-link your web and mobile projects with your core npm package. Before lastly having a look how to share your finished npm package with a private npm repository account. When you're finished with this Play-by-Play you'll have the fundamental concepts of how to make custom npm modules and share code effectively between Ionic and Angular apps. You'll also know what decisions you will need to make when implementing custom npm modules and what are the pros and cons of each option. Before beginning the course you should be familiar with Angular Version 2 or higher and JavaScript in general. I hope you'll join us on this journey about sharing code with the Sharing Code with npm Packages Between Angular Web and Ionic Mobile Apps, Play-by-Play, at Pluralsight.
Why Use Ionic and Angular?
Hi, I'm Lars Klint, I'm here with Duncan Hunter again, and today we're going to try and kind of get our head around if you have a mobile app, and you have a web app, and you're building the same product on both, and what happens normally is that you start building two different things, two different projects, how do you share some, all, or whatever it might be of your code base between these two projects, between a native app and a mobile app? Is that we're--- That's exactly what we're going to do. It's going to be a lot of fun, there's lots of good bits. I'm all new to this, just like you guys probably are, so I'm pretty keen to hear what Duncan has to say, and let's get into it.