041 AiA TypeScript with Dan Wahlin

Download MP3

01:46 - Dan Wahlin Introduction

02:29 - Background and Involvement in the Angular Community

04:16 - TypeScript

06:02 - Why Care About TypeScript?

07:20 - ES3, ES5, ES6

10:00 - Type Support

11:41 - Refactoring

12:39 - Microsoft Involvement

  • Open Source <=> Source Open (Pull Request Acceptance)

17:45 - Benefits and Concerns

20:07 - TypeScript and Angular

24:11 - TypeScript and Angular 2

25:28 - Collaboration (AtScript => TypeScript)

  • Annotations and Naming Conventions

30:47 - The Angular Community and TypeScript

36:38 - Type Inference

Avengers: Age of Ultron (John)Star Wars: Episode VII - The Force Awakens (John).d.ts (John)Lord of the Rings (Katya)Avengers: Age of Ultron (Katya)Matterhorn: A Novel of the Vietnam War by Karl Marlantes (Aaron)Tyler Russell: An Angular2 Timezone Picker - Part 1: Becoming aKartograph-er (Aaron)Tyler Russell: An Angular2 Timezone Picker - Part 2: Exploring the World (of Ng2) (Aaron)[Pluralsight] TypeScript Fundamentals by John Papa and Dan Wahlin (Lukas)DefinitelyTyped (Ward)Kent Meyers: The Quietest Place in the Universe: Digging For Dark Matter in An Abandoned Mine (Ward)Daredevil (Joe)GoFundMe (Joe)[GoFundMe] Send Samantha to Miss Amazing! (Joe)Headspace (Dan)Faker.js (Dan)


