An update to the Scalable JavaScript presentation of 2009. Describes how to piece together a JavaScript application framework designed for maintainability.
Introduction to React in combination with Redux. Redux helps you to develop applications in a simple way while having features like time-travel available during development.
Objectif général : Prendre en main l’une des bibliothèques JavaScript les plus utilisés pour créer des interfaces utilisateurs
Objectifs spécifiques :
Découper l’interface utilisateur avec les composants;
Configurer les composants avec « props »;
Gérer l’état local d’un composant avec « state »;
Afficher une listes de composants avec map();
Afficher un composant en fonction de l’état de l’application;
Interagir avec un utilisateur grâce à la gestion des événements;
Interagir avec un utilisateur par le biais des formulaires;
Communiquer avec un serveur HTTP avec AJAX;
Afficher des vues en fonction de l’URL avec le routage;
Mettre en forme un composant;
This document provides an introduction and overview of ReactJS concepts including components, JSX, props, state, lifecycle methods and the virtual DOM. It compares ReactJS to AngularJS, noting ReactJS uses a non-MVC architecture and focuses on just the view layer while AngularJS follows MVC. Later sections discuss additional ReactJS topics like Flux, Redux, Webpack and RamdaJS.
Explanation of the fundamentals of Redux with additional tips and good practices. Presented in the Munich React Native Meetup, so the sample code is using React Native. Additional code: https://github.com/nacmartin/ReduxIntro
React js is a JavaScript library created by Facebook in 2013 for building user interfaces and rendering UI components. It uses a virtual DOM to efficiently update the real DOM and allow building of reusable UI components. React code can be written directly in HTML or using JSX syntax and by setting up a React app with Node.js and NPM. Components are the building blocks of React and can be class or function based. Props and state allow passing data to components and re-rendering components on state changes.
This document provides an introduction to Redux, including what it is, its core principles and building blocks. Redux is a predictable state container for JavaScript apps that can be used with frameworks like React, Angular and Vue. It follows the Flux architecture pattern and is based on three principles - state is immutable, state can only be changed through actions, and changes are made with pure functions called reducers. The main building blocks are actions, reducers and the store.
When developing applications we have a hard time managing application state, and that is okay because managing application state is hard. We will try to make it easier using Redux.
Redux is predictable state management container for JavaScript applications that helps us manage our state while also making our state mutations predictable.
Through the presentation and code, I will show you how I solved my state problem with Redux in React application.
The document discusses Node.js and Express.js concepts for building web servers and applications. It includes examples of creating HTTP servers, routing requests, using middleware, handling errors, templating with views and layouts, and separating code into models and routes.
This document provides an overview of React and Redux. It introduces React as a component-based library for building user interfaces using JavaScript and JSX. Key aspects of React include its lifecycle methods, use of a virtual DOM for fast updates, and functional stateless components. Redux is introduced as a state management library that uses a single immutable store with actions and reducers. It follows the Flux architecture pattern without a dispatcher. Hands-on demos are provided for key React and Redux concepts. Resources for further learning are also listed.
This document introduces React, describing it as a JavaScript library for building user interfaces by rendering components rather than mutating the DOM directly. It discusses how React uses a virtual DOM for fast re-rendering, building components instead of templates, and the use of JSX syntax to write HTML-like code. Components have state and props, and the whole app re-renders when state changes to guarantee updates.
Spring Boot is a framework that makes it easy to create stand-alone, production-grade Spring based Applications that can be "just run". It takes an opinionated view of the Spring platform and third-party libraries so that new and existing Spring developers can quickly get started with minimal configuration. Key features include automatic configuration of Spring, embedded HTTP servers, starters for common dependencies, and monitoring endpoints.
This document provides an overview of React.js and key concepts like components, props, state, and JSX syntax. It also discusses performance techniques like virtual DOM and how React efficiently re-renders. Additionally, it covers related topics like Redux for state management and separating concerns with a component architecture.
Chapitre 11: Expression Lambda et Référence de méthode en JavaAziz Darouichi
Voici le chapitre 11 sur les expressions lambda et les références de méthodes en Java.
Si vous avez des remarques ou suggestions afin de le parfaire.
N’hésitez pas à me contacter via mon email:
pr.azizdarouichi@gmail.com.
Bonne lecture.
This document provides an introduction to React.js, including:
- React.js uses a virtual DOM for improved performance over directly manipulating the real DOM. Components are used to build up the UI and can contain state that updates the view on change.
- The Flux architecture is described using React with unidirectional data flow from Actions to Stores to Views via a Dispatcher. This ensures state changes in a predictable way.
- Setting up React with tools like Browserify/Webpack for module bundling is discussed, along with additional topics like PropTypes, mixins, server-side rendering and React Native.
React is a JavaScript library for building user interfaces. It uses a component-based approach where UI is broken into independent, reusable pieces. The key principles of React include breaking UI into components, unidirectional data flow, identifying UI state, and dispatching actions to change state. React uses JSX syntax which resembles HTML but integrates JavaScript. Components can be "smart" or "dumb", with smart components providing data and dumb components displaying it. Redux is often used with React to manage state in a centralized store using actions and reducers. Debugging tools like React Developer Tools and Redux DevTools help develop React applications.
The document discusses RESTful APIs with Node.js and Express. It begins with an introduction to APIs and contrasts REST and SOAP APIs. It then discusses Node.js and how it enables non-blocking asynchronous I/O. Finally, it provides a basic example of creating an Express server to respond with "Hello World" and discusses how Node.js handles threads without blocking.
Node.js is an open source JavaScript runtime environment used to build real-time web applications. The document introduces Node.js, the npm package manager, the Express web application framework, and how to connect a Node.js application to MongoDB. Key points covered include Node.js being single-threaded and event-driven, using npm to install and use packages locally or globally, Express providing features for building web apps and APIs, and using modules like Mongoose to connect a Node app to MongoDB.
Tutorial Videos: https://www.youtube.com/playlist?list=PLD8nQCAhR3tQ7KXnvIk_v_SLK-Fb2y_k_
Day 1 : Introduction to React, Babel and Webpack
Prerequisites of starting the workshop ( Basic understanding of Node & Express )
What is Virtual DOM?
What is React and why should we use it?
Install and set up React:
a-Using create-react-app
b-From scratch using Babel and Webpack. We will use Webpack Dev Server.
Day 2 : React Basic Concepts
Types of Components: Class-based and Functional based Components
Use of JSX
Parent, Child, and Nested Components
Difference between State and Props
Create and Handle Routes
Component Lifecycle Methods
Create a form and handling form inputs
Use of arrow functions and Spread Operator
Day 3: Advanced Concepts in React
Use of Refs
What are Higher Order Components( HOC )?
How to use HOC
Understanding Context in React
React JS is a JavaScript library for building user interfaces. It uses a virtual DOM to efficiently update the real DOM and render user interfaces from components. Components are reusable pieces of UI that accept input data via properties but maintain private state data. The lifecycle of a component involves initialization, updating due to state/prop changes, and unmounting. React uses a single-directional data flow and the concept of components makes code modular and reusable.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
\n\nThe document discusses scalable JavaScript application architecture. It advocates for a modular approach where each component (module) has a limited, well-defined purpose and interface. Modules are loosely coupled by communicating through a central sandbox interface rather than directly referencing each other. The core application manages modules by registering, starting, and stopping them. It also handles errors and enables extension points. This architecture aims to build flexible, maintainable applications that can evolve over time.
Browser Wars Episode 1: The Phantom MenaceNicholas Zakas
This document summarizes the history and evolution of web browsers and internet technologies from the early 1990s to the late 1990s. It traces the development of key browsers like Netscape Navigator and Internet Explorer. It also outlines the introduction of important web standards like HTML, CSS, JavaScript and XML. Major events included the commercialization of the web in the mid-1990s, the browser wars between Netscape and Microsoft in the late 90s, and the consolidation of online services providers toward the end of the decade.
React js is a JavaScript library created by Facebook in 2013 for building user interfaces and rendering UI components. It uses a virtual DOM to efficiently update the real DOM and allow building of reusable UI components. React code can be written directly in HTML or using JSX syntax and by setting up a React app with Node.js and NPM. Components are the building blocks of React and can be class or function based. Props and state allow passing data to components and re-rendering components on state changes.
This document provides an introduction to Redux, including what it is, its core principles and building blocks. Redux is a predictable state container for JavaScript apps that can be used with frameworks like React, Angular and Vue. It follows the Flux architecture pattern and is based on three principles - state is immutable, state can only be changed through actions, and changes are made with pure functions called reducers. The main building blocks are actions, reducers and the store.
When developing applications we have a hard time managing application state, and that is okay because managing application state is hard. We will try to make it easier using Redux.
Redux is predictable state management container for JavaScript applications that helps us manage our state while also making our state mutations predictable.
Through the presentation and code, I will show you how I solved my state problem with Redux in React application.
The document discusses Node.js and Express.js concepts for building web servers and applications. It includes examples of creating HTTP servers, routing requests, using middleware, handling errors, templating with views and layouts, and separating code into models and routes.
This document provides an overview of React and Redux. It introduces React as a component-based library for building user interfaces using JavaScript and JSX. Key aspects of React include its lifecycle methods, use of a virtual DOM for fast updates, and functional stateless components. Redux is introduced as a state management library that uses a single immutable store with actions and reducers. It follows the Flux architecture pattern without a dispatcher. Hands-on demos are provided for key React and Redux concepts. Resources for further learning are also listed.
This document introduces React, describing it as a JavaScript library for building user interfaces by rendering components rather than mutating the DOM directly. It discusses how React uses a virtual DOM for fast re-rendering, building components instead of templates, and the use of JSX syntax to write HTML-like code. Components have state and props, and the whole app re-renders when state changes to guarantee updates.
Spring Boot is a framework that makes it easy to create stand-alone, production-grade Spring based Applications that can be "just run". It takes an opinionated view of the Spring platform and third-party libraries so that new and existing Spring developers can quickly get started with minimal configuration. Key features include automatic configuration of Spring, embedded HTTP servers, starters for common dependencies, and monitoring endpoints.
This document provides an overview of React.js and key concepts like components, props, state, and JSX syntax. It also discusses performance techniques like virtual DOM and how React efficiently re-renders. Additionally, it covers related topics like Redux for state management and separating concerns with a component architecture.
Chapitre 11: Expression Lambda et Référence de méthode en JavaAziz Darouichi
Voici le chapitre 11 sur les expressions lambda et les références de méthodes en Java.
Si vous avez des remarques ou suggestions afin de le parfaire.
N’hésitez pas à me contacter via mon email:
pr.azizdarouichi@gmail.com.
Bonne lecture.
This document provides an introduction to React.js, including:
- React.js uses a virtual DOM for improved performance over directly manipulating the real DOM. Components are used to build up the UI and can contain state that updates the view on change.
- The Flux architecture is described using React with unidirectional data flow from Actions to Stores to Views via a Dispatcher. This ensures state changes in a predictable way.
- Setting up React with tools like Browserify/Webpack for module bundling is discussed, along with additional topics like PropTypes, mixins, server-side rendering and React Native.
React is a JavaScript library for building user interfaces. It uses a component-based approach where UI is broken into independent, reusable pieces. The key principles of React include breaking UI into components, unidirectional data flow, identifying UI state, and dispatching actions to change state. React uses JSX syntax which resembles HTML but integrates JavaScript. Components can be "smart" or "dumb", with smart components providing data and dumb components displaying it. Redux is often used with React to manage state in a centralized store using actions and reducers. Debugging tools like React Developer Tools and Redux DevTools help develop React applications.
The document discusses RESTful APIs with Node.js and Express. It begins with an introduction to APIs and contrasts REST and SOAP APIs. It then discusses Node.js and how it enables non-blocking asynchronous I/O. Finally, it provides a basic example of creating an Express server to respond with "Hello World" and discusses how Node.js handles threads without blocking.
Node.js is an open source JavaScript runtime environment used to build real-time web applications. The document introduces Node.js, the npm package manager, the Express web application framework, and how to connect a Node.js application to MongoDB. Key points covered include Node.js being single-threaded and event-driven, using npm to install and use packages locally or globally, Express providing features for building web apps and APIs, and using modules like Mongoose to connect a Node app to MongoDB.
Tutorial Videos: https://www.youtube.com/playlist?list=PLD8nQCAhR3tQ7KXnvIk_v_SLK-Fb2y_k_
Day 1 : Introduction to React, Babel and Webpack
Prerequisites of starting the workshop ( Basic understanding of Node & Express )
What is Virtual DOM?
What is React and why should we use it?
Install and set up React:
a-Using create-react-app
b-From scratch using Babel and Webpack. We will use Webpack Dev Server.
Day 2 : React Basic Concepts
Types of Components: Class-based and Functional based Components
Use of JSX
Parent, Child, and Nested Components
Difference between State and Props
Create and Handle Routes
Component Lifecycle Methods
Create a form and handling form inputs
Use of arrow functions and Spread Operator
Day 3: Advanced Concepts in React
Use of Refs
What are Higher Order Components( HOC )?
How to use HOC
Understanding Context in React
React JS is a JavaScript library for building user interfaces. It uses a virtual DOM to efficiently update the real DOM and render user interfaces from components. Components are reusable pieces of UI that accept input data via properties but maintain private state data. The lifecycle of a component involves initialization, updating due to state/prop changes, and unmounting. React uses a single-directional data flow and the concept of components makes code modular and reusable.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
\n\nThe document discusses scalable JavaScript application architecture. It advocates for a modular approach where each component (module) has a limited, well-defined purpose and interface. Modules are loosely coupled by communicating through a central sandbox interface rather than directly referencing each other. The core application manages modules by registering, starting, and stopping them. It also handles errors and enables extension points. This architecture aims to build flexible, maintainable applications that can evolve over time.
Browser Wars Episode 1: The Phantom MenaceNicholas Zakas
This document summarizes the history and evolution of web browsers and internet technologies from the early 1990s to the late 1990s. It traces the development of key browsers like Netscape Navigator and Internet Explorer. It also outlines the introduction of important web standards like HTML, CSS, JavaScript and XML. Major events included the commercialization of the web in the mid-1990s, the browser wars between Netscape and Microsoft in the late 90s, and the consolidation of online services providers toward the end of the decade.
The document discusses best practices for handling JavaScript errors. It recommends 7 rules: 1) assume code will fail, 2) log errors to servers, 3) handle errors in code not browsers, 4) identify where errors may occur, 5) throw your own errors, 6) distinguish fatal from non-fatal errors, and 7) provide a debug mode. The document covers different types of errors and strategies for logging, catching, and displaying errors to users.
This document summarizes Nicholas C. Zakas's presentation on maintainable JavaScript. The presentation discusses why maintainability is important, as most time is spent maintaining code. It defines maintainable code as code that works for five years without major changes and is intuitive, understandable, adaptable, extendable, debuggable and testable. The presentation covers code style guidelines, programming practices, code organization techniques and automation tools to help write maintainable JavaScript.
Building a JavaScript Module Framework at GiltEric Shepherd
For modules to function within a large-scale system and on third-party sites, they need to be self-contained units with minimal dependencies. They also need to keep their hands off of other modules and library code. Gilt's module framework manages multiple independent components, providing them with what they need, and only what they need, to do their jobs.
Hydra.js es un framework que le facilita las herramientas para escribir su aplicación utilizando módulos o widgets y hace fácil el trabajar con ellos. Hydra.js utiliza una arquitectura desacoplada que:
Permite cambiar you framework base sin tener que cambiar el código de tus módulos o widgets
Permite a los módulos comunicarse con el resto sin conocer que módulos han sido cargados.
Puede extenderse fácilmente con nuevas funcionalidades.
Modeling Patterns for JavaScript Browser-Based GamesRay Toal
This document proposes JavaScript patterns for modeling browser-based game objects and types without using frameworks. It describes challenges for browser games and recent advances in JavaScript. Patterns are presented for modules, types, and inheritance using prototypes instead of classes. A root game object type and projectile subtype are implemented as examples. The patterns were applied in an HTML5 game and several JavaScript game engines are surveyed.
Data Caching Strategies for Oracle Mobile Application Frameworkandrejusb
This document discusses data caching strategies for Oracle Mobile Application Framework (MAF). It outlines different caching options in MAF including using a local SQLite database and integrating with web services. It also provides examples of implementing read-only and transactional data caching in MAF applications. The document was presented by Andrejus Baranovskis from Red Samurai Consulting who is an Oracle ACE Director and technical expert focused on Oracle Fusion Middleware technologies.
The document discusses new features and improvements in Grails 2.0, including enhanced plugin support, NoSQL integration, improved unit testing, static resource handling, GORM updates, and SQL database migration tools. It provides an overview of several new capabilities and summarizes key areas that received attention in the latest Grails release.
JavaScript Timers, Power Consumption, and PerformanceNicholas Zakas
This document discusses how timers, power consumption, and performance are related on web pages. It explains that CPUs can enter low-power sleep states when idle, but timers used in JavaScript can prevent this and increase power usage. The document recommends using higher interval timers (over 15ms) when possible to improve battery life on mobile devices. It also notes that having too many concurrent timers can flood the browser's queue and negatively impact rendering performance.
Believe it or not, accessibility is more than just screen readers. There's a whole group of users who only use a keyboard (without a mouse). Learn how to make the web a friendly place for all kinds of people by ensuring keyboard accessibility.
Overhauling one of the most visited web sites in the world is a major task, and add on top of it the pressure of keeping performance the same while adding a ton of new features, and you have quite a task. Learn how the Yahoo! homepage team achieved performance parity with the previous version even while adding a ton of new features.
Advancing JavaScript with Libraries (Yahoo Tech Talk)jeresig
1. JavaScript libraries abstract away browser differences and complex DOM APIs to provide simpler, more consistent interfaces.
2. New library patterns that emerged like DOM selectors and behaviors advanced development by managing cross-browser issues and establishing expectations around DOM manipulation.
3. Libraries build upon one another, with higher-level "meta-libraries" and domain-specific languages creating new programming paradigms on top of existing libraries and APIs.
Talk at FullStack 2016: Automating documentation on JavaScript projectsMarcos Iglesias
Documenting code is an important task that few teams get right. Docs get easily outdated, everybody hates writing them and sometimes developers don’t even use them at all.
In this talk, you will learn about an approach to documentation writing based on adding comments directly to the source code. I will also show you its benefits applied to three different types of codebases.
You will also learn how to generate documentation from those same comments in two different flavors as well as when each of them work best.
Design on a scalable, state-based, front-end application architecture to manage business logic and control flow. We'll synthesize a number of programming patterns to help you decouple not only views and data, but also navigation paradigms and transitions between states to keep your product agile and moving forward without having to refactor.
As browsers explode with new capabilities and migrate onto devices users can be left wondering, “what’s taking so long?” Learn how HTML, CSS, JavaScript, and the web itself conspire against a fast-running application and simple tips to create a snappy interface that delight users instead of frustrating them.
Slides for my tutorial from Velocity 2014 on some of the more advanced features in WebPagetest.
Video is available on Youtube:
Part 1: http://youtu.be/6UeRMMI_IzI
Part 2: http://youtu.be/euVYHee1f1M
In the beginning, progressive enhancement was simple: HTML layered with CSS layered with JavaScript. That worked fine when there were two browsers, but in today's world of multiple devices and multiple browsers, it's time for a progressive enhancement reboot. At the core is the understanding that the web is not print - the same rules don't apply. As developers and consumers we've been fooled into thinking about print paradigms for too long. In this talk, you'll learn just how different the web is and how the evolution of progressive enhancement can lead to better user experiences as well as happier developers and users.
This deck is a conference-agnostic one, suitable to be shown anywhere without site-specific jokes!
ascitconsultancy-scalable-javascript-application-architecture for ascitconsul...Carmor Bass
This document outlines an architecture for scalable JavaScript applications. It proposes dividing applications into independent and reusable modules that communicate through a sandbox interface. An application core manages modules' lifecycles and enables loose coupling. Extensions augment core functionality like error handling or AJAX. The base library normalizes browsers while remaining replaceable. By minimizing interdependencies and clearly defining each component's role, the architecture aims to improve modularity, testability, and long-term maintainability of JavaScript applications.
An overview of Scalable Web Application Front-endSaeid Zebardast
Problem Definition:
Building large web applications with dozens of developers is a difficult task. Organizing the engineers around a common goal is one thing, but organizing your code so that people can work efficiently is another. Many large applications suffer from growing pains after just a few months in production due to poorly designed JavaScript with unclear upgrade and extension paths.
Scalable JavaScript Application Framework:
Yahoo! home page engineer Nicholas Zakas, author of Professional JavaScript for Web Developers, introduced front-end architecture for complex, modular web applications with significant JavaScript elements.
Building modular software with OSGi - Ulf Fildebrandtmfrancis
The document discusses how to build modular software using OSGi by defining modules based on difficult design decisions, implementing principles like dependency injection and the Liskov substitution principle, and measuring modularity through metrics analyzed by tools like ConQAT to compare the desired architecture with the actual implementation. The goals of modularity are to manage complexity through separation of concerns into interchangeable modules and to allow systems to evolve over time through substitutability and extensibility of modules.
When you complete this module, you should be able to do these tasks :
• Explore the content of a module
• Analyze the information in a module
• Create, move, edit and delete artifacts in a module
• Identify and implement hierarchical data structures in a
module
This document discusses modules in JavaScript. It defines what modules are, their benefits like abstraction, encapsulation, reusability and managing dependencies. It describes how earlier versions of JavaScript did not support modules natively and workarounds used like IIFE and Revealing Module Pattern. It also explains key aspects of modules like module format, module loader and build tools. Finally, it provides details on popular module formats like AMD, CommonJS, module loaders like SystemJS, RequireJS, configuration options of SystemJS like baseURL, bundles, map etc.
This document discusses patterns for building scalable JavaScript applications. It recommends combining module, facade, and mediator/event aggregator patterns. Modules should be self-contained and communicate through a facade to the application core. An event aggregator promotes loose coupling by allowing modules to broadcast and listen to each other's notifications. Together these patterns can help address issues like reusability, independent testability, and failure tolerance to create maintainable, scalable JavaScript apps.
This document discusses OpenCV and its modules. OpenCV is an open source library for computer vision and machine learning. It contains over 2500 algorithms for tasks like object detection, face recognition, video analysis, image processing and more. Some key modules include core, imgproc, dnn, ml, video, highgui, features2d, flann, stitching, objdetect. These modules provide functionality for tasks like image processing, neural networks, regression, clustering, video analysis, window display, feature detection and more.
jquery summit presentation for large scale javascript applicationsDivyanshGupta922023
The document discusses different patterns for organizing JavaScript applications, including the module pattern and MVC frameworks. It provides examples of implementing the module pattern in jQuery, Dojo, YUI, and ExtJS. It also covers MVC frameworks like Backbone.js, AngularJS, and Ember and discusses how to convert existing code to an MVC structure.
ZF2 Modular Architecture - Taking advantage of itSteve Maraspin
Zend Framework 1 had modules. Their name is pretty much everything Zend Framework 2 modules share with them, though. The whole framework architecture has been rewritten to encourage software reuse and extension. In this talk I’ll share our experiences on ZF2 module creation and usage.
The document discusses various design principles and patterns in Java including the Singleton, Factory Method, Prototype, and Abstract Factory patterns. It provides examples of when and how to apply each pattern, describing their structures, participants, collaborations and consequences. It also covers design principles such as the open-closed principle, dependency inversion, and interface segregation.
Solid principles, Design Patterns, and Domain Driven DesignIrwansyah Irwansyah
This document discusses SOLID principles and design patterns. It begins by explaining SOLID, which stands for five principles of object-oriented design: single responsibility, open/closed, Liskov substitution, interface segregation, and dependency inversion. It then defines and provides examples of several classic design patterns like singleton, strategy, decorator, factory method, and observer. The document emphasizes that SOLID principles and design patterns help create flexible and reusable code that is easy to modify without breaking existing functionality. It also discusses domain-driven design and techniques like dependency injection that can be used to apply SOLID and design patterns.
Spring architecture includes around 20 modules grouped into the core container, data access/integration, aspects oriented programming, and instrumentation. The core container's important modules are core, bean, and context. Data access modules include JDBC, ORM, OXM, and transaction management. Spring benefits include being non-invasive, promoting decoupling and reusability, and reducing coding effort through implicit patterns.
The document discusses the Model-View-ViewModel (MVVM) architecture pattern and provides an overview of key Android Architecture Components that support MVVM, including Lifecycle, LiveData, ViewModel, Room, and Data Binding. It describes how these components help manage lifecycles and data in a lifecycle-conscious way. Steps are outlined for implementing Lifecycle, LiveData, Data Binding, ViewModel, and Room in Android apps to follow the MVVM pattern. References for code demos and guides are also included.
Using Dagger in a Clean Architecture projectFabio Collini
Clean Architecture and app modularization are often used together to achieve a better code structure and a faster build time. But how can we use Dagger in an app structured in that way? Can we use subcomponents (with or without Dagger Android) or are component dependencies enough?
In this talk we’ll see how to leverage Dagger to organize the dependencies in a multi-module project with particular attention to testing and decoupling. The examples will be both in a standard layered architecture and in a Clean Architecture where the Dependency Inversion increases the overall structure but can complicate the Dagger code.
The document discusses several creational design patterns including Singleton, Abstract Factory, Builder, and Prototype patterns. It provides definitions and examples of how each pattern works, including ensuring a class only has one instance (Singleton), creating object factories without specifying classes (Abstract Factory), constructing complex objects step-by-step (Builder), and copying existing objects (Prototype). The document is intended for teaching software design patterns to students.
by Volodymyr Pavlyuk
Why do we need this?
Code reuse
Better maintainability
Better flexibility
Easier to test
Even big application doesn’t look very complex
Developing large scale JavaScript applicationsMilan Korsos
Developing large scale JavaScript applications
24/11/11 @ Front end meetup, Budapest (Hungary)
www.milankorsos.com
www.twitter.com/korsosm
www.sowink.com
After consulting with several companies on performance related issues, it became clear that one of the biggest performance issues facing websites today is the sheer amount of JavaScript needed to power the page. The demand for more interactive and responsive applications has driven JavaScript usage through the roof. It’s quite common for large sites to end up with over 1 MB of JavaScript code on their page even after minification. But do today’s web applications really need that much JavaScript?
JavaScript APIs you’ve never heard of (and some you have)Nicholas Zakas
The document discusses several JavaScript APIs related to manipulating the DOM and CSS, including some newer APIs that the reader may be unfamiliar with. It describes APIs such as insertAdjacentHTML() and outerHTML for inserting and retrieving HTML, children and firstElementChild/lastElementChild for traversing element nodes, and matches() and getBoundingClientRect() for working with CSS selectors and elements' positions. The document provides examples and explanations of many DOM and CSS-related JavaScript APIs beyond the traditional ones.
High Performance JavaScript (CapitolJS 2011)Nicholas Zakas
High Performance JavaScript provides techniques for optimizing JavaScript performance. It discusses how JavaScript execution blocks the browser UI thread, preventing responsive user experiences. It recommends limiting individual JavaScript jobs to under 50ms to avoid unresponsiveness. The document then provides techniques to improve load time performance such as dynamically loading scripts, and runtime techniques like timers and web workers to avoid blocking the UI thread during long-running processes.
Writing JavaScript as a hobby and writing JavaScript as a job are two very different things. Learn some common practices for making your JavaScript friendly to a team environment.
For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there’s still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.
High Performance JavaScript (Amazon DevCon 2011)Nicholas Zakas
The document summarizes techniques for improving JavaScript performance in web applications. It discusses how JavaScript execution blocks the browser UI thread, leading to unresponsive user experiences if scripts run for too long. It then provides recommendations to limit JavaScript execution times to under 50ms and describes load time techniques like placing scripts at the bottom of the page, combining files, and loading scripts dynamically or deferring their execution to improve page load performance.
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Nicholas Zakas
In the beginning, progressive enhancement was simple: HTML layered with CSS layered with JavaScript. That worked fine when there were two browsers, but in today's world of multiple devices and multiple browsers, it's time for a progressive enhancement reboot. At the core is the understanding that the web is not print - the same rules don't apply. As developers and consumers we've been fooled into thinking about print paradigms for too long. In this talk, you'll learn just how different the web is and how the evolution of progressive enhancement can lead to better user experiences as well as happier developers and users.
YUI Test The Next Generation (YUIConf 2010)Nicholas Zakas
This document summarizes a presentation given by Nicholas C. Zakas on the evolution of YUI Test and introducing the new standalone version. Some key points:
- YUI Test was originally developed as a testing framework for YUI but inconsistencies arose between YUI 2.x and 3.x versions.
- A new standalone version was created to address these issues and allow YUI Test to be used without YUI dependencies. It provides a familiar syntax and API improvements.
- Additional related libraries were introduced, including a Selenium driver for browser automation and code coverage to identify untested code paths.
- Together these provide a complete JavaScript testing solution for continuous integration with features like Hudson integration and reporting
High Performance JavaScript (YUIConf 2010)Nicholas Zakas
Ever wonder why the page appears frozen or why you get a dialog saying, "this script is taking too long"? Inside of the browser, JavaScript and the page's UI are very intertwined, which means they can affect each other and, in turn, affect overall page performance. Ensuring the fastest execution time of JavaScript code isn't about geek cred, it's about ensuring that the user experience is as fast and responsive as possible. In a world where an extra second can cost you a visitor, sluggishness due to poor JavaScript code is a big problem. In this talk, you'll learn what's going on inside the browser that can slow JavaScript down and how that can end up creating a "slow page". You'll also learn how to overcome the conspiracy against your code by eliminating performance bottlenecks.
High Performance JavaScript - Fronteers 2010Nicholas Zakas
For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there's still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.
The document discusses optimizing JavaScript performance for Yahoo's homepage. It describes techniques used such as:
1. Loading non-critical JavaScript asynchronously and lazily to improve time to interactivity.
2. Splitting long-running JavaScript tasks into smaller chunks with timers to maintain responsiveness.
3. Using Web Workers to offload CPU-intensive tasks without blocking the UI thread.
4. Caching and preloading resources to reduce roundtrip times for Ajax requests.
The techniques helped optimize performance by reducing JavaScript parsing time and improving responsiveness.
High Performance JavaScript - WebDirections USA 2010Nicholas Zakas
This document summarizes Nicholas C. Zakas' presentation on high performance JavaScript. It discusses how the browser UI thread handles both UI updates and JavaScript execution sequentially. Long running JavaScript can cause unresponsive UIs. Techniques to ensure responsive UIs include limiting JavaScript execution time, using timers or web workers to break up processing, reducing repaints and reflows, and grouping style changes. Hardware acceleration and optimizing JavaScript engines have improved performance but responsive UIs still require discipline.
The document discusses responsive interfaces and how to keep the user interface responsive when executing JavaScript. It explains that the UI thread is used for both drawing updates and running JavaScript, so no updates can happen while JavaScript runs. It recommends keeping JavaScript execution under 50ms to avoid unresponsiveness, and describes using timers and web workers to split processing over multiple ticks to keep the UI responsive.
Writing Efficient JavaScript discusses common issues that can slow down JavaScript performance and provides recommendations to address them. It covers scope management, data access, loops, DOM manipulation, and avoiding browser limits. The document recommends minimizing scope chain lookups, storing frequently accessed properties in local variables, optimizing loops, performing DOM changes off-document to reduce reflows, and using setTimeout() to avoid locking up the browser thread.
Nicholas C. Zakas discusses common JavaScript performance issues and recommendations to address them. He covers scope management, data access, loops, and DOM manipulation. The key points are to minimize scope chain lookups, store frequently accessed data in local variables, optimize loops, avoid reflows from DOM changes, and leverage modern browser optimizations. Overall, the talk provides practical tips to speed up JavaScript code by addressing issues related to scope, data access patterns, loops, and DOM interactions.
My talk at the January 21, 2009 Mountain View JavaScript Meetup about the performance of JavaScript variables relative to their position in the scope chain.
The document summarizes the goals and key features of the new Yahoo! homepage and YUI 3.0 library. YUI 3.0 aimed to eliminate global dependencies, reduce file sizes for faster loading, create version independence between releases, and allow code portability. It achieved these goals by removing the YAHOO global namespace and modularizing the library into smaller independent modules to improve performance and flexibility.
Test Driven Development With YUI Test (Ajax Experience 2008)Nicholas Zakas
This document discusses test-driven development (TDD) using the YUI Test framework. It introduces TDD principles like writing tests before code and iterating through failing tests, passing tests, and refactoring. It then covers key aspects of YUI Test like writing unit tests, simulating events, handling asynchronous code, and hooking into the test runner. The document provides examples and recommendations for effectively using TDD and YUI Test in web development.
AI Agents at Work: UiPath, Maestro & the Future of DocumentsUiPathCommunity
Do you find yourself whispering sweet nothings to OCR engines, praying they catch that one rogue VAT number? Well, it’s time to let automation do the heavy lifting – with brains and brawn.
Join us for a high-energy UiPath Community session where we crack open the vault of Document Understanding and introduce you to the future’s favorite buzzword with actual bite: Agentic AI.
This isn’t your average “drag-and-drop-and-hope-it-works” demo. We’re going deep into how intelligent automation can revolutionize the way you deal with invoices – turning chaos into clarity and PDFs into productivity. From real-world use cases to live demos, we’ll show you how to move from manually verifying line items to sipping your coffee while your digital coworkers do the grunt work:
📕 Agenda:
🤖 Bots with brains: how Agentic AI takes automation from reactive to proactive
🔍 How DU handles everything from pristine PDFs to coffee-stained scans (we’ve seen it all)
🧠 The magic of context-aware AI agents who actually know what they’re doing
💥 A live walkthrough that’s part tech, part magic trick (minus the smoke and mirrors)
🗣️ Honest lessons, best practices, and “don’t do this unless you enjoy crying” warnings from the field
So whether you’re an automation veteran or you still think “AI” stands for “Another Invoice,” this session will leave you laughing, learning, and ready to level up your invoice game.
Don’t miss your chance to see how UiPath, DU, and Agentic AI can team up to turn your invoice nightmares into automation dreams.
This session streamed live on May 07, 2025, 13:00 GMT.
Join us and check out all our past and upcoming UiPath Community sessions at:
👉 https://community.uipath.com/dublin-belfast/
Config 2025 presentation recap covering both daysTrishAntoni1
Config 2025 What Made Config 2025 Special
Overflowing energy and creativity
Clear themes: accessibility, emotion, AI collaboration
A mix of tech innovation and raw human storytelling
(Background: a photo of the conference crowd or stage)
Build with AI events are communityled, handson activities hosted by Google Developer Groups and Google Developer Groups on Campus across the world from February 1 to July 31 2025. These events aim to help developers acquire and apply Generative AI skills to build and integrate applications using the latest Google AI technologies, including AI Studio, the Gemini and Gemma family of models, and Vertex AI. This particular event series includes Thematic Hands on Workshop: Guided learning on specific AI tools or topics as well as a prequel to the Hackathon to foster innovation using Google AI tools.
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Christian Folini
Everybody is driven by incentives. Good incentives persuade us to do the right thing and patch our servers. Bad incentives make us eat unhealthy food and follow stupid security practices.
There is a huge resource problem in IT, especially in the IT security industry. Therefore, you would expect people to pay attention to the existing incentives and the ones they create with their budget allocation, their awareness training, their security reports, etc.
But reality paints a different picture: Bad incentives all around! We see insane security practices eating valuable time and online training annoying corporate users.
But it's even worse. I've come across incentives that lure companies into creating bad products, and I've seen companies create products that incentivize their customers to waste their time.
It takes people like you and me to say "NO" and stand up for real security!
Slides of Limecraft Webinar on May 8th 2025, where Jonna Kokko and Maarten Verwaest discuss the latest release.
This release includes major enhancements and improvements of the Delivery Workspace, as well as provisions against unintended exposure of Graphic Content, and rolls out the third iteration of dashboards.
Customer cases include Scripted Entertainment (continuing drama) for Warner Bros, as well as AI integration in Avid for ITV Studios Daytime.
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAll Things Open
Presented at All Things Open RTP Meetup
Presented by Brent Laster - President & Lead Trainer, Tech Skills Transformations LLC
Talk Title: AI 3-in-1: Agents, RAG, and Local Models
Abstract:
Learning and understanding AI concepts is satisfying and rewarding, but the fun part is learning how to work with AI yourself. In this presentation, author, trainer, and experienced technologist Brent Laster will help you do both! We’ll explain why and how to run AI models locally, the basic ideas of agents and RAG, and show how to assemble a simple AI agent in Python that leverages RAG and uses a local model through Ollama.
No experience is needed on these technologies, although we do assume you do have a basic understanding of LLMs.
This will be a fast-paced, engaging mixture of presentations interspersed with code explanations and demos building up to the finished product – something you’ll be able to replicate yourself after the session!
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?Lorenzo Miniero
Slides for my "RTP Over QUIC: An Interesting Opportunity Or Wasted Time?" presentation at the Kamailio World 2025 event.
They describe my efforts studying and prototyping QUIC and RTP Over QUIC (RoQ) in a new library called imquic, and some observations on what RoQ could be used for in the future, if anything.
Bepents tech services - a premier cybersecurity consulting firmBenard76
Introduction
Bepents Tech Services is a premier cybersecurity consulting firm dedicated to protecting digital infrastructure, data, and business continuity. We partner with organizations of all sizes to defend against today’s evolving cyber threats through expert testing, strategic advisory, and managed services.
🔎 Why You Need us
Cyberattacks are no longer a question of “if”—they are a question of “when.” Businesses of all sizes are under constant threat from ransomware, data breaches, phishing attacks, insider threats, and targeted exploits. While most companies focus on growth and operations, security is often overlooked—until it’s too late.
At Bepents Tech, we bridge that gap by being your trusted cybersecurity partner.
🚨 Real-World Threats. Real-Time Defense.
Sophisticated Attackers: Hackers now use advanced tools and techniques to evade detection. Off-the-shelf antivirus isn’t enough.
Human Error: Over 90% of breaches involve employee mistakes. We help build a "human firewall" through training and simulations.
Exposed APIs & Apps: Modern businesses rely heavily on web and mobile apps. We find hidden vulnerabilities before attackers do.
Cloud Misconfigurations: Cloud platforms like AWS and Azure are powerful but complex—and one misstep can expose your entire infrastructure.
💡 What Sets Us Apart
Hands-On Experts: Our team includes certified ethical hackers (OSCP, CEH), cloud architects, red teamers, and security engineers with real-world breach response experience.
Custom, Not Cookie-Cutter: We don’t offer generic solutions. Every engagement is tailored to your environment, risk profile, and industry.
End-to-End Support: From proactive testing to incident response, we support your full cybersecurity lifecycle.
Business-Aligned Security: We help you balance protection with performance—so security becomes a business enabler, not a roadblock.
📊 Risk is Expensive. Prevention is Profitable.
A single data breach costs businesses an average of $4.45 million (IBM, 2023).
Regulatory fines, loss of trust, downtime, and legal exposure can cripple your reputation.
Investing in cybersecurity isn’t just a technical decision—it’s a business strategy.
🔐 When You Choose Bepents Tech, You Get:
Peace of Mind – We monitor, detect, and respond before damage occurs.
Resilience – Your systems, apps, cloud, and team will be ready to withstand real attacks.
Confidence – You’ll meet compliance mandates and pass audits without stress.
Expert Guidance – Our team becomes an extension of yours, keeping you ahead of the threat curve.
Security isn’t a product. It’s a partnership.
Let Bepents tech be your shield in a world full of cyber threats.
🌍 Our Clientele
At Bepents Tech Services, we’ve earned the trust of organizations across industries by delivering high-impact cybersecurity, performance engineering, and strategic consulting. From regulatory bodies to tech startups, law firms, and global consultancies, we tailor our solutions to each client's unique needs.
Autonomous Resource Optimization: How AI is Solving the Overprovisioning Problem
In this session, Suresh Mathew will explore how autonomous AI is revolutionizing cloud resource management for DevOps, SRE, and Platform Engineering teams.
Traditional cloud infrastructure typically suffers from significant overprovisioning—a "better safe than sorry" approach that leads to wasted resources and inflated costs. This presentation will demonstrate how AI-powered autonomous systems are eliminating this problem through continuous, real-time optimization.
Key topics include:
Why manual and rule-based optimization approaches fall short in dynamic cloud environments
How machine learning predicts workload patterns to right-size resources before they're needed
Real-world implementation strategies that don't compromise reliability or performance
Featured case study: Learn how Palo Alto Networks implemented autonomous resource optimization to save $3.5M in cloud costs while maintaining strict performance SLAs across their global security infrastructure.
Bio:
Suresh Mathew is the CEO and Founder of Sedai, an autonomous cloud management platform. Previously, as Sr. MTS Architect at PayPal, he built an AI/ML platform that autonomously resolved performance and availability issues—executing over 2 million remediations annually and becoming the only system trusted to operate independently during peak holiday traffic.
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPathCommunity
Nous vous convions à une nouvelle séance de la communauté UiPath en Suisse romande.
Cette séance sera consacrée à un retour d'expérience de la part d'une organisation non gouvernementale basée à Genève. L'équipe en charge de la plateforme UiPath pour cette NGO nous présentera la variété des automatisations mis en oeuvre au fil des années : de la gestion des donations au support des équipes sur les terrains d'opération.
Au délà des cas d'usage, cette session sera aussi l'opportunité de découvrir comment cette organisation a déployé UiPath Automation Suite et Document Understanding.
Cette session a été diffusée en direct le 7 mai 2025 à 13h00 (CET).
Découvrez toutes nos sessions passées et à venir de la communauté UiPath à l’adresse suivante : https://community.uipath.com/geneva/.
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Safe Software
FME is renowned for its no-code data integration capabilities, but that doesn’t mean you have to abandon coding entirely. In fact, Python’s versatility can enhance FME workflows, enabling users to migrate data, automate tasks, and build custom solutions. Whether you’re looking to incorporate Python scripts or use ArcPy within FME, this webinar is for you!
Join us as we dive into the integration of Python with FME, exploring practical tips, demos, and the flexibility of Python across different FME versions. You’ll also learn how to manage SSL integration and tackle Python package installations using the command line.
During the hour, we’ll discuss:
-Top reasons for using Python within FME workflows
-Demos on integrating Python scripts and handling attributes
-Best practices for startup and shutdown scripts
-Using FME’s AI Assist to optimize your workflows
-Setting up FME Objects for external IDEs
Because when you need to code, the focus should be on results—not compatibility issues. Join us to master the art of combining Python and FME for powerful automation and data migration.
DevOpsDays SLC - Platform Engineers are Product Managers.pptxJustin Reock
Platform Engineers are Product Managers: 10x Your Developer Experience
Discover how adopting this mindset can transform your platform engineering efforts into a high-impact, developer-centric initiative that empowers your teams and drives organizational success.
Platform engineering has emerged as a critical function that serves as the backbone for engineering teams, providing the tools and capabilities necessary to accelerate delivery. But to truly maximize their impact, platform engineers should embrace a product management mindset. When thinking like product managers, platform engineers better understand their internal customers' needs, prioritize features, and deliver a seamless developer experience that can 10x an engineering team’s productivity.
In this session, Justin Reock, Deputy CTO at DX (getdx.com), will demonstrate that platform engineers are, in fact, product managers for their internal developer customers. By treating the platform as an internally delivered product, and holding it to the same standard and rollout as any product, teams significantly accelerate the successful adoption of developer experience and platform engineering initiatives.
Discover the top AI-powered tools revolutionizing game development in 2025 — from NPC generation and smart environments to AI-driven asset creation. Perfect for studios and indie devs looking to boost creativity and efficiency.
https://www.brsoftech.com/ai-game-development.html
5. An application framework
is like a playground for your code
Provides structure around otherwise unrelated activities
flickr.com/photos/osterwalder/152697503/
10. module (n)
1 : a standard or unit of measurement
2 : the size of some one part taken as a unit of measure by which the
proportions of an architectural composition are regulated
3 a : any in a series of standardized units for use together: as (1) : a
unit of furniture or architecture (2) : an educational unit which covers
a single subject or topic b : a usually packaged functional assembly
of electronic components for use with other such assemblies
4 : an independently operable unit that is a part of the total structure
of a space vehicle
5 a : a subset of an additive group that is also a group under addition
b : a mathematical set that is a commutative group under addition
and that is closed under multiplication which is distributive from the
left or right or both by elements of a ring and for which a(bx) = (ab)x
or (xb)a = x(ba) or both where a and b are elements of the ring and x
belongs to the set
Source: Merriam-Webster Dictionary
11. module (n)
1 : a standard or unit of measurement
2 : the size of some one part taken as a unit of measure by which the
proportions of an architectural composition are regulated
3 a : any in a series of standardized units for use together: as (1) : a
unit of furniture or architecture (2) : an educational unit which covers
a single subject or topic b : a usually packaged functional assembly
of electronic components for use with other such assemblies
4 : an independently operable unit that is a part of the total structure
of a space vehicle
5 a : a subset of an additive group that is also a group under addition
b : a mathematical set that is a commutative group under addition
and that is closed under multiplication which is distributive from the
left or right or both by elements of a ring and for which a(bx) = (ab)x
or (xb)a = x(ba) or both where a and b are elements of the ring and x
belongs to the set
Source: Merriam-Webster Dictionary
26. Each part of the architecture is like a puzzle piece
No single piece needs to know what the picture is
All that matters is that the piece does its own job correctly
flickr.com/photos/generated/501445202/
40. Module Rules
Hands to yourself
– Only call your own methods or those on the sandbox
– Don't access DOM elements outside of your box
– Don't access non-native global objects
Ask, don't take
– Anything else you need, ask the sandbox
Don't leave your toys around
– Don't create global objects
Don't talk to strangers
– Don't directly reference other modules
41. Modules must stay within their own sandboxes
No matter how restrictive or uncomfortable it may seem
flickr.com/photos/madaise/3406217980/
45. Module
Module Module
Module Sandbox Module
Modules only know the sandbox
The rest of the architecture doesn't exist to them
46. The sandbox also acts like a security guard
Knows what the modules are allowed to access and do on the framework
flickr.com/photos/heraklit/169566548/
48. Sandbox Jobs
Consistency
– Interface must be dependable
Security
– Determine which parts of the framework a module can
access
Communication
– Translate module requests into core actions
49. Take the time to design the
correct sandbox interface
It can't change later
53. The application core tells a module when
it should initialize and when it should shutdown
flickr.com/photos/bootbearwdc/20817093/
flickr.com/photos/bootbearwdc/20810695/
62. When modules are loosely coupled,
removing a module doesn't break the others
No direct access to another module = no breaking should the module disappear
63. The application core handles errors
Uses available information to determine best course of action
flickr.com/photos/brandonschauer/3168761995/
64. Core = function(){
var moduleData = {}, debug = false;
function createInstance(moduleId){
var instance =
moduleData[moduleId].creator(new Sandbox(this)),
name, method;
if (!debug){
for (name in instance){
method = instance[name];
if (typeof method == "function"){
instance[name] = function(name, method){
return function(){
try { return method.apply(this, arguments);}
catch(ex) {log(1, name + "(): " + ex.message);}
};
}(name, method);
}
}
}
return instance;
}
//more code here
}();
66. Application Core Jobs
Manage module lifecycle
– Tell modules when to start and stop doing their job
Enable inter-module communication
– Allow loose coupling between modules that are related
to one another
General error handling
– Detect, trap, and report errors in the system
Be extensible
– The first three jobs are not enough!
70. flickr.com/photos/pointnshoot/1443575327/
Anything built for extension can never be
obsolete
Extensions augment the capabilities of the core to keep it relevant and useful
76. GET ?name=value&name=value /ajax
Request format Entrypoint
Response format
<response>
<status>ok|error</status>
<data>
<results>
<result name="..." />
<result name="..." />
</results>
</data>
</response>
77. Entrypoint
var xhr = new XMLHttpRequest();
xhr.open("get", "/ajax?name=value", true);
Request
xhr.onreadystatechange = function(){ format
if (xhr.readyState == 4){
if (xhr.status == 200 || xhr.status == 304){
var statusNode = xhr.responseXML.getElementsByTagName("status")[0],
dataNode = xhr.responseXML.getElementsByTagName("data")[0];
if (statusNode.firstChild.nodeValue == "ok"){
handleSuccess(processData(dataNode));
} else { Response
handleFailure(); format
}
} else {
handleFailure();
}
}
};
xhr.send(null);
Basic implementation
Lowest-level Ajax with XMLHttpRequest
78. Library
reference Entrypoint
var id = Y.io("/ajax?name=value", {
method: "get", Request
on: { format
success: function(req){
var statusNode = req.responseXML.getElementsByTagName("status")[0],
dataNode = req.responseXML.getElementsByTagName("data")[0];
if (statusNode.firstChild.nodeValue == "ok"){
handleSuccess(processData(dataNode));
} else { Response
handleFailure(); format
}
},
failure: function(req){
handleFailure();
}
}
});
Implementation using a library
Hides some of the ugliness but still tightly coupled to Ajax implementation
79. var id = sandbox.request({ name: "value" }, {
success: function(response){
handleSuccess(response.data);
},
failure: function(response){
handleFailure();
}
});
Implementation using sandbox
Passes through to core - hides all Ajax communication details
80. Request format Entrypoint
Response format
Ajax extension encapsulates all details
Any of these three can change without affecting modules
81. GET ?name=value&name=value /request
Request format Entrypoint
Response format
{
status: "ok|error",
data: {
results: [
"...",
"..."
]
}
}
83. Ajax Extension Jobs
Hide Ajax communication details
– Modules don't need to know any of it
Provide common request interface
– Modules use this interface to specify data to send to
the server
Provide common response interface
– Modules use this interface to retrieve data from the
response
Manage server failures
– Modules only care if they got what they wanted or
not, don't care why
93. Base Library Jobs
Browser normalization
– Abstract away differences in browsers with common
interface
General-purpose utilities
– Parsers/serializers for XML, JSON, etc.
– Object manipulation
– DOM manipulation
– Ajax communication
Provide low-level extensibility
97. Only the base library knows which browser
is being used
No other part of the architecture should need to know
Base Library
98. Only the application core knows which
base library is being used
No other part of the architecture should need to know
Application
Core
Base Library
99. Sandbox
Application
Core
Only the sandbox knows which application core
is being used
No other part of the architecture should need to know
100. Module
Module Module
Module Sandbox Module
The modules know nothing except that
the sandbox exists
They have no knowledge of one another or the rest of the architecture
101. Module
Module Module
Module Sandbox Module
Application
Extension Extension
Core
Extension Base Library Extension
No part knows about the web application
#2: Over the past couple of years, we've seen JavaScript development earn recognition as a true discipline. The idea that you should architect your code, use patterns and good programming practices has really elevated the role of the front end engineer. In my opinion, part of this elevation has been the adoption of what has traditionally been considered back end methodologies. We now focus on performance and algorithms, there's unit testing for JavaScript, and so much more. One of the areas that I've seen a much slower than adoption that I'd like is in the area of error handling.How many people have an error handling strategy for their backend? How many have dashboards that display problems with uptime and performance? How many have anything similar for the front end?Typically, the front end has been this black hole of information. You may get a few customer reports here and there, but you have no information about what's going on, how often it's occurring, or how many people have been affected.
#108: So what have we talked about? Maintainable JavaScript is made up of four components.First is Code Conventions that describe the format of the code you’re writing.Second is Loose Coupling – keeping HTML, JavaScript, and CSS on separate layers and keeping application logic out of event handlers.Third is Programming Practices that ensure your code is readable and easily debugged.Fourth is creating a Build Process