Mar 25Module Federation, Hot Prod Reloading, SSR & Next.js, for real this time.Jacob Ebey and I created the first “server-side rendering” technique for Federated Applications almost a year ago. We went with the tried and true POST-request-based network communication to load HTML, convert it into react, then replace the children in the newly minted “react” code. This approach technically worked. But as…Nextjs12 min read
Feb 2When should you leverage Module Federation, and how?Critical thinking and patterns on when, why, where, to leverage Module Federation from the creator of the technology. Webpack’s Federation is immensely useful if used properly. The tricky part is there's not much information on how and where to leverage the technology. Leading to a bit of a wild west scenario. I've been working with the technology for…Webpack11 min read
Oct 15, 2021Next.js and Lazy Hydration. Keep the HTML but drop the JavascriptCode splitting can only get us so far, and how it works means you end up loading a lot of JS you don't really need right then and there. Why download the footer code when I'm looking at the header? Code splitting has served us well, its lets us eliminate…Nextjs5 min read
Aug 23, 2021Distributed Logging in Federated Applications, with SentryWhen it comes to distributed applications, Javascript logging gets tricky. What happens when you have multiple teams owning multiple parts of a single page or component? How can you use multiple DSNs in Sentry to send logs to the owning team, not the consuming team where the error occurred? These…Distributed Systems8 min read
Jul 31, 2021Server-side rendering tactics for federated applicationsWhat are the available techniques for SSR applications powered by Module Federation? There are a few to choose from, let’s list them. I’ve written and spoken about some tactics in varying degrees. But up until now, this information has never been centralized or easily discovered. …Server Side Rendering7 min read
Published in JavaScript in Plain English·Jul 24, 2021Next.js 11, Module Federation, and SSR — A brave new worldServer-side rendering with Next 11 and Module federation is ready for prime time! Bonus: we got "hot" (live) reloading working on federated applications! It’s been a long and painful road to module federation inside a next.js application — but we have finally been able to remove most of that pain. …Nextjs8 min read
Apr 23, 2021Module Federation, How do we create unit tests for distributed code?!The curious case of Module Federation and how do we write tests for federated applications. If you haven't heard by now — Module Federation is a way to simply import() other modules/files between independently compiled and deployed bundles at runtime. Possibilities are endless, especially after working with it for over…Module Federation4 min read
Published in The Startup·Oct 6, 2020Increase App Performance — Tame Tag Managers and Take Back Control From Third-PartiesJavascript application performance can be tricky, even if the application has been well-tuned for speed — there’s a big area that engineering does not own and has little control over. It’s the tag manager and third party code in general. I can get an app to load and finish in…Tag Management12 min read
Published in JavaScript in Plain English·Oct 6, 2020How To Boost JavaScript Runtime PerformancePart 1: Advanced Tactics to reduce App startup time — There’s lots of advice, but it seems to taper off when it comes to advanced performance tactics. I’ve read the articles, but it’s either too vague, too broad, or just basic stuff I have already done. …Web Development17 min read
Oct 1, 2020Micro-FE Architecture: Webpack 5, Module Federation, and custom startup code.Advanced implementation tactics to attach a startup sequence to micro-frontend applications designed using Module Federation. I’ll get this out the way right from the start, something that’s been requested hundreds of times now. You can set webpack_public_path dynamically (not hardcoded in the webpack config) with startup code, but there are…Frontend Architecture6 min read