text
stringlengths
0
1.36k
**Alex Sexton:** Right, yeah. I mean, it's like all of this stuff feels like it's a great-grandchild of Rails, where Rails would -- there's a word for it... It would generate code; you would just say "Rails New Controller"...
**Mikeal Rogers:** Scaffolding... It was called scaffolding.
**Alex Sexton:** Yeah, that's the word. And it definitely feels kind of like scaffolding, and there's a bit of scaffolding in the initial create-react-app, but I think it focuses less on generating code for you and more about providing tools and examples and kind of a baseline for you to build on, and then allowing -- ...
I think the last thing that's interesting in the create-react-app 1.0 release is the code-splitting stuff, and that's part of Webpack, as well. But there's a standard that no one uses for dynamic imports... It mixes async/await with import.
I hadn't looked into it much, because it wasn't really a great place to use it, but it's part of the standards track. I don't know where it is in that, but... You're gonna have an async function and then you can import something... You can do "await import" and then that will automatically build into a separate -- all ...
**Mikeal Rogers:** Yeah, I think that you're complicating it a little bit. It's a piece of syntax that allows you to with a function do the same thing you do with syntax for import, right? And the nice thing about that is at some point in the future - which is like not part of the initial interpretation phase of the br...
**Alex Sexton:** I guess I was complicating it because it would be invalid syntax to just throw an import there. It needs to be supported syntax; it's not just like something you could do before but people didn't know about it. I think awaiting in import is not -- like, it needs to be statically analyzable or at least ...
So create-react-app supports this in order to do bundles, which is a huge part of the PWA community's problem. If you follow Alex Russell, you'll know that your JavaScript that you're serving by default is far too large. So if you can turn on HTTP/2 and then do something like a handful of these asynchronous imports for...
**Mikeal Rogers:** \[44:08\] Following on with your talk about scaffolding, it seems like the big difference between this and what Rails does is, like you said, Rails will generate a lot of boilerplate code. This seems to generate a lot of configuration, right? The joke about Webpack is you only write one Webpack confi...
**Alex Sexton:** Yeah. I mean, that's a makefile joke, but yeah...
**Mikeal Rogers:** Yeah, exactly. \[laughs\] But I think also, like you were saying, one of the things that this does is really standardize what is the proper path for writing a React app with all these different configurations. So this allows you to sort of add features over time to that configuration without trying t...
**Alex Sexton:** Right. It's a noble cause. And other people are doing it. Ember CLI - they're doing this as well. When you upgrade these new-world configuration CLI tools, you get instant improvements in your applications, which is cool. Everything still works, and now it's 20% faster. Whenever Ember did the Glimmer u...
**Mikeal Rogers:** Definitely. One thing I can't wait to see is not compiling down to ES5 anymore, but compiling down to a set of features that are actually mostly supported, because there's a lot of performance benefits, too. Arrow functions are faster than regular functions in V8, and for the most part, people that a...
**Alex Sexton:** Yeah. You can configure that... Not in create-react-app, but in a generic Babel config you can say "This is the target set of features that I want to compile down to." So it's certainly possible, but I don't think many people go that far.
**Mikeal Rogers:** And also there's only one minifier that supports it as well... And it's still under really active development, so that's one of the things that you kind of lose.
Anyway, I think that it's about time for another break. We're gonna take a short little break here and when we come back we're gonna talk about the project of the week.
**Break:** \[46:35\]
**Mikeal Rogers:** The project of the week this week is Electron. There's been so much stuff about Electron; I'm sure that we've talked about Electron apps on here, I know that the Changelog did a whole episode as well...
Just for some quick background, Electron is a way to build desktop applications for Mac, Windows and Linux using Node.js and browser technologies. If you can make a website and use Node.js, you can write an Electron app.
It was originally broken out of the Atom editor that GitHub was doing. it was initially called Atom Shell, and then Jessica Lord and some of the good people at GitHub moved it into its own project and now it's really taken off.
**Rachel White:** \[48:09\] And some of the Electron apps that people might know of is like Hyper and Slack, and something that we talked about recently, which is WebTorrent, and stuff like that.
**Mikeal Rogers:** Visual Studio Code, my current editor of choice, as well. Yeah, one of the interesting things that I've seen about it is that I think a lot of people initially viewed it as "Oh, I can take my website and turn it into a desktop app." That's sort of what the Slack app does. Or "I can write desktop apps...
MongoDB has like a new DB Admin thing that's like a desktop app with Electron. Voltra is like this new music app that is way prettier and nicer than iTunes, and that is just because they knew Node.js really well, they can really dig into the nitty-gritty there. And a lot of the stuff that they're doing with data storag...
**Rachel White:** Have you built anything with Electron?
**Mikeal Rogers:** Yes. I wrote a little kind of a browser viewer on top of IPFS... Because I wanted to play around with IPFS, so I made a little drag-and-drop thing. I'm about halfway done with a desktop version of Roll Call, that uses Electron as well. And then I pulled down and just worked with a couple projects. I ...
**Rachel White:** Yeah. I mean, I'm super comfortable with Node too, and Electron has always been something that I have known existed as a thing, but is there anything extra that people that already know how to build web applications with Node would need to know in order to get up and running with Electron? Or does Ele...
**Mikeal Rogers:** It wraps around all of it, but also... I don't think that we can underestimate how much stuff there is in npm right now, like how many modules. And to make a lot of web apps work, a ton of what you do is that you build these backend services that just talk to something that has less security around i...
I've seen a lot of people just get up and running so quickly on their ideas because they can just store directly on the file system and access every module in npm and then put a web front-end on it and not have to spin up a back-end service, not have to deal with a front-end and a back-end, where they just kind of have...
**Rachel White:** Alex...
**Alex Sexton:** Yeah?
**Rachel White:** Have you made anything?
**Alex Sexton:** \[51:43\] In Electron, no? My experience in Electron has been installing the Electron bin for -- actually, we used Electron in order to do screenshots for our CSS library visual diffs, because it was easier to just run Electron cross-browser, render something and then use the stuff to take a screenshot...
So yeah, I used it for a pretty different thing. That may be an interesting use case of it... It's just a cross-browser environment to run HTML in headlessly, which is kind of cool.
**Rachel White:** Yeah. What was the thing that...? Oh, this is gonna be horrible -- it's gonna showcase my horrible memory. What was the thing that Adobe had that was allowing you to make apps easier? It might have just been like in Max, or something? Does anyone know what I'm talking about?
**Alex Sexton:** Yeah, they had an editor, and then they had... Yeah, the name of this stuff, but it was kind of DreamWeaver 2000, or whatever...
**Rachel White:** Well no, not DreamWeaver... It was one that actually let you get some kind of -- obviously, I guess it's not as notable...
**Alex Sexton:** Oh, Adobe AIR?
**Rachel White:** Yes, Adobe AIR.
**Alex Sexton:** Thank you, Corvin U. in the channel.
**Rachel White:** Thanks! Okay, cool.
**Mikeal Rogers:** And Flex I think is what it eventually became, right?
**Alex Sexton:** Flex was the framework that you wrote in. AIR was the container that it would run in.
**Mikeal Rogers:** Okay.
**Rachel White:** Hold on, the cops are coming again. \[laughter\]
**Alex Sexton:** It was all Flash-based. ActionScript \[unintelligible 00:53:52.00\]
**Mikeal Rogers:** The cops are coming to arrest Rachel for talking about Adobe Flash... \[laughter\]
**Rachel White:** Okay, cool... So I remember when that came out and I was like, "Oh, this is rad!" I mean, Electron seems like -- I know that people are talking about it a lot, but I feel like people should be talking about it more... I know that's just like a handwavy thing to say, but why aren't people that are maki...
**Alex Sexton:** Because the web is an important distribution platform, and defaulting to native applications is maybe not the best strategy to reach the most people.
**Mikeal Rogers:** If you talk to people that have apps that people use daily - any app that you use for business or anything that you open up daily, people prefer desktop applications.
**Rachel White:** True.