LUKAS: That's pretty funny, considering I'm like the most straightest person like you will ever meet. [Chuckles] LUKAS: I mean I don't drink, smoke, do drugs.. I don't even rip the text off my mattress, like seriously. WARD: [Laughs] Don't even rip a text off.. [Laughs] LUKAS: I render to Caesar before it was Caesar's..[Does your team need to master AngularJS? Oasis Digital offers Angular Boot Camp, a three-day, in-person workshop class for individuals or teams. Bring us to your site or send developers to ours -- AngularBootCamp.com.]**[This episode is sponsored by Wijmo 5, a brand new generation of JavaScript Controls. A pretty amazing line of HTML5 and JavaScript products for enterprise application development. Wijmo 5 leverages ECMAScript 5 and each control ships with AngularJS directives. Check out the faster, lighter and more mobile Wijmo 5.]****[This episode is sponsored by Digital Ocean. Digital Ocean is the provider I use to host all of my creations. All the shows are hosted there, along with any other projects I come up with. Their user interface is simple and easy to use. Their support is excellent. And their VPSes are backed on solid-state drives and are fast and responsive. Check them out at DigitalOcean.com. If you use the code “**angularadventures**” you'll get a $10 credit!]**JOE: Hey, everybody! And welcome to Episode 41 of Adventures in Angular! Today on our panel, we have Ward Bell. WARD: Hello there! JOE: Lukas Reubbelke. LUKAS: Hi guys! JOE: Katya Eames. KATYA: Hello! JOE: And, returning as our favorite panelist, Aaron Frost. AARON: Hello! JOE: My name is Joey Eames, I'll be your host. And, we have a special guest today, which is Dan Wahlin! DAN: Hey you, guys! LUKAS: Danny boy! WARD: Danny. JOE: Dan, one of our favorite guests to have on the show and a favorite speaker at conferences. Do you want to give us a little introduction about yourself, Dan? WARD: Yeah, and how do you pronounce your name again? Doesn't everybody get it wrong? DAN: Everybody does get wrong. But, you know Ward, at this point, I just pun it. It's just time to move on. LUKAS: Is it Dan? DAN: No, actually I think he said -- I probably wasn't paying attention good enough, but I'm used to it, but.. WARD:[Chuckles] He said it right, but he said..**DAN: Wahlin, yeah. Dan Wahlin. JOE: Wahlin. DAN: So, I run a consulting and training companies. We do a lot of projects -- I'd say about 90% of nowadays are Angular-based, which keeps it fun. And, I live out in Arizona, where it's starting to get in the 90s already. JOE: So, are you the owner? You say you run it, does that mean you own it or you manage it? DAN: Own it. JOE: Okay. Cool! DAN: Or, at least pretend to own it, you know. You know how that works. JOE:**Yeah! [Laughter]**JOE: For pretense! DAN:**That's right [Laughs].**JOE: So, Dan, you've been pretty heavily involved with Angular and you're a pretty big personality in the Microsoft world before that.  Now, you've become a big Angular personality. Can you give us a little bit of background of your involvement in the community? DAN: Yeah! I think my biggest hobby is just exploration, right? Can't go to space yet, but I'd just stick with tech. JOE: Did you register to go to Mars? DAN:**You know, I did not. The wife shut that one down. Considered, of course, but.. [chuckles] So, yeah, I like to explore so I'm always looking at new stuff, new technologies. Angular is kind of my core nowadays, and JavaScripts in general, I guess you could say. But, like to do, you know, various open source stuff, have quite a bit author in GitHub, speak at various things like to hang out with you guys from time to time like at the awesome ng-conf. Things like that.LUKAS: I'm going to say, Dan is one of the funnier guys to hang out with. At ng-conf, it was like 3 in the morning or -- no! Two in the morning? DAN:[Laughs] Yeah.**LUKAS:**And I had to like blow up a bunch of sharks that we're going to fly through the air. [Laughter]**LUKAS: I think that was you right there. WARD: You are mostly conscious at that... LUKAS: I was like passing out, but I needed someone to talk to so I walked out to the lobby and talked with you guys for like an hour. And we had a blast, though, right? DAN: That was awesome! We were up until -- God, what time did we go to bed? Like, 3:30 or 4? Or, something like that? WARD: Something like that. By the way, those sharks floating around, they were hilarious. LUKAS:**We were late. Ward changed costumes like 5 times! I mean, it was crazy. So, yeah.. [Laughter]JOE: Now, you guys, you set your clock by how many times he changes his costume. LUKAS:[Laughter] Yeah. Exactly.**JOE: So Dan, you've spoken at ng-conf, you've done a lot of things, and it seems like lately, you've been heavily involved -- LUKAS: Twice. JOE: Twice, right. LUKAS:**So, all have been, right? [Laughs]JOE:[Laughs] Yes, right. But, in a thousand --**LUKAS: Yeah. JOE: It does seem like lately, you've been heavily involved with Microsoft, in their TypeScripts. And, that's our topic today -- it's "TypeScript with Dan Wahlin". So, can you give us maybe a little bit of background and your involvement with Microsoft and the TypeScript language? DAN: Yes! So, John and I, who, he must be tied up I'm guessing, but John Papa and I, we got started pretty early right when, probably in a beta. In fact, Ward, you were probably on some of those calls back then, too. And, we kind of saw the potential, you know. No one said, "Hey, this is actually kind of cool," because my big elevator pitch on TypeScript is you can basically leverage the future today without a lot of risk there. And so, yeah, we got started early. We even did the Pluralsight course way back when and I don't think anybody watched it back then. But now, all of the sudden, people were in and understood so that worked out right. And then consulting-wise, we've actually done -- there's a particular big company here in Chandler who happens to make computer chips that we all use. And we did some projects with them as far as -- LUKAS:**No free [Incomprehensible], though, huh?**DAN: You know, some of these companies, they get really sensitive. If you mention their name, actually, it's kind of crazy. LUKAS: Alright. DAN: Yeah. If you go read the fine print on the contract, it still actually say, "No mention in talks", no mention in, you know, no logo usage, and it's crazy. JOE: We can mention them, right? We can say their name. I'm not under any contract. DAN:**Yeah, I'm sure I can't actually say it, it's obviously intel. But, anyway, now you just coaxed [incomprehensible] and obviously I'm a --**JOE: Actually, I was thinking, you were talking about AMD. DAN: Oh! It could have been AMD as well. But, anyway, they've been doing video typescript and they jumped in really, really early. And now, they're loving every course because, you know, that's sort of the direction things are going now with ES6 and TypeScript and all that. So, yeah, between those projects and some training stuff, now all of the sudden with the announcement obviously at ng-conf, then there's a renewed interest and I'm pretty excited about it. I like it a lot, though. KATYA: For people who don't know why should they care about TypeScript.. DAN: That is an excellent question! LUKAS: Oh, good question, man! DAN: Yeah, that's the question I've been -- LUKAS:**That just steps up to the place! [Overlapping talks]KATYA:[Laughs]**LUKAS:**You get us so proud! [Laughter]**DAN: Yeah, so my answer there is, I'm a big fan of Gulp, and with Gulp, you can -- and Grunt or Broccoli or whatever your picks are these days. Is it Broccoli? I haven't used Broccoli, but I think that's what it is. You know, you can go to ES6 route, of course, and I know a lot of people doing that seem to be successful. It's still pretty kind of cutting edge, I think, world. But the TypeScript world, what I like about it is, right now out of the box, it's really easy to get started with. You know, you mentioned, "Yeah, it's from Microsoft", but they're really, really whooshing, "the TypeScript is an open thing that anybody can use". So, a lot of stuff coming out is going to be related to, you know, running a Mac, running a Linux or whatever you want to do there. And so, for me, what I like about it is kind of future-proofing your apps, in my opinion. And that's because, number one, you have a full team behind it. It's going to be generated right now -- you can choose ES3, ES5, or ES6 output. The ES6 is not quite what you think yet for the output, but that's just because most browsers don't fully support ES6 yet, although it's getting there. JOE: So go back to what you're talking about with ES6, I assumed the TypeScripts always output into ES5. DAN: You actually have 3 options. The ES6 option right now, I haven't tried it with the latest build of 1.5, but with like the 1.4, that's officially out. If you're in Visual Studio as an example, you can right-click at the property and set it to ES3, ES5, or ES6. If you're using Gulp, Grunt or one of the others, you can configure that through your task. JOE: But you said that ES6 isn't quite what you'd expect. DAN: Yeah, as in they're not outputting actually full ES6 code yet. There's still a lot of polyfill stuff they haven't do because they can't guarantee it to work everywhere. JOE: Right. AARON: Yeah, that's not in the browser yet. DAN: Right. AARON: I guess they can't give it out there like that. That makes sense. DAN: I think it was 1.4 came out, they introduced the ES6 output. There's actually -- I'd have to go read the post on the differences and all that -- but they basically said that, I think, they're just adding the options so they can move to it. But to be honest, I don't use it. I do the ES5 option. AARON: Right. JOE: So, you're not sure, like, are they actually outputting some ES6 assuming that the browsers are going to support it? Or, do you have to like tell that, "Hey, these are browsers I got which is 6 features that I couldn't even use"? DAN: No. Right now, it doesn't do any of that; it's just going to output compatible code. But I think the goal is, once the browers are passed where at today, they will output ES6 compatible code. That way, they can do things like asynch away, which would be ES7 or whatever they call it. LUKAS: Yeah, that makes more sense because a lot of -- AARON: Yeah, but how was that different doing ES5 output? DAN: Right now, it's not that much. Right now, if you're going to do it, it'll actually be really similar. But, like I said, I'm not actually using the ES6 output so I had to actually run it through and see the difference. LUKAS: Well, the ES6 output could be legit. Like, a lot of people are writing in node and so who cares what browser support you have. If it's your harmony flags on, then, you've got the support; it's supported already. So, I'm thinking, it's just going to go to ES6, no polyfills. On the stuff, it's already ready, but they didn't know. JOE: Is anybody calling it JS 2015 at all? DAN:**I keep seeing that, and I hate that. I'm too.. I do! [Laughs]**AARON: Actually, Axel Rauschmayer, we even talked on Monday at FluentConf, and he and I both talked before. We're going to keep calling ES6 the books being written down or calling it ES6. ES 2017 is when it will really take effect.. Or, ES 2016, sorry. No one's going to call this one ES2015.. LUKAS: Otherwise, JavaScript 2105. AARON: No one's going to call that. LUKAS: Or, they're going to be calling it "ECMAScript 2016" or "JavaScript 2016", do you know? AARON: Yes, 2016, that's what it called. LUKAS: Oh. AARON: It's the community that's doing the releases that's naming it. It's not the JavaScript community, it's the ECMAScript community. LUKAS: Right. Right. WARD: Dan, you mentioned that you get sort of Type support during design time. But, what are some other things that TypeScript does for you during development? DAN: The biggest thing, I think, is number one the Type support. Obviously, they've added the Annotation Type feature for Angular and some other frameworks out there that want it. But, I think, the biggest selling point is that you can just catch a lot of issues upfront. So, as an example, JavaScript doesn't support interfaces. And I'm sure, you've all passed in a settings object, you know, an object literal, and you kind of hope that you cased your properties right, you read the docs, and hope you typed it right and all that -- unless you have unit test or something to back that up, which hopefully you do, but not everybody does -- that's really easy to screw up. With TypeScript, you can actually add things like interfaces. And, if you're not familiar with the interface, for those that are listening, in a nutshell, it's basically just a code of contract. So, if you had the settings object that takes, let's just pretend something simple, first name and last name, then you can have an interface in your code that says, "Hey, this is the type ISettings", I for interface. And ISettings has first name and last name. Now, if you maybe forget one of those, you know, one of them is not optional let's say, and the other one is or something like that, then the compiler can actually catch that unless you know upfront. And so on larger scale apps, you know, if you're on a small app, you'd probably say, "Who gives a crap? Nobody cares". But on a larger app, it's really easy to make those kind of mistakes when you have a lot of team members. And so, one of my favorite things in addition to the types, based on your question, is interfaces. Of course, when it generates the ES5 type code, they're nowhere to be found. It's just the build time, dev time type of operation. So, that's kind of some of my favorite things. WARD: What about refactoring? Is it easier to refactor your code with TypeScript around? DAN: I think it depends on your editor. In something like Visual Studio, absolutely. But if your editor doesn't support a refactoring feature and doesn't have a TypeScript plugin or something, then, probably not. But, I think, just manual refactoring, I still think it's still a lot easier because now you're a lot safer if you're kind of manually redoing things. When I was talking about refactoring, I'm kind of talking about a more automated way through an editor. But, if you're doing it manuallly, then, I think it's a lot easier to catch errors like change request. Everybody loves change request, right, because you're always hoping that you don't screw up the system and that you have a unit test to back it up and all that. Well, the TypeScript, it makes it really, maybe not easier, but much better to catch those type of change request errors you might have introduced withour realizing that such as you left out a property that was required and an interface said you had to have that, something along those lines. WARD: I read this on a post somewhere, I want to get your reaction to this, okay? I'm quoting for you. The guy says, "I know TypeScript is cool and saves time. But to be honest, this is a Microsoft product; may almost always start a new product line and eventually drop it. I fear investing time and energy into TypeScript to find out that they're just trashing it. What are your feelings on that? Basically, what I'm saying is: Is it worth it just writing straight ECMA5, ECMA6 instead of taking the risk? Or, are you all in on TypeScript? I hate that Microsoft is involved", end of quote. DAN:**Hey, hey, now you're quoting comments off my GitHub site. [Laughter]WARD:   I just -- Hey, I just thrown that out here. It could have come from anywhere. DAN:  [Laughs] It could come from anywhere.KATYA:  [Laughs]WARD:   So, how do you feel about that, Dan? I think the guy is onto something.. DAN:   Number one, I emphatize, I symphatize because there is some truth to the initial part of that comment on certain frameworks of the past. I sadly think you can say that about a lot of companies, though. I think they're pointing out Microsoft here when, in reality, I won't name names, but I can pick several other big companies right now that done the exact same thing. So, I think that point is kind of a little bit new. I do think it's something that I personally worry about, yeah, you got to worry about that stuff. In this case, I think the difference, though, is this first off is fully open source so the compiler are even -- even the compiler hooks -- everything you do with it is all out there. It's up on GitHub, everybody can contribute, they take pull request. AARON:   Do they take up pull request? They don't like reject them? DAN:  Well, they might reject them, but they say they take them [laughs].**WARD: Everybody takes. It depends on how deep it is. I mean, I know. I run an open source project and we take pull requests, but that doesn't mean we take every pull request. DAN: Right. AARON:**What I was asking was, so I talked to Jacob Rossi, he was the PM on Project Spartan, and he said they didn't use Blink because Google doesn't accept pull request sometimes from Opera and they didn't want to be on that same boat. So, I'm just wondering, does the TypeScript team take pull requests from a Google, like an Angular team, or an [inaudible] team, it's what I was asking.JOE: Let me ask you guys, before you answer that, does it really matter? Is open source mean you have to accept pull request and pull them in? Or, what's important with open source is that it's out there and they respond to issues and you have community contribution? I'm not sure I know or agree how I feel about that. LUKAS: I think, that one comes back to, you know, the concern about Microsoft. In a good open source project, they feel like, "Hey, if the company decides they don't care about this anymore, they'll turn it over to community". For me, I don't care if they take pull request or not. I care if I invest in a product and the company decide they don't want to invest themselves anymore that they'll turn it willingly over to the community. JOE: Do you know of any examples of Microsoft just turns stuff over to community like that? DAN: Well, pretty much everything they're doing now is, I don't want to say totally turned over. I think, what -- I think, it was Joe who said that -- I think on everything they're doing, it's now going open source. As far as one -- I'm trying to think of one that -- WARD: Were your services was an example of what the Ruby effort; I know Ruby was turned over. Prism was turned over. DAN: Prism! Yep, that'd be one. WARD: Yeah. So, there are various products that they got behind that were actually used in the enterprise. And then they said, "You know what, we know the community is interested in this. Let's put it into foundation and let it go". I think there is an important distinction between open source and source open. And some of the things that Microsoft has done is source open. Meaning, they're not taking pull request. But, TypeScript is one of the things where they are really soliciting feedback, publishing their processes, they grow it. Inviting pull request which means that they had minimum or going to evaluate them. And, of course, you have to sign something that says you're not going to hold patent right. For Angular, it's the same way. Exactly the same way. DAN: Oh, yeah. WARD: Before you can -- they'll take pull request. They don't take every pull request, then before you can put one in. You got to say, "Hey, this really is my work and everybody's welcome to it". If you meet that bar, you're into a discussion, you can influence the outcome. DAN: I think, it's pretty similar to what the Angular team is doing right now, actually. They're not going to take every pull request, obviously, they have the whole triage thing going on. I would assume, TypeScript is probably doing the same type of thing. I doubt they're getting the number pull request quite yet that Angular gets. But to go back to the original question and comment that you asked about, I'm going to side with what John said here. And at this point, if they did drop or whatever, there's so much -- I mean narrow 1.5, this has been out for years now and so it's very mature at this point and there's no reason that somebody can't pick it up. The good news is, given that it's based on ES6 type standards anyway, worst case, even if they did do that and said, "Ah, screw you guys, we're pulling it all", worst case, you're going to have to convert some of your code just to pure ES6 then go on Babel or somethiing. But you're already like -- JOHN: You're already there! DAN: 99% of the way there. JOHN:[Laughs] You're already there. It's not like you're taking binary and say, "What do I do with this?" You got JavaScript in your hands.AARON: I mean, seriously, my concern with the TypeScript are less about stuff like that and more about, you know, when you're running TypeScript or you're doing stuff with JavaScript, how far do you go? What stuff do you do in TypeScript? What stuff do you just leave in JavaScripts and change your files over .ts? Do you actually restrictly type everything? Do you leave it at implicit any? When you're creating directories, which of the seven ways to create an Angular 1.2 or 1.3 directed? Do you use the TypeScript? I think, these are just a lot of the questions on how far you go down that road and where the value is? What do you do, Dan? I mean.. DAN: Well, we just did a big -- as in two weeks so not that big, but big. It was two of us, though. Conversion, I guess, you could say from just regular ES5 to TypeScript. So yeah, what we ended up doing was, you know, some people, I think go letter of the law, and that's definitely not me. I'm not letter of the law guy, I'm more spirit of the law. And, every single thing has to have a type. Or, if you have a complex object, it has to have an interface and you have to have the, in TypeScript, you have something called "d.ts files". They're type definition files that you can load up for Angular and jQuery and all these at the library so that you get code help and you're passing the proper types and the compiler catches theirs and all that fun stuff. Anyway, when it comes to doing types, what we ended up doing -- because we kind of had a pretty compressed schedule -- was some of the more obvious stuff, like we're on pass the complex type that had no typing originally so I'm passing again the settings object. Then, we would met in interface for that because then it was really easy to catch if we screwed up because, you know how it is, some of the settings objects will have like 10, 20, 50 members you got to pass just to get the stupid thing going. I mean, ours didn't have that many yet. I probably have about 10 in this case. But by having that interface in place, we're able to catch things and will be easier to know when we screwed up. Along the way, there's also a tslint so we can buy a tslint just to make sure our code was following the same type of things. So, I think it just depends on the company and how far they want to go because there's definitely no right or wrong way. If you want to go just almost like pure JavaScript with no types but leverage ES6, then you can do that. But if you want to actually get all these benefits we've been talking about, then, you can do that, too. JOE: That's very fluid, right? You can just kind of pick and choose what benefits you want about your investment. DAN: Absolutely. Yep. JOE: I'd like to switch gears just a little bit with sort of -- I already talked about the subject, but bring it to TypeScript and Angular. John, I know you wanted to talk about a little bit of TypeScript with Angular 1. Did you already discuss that? Or, do you have something more specific to say? JOHN: Yeah. I guess what I'd really like to know is: you're using TypeScript with Angular. One of the things that's been frustrating for me is, I write a Controller in TypeScripts and it works great. But when I go to write a Provider in TypeScripts, for example, it's just utter pain especially if I need to inject something into the service that the provider returns from the .get, the dollar sign .get. So, that's why I asked. And Dan, you being the expert here, how do you go down that road and where do you say, "You know what, it's too much pain to do TypeScript for a provider so I'm just going to use JavaScript on that while I use TypeScript for controllers"? How do you balance that? DAN: I'm with you by the way. I'll give you another example. Depending on how you're doing your directives, those also can be a little challenging in TypeScript. I mean, they're challenging in general, but especially with TypeScript. And the reason is that, sometimes it's like you got this round peg and you have to square a hole and you're like, "Nope, I'm going to make it fit, man! It's going!" We ended up, for this app I was kind of talking about, we didn't have a ton. There was only like, I think, 4 custom directives but they were pretty good size. Some of them are pretty big. What we ended up doing there is, I was one of the "Nope, the square peg or the round whatever it is, it's going to fit". I made it work. And at the end of the day, I kind of was like you. I'm like, "You know, I actually think directives and the providers maybe as well are just easier if you just leverage JavaScript so you can still save as the .ts file, of course. But you just don't use like classes, you just do more functional type stuff. So, I don't know. I know, John, you say this, too. It's like write tool for the right job, right? LUKAS: John.. his silence means that he truly does believe that. DAN:[Laughs]**JOHN: Yes, this is John and I totally agree. JOE: My name is John and I approve this message. JOHN:**That sounds like raviolli, and I love it! [Laughter]AARON: So Dan, I'll toss one out more for you. What about a service was a factory, not the difference between, though, Angularize, but writing one in TypeScript? How have you felt about that? DAN: Oh, yes. I'm changing my tune a bit. I've always been more of a factory fan mainly just because I like having the control over the object that you return versus the service words this dot or whatever you choose. I actually think services play a little bit better into TypeScript; you're going to write less code and things. This app I was talking about, this conversion, we ended up converting all the factories to services, actually, because it was just easier. AARON: I did the same exact thing. I mean, did you run the same problems? I mean, the syntax, it was really the syntax in TypeScript that was weird with factories, I thought. DAN: Given that you can do functional programming or more of the class type structure in TypeScript, that's another one where I'd say, "You know, maybe funtional is better for the factory if you wanted". But, you can make it work, and we did. But then I got to the point where I'm like, "Why are we doing this when we can just do a service in just like a regular, plain, old class". WARD: I did not just because TypeScript, but I've also made that move because Angular 2 seems to be more class oriented for the comfortable concepts. DAN: Yup. WARD: I'm also getting a little itchy about all the classes everywhere because I like functional program. They don't want us to lose track of that. And you can program a functional style, but certain of the Angular concepts are more class-friendly, and I think this is one of them. AARON: Yeah. And to be honest with the others, I'm going to be very clear, when I'm writing TypeScripts and I'm doing Angular 1.x, I use controllers and I do directives and I do services with TypeScript classes. But if I do providers or routes or modules or configuration, I just use functional programming. DAN: Yup. I do, too. I would add directives potentially to that as well because you end up jump at least some weird hoops and having to make your own little internal factories just to get this thing to work right. AARON: Yeah! I just saw you did that, too. You did the same thing I did; you basically print a static instance property. That's what I was doing. DAN: Yep. Which, I've now come to conclusion that I don't know if that's worth it. JOE: So, Ward mentioned this -- I think it's a good time to segue into TypeScript and Angular 2. So, talk. Just talk amongst yourselves. DAN:[Laughs] Talk amongst yourselves..**JOE: Discuss. DAN: Well, number one, there's not a lot of great -- I'm aware of one semi-robust example out there with.. JOE: Have you done any Angular 2 and TypeScripts, Dan? DAN: I've been using ES6 right now with Angular 2, and I'd tell you why, though. It's just because the 1.5 with the annotations and things still in alpha and there's instructions. If you go to their GitHub site, it uses a, what's it called, Jake? Or, whatever it is that's actually get it going. JOE: I want to know if anybody still use Jake. DAN: I think that's what they're using. I have to go double check the site, but I think so. And that's where I go, "I'll just hold off a sec.." because I know they're going to be coming out with the release pretty soon. I saw you really had a good one Joe, they came out, so good job on that. JOE: Thank you! DAN: I've been doing that type of thing. For now, until it gets all stabilize, I'm kind of assuming that Angular.io will -- you know how they have that 5-minute, whatever they're calling it jumpstart thing.. JOE: Yep. DAN: I'm hoping, though, soon here, in the next month or two, have one on TypeScript as well. JOE: Right. DAN: But, I haven't heard anything on that. JOE: So, the Angular team and the TypeScript team got together, put their heads together, I know that they talked to the react sim about reacts flow, I don't think that went anywhere. But they also talked with the Ember team as far as I know, specifically with the cats. WARD: And also Rob Eisenburg JOE: Oh, that's right. WARD: So they really tried to reach out across the spectrum of the top frameworks and the people who are involved in JavaScript definition to try and get some common ground and make sure they're covering their bases when they're introducing the new concept like annotations. JOE: Right. So, I know that the big thing out of that, there's a lot of interesting things that came out all of these conversations, but one of the most interesting things was the fact that outscript was essentially, I don't know if abandon is the right word, but merged into TypeScript. So, can we talk a little bit about that? Maybe what you know about that, Dan? DAN:**Yes. You know, I've only used the, I'll call them the normal ones. I haven't tried to write custom decorators now, and I haven't actually, although I've seen a few examples here and there, I haven't actually had the need to write one yet. I've used the View, the Component, kind of the standard stuff that you see out there in some of the samples. So, I just submitted -- I don't know if we're going to go [incomprehensible] because I have a pretty strong opinion on this one. You see, I'm not that opinionated, but I do on this. Right now --**LUKAS: What?! DAN: On GitHub, I just submitted an issue, but it's more of a, "Hey, can we get some more freaking convention?" Because right now, to me, while the annotations I get it, and I llike annotations because some of the other languages I use, we use annotations, just slightly different syntax. I think there's a lot of places right now where the way we use the annotations can be cleaned up a bit through some conventions. As an example, with directives as of today in 1.x, if you name the directive my and then capital D for directive, then it's obviously my-directive, right? JOE: Right. DAN: You don't have to go in and define a selector and do all that stuff. Well, in Angular 2, as those know that had played with it, you go in D or component and you say selector= or selector: and I like the ability to override the default. But I'm hoping that they'll build in some more defaults so that the annotations are a little more simplified; you don't have to find as many properties. Another one was the ViewURL. You can do inline or template URL type thing. And I think if we could have some smart defaults there, it would really clean up that whole Boilerplate code. JOE: Right. DAN: So, if anyone agrees, go to the issues and say, "Yes, I agreed", because I think there's actually been a couple of people that you guys will know that agree because I think we exist to eliminate some of the Boilerplate. But, I like annotations in general and that's why, I think, why Ember is going to be using them as well and some others. AARON: You used to changing so much. I have a friend, he's writing a 4-part blog series about writing apps with any of the two. And he says, just from his first blog post to the second, stuff changed and he had to rewrite some of the first blog posts just to work. And so, it's all pretty dynamic still in the alpha phase. JOE: Dynamic is a very kind word for that. DAN: Yeah. That's why I'm not jumping full board yet. AARON: Yeah. LUKAS:**I was -- actually I just Googled last week visiting the team, and they said that, actually, the API, some of the name at conventions are changing on an hourly basis, which is why I'm not on that train.. just yet. [Overlapping of talks]**JOHN:**I get kind of bugged by this, too, at people. Like, okay, I'm the style of guy that I'll just let it [incomprehensible]. I'm getting people up there saying, "Why don't you add the Angular Style Guide up yet?" [Laughter]**JOHN: Hey, it don't exist. DAN: Yeah, John, why don't you? WARD: What's wrong with you, John? JOE: What do you like, a fulltime job? JOHN:**Dude, I mean, who in the right mind would go up and run and create an enterprise application using an alpha product right now? I mean, you're not going to do that with your mainstay product. And second, a style guide. Let's go here, you're at conventions, you have to have some kind of track record with it first, right, to figure out how you're actually going to use this thing. And with the right track, this is [incomprehensible]. I think, people are getting a little too excited too early. The same thing people complain about all this time at my soapboxes. They complain about this world changes too fast. Things are changing, and coming, and going. Well, you know what, give it a chance to get out the door first before you actually jump all over it.**DAN: You think? JOE: I'll be honest, John, I don't know what you're complaining about. I'm already in the middle, halfway through publishing my Pluralsight Best Practices in Angular 2 Course. JOHN:**Nice! That's great, Joe! [Laughter]**WARD:**I'm skipping Angular 2 and I'm already telling them what about the fashion is in styles for Angular 3. [Laughter]**AARON: I love it. JOE: Hey, I don't rant much. So, that was my rant for the month. JOHN: No, I totally agree with you, though. Because that's like, people complain, it's like, "Dude, it's alpha!" I mean, Lukas just said, literally, they might have just changed an API since we started talking. AARON:**In their weekly meeting, though, Google just barely to the point where -- the Angular team -- just barely to the point where they're ready to help one of the teams internally try to convert [inaudible]. I mean, it's super early. You guys are all justified and like everyone is justified in not jumping on board yet because Google is not even converting like not even just to see how it works yet. So, it's still early.**DAN: For sure. JOE: So, I'd like to talk a little bit about the Angular community in relationship to TypeScript. I personally fell like, until a few months ago, the only portions of the Angular community that were using TypeScript were those who are using a Microsoft backend. And since the Angular team has met with TypeScript, they've absorbed where that script is going to be in the TypeScript, they are obviously on board with the idea that types are a good thing. I thought that's breathing new life into TypeScript, not perceded that it needed a new life because it already have a very strong following, but in an area that normally would not have gone, and that is to the general open source developer that isn't doing Microsoft backend. LUKAS: I'd give you my opinion, Joe. I think, you're right, but I think, I'll tailor it slightly different. Where I've seen the change is that there's a lot of .net Microsofty folks who weren't even looking at Angular or TypeScripts until they heard back. I've seen people who weren't gong web, and now they're like, "You know what, now that Microsoft is getting embeded with Google on this, let's go ahead and go TypeScript and Angular". I haven't seen and actually talked to too many people in the open community and said, "I'm going to TypeScript now," who are doing jobs with Angular. I'd love to see that, but I don't know if I have. AARON: I have definitely seen the things you're saying. I'm not like dialled in to the Microsoft community like you guys are, though, and I've seen people like finally excited about using a TypeScript. I think, Joe, you said it didn't necessarily need new life. I think Babel was about to kill everyone and I think TypeScript hooking you to that Angular horse, I think, would kind of help it stay relevant in this explosion of Babel. And so, I'm kind of excited that they picked TypeScript. And as a JavaScript guy looking for an alternative solution to get the ECMAScript 6, I'm actually excited that they picked TypeScript, considered Babel. I think, it's just a good call. WARD: On that note real quick, I saw, I think, yeah, I know I was on Twitter, it sound like they just met with.. I can't remember his name, the guy from Babel, though, too. AARON: Sebastian? WARD: Yeah. I don't know. I saw a tweet come through and said: "Just met with the team", it was a Babel, I haven't met him. But, I think it's cool that they're not forcing us down like one road even if they used TypeScript to build the framework, we can still use ES5, we could use ES6 with Babel, we could do TypeScript. I like that. It's cool. It gives us options, you know. WARD:**I think we're going to need to make a distinction also between the effort to transpile to ES5 to take ES6 and transpile the ES5 which is accross of things like traceur and [inaudible] is now Babel. The development environment and the type support and all that kind of thing that comes with TypeScript. So, it's very tool-friendly. TypeScript brings those things together. And the other thing that we keep talking about how well it runs in Visual Studio, but, we had a great demo of it running inside sublime. How many other text letters and IDEs is it running?**DAN: WebStorm supports TypeScripts phenomenally well. WARD: Right. It's just easy to run everywhere and bring the tooling support, and that's a lot of work. What I think people are really want to do, they wanted to improve their development practices as well as give them access to ES6 file code. JOE: Well, I personally hope that even though right now authoring Angular 2 in ES5 is a real pain, and I haven't seen anybody really making any kind of effort to do it. Right now, it's ES6, it's where it's easiest to author Angular issue. I hope they come with a good story, a good ability to author Angular 2 to ES5. But I like the fact that right now, it's way obvious that it's a much better story than ES6 and that continues on whether you're using just plain ES6 and, say Tracer or even Babel or TypeScript, that have moved a lot of people to say, "Hey, I can actually expand my tool", and specifically just got a lot of groups and projects out there that are just authoring ES5, not for a good reason just because the momentum of "I don't want to spend the time and figure out if putting a transpiler into my process", and I'd like to see that go away for the most part. JOHN: Joe, Dan, I guess what I'm trying to understand is, are we saying that we would rather get to a place where we don't need to transpile? JOE: Well, that's certainly true. But, I think, that's so much further out of our control because browers and the number of people that are using the older version of Internet Explorer is something as a lot of hurt to control. I would say yes to that, but it'll also be fine if we are transpiling just as long as we're using ES6 more, using TypeScript more than we are right now. JOHN: So, let me go on different directions. I'd like to hear, Dan, your opinion on this, too. Dan and I, those who don't know full disclosure, we wrote a TypeScript course, the Pluralsight couple of years ago so we're both in that world. But, we do a lot of JavaScripts. And, the thing I'm curios on, Dan, is I've been looking at things differently lately. What if TypeScripts wasn't really, nobody looks at it as a language, but you're looking at it as tooling opportunity, right? So, let's say you're just the developer out there working in JavaScript in node and you're happy as you can be, and you're running along, are there things that maybe tooling can take advantage of like WebStorm for example, that would light up using TypeScript to help their regular jobs experience. So, that should happen to right TypeScripts. DAN: Definitely. You know, I think, the definition files, you can suck those in. For those not familiar with the definition files, they're basically just a bunch of, in a nutshell, TypeScript interfaces that, for instance, the jQuery.d.ts file has all the code to basically describe the higher level API of jQuery. So yeah, tools could literally, even if you're just writing ES5 but you're going against Angular or jQuery or a really error or whatever it is, then, I think those are the first things that come to mind - the type definition files - because those can be used by an editor to kind of enhance your experience. JOE: So, I don't know how much you know about flow, and I've also seen their Angular, and now it includes the RTTS which is the Run Time Type System, which I personally know nothing about. I know the flow has similar goals to TypeScript in that except they do sort of a more passive "We're just going to look at your code first" some types information, trying to warn you about it. Do you have any opinions about that versus TypeScript? DAN: Well, you know, number one I think it's cool. I think anytime you can get it built if it's good type end, I think it's cool. TypeScript will do that as well. If you can't figure it out, it'll default to an any type. You know, you only have a few basic types built in so you can do number, you can do string, you can do array, you can do any and there's a couple of it and all and stuff like that. But, I'm a big fan of TypeIn for instance. And even with compile languages that leverage that, I typically will jump on that because normally, it saves a little bit of typein and hopefully catches the few areas along the way, too. JOE: Right. I like it. Alright, we'll move on to picks. So John, do you want to go with your picks first? JOHN: Yeah. I'm going to pick, I'm not sure when the show's going to air, but I'm going to pick something I'm super excited about - it's a double back. It would be an awesome year for movies coming out. First we got Marvel coming out with the "Age of Ultron", I'm so excited about that. Actually, I'm going to be checking that out on opening day. And then, "Star Wars", the new trailer. Man! Have you haven't seen that trailer? I got goosebumps watching it especially at the last 5-10 seconds. DAN:**Especially you have men at 35 indoor, right? [Chuckles]**JOHN: Oh, man! I just love it. I want to roof some of the guys, but dude, check that out. So, those are my picks. If you haven't checked out the trailer of the Star Wars or checking out Ultron, those are the big things I'm looking at. As far as the coding thing goes, my pick's going to be checking out the d.ts files as Dan pointed out for TypeScript. I've been playing a lot lately in just JavaScripts and using TypeScript's typings to kind of help me get along, and that's been a good thing for me to look at because it's been a nice way to make my JavaScript experience better. JOE: Awesome. Katya, do you want to do your picks next? KATYA: I have two. My picks are "Lord of the Rings" because I've just started reading this Silmarillion. Silmarillion  I think that's how you pronounce it. DAN: Silmarillion? KATYA: Yeah. Silmarillion. DAN: Yeah. JOHN: It's a hard book. That's a hard book. KATYA: It just sort of that it is, so I hope I can finish it by the end of next month. And my other one is also going to be "Age of Ultron" because I'm going to a 29-hour Marvel movie marathon at the movie theaters. WARD: Nice. KATYA: So, I'm really excited for Ultron. JOHN:**Actually, you're grounded. [Laughter]**JOHN: You should have done your homework. KATYA: Tell me how to live my life? JOHN: Yes. Go to your room. JOE: The beauty of being a 16-year old. Although, I wll be honest, if they had the 29-hour marathon for Star Wars, I'm not sure that I won't be there. Alright, Aaron, how about you? AARON:**I'm going to pick a book called "Matterhorn". I love books that chapter one just exposed you right in. This is a Vietnam War book. The author, it took him 30 years to write it, he's a Vietnam war veteran. It was super intense. Chapter one pulled me right in and it was just epic tale of Bravo Company and the Marines. This is intense. So, I'm going to pick that book. I'm also going to pick, again, I'd mentioned once the title up. It was a blog post series on building a time zone picker in the [inaudible], too. Time zone picker are so much harder than you think they are. There's like more than just picking one of the time zones because certain parts of the world at certain different dates are on different time zone so you have to almost like do it by city. He walks you through the easiest way to get a like an accurate time zone picher for everybody not just the people who are in kind of the standard time zone. Hey, I'm going to recommend those 2 things.**WARD: Yeah, tell me about it. I was in Australia and there's a certain part of it where you go North and they decided that they weren't going to advance the time for daylight saving because they were afraid of disturbing the cows. AARON: Dude, the cows are a must with them, though, right? WARD:   No, man. They don't want that milking time moved up and down. They're very regular. JOHN: Oh. Yeah, come back tomorrow, same time. LUKAS:**So, I was in Arizona and about that daylight savings time... Guys, we don't do daylight savings time in Arizona for [incomprehensible] like what is he talking about. [Overlapping talks]**LUKAS: Yeah, Dan knows. Dan knows. Yeah, you know what I'm saying? DAN: I know what you're saying. LUKAS: Dan is my bro! Speaking of which, I want to go with my pick now, thank you. JOE: Alright, Lukas... Yeah, go for it. LUKAS: So, one of the beauties of being on this podcast is not only do I get to to talk, but I actually get to listen, and I paid some really good friends who'd put out a bunch of content so my pick is, because nobody else will say it, TypeScript Fundamentals by my buddy Dan and my buddy John. I definitely think it's a good place to start. DAN: Oh, you're a good guy. LUKAS: Oh, yeah. JOE: Awesome. Alright, Ward, how about you? WARD: Okay, on the TypeScript front, I wanted to mention a GitHub site called DefinitelyTyped. Dan, do you want to tell them what's there? DAN:**I'd give you the basics. But Ward, you know more than I do anyway. So... [laughs]**WARD: No, no. I don't. DAN: DefinitelyTyped, that's where you can get this Type Definition files. They also have a tool TST where it's kind of like a bower for Type Definition files. So, if you want to get jQuery, Angular, and those in, you can, works really well actually, and, that's the national version. WARD: You can go shopping there for Type Definition files for open source projects. I'm looking at them and saying, "Why the heck isn't Prism there," so we got to publish -- what is up there, duh. Yeah, so, it's pretty easy if you got a project at open source library that you want to have published, you can publish it right in there, and they take up a pull request for your DefinitelyTyped files. So we do that, too. So, that's my technology pick. My fun pick is a great article in Harper's that I just read called the Quietest Place in the Universe. It's about the hunt for dark matter in a gold mine in Led, South Dakota. It's one of the ne of them most brillianty crafted science articles I've read as it deals with the human dimensions, the source of dimension, the history, the science dimension as well. as what I want what's actually going on there in the effort to detect the undetectable. So, I highly recommend that and I'll post the link. JOE: Awesome. Dan, I'll have you go last. I'll do my picks next, two probably short picks. The first one is the new DareDevil TV Show that Yahoo just came -- the Yahoo or Netflix? KATYA: It was Netflix. JOE: NetFlix just came out just came out with. Well, I just watched the first couple of episodes. Truly enjoyed them, can't wait to watch the rest. I just heard they got picked up for second season... KATYA: Yes! JOE: So, pretty excited about that. And then my second pick, I picked a similar, this is kind of the same thing on JavaScript Jabber, it was "JustGoFundme in of itself because it's a really cool place to go raise the money. The reason I'm talking about it is, I have a niece who's got a Spina Bifida, couldn't find her wheelchair. It's actually a chanllege and got involved in this kind of a talent competition, it's called Miss Amazing, and she won in UTAH and gets to go to the nationals. I wanted to help raise the money to send her off to California so I created this fund. And I just found that GoFundMe is just a great way to do this. What an awesome idea, an awesome place. So, my pick is going to be "GoFundMe" even though -- I'm not actually putting a link to my niece's fund raiser so everybody must spend a couple of bucks for a really good cause, please feel free. But, my pick is going to be GoFundMe. I just think they've created an awesome platforn, what a great way to use technology to make the world a better place. WARD: That's kind of a kickstarter for nonprofits, is that correct? JOE: Yeah, exactly. Donate to somebody for a good cause. You know, you'll all see some kind of weird things like I think they have GoFundMe for helping buy a joint all the way to "I just lost my family in a car accident and I need money to help just to bury them". Things like that. There was a really one that had a lot of traffic about this guy that was walking. He'd been walking to work for like 8 straight years and he was spending 4 hours each way walking to work because there's no buses with route he needed to go. So they created a GoFundMe to get him a car and it ended up raising like $150,000 or something because of all the coverage he got because this guy's amazing story how he's so dedicated providing for his family even though he had to walk 8 hours. He'd rather walk to work than go on unemployment and whatever and keep this good job of it. He just have to walk a ways to get to where the factory was. Very cool stuff. WARD:**That sounds "I'm going to get my TESLA". [Laughter]**JOE:**There you go! You need to start your GoFundMe for your TESLA. I will definitely contribute at least $1 to that. [Laughter]**JOE: I hope the $1 includes a... JOHN: Test drive. WARD:**I'll send you a picture of me riding in my TESLA. [Chuckles]**JOE: Love it! Alright, Dan, you are up. DAN: I'd do, I guess, two as well. For my kind of non-technical pick, Igor gave a talk at ng-conf, kind of the whole mindfulness and meditation. And, it's something I've been doing for a little more than a year, actually, now. So, we actually talked about that topic before he gave it. He had a lot of good stuff. If you haven't seen it, you should go watch it. So he told me about his site, it's headspace.com and you can get like a free trial and then after that, it costs. But if you're kind of in the, "Hey, I just need to chill, I need to relax, get a grip on life" type thing, which about a year ago, I'm like, "You know, I need to get a life", so I started looking more into this stuff. Really, really nice walk throughs that they have up on the site if you're interested, so check that out. He mentioned, I believe, as Willow latest talk. My technology pick, some of you guys might have heard of this. If not, it's really cool. It's Faker.js. It space you away to simulate fake data in apps. But it goes like above and beyond of what you'd expect. So you want first names in English, you want first names in German, it has the whole API. I'll put the link in the chat here so that you guys can add it up to the show, but definitely check it out for a prototype. JOE:The picks are on that GitHub pages. Awesome. [Laughs]DAN: For the Faker? JOE: The Faker. DAN:Yeah! [Laughs] In fact, where's that guy from? I remember that cartoon when I was a kid.JOE: I have no idea. I don't recognize it. DAN: I recognize that guy. Maybe it was a different tweak of it, but anyway... Yeah. JOE: Alright. Well, thank you so much for being on the show, Dan. We really appreciate great talk, great topic. Always great to have such a fantastic personality and contributor to the community on the show. DAN: Oh, thank you. That was good to talk with you guys. You guys are awesome. JOE: Thanks everybody else for showing up. We'll catch you all next week! [This episode is sponsored by Mad Glory. You’ve been building software for a long time and sometimes it gets a little overwhelming; work piles up, hiring sucks, and it's hard to get projects out the door. Check out Mad Glory. They are a small shop with experience shipping big products. They're smart, dedicated, will augment your team, and work as hard as you do. Find them online at madglory.com or on Twitter at @madglory.]**[Hosting and bandwidth provided by The Blue Box Group. Check them out at bluebox.net]**[Bandwidth for this segment is provided by Cache Fly, the world’s fastest CDN. Deliver your content fast with Cache Fly. Visit cachefly.com to learn more.]**[Do you wanna have conversations with the Adventures in Angular crew and their guests? Do you wanna support the show? Now you can. Go to adventuresinangular.com/forum and sign up today!]

Sign up for the Newsletter

Join our newsletter and get updates in your inbox. We won’t spam you and we respect your privacy.