Enhance: SSR for Web Components

Building web apps is often characterized as painful, complex, and time consuming. There are many tools, libraries, frontend frameworks, and opinions about how to fix that problem… but they come with a catch. The frontend ecosystem is fractured into incompatible niches. They are incompatible with the web standards until they've been compiled. They are incompatible with each other, and often even incompatible themselves in between versions. This is especially frustrating as web browsers automatically update while remaining backwards compatible. The web is a medium where compatibility is a feature. By adopting non standard dialects we trade off the web's most powerful feature.

Imagine if we could write code that just worked, and ran forever? Imagine not chasing npm updates? Imagine not hunting the forums for an elusive combination of configuration values to fix a broken build?

Good news: we can. HTML, it turns out, is a pretty good choice for web development. Specifically rendering custom elements, styling them with modern CSS, and treating the element upgrade as a progressive enhancement step with JavaScript.

In this talk, we'll tour Enhance: a new way to build web apps with the pure web standards. No custom dialects to learn. No build steps to configure. No friction. Just you; building the web.

What's the focus of the work these days?

These days we're driving towards finding focus for our customers in the front-end of web development. In the past few years, we've been working hard on figuring out how to bring the back-end more towards the front-end. The back-end traditionally has been tough to do. Lots of complexity. Servers, caching servers, database servers, infrastructure is code. And the front-end has been subsuming a lot of this work. And we think that the recent advances in cloud, cloud functions in particular, have given us the capabilies to bring down a lot of that complexity, adding backend dev into the front-end developer's toolbox.

What's the motivation for your talk?

My talk is in some ways a little bit of a throwback, and in some ways, it's about the future. So in the current state of front-end web development, things have gotten pretty complex. There's a lot of different JavaScript frameworks and there's a lot of different libraries and big ecosystems. These all rose up in the last generation of browsers because browsers weren't super great at dealing with the demands of more immersive experiences, and especially experiences that had to span multiple devices like mobile and desktop.

For us, increasingly, we've seen people struggle with these tools. So each of these different ecosystems tends to ship these days with transpilars. So you don't author web standard languages. You author in some higher level dialect. Then you compile it into web standards. In theory, that's going to run everywhere and work great, and a lot of the time it does. The problem is, as you add more and more code you get dependencies conflicting across different versions, and frequently breaking changes. The code is brittle. Worse, these different high-level dialects are not interoperable, and can't really have a React application inside of an Angular application. It'd be possible to bring all these things together, but it gets messy and the resulting code is very fragile.

The ultimate realization we've had is that a lot of this is just not necessary anymore. Web browsers are very good now. They're evergreen, so they're auto updating and they are backwards compatible. So the question we asked a few years ago is could our code be backwards compatible? Does it have to be compiled and do we have to deal with these incompatible ecosystem issues? The answer is no, we don't.

Now, the web has improved a lot in the last few years, and in particular, JavaScript got modules and we got web components. So we can compose applications now using just pure web standards, which means our apps would be backwards compatible and auto updating. Just a nice feature. So the talk is going to be a lot about these topics and why you should care and how you can move faster without having to deal with broken tool chains.

How would you describe the persona and level of the target audience for this session?

This is an interesting question. So at a high level, I would say this is a talk for Web developers and that is all of us these days. You're building software, you're probably building it for the Web in some fashion. But as you know, there's a lot of different kinds of developers. Some developers are more focused on the back-end. Some developers are more focused on the front-end. I believe that there's something for everyone here. We make a lot of assumptions, but our technology moves fast, and I think these two disciplines are also starting to come together more and more. Full-stack developers are Web devs that are able to participate in both the front-end and the back-end.

Is there anything specifically that you'd like this persona to walk away with after watching your presentation?

I think the big thing I'd like for them to find out is that we can use techniques like progressive enhancement, which are older techniques built for the browser today, and get great fast performance, deeply immersive experiences without sacrificing accessibility or render performance initially. So it'll be a pretty deep talk and it seems like we'll be talking about older technology, but we're going to take a new spin on it using the latest toys with Web Components and browser native JavaScript modules. 


Speaker

Brian LeRoux

Co-founder & CTO @Begin, created and maintains OpenJS Architect, maintains Enhance.dev

Brian is the co-founder of Begin.com, the best way to build Functional Web Apps (FWAs). He is the creator and maintainer of OpenJS Architect, an open-source framework for generating and deploying AWS standard SAM/CloudFormation and coined the term FWA. Also a maintainer of the recently shipped Enhance.dev which is the first HTML framework. You can catch him @brianleroux on Twitter where he talks about open source, JavaScript, serverless, FWA, and other web developer stuff.

 

Read more

Date

Wednesday Oct 26 / 04:10PM PDT ( 50 minutes )

Location

Pacific DEKJ

Topics

Frontend SSR Web Components Webb Apps Compatibility CSS JavaScript Enhance

Share

From the same track

Session Frontend

Everyone Can Be a Full-Stack Engineer

Wednesday Oct 26 / 10:35AM PDT

Serverless infrastructure makes it easier than ever to eliminate the boundary between frontend and backend. When engineers own the entire stack, they can focus less on rebuilding the same infrastructure and more on what matters: the user experience.

Speaker image - Alex Cole

Alex Cole

Software Engineer @convex_dev, previously @Asana

Session Frontend

Building Typesafe APIs with tRPC & TypeScript

Wednesday Oct 26 / 11:50AM PDT

When developing modern APIs, there a few options to choose from. REST is not a standard  but instead style. Trust is constantly broken between the API and client. gRPC and GraphQL provide standards but require complex tooling.

Speaker image - Brian Douglas

Brian Douglas

Co-founder & CEO @saucedopen, previously led Developer Advocacy by showcasing newest features @Github

Session

Panel: Rethinking Our Relationship with the Frontend

Wednesday Oct 26 / 02:55PM PDT

Each of the track speakers joins together in a panel about how the front-end is changing in today’s high velocity, domain-focused teams.

Speaker image - Brian LeRoux

Brian LeRoux

Co-founder & CTO @Begin, created and maintains OpenJS Architect, maintains Enhance.dev

Speaker image - Brian Douglas

Brian Douglas

Co-founder & CEO @saucedopen, previously led Developer Advocacy by showcasing newest features @Github

Speaker image - Laurie Voss

Laurie Voss

Data Analyst @Netlify

Speaker image - Alex Cole

Alex Cole

Software Engineer @convex_dev, previously @Asana

Session

What the Data Says: Emerging Technical Trends in Front-End and How They Affect You

Wednesday Oct 26 / 01:40PM PDT

Over the last 30 years of web development a predictable cycle has appeared in the adoption, commoditization and eventual abstraction of major new technical trends in web development.

Speaker image - Laurie Voss

Laurie Voss

Data Analyst @Netlify