Latest / CyberSecurity Summary / Building Your Own JavaScript Framework: Architect extensible and reusable framework systems
Transcript
- 0:00Speaker 1: Welcome to the Deep Dive. Today. We're tackling a pretty
- 0:03Speaker 1: big topic, JavaScript frameworks.
- 0:05Speaker 2: Yeah. It's a huge part of web development today for sure.
- 0:07Speaker 1: And we're using Vlad Philippa's book Building Your Own JavaScript
- 0:11Speaker 1: Framework as our main guide here.
- 0:13Speaker 2: That's the plan.
- 0:14Speaker 1: Our mission really is to cut through some of the
- 0:17Speaker 1: complexity and get to the core of why these frameworks
- 0:20Speaker 1: are so dominant and what makes them actually work right.
- 0:24Speaker 2: And this book is pretty recent, came out last year.
- 0:27Speaker 2: Vlad Philipov, he's got a ton of experience Mozilla, Stripe,
- 0:31Speaker 2: grunt js wow.
- 0:33Speaker 1: Yeah, solid background.
- 0:34Speaker 2: Definitely, and he's really aiming to help developers not just
- 0:38Speaker 2: use frameworks, but understand them deeply, maybe even build their own.
- 0:42Speaker 1: That's ambitious, it is.
- 0:44Speaker 2: And Mike Taylor from Google wrote the ForWord, which kind
- 0:47Speaker 2: of speaks to Vlad standing in the community.
- 0:49Speaker 1: Okay, cool, And for you listening, maybe you're making tech
- 0:51Speaker 1: choices or leveling up your skills, or maybe you're just
- 0:54Speaker 1: curious about like the plumbing of the modern web. This
- 0:58Speaker 1: deep dive should give you a solt a handle on
- 1:00Speaker 1: JavaScript frameworks. We'll try to keep it practical, focus on
- 1:04Speaker 1: the why and the what without drowning in jargon.
- 1:07Speaker 2: Sounds good, let's get into it.
- 1:09Speaker 1: Okay, So where does the book start the rise of
- 1:11Speaker 1: JavaScript itself?
- 1:12Speaker 2: Exactly? It sets the stage by looking back at JavaScript's
- 1:16Speaker 2: journey over twenty five years. Right, it went from just
- 1:19Speaker 2: simple scripting.
- 1:20Speaker 1: Yeah, like making text blank basically.
- 1:23Speaker 2: Pretty much to being this, you know, powerhouse language. It's
- 1:27Speaker 2: used on something like ninety eight percent of websites. That's staggering,
- 1:30Speaker 2: it really is.
- 1:31Speaker 1: You can't imagine the Web without it now. And the
- 1:34Speaker 1: book makes the point that frameworks became the standard way
- 1:37Speaker 1: to build things.
- 1:38Speaker 2: Millions of developers rely on them. They enable that rapid
- 1:41Speaker 2: development we see everywhere.
- 1:42Speaker 1: It's hard to argue with that, And the.
- 1:44Speaker 2: Book poses an interesting thought. Maybe the Web wouldn't have
- 1:47Speaker 2: kept up with other platforms like native apps without frameworks
- 1:51Speaker 2: pushing things forward.
- 1:52Speaker 1: Huh, that's a big claim. Why what were the early challenges?
- 1:56Speaker 2: Well, think about it. Early on front tend stuff was
- 1:59Speaker 2: often lots of repeated code, not much focus on like
- 2:04Speaker 2: organizing for performance or scalability.
- 2:06Speaker 1: Right, copy paste driven development sometimes.
- 2:08Speaker 2: Sometimes yeah, And deployment was often pretty basic too. Frameworks
- 2:12Speaker 2: brought structure.
- 2:13Speaker 1: And they pushed for things like a build step right
- 2:15Speaker 1: tools like webpack s build. Those weren't common before.
- 2:19Speaker 2: Not nearly as common. That build step became crucial. Package
- 2:23Speaker 2: managers too for handling all the dependencies, and transpilers like
- 2:26Speaker 2: Babble letting you use new JavaScript features sooner.
- 2:29Speaker 1: Okay, So frameworks sort of force the ecosystem to mature
- 2:33Speaker 1: in a way.
- 2:33Speaker 2: You could definitely say that, which brings us to the benefits.
- 2:37Speaker 2: The big one the book highlights is abstraction.
- 2:39Speaker 1: Abstraction meaning hiding complexity.
- 2:42Speaker 2: Pretty much providing simpler ways to do complex things. It
- 2:45Speaker 2: lets developers focus on the actual business logic, the features,
- 2:49Speaker 2: and iterate faster.
- 2:50Speaker 1: Gotcha like the example of asynchronous web requests before fetch
- 2:54Speaker 1: API was standard.
- 2:55Speaker 2: Oh yeah, that used to be way more complicated. Different
- 2:59Speaker 2: browsers handled x some LHTTP requests differently. Error handling was tricky.
- 3:04Speaker 2: Frameworks smoothed all that out.
- 3:06Speaker 1: I remember those days. It was painful totally.
- 3:10Speaker 2: And it's not just basic browser stuff. Frameworks help integrate
- 3:13Speaker 2: with databases external APIs.
- 3:16Speaker 1: Like graft you all integration, maybe exactly.
- 3:18Speaker 2: Some frameworks make that much simpler. It helps keep your
- 3:21Speaker 2: front end and back end talking.
- 3:22Speaker 1: Nicely, and presumably helps with security too. By providing standard
- 3:26Speaker 1: ways to do things.
- 3:27Speaker 2: That can be a benefit. Yeah, fewer chances for common errors.
- 3:31Speaker 2: Plus they help developers keep up with evolving web standards.
- 3:34Speaker 1: Okay, what else tooling you mentioned CLIs right?
- 3:37Speaker 2: Command line interfaces clies are huge.
- 3:39Speaker 1: Many frameworks come with one, so you type commands in
- 3:43Speaker 1: your terminal yep.
- 3:44Speaker 2: Like the Ember CLI. It can set up a whole
- 3:46Speaker 2: new project for you, generate boilerplate code for components or routes.
- 3:51Speaker 1: Ah. So it saves a lot of setup time and
- 3:53Speaker 1: keeps things consistent exactly.
- 3:54Speaker 2: It's like having a toolkit ready to go.
- 3:56Speaker 1: Makes sense. The book then gives specific examples, which I
- 3:59Speaker 1: found really helped.
- 4:00Speaker 2: Yeah, Comparing them really clarifies the different philosophies. They start
- 4:04Speaker 2: with MBERGS, which is described as opinionated, highly opinionated. It
- 4:09Speaker 2: makes a lot of choices for you about structure, component services, models, routers, CLI,
- 4:14Speaker 2: even data management with.
- 4:16Speaker 1: Mber data, so steeper learning curve maybe the.
- 4:18Speaker 2: Book suggests that. Yeah, but the payoff is supposed to
- 4:22Speaker 2: be consistency and guidance towards building really solid, maintainable apps,
- 4:27Speaker 2: especially for larger teams.
- 4:28Speaker 1: And it came from sprout Core originally.
- 4:30Speaker 2: Interesting, Yeah, it has a history. Then you've got spelt
- 4:33Speaker 2: Kit powered by Spelt.
- 4:34Speaker 1: Right the dot sveelt files everything in one place, script
- 4:38Speaker 1: style HTML.
- 4:40Speaker 2: Huh. And it's big thing is the compiler. It does
- 4:43Speaker 2: a lot of work before the code even hits the browser,
- 4:45Speaker 2: compiling those spelt components into efficient vanilla javascripts.
- 4:49Speaker 1: That's different. And it uses vite for tooling.
- 4:51Speaker 2: Yeah, vitees done for being really fast during development.
- 4:54Speaker 1: Okay. Then next JS that's built on React right for
- 4:57Speaker 1: service side.
- 4:57Speaker 2: Rendering primarily, Yes, SSR is a big focus. Lots of
- 5:01Speaker 2: built in features, especially around fetching data, very popular for
- 5:04Speaker 2: sites needing good SEO.
- 5:06Speaker 1: And NEXTJS is kind of the view equivalent.
- 5:08Speaker 2: Broadly speaking, Yes uses VJs. Also focuses on SSR and
- 5:12Speaker 2: optimizing the app experience, often using Webpack and babble behind
- 5:16Speaker 2: the scenes.
- 5:17Speaker 1: And solid start for solog ijs. What's its angle?
- 5:20Speaker 2: The book highlights its flexibility with rendering methods and its
- 5:23Speaker 2: efficient rendering using like standard browser features, real dom nodes,
- 5:27Speaker 2: web components.
- 5:28Speaker 1: Interesting and remix full stack.
- 5:31Speaker 2: Yeah. Remix handles frontend and back end. Very UI focused,
- 5:35Speaker 2: uses Typescript and React, known for its powerful routing, often
- 5:39Speaker 2: file based, lots of rendering options too.
- 5:41Speaker 1: Wow, Okay, that's quite a spectrum of approaches.
- 5:44Speaker 2: It really is, and the book tries to categorize the
- 5:46Speaker 2: common features and patterns you see.
- 5:47Speaker 1: Across them, like spa single page application.
- 5:51Speaker 2: Right where the page loads once and content updates dynamically.
- 5:54Speaker 1: SSR service side rendering, which we mentioned, good for SEO initial.
- 5:57Speaker 2: Load, CSR client side rendering, the browser does all the work.
- 6:01Speaker 1: SSG static site generators build all the HTML upfront, good
- 6:05Speaker 1: for blogs.
- 6:05Speaker 2: Docs exactly, And patterns like SFC single file components like
- 6:09Speaker 2: spelt uses and.
- 6:10Speaker 1: Those classic architectural patterns MVC, MVVM.
- 6:13Speaker 2: Model view controller, model.
- 6:15Speaker 1: Viewview model. Yeah, common ways to structure the code's responsibilities.
- 6:19Speaker 1: They're blueprints. Many frameworks adapt.
- 6:22Speaker 2: The book mentioned the Touto MBC project here.
- 6:24Speaker 1: Oh yeah. Totem vc was brilliant, simple to do app
- 6:28Speaker 1: built in dozens of different frameworks.
- 6:29Speaker 2: You could compare them side by side.
- 6:31Speaker 1: Exactly apples apples comparison of syntax structure performance. It was
- 6:36Speaker 1: incredibly useful for understanding the differences.
- 6:39Speaker 2: We probably need a new version of that now with
- 6:41Speaker 2: all the newer frameworks.
- 6:42Speaker 1: The book suggests that too, would be fascinating.
- 6:44Speaker 2: Definitely now The book also touches on back end frameworks right,
- 6:48Speaker 2: not just front end.
- 6:49Speaker 1: YEP important distinction. Frameworks aren't just for the browser. Back
- 6:53Speaker 1: End frameworks help build server side logic and APIs thick.
- 6:56Speaker 2: Express That one comes up a lot.
- 6:58Speaker 1: Express is huge in the no jail world, very minimal, unopinionated,
- 7:02Speaker 1: often a starting point you build on top of it.
- 7:04Speaker 2: What about others? Happy dot js?
- 7:06Speaker 1: Happyjs is more opinionated, convention over configuration, strong built in
- 7:12Speaker 1: features for things like validation sales.
- 7:15Speaker 2: Dot js sales is like an MVC framework built on Express.
- 7:18Speaker 2: Enterprise focus, RM support powerful CLISJS that sounds familiar. SGS
- 7:24Speaker 2: is very popular, uses Typescript, heavily structured similarly to Angular.
- 7:29Speaker 2: Actually good for micro services, web sockets, graph QL and
- 7:33Speaker 2: isjs another comprehensive typescript back end framework. RM templating routing
- 7:39Speaker 2: kind of an all in one solution.
- 7:41Speaker 1: Okay, so lots of options on the back end too,
- 7:43Speaker 1: and even goes beyond the web.
- 7:44Speaker 2: Yeah. Briefly mentions native and hardware frameworks React Nator for
- 7:48Speaker 2: cross platform mobile.
- 7:49Speaker 1: Apps build once, run on iOS and Android.
- 7:52Speaker 2: That's the idea Electron for desktop apps using web tech
- 7:55Speaker 2: like HTML, CSSGS.
- 7:57Speaker 1: Like Slacker vs code exactly.
- 7:59Speaker 2: And even Johnny for robotics programming hardware with JavaScript.
- 8:02Speaker 1: Ohoh, okay, JavaScript really is everywhere.
- 8:05Speaker 2: It's wild, and you can't talk frameworks without talking testing.
- 8:08Speaker 1: Right, ensuring things actually work.
- 8:10Speaker 2: The book mentions just Playwright Vitist as examples crucial for billing,
- 8:14Speaker 2: reliable apps and reliable frameworks.
- 8:16Speaker 1: Okay, and mentioned the STATEDJAS dot com survey is a
- 8:19Speaker 1: way to track trends.
- 8:20Speaker 2: Yeah, that survey is a great resource. The book noted
- 8:24Speaker 2: the twenty twenty two surveys showed maybe a slight dip
- 8:27Speaker 2: and reacts retention rate developers saying they'd use it again.
- 8:30Speaker 1: Interesting suggest the landscape is always shifting.
- 8:33Speaker 2: Absolutely, which is why the book emphasizes understanding the core
- 8:37Speaker 2: patterns that transcend specific popular frameworks. Those ideas are likely
- 8:42Speaker 2: to stick around.
- 8:43Speaker 1: That makes sense. Focus on the fundamentals. Okay, so we've
- 8:46Speaker 1: covered the Y and the what, Let's peel back the layers.
- 8:49Speaker 1: How are these things actually built? Framework organization and abstractions.
- 8:53Speaker 2: Right, And the book even nudges you to use debugging
- 8:55Speaker 2: tools like in vs code to poke around inside a
- 8:58Speaker 2: frameworks code and see how let's put together.
- 9:00Speaker 1: Get your hands dirty exactly.
- 9:02Speaker 2: So abstractions we mentioned them before, but they're central taking
- 9:07Speaker 2: complex stuff, giving it a simpler interface.
- 9:09Speaker 1: Hiding the messy details, and.
- 9:11Speaker 2: Also organizing different features into usable patterns. It lets developers
- 9:15Speaker 2: focus on their specific problem the business logic, not the
- 9:20Speaker 2: low level plumbing.
- 9:21Speaker 1: Cuts down on repetition complexity.
- 9:23Speaker 2: Right, and abstraction is a Corsis concept, not just web dev.
- 9:27Speaker 2: Simplifying complex systems is how we build anything sophisticated.
- 9:31Speaker 1: The book talks about levels of abstraction.
- 9:33Speaker 2: Yeah, like layers browser APIs or one level back end
- 9:37Speaker 2: services running on OS infrastructures. Another frameworks add their own
- 9:41Speaker 2: layers on top.
- 9:42Speaker 1: But abstractions aren't perfect right downsides good point.
- 9:45Speaker 2: The book mentions they might be incomplete, not cover every
- 9:48Speaker 2: edge case, or they might misrepresent the low level system,
- 9:52Speaker 2: which can be confusing if you need to debug deep
- 9:54Speaker 2: and being.
- 9:55Speaker 1: Too opinionated can limit flexibility.
- 9:57Speaker 2: Definitely, Like the next JSAP roads examples. Super convenient for
- 10:00Speaker 2: the standard case, but maybe restrictive if you want a
- 10:04Speaker 2: different structure. It's a tradeoff.
- 10:05Speaker 1: Okay, So what are these abstractions built from? In JavaScript?
- 10:09Speaker 2: On the front end? A lot builds on the web
- 10:11Speaker 2: APIs The browser provides domb bomb, cssom fetch, web sockets, storage,
- 10:17Speaker 2: background services, tons of them.
- 10:19Speaker 1: So frameworks often wrap these browser features, often.
- 10:22Speaker 2: Yes, or they build their own abstractions from scratch based
- 10:24Speaker 2: on their design goals.
- 10:25Speaker 1: Like the next JS nestlink example.
- 10:27Speaker 2: Perfect example. It simplifies creating internal links compared to a
- 10:32Speaker 2: basic HTML attag building on view router's capabilities, but adding
- 10:36Speaker 2: next specific features takes.
- 10:37Speaker 1: A basic tool, makes it more framework specific and convenient exactly.
- 10:42Speaker 2: And on the back end, no js provides its own APIs,
- 10:45Speaker 2: and frameworks build on those, sometimes adding custom extensions.
- 10:49Speaker 1: The abstraction levels vary there too, like nestjs letting you
- 10:52Speaker 1: swap HTTP frameworks right, you.
- 10:54Speaker 2: Can choose express or fastify under the hood in nests.
- 10:57Speaker 2: That's a pretty high level of abstraction over the server itself.
- 11:00Speaker 1: Events are important too.
- 11:02Speaker 2: Crucial responding to user clicks on the front end, handling
- 11:05Speaker 2: beta streams on back end. Happyjs has its event system.
- 11:09Speaker 2: Johnny five uses events for sensor data.
- 11:12Speaker 1: It's everywhere and the UI specific stuff components.
- 11:15Speaker 2: Yeah, the building blocks of UI.
- 11:17Speaker 1: Yeah.
- 11:17Speaker 2: The book distinguishes between nesting just putting one inside another
- 11:21Speaker 2: and composition designing them to work together flexibly.
- 11:23Speaker 1: Light cycle methods those hooks where you run code at specific.
- 11:27Speaker 2: Times YEP like mounted in view or use effect and
- 11:29Speaker 2: React frameworks manage the component life cycle and give you
- 11:32Speaker 2: points to.
- 11:33Speaker 1: Plug in routers for mapping URLs.
- 11:36Speaker 2: Essential for spas mapping a URL path to the right
- 11:39Speaker 2: component or logic.
- 11:41Speaker 1: And template engines mixing HTML like syntax with data.
- 11:45Speaker 2: Right, defining the structure and binding it to application state.
- 11:49Speaker 1: Okay, and the book clarifies modules, libraries and frameworks good distinction.
- 11:54Speaker 2: Modules are about code organization, encapsulation. Libraryes solve specific problems
- 11:59Speaker 2: like podash for utilities, React for UI. Frameworks provide the
- 12:03Speaker 2: whole structure the rules of the game, often using libraries internally.
- 12:07Speaker 1: Got it modules Organized libraries solve frameworks orchestrate nicely print Okay,
- 12:11Speaker 1: so we understand abstractions and building blocks. What about the
- 12:14Speaker 1: overall internal architecture? How are framework structured inside?
- 12:18Speaker 2: This part focuses on the patterns APIs packaging tooling, basically
- 12:22Speaker 2: how the framework itself is engineered, and a key point
- 12:25Speaker 2: is that the architecture is often designed with the framework
- 12:27Speaker 2: user the developer in mind.
- 12:28Speaker 1: Makes sense. It has to be usable.
- 12:30Speaker 2: Totally, so you see things like a clear directory structure,
- 12:33Speaker 2: separation of concerns different parts do different jobs, and well
- 12:38Speaker 2: defined public interfaces the APIs developers actually interact with.
- 12:42Speaker 1: Some frameworks are split into multiple repos like Angular.
- 12:45Speaker 2: Yeah for very large frameworks that helps manage complexity. Core
- 12:50Speaker 2: logic might be separate from the CLI tool, for instance.
- 12:53Speaker 1: And modules are key for organizing the frameworks on code too.
- 12:57Speaker 2: Absolutely the module pattern is universal form encapsulation. The technical
- 13:01Speaker 2: architecture then outlines the specific APIs entry points and tooling.
- 13:06Speaker 1: And it's all distributed as packages, usually via NPM.
- 13:09Speaker 2: Mostly Yes, packages contain the core logic, public, private APIs,
- 13:13Speaker 2: maybe build tools. The book points out some common package
- 13:16Speaker 2: types in modern frameworks.
- 13:17Speaker 1: Like a server interface package for full stack.
- 13:19Speaker 2: Or back end right like ne SGS adapters, NEXTJS server package,
- 13:23Speaker 2: feltkit adapters. They handle the connection to the deployment environment.
- 13:26Speaker 1: Shared packages for common utilities.
- 13:28Speaker 2: YEP reusable stuff like helper functions, constants, maybe HTML escaping logic.
- 13:33Speaker 1: Core API packages the fundamental building.
- 13:35Speaker 2: Blocks exactly like Angler's dependency injection system. The stuff developers used.
- 13:40Speaker 1: Directly developer tools packages.
- 13:42Speaker 2: Enhancing the dev experience, linters, formatters, debug tools integrated somehow
- 13:47Speaker 2: and plugin extension APIs crucial for customization, allowing users or
- 13:52Speaker 2: other developers to extend the framework without modifying the core.
- 13:55Speaker 2: Think Happy dot JS plugins or solid as integrations.
- 13:59Speaker 1: What about entry point Where does it all start?
- 14:01Speaker 2: Key concept where the framework or the application using it
- 14:04Speaker 2: boots up Ember's application class, nuts, dot com fig, dot
- 14:09Speaker 2: JS back end, bootstrap files like an ADONISJS or sjs's
- 14:13Speaker 2: app module.
- 14:14Speaker 1: And binary s executables. The cli tools we talked about YEP.
- 14:17Speaker 2: Scripts for building, testing, scaffolding, managing dependencies, automating the workflow.
- 14:21Speaker 1: Compiler, bundler, infrastructure tools like babble s built.
- 14:25Speaker 2: Essential, transforming and optimizing the code. For production frameworks often
- 14:28Speaker 2: bundle or configure.
- 14:29Speaker 1: These tools and types.
- 14:31Speaker 2: For Typescript very important if the framework uses Typescript. Exporting
- 14:35Speaker 2: type definitions ts files allows developers using Typescript to get
- 14:39Speaker 2: autocompletion and type checking. Huge productivity boost.
- 14:42Speaker 1: Wow. Okay, A lot goes into the internal plumbing. So
- 14:46Speaker 1: once it's built, how do you ensure it's well, good, usable,
- 14:49Speaker 1: in high quality.
- 14:50Speaker 2: That's the next section focuses on documentation, framework, testing, and
- 14:54Speaker 2: deb tooling. Documentation is first, and the book calls it
- 14:57Speaker 2: absolutely crucial for adoption sense.
- 15:00Speaker 1: If people can't figure out how to use.
- 15:01Speaker 2: It, they won't. So comprehensive API references good examples, maybe
- 15:06Speaker 2: even internal docks for contributors.
- 15:08Speaker 1: API references can be generated automatically.
- 15:11Speaker 2: Sometimes yeah from code comments using tools like jstoc or
- 15:14Speaker 2: type doc or written manually. Stat Site generators like Docusaurus
- 15:19Speaker 2: are often used to build the actual documentation websites. Viewdogs
- 15:23Speaker 2: and Angular are mentioned as having strong docs. Examples are
- 15:26Speaker 2: key to hugely important. They drastically lower the learning curve.
- 15:30Speaker 2: Can be in the docks or as separate code samples,
- 15:32Speaker 2: even for internal company frameworks. Good examples save tons of time.
- 15:36Speaker 1: And internal docks for contributors. Explaining how to build test
- 15:39Speaker 1: contribute code.
- 15:40Speaker 2: Essential for open source YEAH, setting contribution guidelines, coding standards,
- 15:45Speaker 2: Ember and Angular are again cited as good examples here.
- 15:48Speaker 1: Then testing the framework.
- 15:50Speaker 2: Itself vital making sure it's correct performance, handles edge cases
- 15:55Speaker 2: using testing frameworks like just playwright vitised internally.
- 16:00Speaker 1: What kinds of tests unit.
- 16:01Speaker 2: Tests for individual functions, modules and isolation, integration tests to
- 16:06Speaker 2: check how different parts work together. End to end tests
- 16:09Speaker 2: that run a whole sample application built with the framework.
- 16:12Speaker 1: Testing the whole workflow exactly.
- 16:14Speaker 2: The book gives snippets showing how Angular and NESGS might
- 16:17Speaker 2: test their own internal pieces.
- 16:18Speaker 1: Benchmarking performance too.
- 16:20Speaker 2: Yep, measuring API speed, rendering efficiency, how it handles large inputs,
- 16:25Speaker 2: both public APIs and internal micro benchmarks. Next, dot js
- 16:29Speaker 2: having benchmark scripts is mentioned.
- 16:31Speaker 1: And finally, development tooling for the framework's own development.
- 16:34Speaker 2: Right, things like CI systems for automated testing on every commit,
- 16:39Speaker 2: good source control practices with get tagging releases, managing branches,
- 16:44Speaker 2: and well configured package dot json files for dependencies and
- 16:48Speaker 2: development scripts. Linting building testing.
- 16:51Speaker 1: Sgs'spackage dot Jason is shown as an example of how
- 16:54Speaker 1: complex that can get.
- 16:55Speaker 2: It really ties everything together. The book wraps up this
- 16:58Speaker 2: part by noting that learning from the recurring patterns in
- 17:01Speaker 2: existing framework architectures is super valuable.
- 17:04Speaker 1: Okay, so we've gone deep on internals and quality. What
- 17:08Speaker 1: about someone actually thinking, Hey, maybe I should build a framework.
- 17:11Speaker 1: What considerations come first?
- 17:13Speaker 2: The book shifts to that practical perspective. Next starts with
- 17:17Speaker 2: really defining the project goals.
- 17:19Speaker 1: Who is this for the target audience? Right? Web apps,
- 17:22Speaker 1: component libraries, back end native exactly.
- 17:25Speaker 2: That defines the scope, then identifying the specific problem space,
- 17:30Speaker 2: What pain point are you solving? How is it different
- 17:33Speaker 2: or better than existing solutions?
- 17:34Speaker 1: That's the unique value proposition precisely.
- 17:37Speaker 2: And then come the big technical design decisions, your tech stack,
- 17:41Speaker 2: architectural patterns, development approach. These foundational choices shape everything.
- 17:45Speaker 1: Revisiting that idea of abstraction levels crucial.
- 17:48Speaker 2: Finding the right balance between simplifying things and keeping enough flexibility,
- 17:52Speaker 2: clean interfaces boosting productivity but not overly restrictive.
- 17:56Speaker 1: In which JavaScript environments to support browser node deno big decision.
- 18:01Speaker 2: Supporting multiple environments adds complexity and maintenance overhead. Need to
- 18:06Speaker 2: choose carefully.
- 18:06Speaker 1: And leveraging existing libraries. Don't reinvent the wheel.
- 18:10Speaker 2: Strong advice use solid libraries for common tasks routing, state management,
- 18:15Speaker 2: data fetching. Focus your effort on what makes your framework unique.
- 18:19Speaker 2: Angular using RxJS view, recommending Pinia next, building on React
- 18:24Speaker 2: good examples.
- 18:25Speaker 1: Okay, makes sense, right? Did the book gets really hands
- 18:27Speaker 1: on with examples building Componium test.
- 18:30Speaker 2: Yeah, this is where it gets concrete. Building a simple
- 18:32Speaker 2: testing framework starts with branding, name, logo colors. Seems small,
- 18:37Speaker 2: but identity matters. Choosing a unique name space.
- 18:40Speaker 1: Is key avoid naming collisions right.
- 18:42Speaker 2: Then architecting it core goal, test JS code with assertions,
- 18:46Speaker 2: what's needed, test runner, cross platform support, assertion types, test
- 18:50Speaker 2: suite interface, what's out of scope? Initially, code coverage, stubbing,
- 18:54Speaker 2: build system integration, keep it.
- 18:55Speaker 1: Focused, find the minimum viable product essentially kind of yeah.
- 18:59Speaker 2: Then design the overall structure the executable CLI, handling options,
- 19:03Speaker 2: emitting test status, respecting test life cycles, sat up, tear down.
- 19:07Speaker 1: And implementing executors for different environments. Node executor, browser executor exactly.
- 19:12Speaker 2: Node executor runs tests in node may be using worker
- 19:15Speaker 2: threads for isolation. Browser executor needs to control a real browser,
- 19:20Speaker 2: maybe using.
- 19:21Speaker 1: Puppeteer puppeteer let's node control Chrome yep.
- 19:24Speaker 2: It bridges node and the browser handles headless mode, no
- 19:28Speaker 2: visible UI or headful visible. Browser needs to send results
- 19:32Speaker 2: back from the browser to the node.
- 19:33Speaker 1: Runner complex and designing the API for writing tests the
- 19:37Speaker 1: eight function assert object life cycle methods.
- 19:40Speaker 2: That's the developer facing part needs to be intuitive. CT
- 19:43Speaker 2: defines a suite assert checks conditions, cert equaliss are true,
- 19:46Speaker 2: life cycle hooks like before each run before tests mocking
- 19:50Speaker 2: fake replaces also considered.
- 19:52Speaker 1: Then implementing step by step node in first internal packages, browser, infra,
- 19:57Speaker 1: result collection.
- 19:58Speaker 2: Logical progression, and the CLI needs to be well behaved,
- 20:01Speaker 2: follows standard conventions. Choose the right executor based on user input.
- 20:05Speaker 1: And testing the testing framework itself with E two E tests.
- 20:08Speaker 2: Meta but necessary. Ensure the whole install, import, execute workflow
- 20:11Speaker 2: functions correctly.
- 20:13Speaker 1: Okay, that's a great walkthrough for a focused tool. Then
- 20:15Speaker 1: it tackles a full stack framework Componium again.
- 20:18Speaker 2: Yep, same brand, bigger scope. Back End and front end
- 20:21Speaker 2: functionality starts with the back end entry point a server
- 20:24Speaker 2: file using Express as a foundation. Middleware routing requests parsing
- 20:29Speaker 2: API responses similar pattern to SGS starting point.
- 20:32Speaker 1: Back End routing uses Express routes.
- 20:35Speaker 2: Configuration handled by a config package. Supports YAML, json JS formats,
- 20:40Speaker 2: sensible defaults in default dot JS standard practice. THETIS integration
- 20:44Speaker 2: uses sqalized ORM via a dB package, loads models automatically
- 20:49Speaker 2: from a model's directory, shows an example query within a
- 20:52Speaker 2: route handler.
- 20:53Speaker 1: ORM simplifies database code definitely optional.
- 20:55Speaker 2: Graph Quel support is also mentioned for flexible APIs observability.
- 20:59Speaker 1: Log using a logger class based on Winston logs to
- 21:02Speaker 1: console and dev json files and PROD standard levels. Dot
- 21:06Speaker 1: info warn.
- 21:07Speaker 2: Error good for debugging and monitoring and developer experience.
- 21:11Speaker 1: A big focus a Componium CLI for in it scaffold
- 21:15Speaker 1: project dev, start dev server with hot reloading, create scaffold components,
- 21:20Speaker 1: streamlining the workflow, walks through a sample workflow, install in
- 21:24Speaker 1: it dev, create components, ad models, ad tests.
- 21:27Speaker 2: Yeah shows how a developer would use the CLI and
- 21:29Speaker 2: framework features mentions tools like chokodar for file watching, at
- 21:32Speaker 2: inquirer for interactive prompts, yards for parsing CLI arguments.
- 21:36Speaker 1: Okay, so that covers the back and end DX. Then
- 21:38Speaker 1: it switches to the front end part of the Componium.
- 21:40Speaker 2: Right building the UI side goals interact with the back
- 21:44Speaker 2: end API, provide visual interfaces, mimic features like reactivity from established.
- 21:48Speaker 1: Frameworks, architecture, component based views, routing.
- 21:52Speaker 2: Standard front end patterns. Key features discussed.
- 21:54Speaker 1: Component based architecture, reusable UI.
- 21:56Speaker 2: Pieces, reactivity, UI updates automatically when data changes, uses web
- 22:00Speaker 2: components and the proxy API. In this basic.
- 22:02Speaker 1: Example, templating defining UI structure uses lit html here for
- 22:06Speaker 1: writing HTML and JS.
- 22:08Speaker 2: Server side rendering SSR pre render on the server for performance,
- 22:11Speaker 2: SEO inject state.
- 22:13Speaker 1: Production optanizations, medification using s build.
- 22:16Speaker 2: Shows implementing reactive components. Reactive component class using proxy YEP
- 22:22Speaker 2: extends HTM element uses proxy to watch state changes. Templating
- 22:26Speaker 2: with lit HTML's tagged templates.
- 22:29Speaker 1: Defines a Componium component class combining reactivity and lit uses.
- 22:33Speaker 1: E S six imports handles events like ad Click.
- 22:36Speaker 2: Exactly shows how components are defined and used. Server serve
- 22:40Speaker 2: static files. SSR prerenders components.
- 22:42Speaker 1: Client side routing maps URLs to components, basic client views,
- 22:47Speaker 1: object examples.
- 22:48Speaker 2: Simple mapping. Yeah shows in a framework item component rendered
- 22:51Speaker 2: via SSR, then hydrated on the client mentions enabling prod
- 22:54Speaker 2: mode with noto D and V production.
- 22:56Speaker 1: Wow. Okay, so it really walks through building significant pieces.
- 23:00Speaker 1: What's the final section about maintenance In the future.
- 23:02Speaker 2: Crucial stuff starts with the software development life cycle SDLC planning, design, implement, test, deploy,
- 23:08Speaker 2: maintain applies to frameworks too. Agile is mentioned as an extension.
- 23:12Speaker 1: Development cycle for frameworks. Gathering user feedback is key.
- 23:15Speaker 2: Essential formal future definition processes like RFCs, mber U examples
- 23:20Speaker 2: keeping users informed about changes.
- 23:22Speaker 1: Release process details, change logs.
- 23:25Speaker 2: Need good change logs, automating them from commit messages. Commit
- 23:29Speaker 2: is in change sets, version INGSIMB major minor dot patch
- 23:33Speaker 2: versus calvert date based semantic release tool for automating simver
- 23:37Speaker 2: document your strategy.
- 23:39Speaker 1: Simplifying releases. Tools like release it, NPCD pipelines.
- 23:43Speaker 2: Automating testing, building, version bumping, publishing, continues, delivery via GitHub
- 23:48Speaker 2: actions circle ci makes it smoother.
- 23:50Speaker 1: Licensing open source apatche MITGPL versus proprietary.
- 23:53Speaker 2: Important decision early on choose al license. Dot com helps
- 23:57Speaker 2: consider dependency, licenses too.
- 24:00Speaker 1: And long term maintenance security.
- 24:02Speaker 2: Huge topic, document dangerous APIs, track vulnerabidities oas manage dependencies securely.
- 24:07Speaker 1: Dependency management is ongoing pain.
- 24:09Speaker 2: Can be keep track update, maybe migrade away from stale ones.
- 24:13Speaker 2: Minimize dependencies where possible.
- 24:14Speaker 1: Future coverage and deprecation.
- 24:16Speaker 2: Decide long term value of features. Deprecate carefully with migration paths,
- 24:20Speaker 2: use extension points, plugins, middleware to avoid.
- 24:23Speaker 1: Core blow modularity, MPM pros cons Evolving design with tech changes,
- 24:27Speaker 1: web components, node APIs.
- 24:29Speaker 2: Constant adaptation needed, good abstractions help manage change.
- 24:33Speaker 1: Then common themes in frameworks today, minimalism.
- 24:36Speaker 2: Yeah, lean, core focus, preact happy core performance improvements.
- 24:41Speaker 1: Constant push, faster rendering, lower resource use. Benchmarking tools help
- 24:46Speaker 1: compare jsframework benchmark tetch, empower, dot com Developer experience DX.
- 24:51Speaker 2: Big focus, better tooling, clearer APIs, easier workflows in.
- 24:56Speaker 1: The future, more built in tooling.
- 24:58Speaker 2: Likely, continued performance focus, core web vitals, more flexibility, database integrations, packaging,
- 25:04Speaker 2: bundling improvements, influence of browser engine changes, package management evolution.
- 25:10Speaker 1: And final practical considerations. Funding, time, support, reality.
- 25:15Speaker 2: Checks, frameworks need resources, money, sponsorship services, donations, significant time investment,
- 25:21Speaker 2: and user support structures.
- 25:23Speaker 1: Okay, that's a comprehensive lick, so let's try to wrap
- 25:25Speaker 1: this up. What are the main takeaways from this deep dive.
- 25:27Speaker 2: Well, I think it's clear that JavaScript frameworks aren't just
- 25:29Speaker 2: random code. They're complex systems built on careful abstractions.
- 25:33Speaker 1: Right, designed to speed up development, handle complexity.
- 25:36Speaker 2: Exactly, and they've evolved so much. Understanding they're building blocks, components, routing, state, abstraction,
- 25:43Speaker 2: and their architectural patterns gives you real insight into how
- 25:46Speaker 2: modern web development actually works.
- 25:49Speaker 1: And for you the listener, whether you're aiming to build
- 25:52Speaker 1: your own tools one day or just want to understand
- 25:54Speaker 1: the tech you.
- 25:55Speaker 2: Use better, exploring these ideas really empowers you, right, It
- 25:59Speaker 2: helps you make better choices, learn faster.
- 26:02Speaker 1: Definitely, So maybe check out some of the frameworks we mentioned,
- 26:05Speaker 1: dig into abstraction modularity.
- 26:07Speaker 2: Maybe even try building a tiny component, or look at
- 26:10Speaker 2: the contribution guide for an open source project to use
- 26:13Speaker 2: see how it's put together.
- 26:14Speaker 1: Yeah, this deep dive is just scratching the surface. Really,
- 26:17Speaker 1: it's a huge, constantly changing feel absolutely so. A final
- 26:21Speaker 1: thought to leave everyone with maybe.
- 26:22Speaker 2: Just that the web isn't standing still, so frameworks won't either.
- 26:26Speaker 2: Staying curious, understanding the principles behind the tools, not just
- 26:30Speaker 2: the tools themselves. That's probably the best way to stay
- 26:34Speaker 2: ahead of the curve.
- 26:35Speaker 1: Great point, keep learning the fundamentals. Thanks for joining us
- 26:38Speaker 1: for this deep dive.