Logo

    800: Why the jQuery Creator Uses React and Typescript - John Resig

    enJuly 26, 2024
    Who created jQuery and in what year?
    Why is jQuery less popular now?
    What role does the speaker have at Khan Academy?
    What challenges does the speaker face with codebase transitions?
    How does Khan Academy handle internationalization for 60 languages?

    Podcast Summary

    • JQuery's Impact on Web DevelopmentJQuery revolutionized web development by simplifying DOM interactions and papering over browser inconsistencies, inspiring browser standards to improve and making JavaScript a serious programming language.

      JQuery, created by John Resig in 2006, revolutionized web development by simplifying DOM interactions and papering over browser inconsistencies. At its peak, it was used on most websites in the world. Although it's not as popular now due to modern browser standards, it's still used by some developers and remains a significant part of web development history. The modern JavaScript landscape is more complex, and tools like Sentry help developers identify and solve errors quickly. jQuery's impact on the industry is immeasurable, as it inspired the browser standards to improve and made JavaScript a serious programming language. The jQuery community played a crucial role in the growth of web development, providing a supportive environment for developers to learn and collaborate.

    • JQuery communityEffective community building and support are essential for the success of open-source JavaScript projects, as demonstrated by jQuery's early focus on documentation, outreach, and hiring community managers.

      The success of jQuery, and perhaps other open-source JavaScript projects, can be attributed to the intentional focus on building and fostering a strong community. From the early days, the creators of jQuery recognized the importance of documentation, community outreach, and support. They even hired community managers to help manage and engage with the community. This approach not only helped make the library successful but also provided opportunities for community members to contribute through plugins and eventually join the team. The power of good documentation and community support cannot be overstated, especially in the early days when resources for learning and troubleshooting were more limited. While commercialization of JavaScript libraries has become more sophisticated, the importance of community remains a crucial factor in the success of open-source projects.

    • Khan Academy front end infrastructureKhan Academy's front end infrastructure team is transitioning from custom build systems and routing to modern frameworks, moving from Flow to TypeScript, and considering moving away from their homegrown CSS and JavaScript framework, Aphrodite, in favor of CSS modules or other solutions.

      The technology stack at Khan Academy is constantly evolving, with ongoing efforts to improve performance, adapt to new technologies, and upgrade from older systems. The speaker, who currently serves as a product manager for the front end infrastructure team, discussed their role in driving the direction of the team's work and their involvement in the architecture of the application, including both front end and back end systems. They mentioned that the front end tech stack is extensive and includes multiple generations of React code, as well as a move from Flow to TypeScript. The speaker also highlighted the use of Google's compute platform for back end infrastructure and the implementation of GraphQL with federated services. In the front end, they're working on transitioning from custom build systems and routing to modern frameworks, and considering moving away from their homegrown CSS and JavaScript framework, Aphrodite, in favor of CSS modules or other solutions. The speaker expressed the challenges of making these transitions while managing a large codebase and the importance of considering market effects and the widespread adoption of certain technologies.

    • GraphQL & ReactGraphQL and React are powerful tools for managing complex data structures and APIs in large organizations. GraphQL offers benefits like a single layer for data federation, self-documenting nature, and upfront schema definition. React provides a large ecosystem and ability to build applications for multiple platforms using the same codebase.

      GraphQL is a powerful tool for managing complex data structures and APIs, particularly in large organizations with multiple services. It offers benefits such as a single layer for data federation, self-documenting nature, and the ability to define a schema upfront with typed queries. React, on the other hand, is a popular front-end framework with a large ecosystem and the ability to build applications for web, mobile, and native platforms using the same codebase. The speaker personally prefers React due to its model matching and the availability of a wide range of component libraries. However, setting up server-side rendering with React can be complex, and the speaker is considering moving to frameworks like Remix or React Router for easier implementation. Despite Ryan Florence's background with MooTools, the speaker has no reservations about using React Router. Khan Academy's mobile apps are built using React Native, but the amount of shared code between the web and native platforms is limited, with the underlying GraphQL schema being the main shared component.

    • Web vs Native for learning platformsWeb platforms offer more features for educators and administrators but may not be optimally suited for mobile devices, while native apps have a smaller scope but are more mobile-friendly.

      While native applications for learning platforms like Khan Academy have a smaller scope and are primarily focused on content consumption for learners, full websites offer a wider range of features including teacher tools, reporting, and district management, which may not be optimally suited for mobile devices. Khan Academy's user base is primarily on Google Chromebooks due to its widespread use in schools. Regarding state management, some teams use Redux, Apollo, or even React Hooks for managing state. Firefox faces challenges in competing with Chrome, which has received significant resources and marketing efforts from Google. Accessibility and performance remain significant challenges in web development, requiring manual testing and analysis beyond automated tools.

    • JQuery historyJQuery's origins stem from a shorthand ID selector, but its ownership and debugging challenges led to the development of newer web technologies and frameworks

      Writing minimal JavaScript and using frameworks like Astro for relatively static websites is still a valid approach. This method allows for easy compilation and potential elimination of JavaScript if it's not needed. The use of the dollar sign in jQuery originated from a similar library called prototype, serving as a shorthand for get element by ID. However, it led to complications and eventually, jQuery's ownership was transferred to the jQuery Foundation, removing John Resig's name from the license. Debugging challenges in the past included understanding caching layers and ensuring correct content delivery, which required building tools for sending multiple requests and checking for malformed responses.

    • Cloud Functions benefits, state pollutionCloud Functions eliminate state pollution across renders by loading all code in memory and executing it once, while ensuring no state pollution without Cloud Functions is a complex task with no available tooling or linters.

      Server side rendering with Cloud Functions offers benefits such as eliminating the need to worry about state across renders due to loading all the code in memory and executing it once. However, when not using Cloud Functions and trying to reuse server code, ensuring no state pollution across renders becomes a complex and time-consuming task with no available tooling or linters. The speaker suggests that this might be a reason why Cloud Functions are popular. He also shared his excitement about tools like Biome for linting and code formatting, Remix for its design and API, and Linguee JS for internationalization, which he finds to be one of the few internationalization libraries that consider performance. During the discussion, he mentioned performance issues with internationalization, including assumptions made by frameworks about the number of languages and the waterfall pattern of loading strings, which can lead to increased page load times and a suboptimal user experience. Khan Academy, where the speaker works, deals with 60 languages and had to build its own internationalization framework to address these issues. The speaker ended by promoting Khan Academy as a free education platform for K-12 students and thanking the audience for their appreciation of his work in shaping the web with JavaScript.

    Recent Episodes from Syntax - Tasty Web Development Treats

    817: You Need These 30 Apps - PART 1

    817: You Need These 30 Apps - PART 1

    Scott and Wes kick off part 1 of a 2-part series, breaking down 30 must-have apps for web developers and productivity enthusiasts. From file management tools to media utilities, they cover everything you need to supercharge your workflow.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    816: Why Your CSS Sucks

    816: Why Your CSS Sucks

    Scott and Wes break down why your CSS might suck—from misusing specificity to not leveraging CSS variables. Tune in as they dive into common pitfalls that are making your stylesheets a hot mess.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    815: Deno 2 with Ryan Dahl

    815: Deno 2 with Ryan Dahl

    In this episode of Syntax, Wes and Scott talk with Ryan Dahl about Deno 2.0, its new features and use of web standards, and how it seamlessly integrates with popular frameworks like Next.js. Ryan shares insights on the motivations behind Deno’s creation, its emphasis on simplicity and security, and offers his take on the evolving JavaScript ecosystem.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    814: Fundamentals: HTML

    814: Fundamentals: HTML

    In this episode of Syntax, Wes and Scott talk about HTML fundamentals — from basic structure and semantics to practical tips for better accessibility and SEO. They also discuss the difference between block and inline elements, form functionalities, HTML5 elements like dialog and canvas, and more.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    813: CSS: Scroll Driven Animations

    813: CSS: Scroll Driven Animations

    In this episode of Syntax, Wes and Scott talk about CSS’ new scroll-driven animations, its implementation, uses, and potential pitfalls. They also discuss animation-timeline and animation-range, and how they can be utilized to control animations based on scroll positions.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    812: CSS 4, 5, and 6! With Google’s Una and Adam

    812: CSS 4, 5, and 6! With Google’s Una and Adam

    In this episode of Syntax, Wes and Scott talk with Una Kravetz and Adam Argyle from Google Chrome about the evolution of CSS, new features, and the push toward more advanced UI capabilities on the web. They discuss the introduction of CSS versioning, exciting new properties like text-box-trim, state queries, and scroll state functionalities, select, and more!

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    How To Stay Up To Date with Daily.dev’s Francesco Ciulla

    How To Stay Up To Date with Daily.dev’s Francesco Ciulla

    In this episode of Syntax, Scott and Wes talk with Daily.dev’s Francesco Ciulla about the platform's history, community features, and significant growth. They dive into the core ideas behind daily.dev, including its personalized feed for developers, new features like squads, community contributions, and tech stack. Francesco also shares his passion for Rust, and highlights the importance of content creation in the ever-evolving tech landscape.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    808: The Future of JavaScript Frameworks × Building Auth × DB Design Tips, and more!

    808: The Future of JavaScript Frameworks × Building Auth × DB Design Tips, and more!

    In this potluck episode of Syntax, Wes and Scott answer your questions about the future of JavaScript frameworks, building custom authentication systems, limiting API access, using Caddy server proxy for local development, component props in JSX, structuring a relational database, and more!

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads