Slides for a new talk - honestly, an alpha version (thanks to everyone who came for playing guinea pig) - of my client side performance talk. This is very much aimed towards back-end, or full stack developers more used to working behind the scenes, who may be less comfortable with JavaScript and other front-end performance concerns.
How to Build a Bespoke Page Builder in WordPressGerald Glynn
This document discusses building a bespoke page builder for WordPress. It covers using Advanced Custom Fields to create custom fields that store metadata which can then be used to dynamically generate page content. The key benefits are that it allows marketing and content teams to create customized page designs and flows without needing coding skills, while reducing the back-and-forth between developers and other teams. Potential pitfalls discussed include performance optimizations and how to best structure fields and templates.
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirstJun-ichi Sakamoto
This document discusses building a registration site using ASP.NET MVC4, Entity Framework Code First, and other technologies. It demonstrates creating a site that allows attendees to register by entering their name and email, with the list only shared among staff. Technologies used include MVC4, Razor syntax, Entity Framework Code First, SQL Server 2012 LocalDB, and libraries from NuGet. Authentication is added using HTTP Basic Authentication to allow access from any client like Excel. An API is also provided. Storing data in Google Spreadsheets is demonstrated as an alternative database.
HTML5 의 표준 권고안이 채택되면서 HTML5는 엄청난 속도로 웹 전반에 걸쳐 보급되고 있습니다. HTML5 와 기존의 HTML4 / XHTML 1.1 과의 가장 큰 차잇점은 웹을 바라보는 관점입니다. 웹브라우저를 저작 플랫폼이 아닌 실행 환경으로 바라보는 HTML5의 독특한 관점은 webcomponent 에 잘 드러나 있습니다. 이 발표에서는 webcomponent 의 개념 및 역사를 훑고, webcomponent 오픈소스 구현체들인 webcomponents.js 및 구글의 Polymer, 모질라의 x-tag 과 함께 페이스북의 React 와의 비교 및 브라우저 대응에 대한 내용을 다룹니다.
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Corey Clark, Ph.D.
As hardware developer’s push away from creating faster processors in lieu of multicore architectures game developers have to leverage multithreading technologies to capitalize on these new devices. With multicore mobile devices the need for a multithreaded web based game engine is a reality. This talk will discuss design of various multithreaded web engine architectures. Two specific threading implementations will be discussed. First technique shows how to create a static thread that is registered with the engine with the same techniques as other loaded resource. A second technique will focus on using a Thread Controller, which has the ability to create dynamic generic threads that can be passed functions during run time and process them in parallel. This also allows for coupling threaded commands together thereby creating critical sections and other common multithreading techniques utilized in C++ coding.
Focus will also be placed on design consideration and operation performance. An example will be show that demonstrates how the proper coding style and data structures can make or break your design. Also timing and performance standards will be given for various browsers so users can understand the overall overhead and operational considerations that need to be considered when using threads in a browser based environment.
Technology and capability limitations will also be discussed so developers can understand the differences between multithreading in C++ native applications and JavaScript browser-based application. This will also include some tricks on how to design an architecture that allows for some workarounds. Other JavaScript APIs such as WebGL, and WebSockets will also be discussed and demonstrated to help show the full realization of a web based game engine.
Coding samples and architectural layouts will be shown to the audience to help drive home the concepts being discussed during the lecture. A functional HTML5 JavaScript Multithreaded Web Engine will be demonstrated during the lectured to show the overall functionality and performance of the techniques described.
A summary write up of a sample engine architecture is attached in the supplemental documents that gives a brief description and architectural figures. These will be integrated into the lecture to help visualize some of the concepts being discussed.
High Performance/Real-Time Web Applications can suffer from serial program execution, which can greatly decrease user experience, usability, application capabilities and overall performance. The new HTML5 WebWorker JavaScript API allows for multithreading in browser environment, which has removed serial code bottleneck that has always been an issue for processor intensive applications. Specifically at Game Theory Labs we were able to increase the performance of our application by 55% utilizing the techniques discussed. This meetup will show off the variations in the WebWorker API, associated overhead using the API, various WebWorker architectures (Inline vs External, Static vs Dynamic, Nested vs Shared) as well as implementing a 2-Tier Thread Management system that allows for generating child process outside of the main thread thereby increasing performance of handling/merging data between threads and the main application.
What happened to XHTML 2.0 and how did HTML5 come about? What kind of new features (many already supported in modern browsers) are driving HTML5 adoption? HTML5 is the flavor of html you will be writing for the next 10 years. Time to get started!
The document discusses the divergence of goals between the W3C and WHATWG efforts for HTML specifications. It notes that the W3C is focused on creating snapshots of HTML according to its process, while WHATWG is focused on the canonical description and adding new features as needed. It also introduces web components as a way to build reusable custom elements using existing web technologies like HTML and JavaScript.
This document discusses techniques for caching dynamic web pages to improve performance without adding more hardware. It proposes using a combination of server-side includes (SSI), JavaScript, and Nginx scripting to serve mostly static pages from Memcached, while handling personalization through asynchronous calls if the user is logged in. Key aspects are caching an anonymous page template, personalizing it if needed, and handling interactions like viewing loves through additional asynchronous data requests.
How to Build a Bespoke Page Builder in WordPressGerald Glynn
This document discusses building a bespoke page builder for WordPress. It covers using Advanced Custom Fields to create custom fields that store metadata which can then be used to dynamically generate page content. The key benefits are that it allows marketing and content teams to create customized page designs and flows without needing coding skills, while reducing the back-and-forth between developers and other teams. Potential pitfalls discussed include performance optimizations and how to best structure fields and templates.
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirstJun-ichi Sakamoto
This document discusses building a registration site using ASP.NET MVC4, Entity Framework Code First, and other technologies. It demonstrates creating a site that allows attendees to register by entering their name and email, with the list only shared among staff. Technologies used include MVC4, Razor syntax, Entity Framework Code First, SQL Server 2012 LocalDB, and libraries from NuGet. Authentication is added using HTTP Basic Authentication to allow access from any client like Excel. An API is also provided. Storing data in Google Spreadsheets is demonstrated as an alternative database.
HTML5 의 표준 권고안이 채택되면서 HTML5는 엄청난 속도로 웹 전반에 걸쳐 보급되고 있습니다. HTML5 와 기존의 HTML4 / XHTML 1.1 과의 가장 큰 차잇점은 웹을 바라보는 관점입니다. 웹브라우저를 저작 플랫폼이 아닌 실행 환경으로 바라보는 HTML5의 독특한 관점은 webcomponent 에 잘 드러나 있습니다. 이 발표에서는 webcomponent 의 개념 및 역사를 훑고, webcomponent 오픈소스 구현체들인 webcomponents.js 및 구글의 Polymer, 모질라의 x-tag 과 함께 페이스북의 React 와의 비교 및 브라우저 대응에 대한 내용을 다룹니다.
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Corey Clark, Ph.D.
As hardware developer’s push away from creating faster processors in lieu of multicore architectures game developers have to leverage multithreading technologies to capitalize on these new devices. With multicore mobile devices the need for a multithreaded web based game engine is a reality. This talk will discuss design of various multithreaded web engine architectures. Two specific threading implementations will be discussed. First technique shows how to create a static thread that is registered with the engine with the same techniques as other loaded resource. A second technique will focus on using a Thread Controller, which has the ability to create dynamic generic threads that can be passed functions during run time and process them in parallel. This also allows for coupling threaded commands together thereby creating critical sections and other common multithreading techniques utilized in C++ coding.
Focus will also be placed on design consideration and operation performance. An example will be show that demonstrates how the proper coding style and data structures can make or break your design. Also timing and performance standards will be given for various browsers so users can understand the overall overhead and operational considerations that need to be considered when using threads in a browser based environment.
Technology and capability limitations will also be discussed so developers can understand the differences between multithreading in C++ native applications and JavaScript browser-based application. This will also include some tricks on how to design an architecture that allows for some workarounds. Other JavaScript APIs such as WebGL, and WebSockets will also be discussed and demonstrated to help show the full realization of a web based game engine.
Coding samples and architectural layouts will be shown to the audience to help drive home the concepts being discussed during the lecture. A functional HTML5 JavaScript Multithreaded Web Engine will be demonstrated during the lectured to show the overall functionality and performance of the techniques described.
A summary write up of a sample engine architecture is attached in the supplemental documents that gives a brief description and architectural figures. These will be integrated into the lecture to help visualize some of the concepts being discussed.
High Performance/Real-Time Web Applications can suffer from serial program execution, which can greatly decrease user experience, usability, application capabilities and overall performance. The new HTML5 WebWorker JavaScript API allows for multithreading in browser environment, which has removed serial code bottleneck that has always been an issue for processor intensive applications. Specifically at Game Theory Labs we were able to increase the performance of our application by 55% utilizing the techniques discussed. This meetup will show off the variations in the WebWorker API, associated overhead using the API, various WebWorker architectures (Inline vs External, Static vs Dynamic, Nested vs Shared) as well as implementing a 2-Tier Thread Management system that allows for generating child process outside of the main thread thereby increasing performance of handling/merging data between threads and the main application.
What happened to XHTML 2.0 and how did HTML5 come about? What kind of new features (many already supported in modern browsers) are driving HTML5 adoption? HTML5 is the flavor of html you will be writing for the next 10 years. Time to get started!
The document discusses the divergence of goals between the W3C and WHATWG efforts for HTML specifications. It notes that the W3C is focused on creating snapshots of HTML according to its process, while WHATWG is focused on the canonical description and adding new features as needed. It also introduces web components as a way to build reusable custom elements using existing web technologies like HTML and JavaScript.
This document discusses techniques for caching dynamic web pages to improve performance without adding more hardware. It proposes using a combination of server-side includes (SSI), JavaScript, and Nginx scripting to serve mostly static pages from Memcached, while handling personalization through asynchronous calls if the user is logged in. Key aspects are caching an anonymous page template, personalizing it if needed, and handling interactions like viewing loves through additional asynchronous data requests.
This document provides an introduction to UI & UX basics, covering HTML for content, CSS for layout, and JavaScript for behavior. It discusses basic HTML structures like paragraphs, images, lists, links, and tables. It then covers identifying layout elements, applying CSS style rules using selectors and properties, prefixes for cross-browser compatibility, and testing across browsers. The document concludes with a section on using JavaScript for user interactivity and validation, questions and answers, and references.
This document discusses various web development tools for debugging and inspecting code, including FireBug, Opera Dragonfly, IE Developer Tools, and Webkit Developer Tools. It also provides tips on using breakpoints to debug JavaScript code and references browser-specific developer tools guides. Several real-world web applications are listed as examples of AJAX and HTML5 implementations. HTML Tidy is introduced as a tool for cleaning up and fixing errors in HTML markup.
GatsbyJS is a site generator that allows you to build modern, fast and secure apps and websites using React, GraphQL, and other tools. It focuses on developer experience with batteries included and features like hot reloading. Popular sites using Gatsby include reactjs.org, airbnb.io, and figma.com. Gatsby gets data from various sources and delivers sites via services like S3, Netlify, and GitHub Pages. Developers can install Gatsby globally, generate a new Gatsby site, and develop locally while previewing changes in real time.
This document provides an overview of various front-end frameworks and tools. It discusses HTML templating languages like HAML and templating engines like Handlebars. It also covers CSS preprocessors like SASS and LESS. JavaScript libraries and frameworks covered include jQuery, Backbone, Spine and CoffeeScript. Boilerplates like HTML5 Boilerplate and frameworks like Twitter Bootstrap and Zurb Foundation are also summarized. The document encourages trying new tools but not feeling overwhelmed by the many options and focusing on those most helpful.
Cada día se desarrollan tecnologías que aprovechan mejor las capacidades de los navegadores, el soporte para HTML 5 y CSS 3 mejora cada día y se pueden encontrar librerías JavaScript que ofrecen soporte para lo mas moderno u ofrecen un fallback para funcionar en navegadores anticuados.
Los usuarios cada vez sufren mas el fenomeno de la inmediatez, si el sitio web tarde en contestar se desesperan y se cierran el tab, perdemos al usuario. Por eso es importante que un sitio sea muy rápido y que ofrezca la información que el usuario busca.
En esta charla hablare de como hemos empezado a adoptar Single Page Interface y de los retos que esto significa, como Bookmarking, SEO y otros. Así como de las librerías JavaScript (microframeworks) que evaluamos y que finalmente terminamos usando.
Presented at Web Unleashed on September 16-17, 2015 in Toronto, Canada
More info at www.fitc.ca/webu
Web Components
with Jeff Tapper
OVERVIEW
Web Components provide a necessary element for large scale applications: the ability to build Web Apps as a set of encapsulated, maintainable and reusable components. In order to use Web Components, a series of emerging web platform features such as the Shadow DOM, HTML Imports and Custom elements need to be used, each of which have varying support in browsers today. However, with the help of the Polymer project – a set of polyfills and an application framework using these principles – Web Components can be used today.
In this session Jeff Tapper will explore Web Components, and walk through the creation of a Web Component for a modern JavaScript project.
OBJECTIVE
Learn to use Web Components to create reusable elements for your web application.
TARGET AUDIENCE
JavaScript Developers looking to understand how to build large scale applications.
ASSUMED AUDIENCE KNOWLEDGE
Audience should be comfortable working in JavaScript and manipulating the DOM.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
What are Web Components
What is the current state of support for Web Components
When do I need to use the Polymer Project to implement Web Components
How to build a Web Component
How to use a Web Component
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
Extending on some of the themes of front-end heavy application development, this session covered the higher order themes of development workflow automation, revolving around the concepts of modern web app development from a full stack perspective.
In this session we’ll talk about the evolving ASP.NET platform and what’s new with .NET 5, as well as what’s coming with .NET 6. Modern ASP.NET applications will take advantage of .NET full-stack using Microsoft’s Blazor framework. We’ll discuss how the new framework coupled with Telerik UI for Blazor cut development time and boost productivity.
Dmitry Buzdin presented on the evolution of the web over the past 5 years. He discussed how JavaScript has become more important and led to performance wars between browsers in 2008-2009. Browsers now compete through introducing new HTML5 features in their versions released every few months. Buzdin highlighted some new HTML5 features like LocalStorage, IndexedDB, Web Sockets, SVG, and Canvas, and argued this moves the web to a new architecture with more dynamic pages and capabilities beyond just HTTP. He concluded by encouraging learning HTML5 as programming is becoming more mainstream and building applications is simpler than ever on the new HTML5 platform.
Refreshing Your UI with HTML5, Bootstrap and CSS3Matt Raible
Many startups and open source projects have the luxury of starting greenfield projects. Unfortunately, the corporate world rarely works this way. It's more maintenance coding and a few new features every now and then. This session covers how you can use three of the hottest technologies (HTML5, CSS3 and Bootstrap) to spruce up a legacy application. It describes a real-world situation where a redesign was implemented in a few short weeks, making an old site look brand new. It also does a deep dive into Bootstrap, explains LESS, and shows pitfalls with older browsers. After this session, you'll be motivated to integrate Bootstrap into your applications and turn that legacy UI into something sexy!
See blog post about this presentation at http://raibledesigns.com/rd/entry/my_bootstrap_presentation_from_html5.
Using WordPress as a Backend for Your React ProjectAdam Rasheed
This document discusses using WordPress as a backend for a React project, creating a headless CMS. It recommends setting up WordPress and React development environments separately. The WordPress REST API allows accessing WordPress data as JSON that can be consumed by the React frontend. The document provides an example of building a React component that fetches a list of WordPress posts via the REST API and displays them. It also discusses hosting the WordPress backend and React frontend separately, such as using Netlify for the frontend and DigitalOcean for WordPress.
Untangling the web - fall2017 - class 4Derek Jacoby
This document provides an agenda and summary for a class on CSS, Flexbox, HTML, and JavaScript. It includes reminders on getting HTML elements from JavaScript using getElementById and creating elements. It reviews a homework assignment on those methods and creating elements. It then covers GitHub branches and commands for creating a new branch. Finally, it introduces CSS and selectors, exercises in CSS, an introduction to Flexbox with a Flexbox Froggy exercise, an introduction to the Bootstrap framework with exercises in using button styles and tooltips, discusses Bootstrap themes and templates, and assigns homework to create a resume using Bootstrap and Flexbox hosted on GitHub pages.
Slides from an HTML5 overview session I presented at work...
This presentation has an accompanying sample webapp project: http://code.google.com/p/html5-playground
With the release of the WordPress JSON API expected later this year, WordPress is primed to serve as a viable backend for single-page web applications of the future. The presentation will explain the benefits of using WordPress in this context and include a short demonstration to show how WordPress can be integrated in a typical single-page application technology stack.
JavaScript is a scripting language that adds interactivity to HTML pages. It is embedded directly into HTML and allows dynamic updating of pages without reloading. JavaScript can react to events, read/write HTML elements, and validate data. AJAX uses JavaScript asynchronously to exchange small amounts of data with a server in the background without reloading the whole page. Common uses include Google Maps, Gmail, YouTube, and Facebook tabs.
Node.js 101
with Rami Sayar
Presented by FITC at Web Unleashed 2014 in Toronto
on September 18 2014, 10:30 - 11:15am
Node.js is a runtime environment and library for running JavaScript applications outside the browser. Node.js is mostly used to run real-time server applications and shines through its performance using non-blocking I/O and asynchronous events. This talk will introduce you to Node.js by showcasing the environment and its two most popular libraries: express and socket.io.
TARGET AUDIENCE
Beginner web developers
ASSUMED AUDIENCE KNOWLEDGE
Working knowledge of JavaScript and HTML5.
OBJECTIVE
Learn how to build a chat engine using Node.js and WebSockets.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Node.js environment and basics
Node Package Manager overview
Web Framework, express, basics
WebSockets and Socket.io basics
Building a chat engine using Node.js
This document introduces WebSockets as a new technology for bidirectional communication between a browser and server. It discusses how WebSockets improve on older techniques like Ajax and Comet by allowing real-time data updates with less overhead. Example uses of WebSockets include chat applications, displaying stock prices, and collaboration tools. While browser support is still limited, libraries exist for many programming languages to create WebSocket servers.
The document discusses Blazor, a new web framework that uses C# and .NET to build client-side web UI using WebAssembly. It begins with background on JavaScript and WebAssembly. It then covers the key aspects of Blazor like components, routing, dependency injection. It addresses concerns about older browser support and downloading the .NET runtime. Overall, the document provides an introduction to Blazor highlighting its benefits and community projects while also addressing some potential concerns.
The document outlines an agenda to demonstrate a variety of tools for web designers, including Chrome Developer Tools, Firebug, Google Web Toolkit, Foundation, Pattern Tap, and Opera Developer. It also lists other tools to check out such as Bootstrap, Kompozer, Dripple, Dropbox, Google Drive, JS Bin, GitHub, DiffChecker, XAMPP, and 85 responsive web design tools compiled by Mashable. The document invites the reader to a virtual petting zoo/discussion and provides links to hang out on Google+ or AnyMeeting.
Give Responsive Design a Mobile Performance BoostGrgur Grisogono
The document discusses why mobile web experiences are often slower than desktop experiences and proposes approaches to address this. It notes that mobile is slower due to factors like network latency, available bandwidth, processing power and battery preserving strategies in mobile browsers. It advocates an adaptive responsive design approach using server-side components to reduce downloading of unnecessary assets, optimize assets for specific devices, and eliminate issues caused by high latency and variable bandwidth on mobile networks. This hybrid responsive-adaptive approach aims to provide a faster mobile user experience.
This document provides an introduction to UI & UX basics, covering HTML for content, CSS for layout, and JavaScript for behavior. It discusses basic HTML structures like paragraphs, images, lists, links, and tables. It then covers identifying layout elements, applying CSS style rules using selectors and properties, prefixes for cross-browser compatibility, and testing across browsers. The document concludes with a section on using JavaScript for user interactivity and validation, questions and answers, and references.
This document discusses various web development tools for debugging and inspecting code, including FireBug, Opera Dragonfly, IE Developer Tools, and Webkit Developer Tools. It also provides tips on using breakpoints to debug JavaScript code and references browser-specific developer tools guides. Several real-world web applications are listed as examples of AJAX and HTML5 implementations. HTML Tidy is introduced as a tool for cleaning up and fixing errors in HTML markup.
GatsbyJS is a site generator that allows you to build modern, fast and secure apps and websites using React, GraphQL, and other tools. It focuses on developer experience with batteries included and features like hot reloading. Popular sites using Gatsby include reactjs.org, airbnb.io, and figma.com. Gatsby gets data from various sources and delivers sites via services like S3, Netlify, and GitHub Pages. Developers can install Gatsby globally, generate a new Gatsby site, and develop locally while previewing changes in real time.
This document provides an overview of various front-end frameworks and tools. It discusses HTML templating languages like HAML and templating engines like Handlebars. It also covers CSS preprocessors like SASS and LESS. JavaScript libraries and frameworks covered include jQuery, Backbone, Spine and CoffeeScript. Boilerplates like HTML5 Boilerplate and frameworks like Twitter Bootstrap and Zurb Foundation are also summarized. The document encourages trying new tools but not feeling overwhelmed by the many options and focusing on those most helpful.
Cada día se desarrollan tecnologías que aprovechan mejor las capacidades de los navegadores, el soporte para HTML 5 y CSS 3 mejora cada día y se pueden encontrar librerías JavaScript que ofrecen soporte para lo mas moderno u ofrecen un fallback para funcionar en navegadores anticuados.
Los usuarios cada vez sufren mas el fenomeno de la inmediatez, si el sitio web tarde en contestar se desesperan y se cierran el tab, perdemos al usuario. Por eso es importante que un sitio sea muy rápido y que ofrezca la información que el usuario busca.
En esta charla hablare de como hemos empezado a adoptar Single Page Interface y de los retos que esto significa, como Bookmarking, SEO y otros. Así como de las librerías JavaScript (microframeworks) que evaluamos y que finalmente terminamos usando.
Presented at Web Unleashed on September 16-17, 2015 in Toronto, Canada
More info at www.fitc.ca/webu
Web Components
with Jeff Tapper
OVERVIEW
Web Components provide a necessary element for large scale applications: the ability to build Web Apps as a set of encapsulated, maintainable and reusable components. In order to use Web Components, a series of emerging web platform features such as the Shadow DOM, HTML Imports and Custom elements need to be used, each of which have varying support in browsers today. However, with the help of the Polymer project – a set of polyfills and an application framework using these principles – Web Components can be used today.
In this session Jeff Tapper will explore Web Components, and walk through the creation of a Web Component for a modern JavaScript project.
OBJECTIVE
Learn to use Web Components to create reusable elements for your web application.
TARGET AUDIENCE
JavaScript Developers looking to understand how to build large scale applications.
ASSUMED AUDIENCE KNOWLEDGE
Audience should be comfortable working in JavaScript and manipulating the DOM.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
What are Web Components
What is the current state of support for Web Components
When do I need to use the Polymer Project to implement Web Components
How to build a Web Component
How to use a Web Component
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
Extending on some of the themes of front-end heavy application development, this session covered the higher order themes of development workflow automation, revolving around the concepts of modern web app development from a full stack perspective.
In this session we’ll talk about the evolving ASP.NET platform and what’s new with .NET 5, as well as what’s coming with .NET 6. Modern ASP.NET applications will take advantage of .NET full-stack using Microsoft’s Blazor framework. We’ll discuss how the new framework coupled with Telerik UI for Blazor cut development time and boost productivity.
Dmitry Buzdin presented on the evolution of the web over the past 5 years. He discussed how JavaScript has become more important and led to performance wars between browsers in 2008-2009. Browsers now compete through introducing new HTML5 features in their versions released every few months. Buzdin highlighted some new HTML5 features like LocalStorage, IndexedDB, Web Sockets, SVG, and Canvas, and argued this moves the web to a new architecture with more dynamic pages and capabilities beyond just HTTP. He concluded by encouraging learning HTML5 as programming is becoming more mainstream and building applications is simpler than ever on the new HTML5 platform.
Refreshing Your UI with HTML5, Bootstrap and CSS3Matt Raible
Many startups and open source projects have the luxury of starting greenfield projects. Unfortunately, the corporate world rarely works this way. It's more maintenance coding and a few new features every now and then. This session covers how you can use three of the hottest technologies (HTML5, CSS3 and Bootstrap) to spruce up a legacy application. It describes a real-world situation where a redesign was implemented in a few short weeks, making an old site look brand new. It also does a deep dive into Bootstrap, explains LESS, and shows pitfalls with older browsers. After this session, you'll be motivated to integrate Bootstrap into your applications and turn that legacy UI into something sexy!
See blog post about this presentation at http://raibledesigns.com/rd/entry/my_bootstrap_presentation_from_html5.
Using WordPress as a Backend for Your React ProjectAdam Rasheed
This document discusses using WordPress as a backend for a React project, creating a headless CMS. It recommends setting up WordPress and React development environments separately. The WordPress REST API allows accessing WordPress data as JSON that can be consumed by the React frontend. The document provides an example of building a React component that fetches a list of WordPress posts via the REST API and displays them. It also discusses hosting the WordPress backend and React frontend separately, such as using Netlify for the frontend and DigitalOcean for WordPress.
Untangling the web - fall2017 - class 4Derek Jacoby
This document provides an agenda and summary for a class on CSS, Flexbox, HTML, and JavaScript. It includes reminders on getting HTML elements from JavaScript using getElementById and creating elements. It reviews a homework assignment on those methods and creating elements. It then covers GitHub branches and commands for creating a new branch. Finally, it introduces CSS and selectors, exercises in CSS, an introduction to Flexbox with a Flexbox Froggy exercise, an introduction to the Bootstrap framework with exercises in using button styles and tooltips, discusses Bootstrap themes and templates, and assigns homework to create a resume using Bootstrap and Flexbox hosted on GitHub pages.
Slides from an HTML5 overview session I presented at work...
This presentation has an accompanying sample webapp project: http://code.google.com/p/html5-playground
With the release of the WordPress JSON API expected later this year, WordPress is primed to serve as a viable backend for single-page web applications of the future. The presentation will explain the benefits of using WordPress in this context and include a short demonstration to show how WordPress can be integrated in a typical single-page application technology stack.
JavaScript is a scripting language that adds interactivity to HTML pages. It is embedded directly into HTML and allows dynamic updating of pages without reloading. JavaScript can react to events, read/write HTML elements, and validate data. AJAX uses JavaScript asynchronously to exchange small amounts of data with a server in the background without reloading the whole page. Common uses include Google Maps, Gmail, YouTube, and Facebook tabs.
Node.js 101
with Rami Sayar
Presented by FITC at Web Unleashed 2014 in Toronto
on September 18 2014, 10:30 - 11:15am
Node.js is a runtime environment and library for running JavaScript applications outside the browser. Node.js is mostly used to run real-time server applications and shines through its performance using non-blocking I/O and asynchronous events. This talk will introduce you to Node.js by showcasing the environment and its two most popular libraries: express and socket.io.
TARGET AUDIENCE
Beginner web developers
ASSUMED AUDIENCE KNOWLEDGE
Working knowledge of JavaScript and HTML5.
OBJECTIVE
Learn how to build a chat engine using Node.js and WebSockets.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Node.js environment and basics
Node Package Manager overview
Web Framework, express, basics
WebSockets and Socket.io basics
Building a chat engine using Node.js
This document introduces WebSockets as a new technology for bidirectional communication between a browser and server. It discusses how WebSockets improve on older techniques like Ajax and Comet by allowing real-time data updates with less overhead. Example uses of WebSockets include chat applications, displaying stock prices, and collaboration tools. While browser support is still limited, libraries exist for many programming languages to create WebSocket servers.
The document discusses Blazor, a new web framework that uses C# and .NET to build client-side web UI using WebAssembly. It begins with background on JavaScript and WebAssembly. It then covers the key aspects of Blazor like components, routing, dependency injection. It addresses concerns about older browser support and downloading the .NET runtime. Overall, the document provides an introduction to Blazor highlighting its benefits and community projects while also addressing some potential concerns.
The document outlines an agenda to demonstrate a variety of tools for web designers, including Chrome Developer Tools, Firebug, Google Web Toolkit, Foundation, Pattern Tap, and Opera Developer. It also lists other tools to check out such as Bootstrap, Kompozer, Dripple, Dropbox, Google Drive, JS Bin, GitHub, DiffChecker, XAMPP, and 85 responsive web design tools compiled by Mashable. The document invites the reader to a virtual petting zoo/discussion and provides links to hang out on Google+ or AnyMeeting.
Give Responsive Design a Mobile Performance BoostGrgur Grisogono
The document discusses why mobile web experiences are often slower than desktop experiences and proposes approaches to address this. It notes that mobile is slower due to factors like network latency, available bandwidth, processing power and battery preserving strategies in mobile browsers. It advocates an adaptive responsive design approach using server-side components to reduce downloading of unnecessary assets, optimize assets for specific devices, and eliminate issues caused by high latency and variable bandwidth on mobile networks. This hybrid responsive-adaptive approach aims to provide a faster mobile user experience.
This document compares Sass and LESS, two CSS preprocessors. It introduces some of the key features and benefits of each, including variables, nested rules, mixins, functions, and more. Sass is described as the most mature and powerful option, while LESS is meant to feel like CSS but with added programming features. Examples are provided to illustrate concepts like variables, nesting, mixins and more. Frameworks that use Sass are also listed.
Sencha Cmd is a tool used to build Sencha frameworks like Sencha Touch and Ext JS. It provides utilities, compilers, and build tasks to package applications and frameworks. Sencha Cmd uses a configurable and customizable build process based on Apache Ant that can be integrated into continuous integration workflows. It supports scaffolding and building applications, packages, and existing projects through special configuration files and folders.
This document discusses building Cordova plugins for iOS. It begins by looking at the anatomy of a Cordova plugin and exploring some examples. It then covers the three step process for developing a Cordova plugin: 1) configuring the plugin, 2) creating Objective-C classes, and 3) writing the code. Specific examples are provided for creating a random number plugin and developing a custom audio FFT data renderer plugin.
The document discusses upcoming features in Sencha frameworks, including common core improvements, chart unification, new themes, Cordova/PhoneGap integration, touch grid enhancements, gadgets as minimal UI components, MVC routing with parameters, and demos. Key areas of focus are performance, compatibility, and building awesome mobile apps across devices.
At the Kings of Code conference in Amsterdam in May 2008 I presented an updated version of my High Performance Web Sites talk that I first offered at @media in London in 2007. Thanks to the Performance Engineers at Yahoo! for the research!
This document discusses practices and obstacles in agile development based on a presentation. It begins with introductions of the presenter and definitions of key terms like agile development. It then discusses approaches for introducing agile development into a company, such as starting with a pilot project or going "stealth". Technical practices covered include test-driven development, collective code ownership, pair programming, refactoring, and continuous integration. The document concludes with resources for further reading.
The document discusses various options for securely storing client-side data, including encrypting data stored in HTML5 storage mechanisms like LocalStorage. It recommends using libraries like Crypto-JS and the Stanford JavaScript Crypto Library to encrypt data before storing it. It provides code examples of overriding Ext.encode and Ext.decode to encrypt all JSON, as well as overriding proxies to encrypt record data. Hybrid mobile app options for securely storing data like SQLite with encryption extensions are also covered.
Exploring the Possibilities of Sencha and WebRTCGrgur Grisogono
This document discusses WebRTC and how it can be used with Sencha and Ext JS. It provides an overview of WebRTC, including what it is, its key features such as media streams and peer connections, and how it enables real-time communication directly in the browser. It also covers related concepts like NAT traversal using STUN, TURN, and ICE and provides code examples for setting up a basic WebRTC video call between two peers.
This document provides an overview and introduction to JavaScript basics and best practices. It covers what JavaScript is, how engines work, language features, and future developments like ES6. The basics section discusses types, variables, expressions, statements, functions, objects, and prototypical inheritance. The best practices section focuses on techniques for enterprise applications. The document is intended to help front-end developers learn JavaScript fundamentals.
This document discusses AngularJS basics and best practices. It covers what AngularJS is, why it's used, its core framework features like MVVM, dependency injection, and two-way data binding. It also describes the main framework components like modules, scopes, views, controllers, services, routers, resolvers, and directives. The document concludes with a section on unit testing AngularJS applications with Karma and Jasmine.
This document provides tips for boosting performance in React and Webpack applications. It discusses various optimizations that can improve build speed and bundle size for development and production environments. Some of the key recommendations include using PureComponent to minimize unnecessary re-renders, avoiding large JSX blocks, code splitting, tree shaking with Webpack 2, and leveraging tools like HappyPack, UglifyJS, and CSS loaders.
Optimizing web app delivery speed with PRPL pattern. Interactive demo with Webpack and React sample code. Project available with an incremental 7-step process for free on GitHub. Presentation from Split.JS Meetup.
GitHub project: https://github.com/ModusCreateOrg/react-dynamic-route-loading-es6/tree/steps/6-no-helmet-scripttags
Frustration-Free Packaging of Ext JS 5 ApplicationsGrgur Grisogono
This document discusses options for packaging Ext JS applications for different targets, including web delivery, desktop packaging, and mobile packaging. It compares platforms such as TideSDK, Cordova, and Sencha Space across criteria like execution speed, hardware API access, use of native code, how application updates are handled, and security. The key message is that packaging should not be considered the last step of the development process.
The document discusses the evolution of ECMAScript (ES) standards over time, including new features introduced in ES2015, ES2016, and future versions. It covers topics like constants, arrow functions, classes, modules, promises, and other new syntax and APIs. The presentation also discusses how these new features can improve developer experience and interaction design when building applications.
Today, a web page can be delivered to desktop computers, televisions, or handheld devices like tablets or phones. While a technique like responsive design helps ensure that our web sites look good across that spectrum of devices we may forget that we need to make sure that our web sites also perform well across that same spectrum. More and more of our users are shifting their Internet usage to these more varied platforms and connection speeds with some moving entirely to mobile Internet.
In this session we’ll look at the tools that can help you understand, measure and improve the web performance of your web sites and applications. The talk will also discuss how new server-side techniques might help us optimize our front-end performance. Finally, since the best way to test is to have devices in your hand, we’ll discuss some tips for getting your hands on them cheaply.
This presentation builds upon Dave’s “Optimization for Mobile” chapter in Smashing Magazine’s “The Mobile Book.”
This talk was given at the Responsive Web Design Summit hosted by Environments for Humans.
Client Side Performance for Back End Developers - Cambridge .NET User Group -...Bart Read
The document discusses strategies for improving client-side web performance for back-end developers. It introduces key concepts like RAIL (Response, Animation, Idle, Load), techniques for reducing JavaScript memory usage and CSS/animation performance. A major focus is on HTTP/2 and its benefits like multiplexing and server push. The presentation provides examples of tools for profiling performance and inline code samples for optimizing aspects like object pooling, deferred loading, and DNS prefetching.
Building Web Mobile App that don’t suck - FITC Web Unleashed - 2014-09-18Frédéric Harper
Mobility is everywhere. It’s even more important to think about smaller devices like smartphones when building application or game using web technology. Everybody wants to have a mobile application, but it's not sufficient: you need to create an awesome experience for your users, your customers. You need to be future proof, and think about different markets as users needs: you never know when your application will be the next Flappy Bird. This presentation is about concrete tips, tricks and guidelines for web developers using HTML, CSS, and JavaScript based on experience that will help you make a success of your next exciting mobile application or game idea.
This document provides 14 lessons and hacks for building native and mobile web applications using JavaScript. It discusses issues like architecting for multiple platforms and environments, structuring the codebase, detecting the platform, improving performance of animations through CSS transitions, handling garbage collection of images and HTML, supporting touch events, adding sound, and leveraging tools like PhoneGap Build. The tips aim to help developers apply their web skills to build applications that run on both desktop and mobile devices using a single codebase.
The document provides an overview of the author's experience building web applications using Go. It discusses the author's background with various backend and frontend technologies. It then summarizes building web apps in Go, covering routing, handlers, middleware, models, rendering, frameworks, and packages. The author advocates composing simple packages together rather than relying on magic or large frameworks. The document also touches on developer tools for assets, hot reloading, and distribution packaging.
External JavaScript Widget Development Best Practices (updated) (v.1.1) Volkan Özçelik
The document discusses best practices for developing JavaScript widgets. It covers challenges like versioning, cross-domain restrictions, cookies, security, and performance. Versioning can be handled through URL parameters or initializing with a version number. Cross-domain issues can be addressed using techniques like CORS, postMessage, or JSONP. Security requires sanitizing inputs, whitelisting domains, and handling risks like XSS and CSRF. Performance involves minimizing payload size and network requests.
This document discusses best practices for developing JavaScript widgets. It begins by introducing widgets and their types, then discusses challenges like versioning, cross-domain restrictions, shared environments, and security. It provides recommendations for handling these challenges, such as using cache-revalidating scripts for versioning, cross-domain messaging for communication, and sanitization for security. The document concludes by addressing widget performance, emphasizing minimizing payload size, lazy loading, and yielding to avoid blocking.
Freelancer Weapons of mass productivityGregg Coppen
In the battle to stay organized, efficient, sane and maximize on billable time it helps to have systems in place to help deal with the daily business processes and management that make sure that you are working on what you should be and that projects, budgets and timelines stay on track. In particular, when you work on your own, its critical to have things like billing, time tracking and project management as a natural and seamless part of your workflow.
This session aims to be a whistle stop tour of some useful open source tools and subscription solutions I have found to be well worth their costs - including how they can be used effectively together to allow you to make the most efficient use of your time designing and developing Drupal sites.
I work as a remote contractor & consultant and my clients are drupal shops and companies needing web sites and systems designed, built, themed and/or maintained. These tools and services work for me to help stay organized and on top of my workload and help me to manage my responsibilities across multiple clients and timezones effectively.
The material in this session is geared more towards individual freelancers although much of it will be relevant for larger drupal shops and teams too.
A few of the topics I intend to cover will include
* Project Management with Redmine - an overview of this powerful open source project management system and a demo of some of the plugins that extend its functionality and integrate well with Drupal, Dropbox, Github, Chrome and others.
* Simplifying getting paid and easy record keeping - Easy invoicing, credit card processing and automatic importing of expenses using Freshbooks & Stripe
* Design to theme tricks and up and coming in-browser design tools and workflows using Styletiles, CSS Hat, SASS, Typekit, Typecast & Livestyle
* Faster Drupal development tips using Alfred & Sublime Text
* Rapid protoyping using Bootstrap/Zenstrap
* Site building strategies using install profiles and drush make files
* Deployment and Maintenance using Aegir
* Server monitoring using New Relic & load testing using Blazemeter
* Hosting and managing your site in the cloud
It is my aim to introduce ( in some cases briefly) tools and services that have made a difference to me that may have the potential to add to and improve your existing workflows.
The document discusses options for custom development on the SharePoint platform. It provides an overview of development options for SharePoint 2007, 2010, 2013, and Office 365. These include out of the box configuration, SharePoint designer, sandbox solutions, apps for SharePoint, and provider hosted apps. It also discusses factors to consider when choosing a development approach like requirements, team skills, and maintainability. The document recommends resources for learning more about custom SharePoint development.
Rapid and Responsive - UX to Prototype with BootstrapJosh Jeffryes
The document discusses how to rapidly prototype user interfaces using Bootstrap, a popular front-end framework. It outlines the benefits of prototyping with Bootstrap over traditional wireframing or jumping straight to development. Prototyping with Bootstrap allows building interactive prototypes quickly in hours using responsive design principles. The prototypes can then be used as the basis for the final site design rather than being discarded. The document introduces key concepts like responsive design, prototyping, and frameworks. It also provides an overview of features in Bootstrap like grids, components, and how they can be combined for prototyping.
This document discusses the JavaScript library Prototype and how it can be used to build dynamic user interfaces with Ajax techniques. It provides an overview of Prototype's features for simplifying Ajax calls, enhancing DOM manipulation, adding visual effects, and debugging JavaScript across browsers. The document promotes Prototype as a way to focus on applications rather than browser bugs and contains links to documentation, extensions, and debugging tools to support Prototype development.
This document discusses the JavaScript library Prototype and how it can be used to build dynamic user interfaces with Ajax techniques. It provides an overview of Prototype's features for simplifying Ajax calls, enhancing DOM manipulation, adding visual effects, and debugging JavaScript across browsers. The document promotes Prototype as a way to focus on applications rather than browser bugs and contains links to documentation, extensions, and debugging tools to support Prototype development.
This document discusses rapid development using Ruby on Rails. It covers how Rails enables rapid development through conventions, community best practices, and continuous innovation. It also provides tips for scaling Rails applications, such as client-side performance tuning, database optimization, version control, automation, and modern architectural patterns like Arel, Rack, and Bundler. The overall message is that Rails can help deliver projects quickly while maintaining quality through its principles of DRY, agile development, and an active community of developers.
Morden F2E Education - Think of Progressive Web AppsCaesar Chi
We focus on newbie front end / JavaScript full-stack engineer training, we will tell training evolution.
And we well tell you how PWA works in training process.
Getting started with Vue.js - CodeMash 2020Burton Smith
This document provides an overview and introduction to getting started with the Vue.js framework. It discusses why one might choose Vue over other frameworks, the key components of Vue like Vue, Vue-Router, and Vuex. It also covers the basics of Vue including component-driven architecture, templates, props, events, and routing. The document concludes with challenges and examples to help get users up and running with Vue today.
I based my presention on the great "HTML5 for Web designers" by Jeremy Keith. Awesome and pragmatic book, the way I like it. Get your copy on: http://books.alistapart.com/products/html5-for-web-designers
OVERVIEW
Twitter Bootstrap is a wildly popular HTML and CSS framework for building websites and web applications. It is the number 1 project on GitHub. Bootstrap supports responsive web design, allowing the layout of your page to adapt to the device (desktop, tablet, mobile). This talk will introduce you to the basics of using Bootstrap and show you how to build responsive web layouts to build your own app.
TARGET AUDIENCE
Beginner web developers
ASSUMED AUDIENCE KNOWLEDGE
Working knowledge of HTML5 and CSS3.
OBJECTIVE
Learn how to use Twitter Bootstrap to quickly build a beautiful, responsive web app.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Twitter Bootstrap basics
Bootstrap CSS basics
Bootstrap responsive layouts
Bootstrap components
JavaScript Bootstrap plugins
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.
The document discusses improving mobile web performance. It notes that mobile is different than desktop due to limitations in power, memory, battery and connections on mobile devices. Sites are growing larger in size which slows performance, and users strongly prefer faster loading sites. A variety of tools can measure performance, and waterfalls charts show where time is spent loading pages between the server and client. Optimizations discussed include enabling caching, compression, image resizing, lazy loading images, inlining images and scripts where possible, minifying assets, and delivering scripts and styles in a single HTTP request through techniques like application caching.
The document discusses client-side storage options for web applications, including cookies, Web Storage, IndexedDB, and File APIs. It provides details on each technology, including examples, limitations, and browser support. It emphasizes that IndexedDB and client-side storage can provide benefits like faster loading, reduced network usage, and the ability to work offline. The document also lists several sites that provide more information and tools for exploring these web storage technologies.
Similar to Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016 (20)
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...APNIC
Adli Wahid, Senior Internet Security Specialist at APNIC, delivered a presentation titled 'Honeypots Unveiled: Proactive Defense Tactics for Cyber Security' at the Phoenix Summit held in Dhaka, Bangladesh from 23 to 24 May 2024.
EASY TUTORIAL OF HOW TO USE CiCi AI BY: FEBLESS HERNANE Febless Hernane
Cici AI simplifies tasks like writing and research with its user-friendly platform. Users sign up, input queries, customize responses, and edit content as needed. It offers efficient saving and exporting options, making it ideal for enhancing productivity through AI assistance.
Securing BGP: Operational Strategies and Best Practices for Network Defenders...APNIC
Md. Zobair Khan,
Network Analyst and Technical Trainer at APNIC, presented 'Securing BGP: Operational Strategies and Best Practices for Network Defenders' at the Phoenix Summit held in Dhaka, Bangladesh from 23 to 24 May 2024.
Network Security and Cyber Laws (Complete Notes) for B.Tech/BCA/BSc. ITSarthak Sobti
Network Security and Cyber Laws
Detailed Course Content
Unit 1: Introduction to Network Security
- Introduction to Network Security
- Goals of Network Security
- ISO Security Architecture
- Attacks and Categories of Attacks
- Network Security Services & Mechanisms
- Authentication Applications: Kerberos, X.509 Directory Authentication Service
Unit 2: Application Layer Security
- Security Threats and Countermeasures
- SET Protocol
- Electronic Mail Security
- Pretty Good Privacy (PGP)
- S/MIME
- Transport Layer Security: Secure Socket Layer & Transport Layer Security
- Wireless Transport Layer Security
Unit 3: IP Security and System Security
- Authentication Header
- Encapsulating Security Payloads
- System Security: Intruders, Intrusion Detection System, Viruses
- Firewall Design Principles
- Trusted Systems
- OS Security
- Program Security
Unit 4: Introduction to Cyber Law
- Cyber Crime, Cyber Criminals, Cyber Law
- Object and Scope of the IT Act: Genesis, Object, Scope of the Act
- E-Governance and IT Act 2000
- Legal Recognition of Electronic Records
- Legal Recognition of Digital Signatures
- Use of Electronic Records and Digital Signatures in Government and its Agencies
- IT Act in Detail
- Basics of Network Security: IP Addresses, Port Numbers, and Sockets
- Hiding and Tracing IP Addresses
- Scanning: Traceroute, Ping Sweeping, Port Scanning, ICMP Scanning
- Fingerprinting: Active and Passive Email
Unit 5: Advanced Attacks
- Different Kinds of Buffer Overflow Attacks: Stack Overflows, String Overflows, Heap and Integer Overflows
- Internal Attacks: Emails, Mobile Phones, Instant Messengers, FTP Uploads, Dumpster Diving, Shoulder Surfing
- DOS Attacks: Ping of Death, Teardrop, SYN Flooding, Land Attacks, Smurf Attacks, UDP Flooding
- Hybrid DOS Attacks
- Application-Specific Distributed DOS Attacks
Decentralized Justice in Gaming and EsportsFederico Ast
Discover how Kleros is transforming the landscape of dispute resolution in the gaming and eSports industry through the power of decentralized justice.
This presentation, delivered by Federico Ast, CEO of Kleros, explores the innovative application of blockchain technology, crowdsourcing, and incentivized mechanisms to create fair and efficient arbitration processes.
Key Highlights:
- Introduction to Decentralized Justice: Learn about the foundational principles of Kleros and how it combines blockchain with crowdsourcing to develop a novel justice system.
- Challenges in Traditional Arbitration: Understand the limitations of conventional arbitration methods, such as high costs and long resolution times, particularly for small claims in the gaming sector.
- How Kleros Works: A step-by-step guide on the functioning of Kleros, from the initiation of a smart contract to the final decision by a jury of peers.
- Case Studies in eSports: Explore real-world scenarios where Kleros has been applied to resolve disputes in eSports, including issues like cheating, governance, player behavior, and contractual disagreements.
- Practical Implementation: Detailed walkthroughs of how disputes are handled in eSports tournaments, emphasizing speed, cost-efficiency, and fairness.
- Enhanced Transparency: The role of blockchain in providing an immutable and transparent record of proceedings, ensuring trust in the resolution process.
- Future Prospects: The potential expansion of decentralized justice mechanisms across various sectors within the gaming industry.
For more information, visit kleros.io or follow Federico Ast and Kleros on social media:
• Twitter: @federicoast
• Twitter: @kleros_io
10 Conversion Rate Optimization (CRO) Techniques to Boost Your Website’s Perf...Web Inspire
What is CRO?
Conversion Rate Optimization, or CRO, is the process of enhancing your website to increase the percentage of visitors who take a desired action. This could be anything from purchasing a product to signing up for a newsletter. Essentially, CRO is about making your website more effective in turning visitors into customers.
Why is CRO Important?
CRO is crucial because it directly impacts your bottom line. A higher conversion rate means more customers and revenue without needing to increase your website traffic. Plus, a well-optimized site improves user experience, which can lead to higher customer satisfaction and loyalty.
Unlimited Short Call Girls Navi Mumbai ✅ 9967824496 FULL CASH PAYMENT
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016
1. Client side web performance
for back end developers
Bart Read
http://www.slideshare.net/bartread/ddd-nights-client-side-performance-for-back-end-developers
2. Who am I?
• Bart Read, Web, Database, and Mobile Performance Consultant
• Previously worked for Red Gate
• Contacts
• E: bart@bartread.com
• W:
• www.bartread.com
• https://arcade.ly (site on which this talk is based)
• B: www.bartread.com/blog
• T: @bart_read
• GH: https://github.com/bartread
7. Modern web apps are becoming
more and more like fat client
desktop apps that run in a
browser
8. Stuff that’s out of scope
• The back-end
• Front end/SPA frameworks
• WebGL
• The latest and greatest JavaScript libraries, build tools, blah…zzzzz
• ECMAScript 6 (or 7!), TypeScript, etc.
18. HTTP/2 Platform Support
• IIS on Windows 10 and Windows Server 2016
• .NET 4.6.0 or later
• Tutorial: http://www.c-sharpcorner.com/UploadFile/efa3cf/creating-http2-supported-website-with-Asp-Net-core-hostin/
• Node/express – spdy module
• https://www.npmjs.com/package/spdy
• Tutorial: https://webapplog.com/http2-node/
• Java
• Go – http2 package
• https://godoc.org/golang.org/x/net/http2
• Demo: https://http2.golang.org/
• Ruby
• Python
• PHP
Full list at https://github.com/http2/http2-spec/wiki/Implementations
30. CSS Effects
• First run of CSS animations is often ropey
• Transform/scale/skew
• Forcing hardware acceleration
• https://www.smashingmagazine.com/2012/06/play-with-hardware-
accelerated-css/
• transform: translate3d(0,0,0);
• (still necessary in 2016?)
31. Tools
How to find out how your page’s are performing from a client’s perspective
45. Google Adsense scripts (applies to third party
scripts in general)
<- Leave this inline
And load the Adsense script
at the bottom of the page,
/// after your own scripts
48. Don’t get too carried
away in <HEAD>!
https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent
https://en.wikipedia.org/wiki/TCP_congestion_control
With this talk I’m going to talk you through the kind of diagnostic techniques I use for isolating performance problems in .NET and SQL Server web apps.
I’m going to start off with an overview of the tools I use, and then go through some scenarios illustrating how to use them.
I’m going to focus mostly on the server side but, obviously, nowadays with the rise of the single page app, and mobile devices, the client has become a lot more important performance-wise for a good user experience.
How many of you are writing client-side code using a framework such as Angular, React, Knockout, Durandal, Ember or whatever?
How many of you are building apps that you expect people to use from mobile devices and tablets?
Obviously, particularly for these, performance and resource usage is critical. You often find you can get away with murder in desktop Chrome whereas on a phone your app runs like an absolute dog. I’ll talk about this a little at the end if there’s time.
I don’t want to spend ages on page lifecycle because apart from anything else you probably already have at least an inferred understanding of what’s going on that probably isn’t a million miles from the truth. But it is worth spending a little time on it so you can see where the topics I’m going to cover fit in, in terms of lifecycle, and therefore better understand why they have an impact.
Client side web performance used to be all about page load and to be honest, this is still hugely important, and it’s probably the single biggest predictor of whether users will hang around on your site and whether they’ll come back to it… or not.
It also goes without saying that server-side performance impacts the client significantly, as should be apparent from the diagram. So, if you’re running loads of complex logic, database queries, and the like, before you start returning data to the client, well, they’re going to have a bad experience. I do talks on that stuff, but we’re going to leave it to one side for today’s talk and assume that your server is really fast and that you have no performance problems there to focus (largely) on client issues.
Nowadays interactivity is becoming ever more important. Often there’s a lot going on with the client in terms of presentation of data loaded on the fly, data binding, validation, visualisation, aggregation, real-time feeds, notifications, along with complex applications:
Google Docs and other aps,
Trello and similar project management systems,
YouTube, MixCloud, Soundcloud
Appear.in, Hangouts
Office 365
Social networks such as Facebook and Pinterest
Games
Here we can see the basic flow of the browser rendering engine. As content is loaded the HTML is parsed into a DOM tree. Generally this is done in chunks; the chunk size is obviously an implementation detail, but say 8K.
The DOM tree is then used to build a render tree. This is really a tree made up of rectangles that have visual attributes assigned to them – such as colour and size. They’re also structured in the order they need to appear on screen (ish).
The next phase is layout. This is where the exact position of each node or rectangle in the tree is calculated or assigned to it.
Finally the tree is painted so that the user can see it.
The important point here is that the render engine doesn’t wait until all the content is loaded and parsed to start this process. As I said, it handles chunks of data, and pushes those chunks through the pipeline as they arrive. This means the user doesn’t have to wait for the entire page to load before they can see any content.
In general this is better for the user because, if the page is well designed, they should start to get the relevant information they visited the page for almost straight away. It’s also good for us because we can ensure that the most relevant information is rendered first, in what’s known as the “above the fold” area of the page – i.e., the area of the page the user can see without scrolling.
Why do this?
Take advantage of the power of modern devices
Reduce load on server (doesn’t have to generate content)
Offer users a richer experience (sometimes even a better experience)
Recently a new tool has been added to the web performance armoury, in the shape of HTTP/2, which was published as a proposed standard in May 2015.
HTTP/2 effectively reduces latency by adding a number of features.
Mutliplexing allows clients to make multiple requests over a single TCP connection. Requests can be sent before responses to previously sent requests are received, thus clients can request all required assets for a page in parallel without running into connection limits that apply to HTTP/1.1 (e.g., Chrome only allows 6 outgoing connections to a given host).
Server push allows servers to push web assets down to clients before they’ve even requested them.
Stream priority allows clients to prioritise assets such as HTML ahead of, say, CSS or JavaScript. This can allow for faster rendering.
Header compression involves compressing HTTP headers to reduce bandwidth requirements – this works because headers often contain redundant information. Note that under HTTP 1.1 compressed content can be requested using, e.g., Accept-Encoding: gzip header and specified in the response using the Content-Encoding: gzip header but that the headers themselves are not compressed.
The HTTP/2 standard itself doesn’t actually require encryption, but the fact is that all browser vendors only support HTTP/2 over TLS, so it’s basically required. This has been somewhat controversial because honestly, not all sites require encryption and, whilst when you look at a single site, adding TLS isn’t that much hassle, if you have many sites to deal with certificate management becomes a pain. (A pain that perhaps LetsEncrypt can ease, but whilst some love LetsEncrypt, others have had less success, and my own experience with it hasn’t been great – it seemed like more aggro that just getting a certificate through CloudFlare in the end, or just buying one from elsewhere.)
The great news is HTTP/2 is now supported in current versions of all major browsers.
(Hands up who cares about Opera Mini?)
Obviously if you do need to support older versions of IE you’re out of luck (sorry).
Fortunately using HTTP/2 is actually pretty simple. It uses all the same verbs, and request/response layouts as HTTP/1.1, so code changes are pretty minimal.
As an example, the above shows some express.js code for creating an app that supports HTTPs.
Here’s the HTTP/1.1 trace in Dev Tools.
Note the staggering of requests. Nonetheless, performance isn’t awful: everything we need to play the game, including sound effects (but not the music) comes down in about 450ms. Note that this is over a very fast corporate network connection. You could probably double all these times on a rural broadband connection.
And here’s the code for the same app, but now supporting HTTP/2.
Disclaimer: this is just going to serve content over HTTP/2, which in itself is an advantage. I haven’t configured server push here, which does require some extra work.
And here we can see in Chrome Dev tools that HTTP/2 is being used. Note how the requests are grouped together. The top request is obviously for the page. The next group are for the resources that the page loads. Then, after that, the next group are all the sound effects.
Almost all of these are loaded using HTTP/2, with the exception of some external resources.
Cloudflare actually supports HTTP/2 out of the box. I believe you have to check an option, but here’s what you see when you go to arcade.ly without me having had to do any work: Cloudflare has done it all for me.
Above the red line is the content actually required to render the page: HTML, CSS, JS, and images. All loaded in less than 200ms. Note how I’ve strategically ensured that adsbygoogle.js is loaded last. I’ll talk about why in a minute.
Below that, above the blue line, are the sound effects and music, none of which are required to render the page, or even play the game. Even so, all the found effects are loaded in around 380ms, with the music taking roughly 1.4 seconds for three tracks totalling just under 6MB – these are by far the biggest contributors to the payload so I load them last, and I’ve prioritised the in game music first (this is mostly because on iOS you won’t get any audio at all until you click a button in the app so there seemed little point prioritising the title screen music). Note that with browsers that support Web Audio, an audio file can start playing before it has completely downloaded, which is handy.
Another point related to payload: this trace is for the desktop version of the site. The mobile version loads smaller versions of the music files to allow for the fact that they may be coming down over a 3G or 4G metered connection.
And then below that is the mess of all the Adsense crap that gets loaded, which goes on for ages, because people who build Adsense content are I surmise colossally undisciplined. And this is why I’ve loaded adsbygoogle.js last above: there’s nothing wrong with the adsbygoogle.js request itself but, as you can imagine, the same can by no means be said of the content it loads, which is generally a dogs breakfast and will slow down your page load dramatically in a way which you have no control over if you let it start loading before you’ve got all your own content sorted out.
The key thing I really want you to note here is that, after the request for the homepage, all these requests for other assets are fired off simultaneously. No connection limit applies here.
Even more striking, all of these requests for sound effects and music, 18 in total, are fired off at the same time.
If this were HTTP/1.1 we’d run into that 6 connection limit and these requests would be fired off in batches. See how much more efficient this makes loading these resources.
To be honest this is all now happening so fast I could probably end my talk right here and we could all get smashed instead, if you like, but there is a bit more to it than this.
Note that I’m not even doing any kind of server push here, which Cloudflare added support for earlier this year. You have to do a bit of work but it’s not too bad. The spdy docs aren’t awesome so I haven’t tried doing server push with it yet, but it’s almost certainly not that hard.
You’ll find you can get away with murder on this front with desktop browsers, at least some of the time, but on mobile it’s a different story. With interactive apps you’ll start to pay a price in terms of framerate and responsiveness, but in my experience this manifests itself differently on iOS and Android:
- iOS (Safari) is quite tolerant of lots of garbage being generated and doesn’t seem quite so prone to suffering with GC pauses; on the other hand high memory usage can definitely lead to framerate issues.
- Android (Chrome) on the other hand will exhibit a choppy framerate when you create a lot of garbage; GC pauses are much more noticeable.
For an app to work well on both platforms you therefore need to be mindful of, and minimise, the amount of garbage you create, as well as looking to reduce your overall memory usage.
The Chrome Dev Tools timeline is excellent for getting an overview of what’s going on with memory on your pages, and for visualising garbage collection.
The blue line shows JS heap memory usage over time, after the app has been running for about half a minute. Note two things:
The characteristic sawtooth pattern as memory is allocated, and then cleaned up by the GC.
Overall memory usage is steadily growing, suggesting that we are possibly leaking memory.
The problem with (1) is that the size of the teeth is about 8MB, which is quite a bit of memory to be throwing around, particularly as we’re averaging about one peak per second. The problem with (2) should be obvious – eventually the page is going to crash.
CDT’s profiler allows you to get a much more detailed view of what’s going on with memory usage, once you’ve identified that there is a problem.
This is the Chrome Dev Tools snapshot view. It’s completely horrendous but, if you patiently start digging through objects you can find out what they are (by looking at their properties), and where they’re allocated.
So anyway, after quite a lot of digging around what I found is that a lot of the objects we’re creating are particles. These are used for things like bullets, explosion, the thrust effect coming out of the back of the player’s ship. It’s not just the point particles either; the same type of object is used for the larger, expanding circle effect, which I’ve called vapours.
Problems:
We create a new particle object every time this function is called – it would be better to use object pooling, only creating new instances when we run out of existing unused instances.
Because we’re using a closure, we also create new instances of the isLive() and move() functions.
As well as not pooling, we’re also not using a prototype, which could be used to create only one instance of the functions on the particle
Overall this means we’re being incredibly wasteful, especially when you consider that we can create hundreds, occasionally even low thousands, of these objects every second.
Here’s a simple object pool implementation. Btw, if you think that looks suspiciously like angular 1.x boilerplate at the top, that’s because it basically is. When I started working on this I thought it would be fun to write an article, or do a talk, on creating games with Angular. I shortly realised that this was a blatantly insane thing to do because Angular was adding nothing but bloat and execution overhead.
By that time I couldn’t be bothered to change all the boilerplate so I quickly coded up an injector that behaves very much like the Angular 1.x injector. At some point I’m going to shift over to another module format but, of course, the more code I write, the less I can be bothered to.
Anyway, back on point, the way this works is you supply a constructor function which builds new instances of the object you want. You could just supply a prototype but I think this is more flexible, because you can wrap up the prototype creation in a function and customise the instance you create in any way you choose.
When you want an instance of your object you call create(), which will try to pull an object out of the pool. It will only actually create a new object for you if it doesn’t have any left in the pool.
When you’re done you call release() and pass in the object you’ve finished with. If you don’t do this, create() will just create new objects all the time.
Generally you’ll want a pool per object type: so particles, asteroids, etc.
We structure the pool as a linked list, not an array? Why? To avoid array expansion and the creation of more garbage when this happens. Also, we’d end up using it like a circular buffer and that’s kind of a pain in the butt compared with pulling the first item in a linked list.
When using the 2D context for rendering to the HTML5 canvas, it’s generally quicker to blit images than draw vectors using the primitives provided by the context.
Star Citadel uses vector drawing. Shoot The Rocks, because there can potentially be dozens of asteroids on screen, uses pre-generated bitmaps for rendering, which performs much better.
You can verify this for yourself by running the Canvasmark 2013 benchmark in your browser or on your mobile device.
Worth pointing out that a lot of the benefit of implementing these rules will fall to mobile users who, unless they’re connected to WiFi, often have higher latency Edge, 3G, and 4G connections to contend with, though obviously 4G and LTEE can be very fast.
Excessive redirects are a pain in the neck for users because they slow down page loads, *can* break back button navigation, and are genuinely a nuisance. Historically sales and marketing people love them because they provide even more opportunities to track peoples’ behaviour on your website and in your sales funnel.
Fortunately the golden age of multiple redirects was probably ended 4 – 5 years ago amongst most intelligent people, although you’ll still find sites on the scuttier end of the internet (like these clickbait black holes that facebook have recently spanked) that still use them.
Even a single redirect slows down browsing though because it adds another roundtrip.
But generally on landing pages you want your users to see content as quickly as possible so they don’t get bored and go elsewhere. First impressions last. So putting a redirect on a landing page is really an awful thing to do. If you do want to show users different content depending on how they arrived at the landing page, or where they are in the world, or the value of some parameter in the query string, that’s cool, but figure that stuff out on the server-side in as few a branch points as possible and send back the right content. Preferable pre-compile that content so the overhead isn’t much more than a request for static content.
Legitimate uses for redirects include redirecting people to HTTPS, in which case you’ll want to use a permanent redirect. If you *must* redirect from a landing page, do so with a permanent redirect (like the starcas.tl redirect above).
Note that the only reason I’ve used a temporary redirect at the bottom is because there really *should* be some homepage content; I just haven’t got round to creating it yet. But understand that this isn’t good practice.
A completely non-legitimate use is to redirect mobile users to a specific mobile site. A much better approach is to use responsive web design to offer the best experience to users regardless of device. A great example of this is the BBC News website which shows exactly the same site to both desktop and mobile users and, I believe, was designed for mobile first. As such it’s one of a relatively small portion of sites where the mobile browsing experience doesn’t suck balls.
Again, I mentioned redirecting to HTTPS as a legit reason for redirecting, and I’ve illustrated that here. Note that my redirect behaviour differs for debug and release.
I’m also checking for blocked referers to reduce the chance of my analytics getting filled with cruft and, as you can see, I’m not sending back a terribly friendly response.
Compression obviously reduces the amount of bandwidth your content uses. It also (obviously) won’t do anything to improve latency. Worth pointing out that we’re talking here ONLY about content compression, not header compression. Only HTTP/2 offers header compression, so worth supporting it if you can (remember: all current versions of major browsers already support it).
Particularly important for mobile devices as they may be using metered connections.
Compression is easy to switch on, as you can see from this Node sample, and the IIS settings exposed through inetmgr.
The node sample uses: https://github.com/expressjs/compression. If you visit the GitHub page you’ll see that you can tweak the behaviour in various ways.
With IIS it’s all just point and click, and is again configurable, albeit that the options are different.
Note that proxies and AV software can interfere with compression, and may request content uncompressed. Not much you can do about this but something to be aware of when you’re performance testing your website.
You want to avoid blocking rendering by loading external CSS sheets to display your above the fold content. Thus include just enough CSS to display this content without triggering glitchy relayouts/reflows when the rest of your CSS loads later. But don’t include so much that you end up with loads of non-visible content at the beginning of your markup.
This is actually a pretty fine line to walk so I’d say don’t get too hung up on it unless it’s a problem.
On the relayout/reload front, this is something you often see on mobile versions of clickbaity sites people post links to on facebook. It’s the kind of situation where you go to tap a link on the site and then suddenly find that the page has moved around and there’s now an ad under your finger, and that opens up another site or fires up the app store, or some other low grade scummery.
This might be because the people who built the site suck at being web developers and didn’t have the sense to preallocate space for the ad on the page, or it might be because they’re massive scumbags without the balls or the imagination to become international drug traffickers, or it might be a combination of the two.
The point is: don’t do this. It’s really annoying for users, and makes your site seem slow to load and generally crappy.
So I’m using pug (formerly jade) templates for my pages because it’s just a convenient way to share chunks of markup and styles around between different pages with easy support for overriding. And you can see here with these slightly odd comments in the template that I want to insert some inline styles here. This isn’t actually anything to do with pug at all, but rather with gulp-html-replace.
So here’s an extract from my gulpfile. Here we have a couple of tasks, plus a function that’s used by multiple different markup processing tasks for different games to substitute a bunch of CSS and script information into the markup that pug spits out. In this case I’ve just trimmed it down to one substitution for the inline styles.
Loading CSS synchronously will block further rendering until the CSS has loaded. Therefore it’s generally recommended that you load CSS at the bottom of your body. This is all well and good but (a) you probably want at least some styling on your page to begin with, and (b) wouldn’t it be nice to load it asynchronously?
Fortunately most current browsers support preload, which allows for the asynchronous loading of CSS… albeit that JavaScript is required to handle the onload element. Depending on the type of site you may or may not care about this. If you do, include a standard link tag inside of a <noscript> block.
This will background load CSS and then apply the styles once the file has loaded. Be careful this doesn’t lead to ugly glitches/relayouts/reflows.
If you care about older browsers, use the loadCSS polyfill, which will detect all of your preload links and load the CSS in the background for you.
Javascript, especially stuff that needs to load synchronously, should be loaded last.
Here you can see the top two JavaScript files relate to Star Citadel and are loaded synchronously. Why am I loading them synchronously rather than asynchronously? (They do work async, btw.)
Two reasons:
Google Adsense
Social media integrations (like button, G+ button, twitter)
I want my game initialisation code to run, which will create procedurally generated content, fire off requests to load sound effects and music, and show the main menu, BEFORE all the social media and adsense stuff.
Why?
Because otherwise they’ll interfere with the game appearing: it’ll take longer because of all the other stuff happening, and both those social media buttons, and Adsense are SLOW.
Note that document content loaded fires in a mere 676 milliseconds. See the red line? That’s where we can render the page!
Then we get a big block where the sound effects come down… and then we get all the other guff related, mostly, to adsense.
And it goes on…
And it goes on… for nearly 4 seconds.
And this isn’t even bad. Not even close to bad. Some of these adsense ads take two or three times that long to sort their lives out, and spew a load of errors out to the console in the process. I’m not kidding. (I can’t comment on what other ad networks would be like but, suffice to say, there are quite a few crappy ad providers on Adsense. I’ve had to block a couple because they’re so poor.)
Now if I loaded my scripts asychronously the adsense stuff (mainly), and the social buttons (secondarily), would interfere with the execution of those scripts. The page would take noticeably longer to load and display interesting content. So load your ads last. There’s not much you can do with adsense here because most changes are forbidden but you can at least remove the redundant <script> tags that load the adsense script, and move the one remaining script tag to the end of the document. (Btw, it’s not the adsense script itself that’s at fault, it’s the ads themselves.)
To my users the content is more important than the ads, so I want to load the content first.
If you don’t have to worry about ads, you might want to load all your JS asynchronously. Note though that if the order of loading or execution is important that async doesn’t guarantee anything.
Defer does supposedly guarantee execution order, and executions scripts before the onLoad event for the document, but there have been bugs here so I don’t really trust it.
You can use defer and async together for browsers that don’t support async but do support defer. If async is supported it will override defer.
Worth a mention on its own because this applies to any script you don’t have control of in general.
You can split the adsense code into two chunks so…
LOAD THE JAVASCRIPT LAST! OH, FOR THE LOVE OF PETE, LOAD IT LAST! WAAAAAAAAH!!!! If it’s not under your control, and it’s not key content for your page, make it the lowest priority. Make sure you also preallocate space for any content that’s going to be loaded in order to avoid reflows, which are extremely irritating for users (especially on mobile).
AFAIK this isn’t (it certainly wasn’t) against their ToS. Doing stuff like loading their script via XHR definitely is against ToS, and in any case doesn’t work (I tried out of curiosity) so don’t bother with it.
Btw, if third parties are going to be douchebags about this and insist you do stuff a certain way, I’d be looking for some alternatives.
Another thing that you can do is inline small JavaScripts. These will be executed as the page loads, and will block rendering whilst they execute, but they won’t have the added overhead of loading.
You can see here I’ve inlined a script that displays the loader message, as opposed to the message that appears when people have JavaScript disabled (meaning that arcade.ly games won’t run). Loading these two lines of code from an external script file would be insane.
(That being said, you can obviously take advantage of your templating engine to insert this script, or use something like html-replace during your build, so you’re not repeating yourself all over the place.)
(If you’re using a framework I wouldn’t recommend inlining it but you may wish to consider rendering the first cut of your page on the server, ideally precompiled, and only then use client-side templating with your framework.)
This isn’t going to change the world but DNS lookups *can* sometimes take a while; anywhere from a few tens of milliseconds to a few hundred milliseconds (or worse), depending on latency, and whether or not you’re using BT’s DNS servers. Ideally they only take about 1ms for locally cached results.
Assuming that lookups are going to take longer, DNS prefetch forces your browser to go and look up the addresses of domains for resources that you’ll use elsewhere in the page. This means that, hopefully, by the time it gets to the point where it’s loading the resource it’s already completed the DNS lookup that it would otherwise still have to do.
https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent
Don’t go mad sticking loads of stuff, like CSS, in <head> because you want to get your above the fold content before the “initial congestion window” bites. According to Google (above link) this is about 14.6kB compressed content.
This relates to TCP congestion control. You can find out more at https://en.wikipedia.org/wiki/TCP_congestion_control.
If you go over this it can result in another round trip to the server, if congestion is detected. On mobile devices this can really kill your page load time.
Here we don’t really have a problem – although this document <head> looks quite large it actually only weighs in at about 3kB uncompressed, so we’re well inside the limit.
This applies to JS libraries, such as lodash, as well as to CSS resources such as Bootstrap. Don’t just speculatively dump a load of stuff in to your projects because this is how you end up with 1.5MB of JavaScript for a mobile site.
A CDN can be a mixed blessing. You need to test, because they’re not necessarily faster, but they can certainly be useful when you have varying levels of traffic, and traffic coming from different areas of the world, but perhaps only servers in a single geo.
CDNs also won’t help that much where you have a ton of requests for very small resources, that you could perhaps sprite up.