Javascript Applications for the Enterprise: Building for Production Randy Jones Jackie Roberts @Randysjones @Webdevjackie Reduce Image Size Gzip

Total Page:16

File Type:pdf, Size:1020Kb

Javascript Applications for the Enterprise: Building for Production Randy Jones Jackie Roberts @Randysjones @Webdevjackie Reduce Image Size Gzip JavaScript Applications for the Enterprise: Building for Production Randy Jones Jackie Roberts @randysjones @webdevjackie Reduce Image Size gzip Always and Forever Best Practices Blocking Elements http://www.docnrolla.com/codex/css-image-sprites-google-best-practice.php https://tse2.mm.bing.net/th?id=OIP.a2zYlvdmT2zDiTQFHCjlqQHaEK&pid=Api PageSpeed Insights Google Lighthouse https://developers.google.com/speed/ https://developers.google.com/web/tools/ pagespeed/insights/ lighthouse/#devtools H5BP Server-Configs https://github.com/h5bp/server-configs Apache Google App Engine (GAE) Internet Information Services (IIS) lighttpd Nginx Node.js HTTP/2 Protocol Apache httpd Configuration Binary protocol IIS since 10.0 Apache httpd since 2.4.17 Can get benefit w/o Server Push LoadModule http2_module modules/mod_http2.so LoadModule headers_module modules/mod_headers.so Tomcat 9.x * Use for HTTPS only Tomcat 8.5.x * Might be faster, might not TEST Protocols h2 h2c http/1.1 And More! * Be sure to disable ajp or be at 9.0.31 or 8.5.51 & httpd 2.4.42 if being used as a reverse proxy JavaScript Applications for the Enterprise: Building for Production • Jackie Roberts • @webdevjackie If you build it they will come… https://developers.arcgis.com/javascript/latest/guide/webpack/ https://github.com/esri/arcgis-webpack-plugin "devDependencies": { "clean-webpack-plugin": "^2.0.0", "copy-webpack-plugin": "^5.1.1", "css-loader": "^2.1.0", "html-loader": "^0.5.5", "html-webpack-plugin": "^3.2.0", "mini-css-extract-plugin": "^0.5.0", "raw-loader": "^1.0.0", "uglifyjs-webpack-plugin": "^2.3.6", "webpack": "^4.29.6", "webpack-cli": "^3.2.3", "webpack-dev-server": "^3.2.1" }, "dependencies": { "@arcgis/webpack-plugin": "^4.14.1" } Legacy App Integration Tips and Tricks • Relative Paths Are Easier • require(“buildProject/buildProject”) becomes require(“./buildProject”) • Old School Templated Widgets • Static Config Files • Use CopyWebpackPlugin Setup Your Apps with a CLI https://github.com/Esri/arcgis-js-cli https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/ https://developers.arcgis.com/javascript/latest/guide/react https://developers.arcgis.com/javascript/latest/guide/esri-loader/index.html/ What About Web AppBuilder? https://github.com/Esri/esri-wab-build Now supports 2.15! Separate Your Code generate create git Copy watch Web AppBuilder widget Dev Edition https://github.com/Esri/generator-esri-appbuilder-js Source Control the Right Things generate Widget create Project gitgit Copy watch watch Web AppBuilder widget Dev Edition Config Copy Project git configs https://github.com/Esri/generator-esri-appbuilder-js Continuous Integration Web AppBuilder Pipeline Template Widget Submodule Config App w/All create Project git Project git git Widgets Web AppBuilder Copy to app directory Dev Edition App to App.zip deploy build https://github.com/rsjones/wab-config https://github.com/rsjones/wab-widget Resources • 2019 Dev Summit Building for Production Talk: • https://youtu.be/-Xtf1TSYZVw • Google Lighthouse: • https://developers.google.com/web/tools/lighthouse/ • ArcGIS WebPack Plugin: • https://github.com/esri/arcgis-webpack-plugin • https://developers.arcgis.com/javascript/latest/guide/webpack/ • Building Web AppBuilder: • https://github.com/gbochenek/esri-wab-build • @arcgis/cli • https://github.com/Esri/arcgis-js-cli Related Talks JavaScript Applications for the Enterprise: Test More, Work Less • Thursday // 10:30 – 11:30 • Catalina / Madera • Randy Jones / Jackie Roberts JavaScript Applications for the Enterprise: Test More, Work Less • Friday // 1:00 – 2:00 • Pasadena / Sierra / Ventura • Randy Jones / Jackie Roberts.
Recommended publications
  • Google AMP and What It Can Do for Mobile Applications in Terms of Rendering Speed and User-Experience
    URI: urn:nbn:se:bth-17952 Google AMP and what it can do for mobile applications in terms of rendering speed and user-experience Niklas Andersson Oscar B¨ack June 3, 2019 Faculty of Computing Blekinge Institute of Technology SE-371 79 Karlskrona Sweden This thesis is submitted to the Faculty of Computing at Blekinge Institute of Technology in partial fulfillment of the requirements for the bachelor degree in Software Engineering. The thesis is equivalent to 10 weeks of full time studies. The authors declare that they are the sole authors of this thesis and that they have not used any sources other than those listed in the bibliography and identi- fied as references. They further declare that they have not submitted this thesis at any other institution to obtain a degree. Contact Information: Authors: Niklas Andersson [email protected] Oscar B¨ack [email protected] External Advisor: Simon Nord, Prisjakt [email protected] University Advisor: Michel Nass [email protected] Faculty of Computing Internet: www.bth.se Blekinge Institute of Technology Phone: +46 455 38 50 00 SE-371 79 Karlskrona, Sweden Fax: +46 455 38 50 57 1 1 Abstract On today’s web, a web page needs to load fast and have a great user experience in order to be successful. The faster the better. A server side rendered web page can have a prominent initial load speed while a client side rendered web page will have a great interactive user experience. When combining the two, some users with a bad internet connection or a slow device could receive a poor user experience.
    [Show full text]
  • By Media Lounge
    BY MEDIA LOUNGE WWW.MEDIALOUNGE.CO.UK PART 01 Search Engine Optimisation As one of the most popular eCommerce platforms in the world, Magento certainly packs a powerful punch in terms of functionality and customisation. Harnessing this power however can be tricky, especially when it comes to getting the most from your site in terms of SEO 01performance. Stores built on Magento can take advantage of some fantastic built-in features that can be individually tuned with just a few clicks, all helping to bring extra visitors and improve the rankings of your site on Google’s SERPs (Search Engine Results Pages). It’s important to remember the value of search engine optimisation when considering any marketing strategy, especially when you’re in the business of selling products solely through an online store - the bigger your audience, the more sales you’re likely to generate. The brilliant thing about SEO is that all the visitors your site receives through this channel are free, which means you don’t need to risk any of that precious advertising budget to see results. We’re going to highlight a handful of these SEO features that you can use to improve your site’s rankings and drive more organic traffic to your store. These simple Magento practices can be implemented by anyone - there’s no requirement for much in the way of technical knowledge, but you will need to dedicate some time to getting things set up correctly. Let’s go! BY CHRIS BY Optimising Meta Titles & Descriptions Hidden within the pages of your website lies the key to success - meta data.
    [Show full text]
  • Searchmetrics Lighthouse Report Your Keywords – Your Market – Your Insights
    Searchmetrics Lighthouse Report Your Keywords – Your Market – Your Insights GET YOUR CUSTOM REPORT www.searchmetrics.com Introduction Work stream overview The project will look at the ranking pages for the most important keywords for your domain in your market. Google search results and relevant URLs will be compared in order to analyze correlations between competitors’ domains based on Google Lighthouse data and reveal ranking factors in the specified market. Work stream details Your most relevant ranking factors will be presented through tables and graphs showing the first 20 positions of Google search results for relevant keyword queries. Results will be related to SEO values, performance and accessibility metrics, as well as best practices in optimization of website performance. www.searchmetrics.com Contents Your custom Lighthouse Report from Searchmetrics includes: • An overview of your domain’s ranking pages’ performance in all Lighthouse categories, based on the keyword set provided • A detailed breakdown of results by ranking position for all Lighthouse categories and the most important audits • A direct comparison for each audit between your domain and your relevant online market (based on the respective keyword set) – revealing where you can improve to match and outpace your competitors • An analysis and actionable recommendations from our experts explain how to optimize to improve your website’s Google Lighthouse results • An executive summary of results and priorities, showing which optimizations are most relevant for your website and where you have the biggest potential for improvement www.searchmetrics.com Overview Of All Categories Performance Progressive Web Accessibility Best Practices SEO Score App Score Score Score Score 75 27 68 70 97 Score Scale: 90–100 50–89 0–49 The scores that you see at the top of any Lighthouse report represent the five category scores.
    [Show full text]
  • The 2020 Ecommerce Leaders Survey
    2020 eCOMMERCE LEADERS SURVEY Site Performance & Innovation Trends “When they get frustrated by a slow site, shoppers’ actions are damaging to a retailer in every possible way: they leave, they buy from a competitor, and they likely won’t be coming back to the site.” – Retail Systems Research (RSR) The 3rd annual eCommerce Leaders Survey Report on Site Performance examines key online retail trends based on interviews with over 120 eCommerce executives from some of 67% worry that 3rd party technologies will the industry’s biggest brands. Here are some of the key findings threaten compliance from this year’s report: with privacy laws PRIVACY COMPLIANCE 3RD PARTY TECHNOLOGIES • 67% worry that 3rd party technologies • 68% have multiple 3rd parties will threaten compliance with privacy laws performing similar functions • 55% spend 500K to $4M on 3rd parties • 64% say IT restricts 3rd parties each year and growing. And 20% are due to page “heaviness” adding even more! WEBSITE SPEED FAST FLEXIBILITY • 61% agree faster web performance • 62% agree that headless commerce results in higher conversions can significantly improve engagement • 65% believe they only have 2-3 and conversions seconds to engage shoppers • 77% are focused on closing the order and distribution management gap that Amazon has set Similar to last year, the 2020 eCommerce Leaders Survey Report combines primary research data gathered from online retail 61% agree faster web performance executives with findings from the “eCommerce 3rd Party Technology results in higher Index”, published in October of 2019. The 3rd Party Technology Index conversions examined the performance impact of close to 400 of the most widely adopted 3rd parties used on eCommerce sites.
    [Show full text]
  • Fawkes: Faster Mobile Page Loads Via App-Inspired Static Templating
    Fawkes: Faster Mobile Page Loads via App-Inspired Static Templating Shaghayegh Mardani, UCLA; Mayank Singh, IIT Delhi; Ravi Netravali, UCLA https://www.usenix.org/conference/nsdi20/presentation/mardani This paper is included in the Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI ’20) February 25–27, 2020 • Santa Clara, CA, USA 978-1-939133-13-7 Open access to the Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI ’20) is sponsored by Fawkes: Faster Mobile Page Loads via App-Inspired Static Templating Shaghayegh Mardani*, Mayank Singh†, Ravi Netravali* *UCLA, †IIT Delhi Abstract Despite the rapid increase in mobile web traffic, page loads still fall short of user performance expectations. State-of- Mobile the-art web accelerators optimize computation or network App fetches that occur after a page’s HTML has been fetched. However, clients still suffer multiple round trips and server processing delays to fetch that HTML; during that time, a browser cannot display any visual content, frustrating users. This problem persists in warm cache settings since HTML is most often marked as uncacheable because it usually embeds Web a mixture of static and dynamic content. Page Inspired by mobile apps, where static content (e.g., lay- out templates) is cached and immediately rendered while dynamic content (e.g., news headlines) is fetched, we built 300 ms 1100 ms 2900 ms Fawkes. Fawkes leverages our measurement study finding Figure 1: Comparing the mobile app and mobile web browser that 75% of HTML content remains unchanged across page loading processes for BBC News over an LTE cellular network.
    [Show full text]
  • Performance Enhancement of Webpage Using Progressive Web App Features
    International Journal of Innovative Research in Advanced Engineering (IJIRAE) ISSN: 2349-2163 Issue 03, Volume 4 (March 2017) www.ijirae.com PERFORMANCE ENHANCEMENT OF WEBPAGE USING PROGRESSIVE WEB APP FEATURES Dr. V. Karpagam, Padmavathe. R, Professor/IT Department IV Information Technology Sri Ramakrishna Engineering College Sri Ramakrishna Engineering College Coimbatore, India Coimbatore, India Lakshana. R, Priyadharshini.S IV Information Technology IV Information Technology Sri Ramakrishna Engineering College Sri Ramakrishna Engineering College Coimbatore, India Coimbatore, India Manuscript History Number: IJIRAE/RS/Vol.04/Issue03/MRAE10102 Received: 07, March 2017 Final Correction: 20, March 2017 Final Accepted: 28, March 2017 Published: March 2017 Abstract— The progressive web application combines the best of web and mobile apps. It is a website built using web technologies that acts like an app. Recent advancements in the browser, availability of service workers, Cache and Push APIs have enabled web developers to allow users to install web apps to their home screen, receive push notifications and even work offline. To use a traditional app, the user must install it beforehand which includes multiple clicks making the app unappealing to the user. This problem is solved by using PWA enabled webpage. The user is given the advantage of accessing the webpage app-like by creating a desktop icon which eliminates the need for multiple clicks. The primary characteristic of this progressive web app is that it must work on all devices and must enhance on devices and browsers that allow it. They take advantage of the much larger web ecosystem, plugins and community and the relative ease of deploying and maintaining a website when compared to a native application in the respective app stores.
    [Show full text]
  • A Web Developer Tool for Simplifying Mobile Pages Through Javascript Optimizations
    JSAnalyzer: A Web Developer Tool for Simplifying Mobile Pages Through JavaScript Optimizations MOUMENA CHAQFEH, New York University Abu Dhabi, UAE JACINTA HU, New York University Abu Dhabi, UAE WALEED HASHMI, New York University Abu Dhabi, UAE RUSSELL COKE, New York University Abu Dhabi, UAE LAKSHMI SUBRAMANIAN, New York University, USA YASIR ZAKI, New York University Abu Dhabi, UAE The amount of JavaScript embedded in Web pages has substantially grown in the past decade, leading to large and complex pages that are computationally intensive for mobile devices. In this paper, we propose JSAnalyzer, an easy-to-use tool that enables Web developers to quickly optimize and generate simpler versions of existing web pages for mobile users. JSAnalyzer can selectively enable or disable JavaScript elements in a page while visually observing their impact, such that non-critical elements can be removed without sacricing the visual content or the interactive functionality. Our quantitative evaluation results show that JSAnalyzer achieves more than 88% relative increase in performance scoring for low-end mobile phones (i.e., from 32% to 60%), and reduces the page load time by 30%. A qualitative study of 22 users shows that JSAnalyzer maintains more than 90% visual similarity to the original pages, whereas a developer evaluation study conducted with 23 developers shows that JSAnalyzer scores more than 80% in terms of usefulness and usability while retaining the page content and functional features. Additionally, we show that JSAnalyzer outperforms state-of-the-art solutions such as JSCleaner and Google AMP. 1 INTRODUCTION Mobile web user experience has become a major concern due to two main reasons: the increasing complexity of the pages, and the processing limitations of mobile devices.
    [Show full text]
  • Proceedings of the 2020 ICT Accessibility Testing Symposium: Time for Testing in Testing Times (Remote Work, Commerce, Education, Support…)
    Proceedings of the 2020 ICT Accessibility Testing Symposium: Time for Testing in Testing Times (Remote Work, Commerce, Education, Support…) Online October 21 – 23, 2020 Organized by Accessibility Track Consulting, LLC www.ictaccessibilitytesting.org page was left blank Contents Introduction from the Chairs ........................................................................................ 1 Keynote: “The Agilization of A11Y: Why Continuous Change is Good!” ........................ 3 Seminar: Mobile Site and Native App Testing ................................................................ 5 Workshop: Understanding ARIA 1.2 and the ARIA Authoring Practices Guide ........... 19 Panel: Accessibility Overlays ........................................................................................ 25 Panel: COVID-19: The Great Accelerator (Part 1) ........................................................ 29 Panel: COVID-19: The Great Accelerator (Part 2) ........................................................ 33 How to evaluate video conferencing tools for accessibility: Navigating new features and fixes every week ............................................................................................... 37 Broadening the definition of ‘interaction’ for accessibility testing ................................... 43 Introducing the Section 508 ICT Testing Baseline Alignment Framework ..................... 55 Leveraging Trusted Tester for Web with Test Automation ........................................... 65 Demodocus: Automated Web
    [Show full text]
  • Mark T. Kimball [email protected] 1341 E Sapium Way, Phoenix, AZ 85048 Github.Com/Marktkimball (919) 931-8259 Marktkimball.Github.Io
    Mark T. Kimball [email protected] 1341 E Sapium Way, Phoenix, AZ 85048 github.com/marktkimball (919) 931-8259 marktkimball.github.io Work GoDaddy, Tempe, AZ, May 2019 - Present ​ ​ Experience Software Engineer III - Migrated core plan upgrade code into a separate package to encapsulate it and broadly adopt the code across company applications. - Conducted many experiments to learn about users and improve their experience. - Created an API to render internationalized content on customers’ websites. Pendo, Raleigh, NC, June 2018 - May 2019 ​ Front-End Engineer - Rewrote an entire application in Vue which worked in unison with customers’ applications streamlining and simplifying guide creation for 800+ companies. - Implemented new Vue code inside of an AngularJS application; migrated AngularJS code improving performance, maintainability, and developer enjoyment. - Maintained a lightweight JavaScript application that ran inside customers’ code to collect analytics and render generated guides to their end users. O.C. Tanner, Salt Lake City, UT, October 2015 - June 2018 ​ ​ Front-End Engineer - Rewrote and migrated an entire Angular application to React and Redux vastly improving performance for a potential 19 million users. - Migrated codebase to TypeScript which reduced errors and quickened development. Projects Branch Hill Baptist Church, https://dreamy-pike-b3b7bf.netlify.app ​ - Gatsby static site built with a focus on modernizing the design, fully rebranding the church’s web presence, and improving the Google Lighthouse score. - Prioritized giving the church an simple way to update content through Netlify CMS. Soccer Standings, https://soccer-table-c68e5.firebaseapp.com ​ - React app with a Firebase backend to analyze soccer teams’ performance. ISS Tracer, play.google.com/store/apps/details?id=com.isstracer ​ ​ - React Native app that tracks the current position of the International Space Station.
    [Show full text]
  • Evaluation and Improvement of Application Deployment in Hybrid Edge Cloud Environment
    Evaluation and Improvement of Application Deployment in Hybrid Edge Cloud Environment Using OpenStack, Kubernetes, and Spinnaker Khaled Jendi KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE This degree project is supported by: Examinor (KTH): Mihhail Matskin Supervisor (KTH): Ahmad Al-Shishtawy Supervisor (Ericsson, EST): Christopher Price https://wiki.nordix.org/display/RE/Edge+Cloud+project Table of Contents Abstract .......................................................................................................... 1 List of Code Snippet ...................................................................................... 7 List of Abbreviations ...................................................................................... 8 Chapter 1 ....................................................................................................... 9 1 Introduction ............................................................................................. 9 1.1.1 Openstack .......................................................................................... 9 1.1.2 Kubernetes ........................................................................................ 10 1.1.3 System Deployment & Spinnaker ................................................... 10 1.2 Problem ................................................................................................... 10 1.3 Purpose .................................................................................................... 11
    [Show full text]
  • Webtune: a Distributed Platform for Web Performance Measurements
    WebTune: A Distributed Platform for Web Performance Measurements Byungjin Jun∗ Matteo Varvelloy Yasir Zakiz Fabián E. Bustamante∗ ∗Northwestern University yNokia Bell Labs zNYU Abu Dhabi Abstract—Web performance researchers have to regularly or the necessary control to explore, and explain the parameter choose between synthetic and in-the-wild experiments. In the space. This frustrating state of affairs motivates the design one hand, synthetic tests are useful to isolate what needs to of WebTune, a platform that enables experimentation with be measured, but lack the realism of real networks, websites, and server-specific configurations. Even enumerating all these real-world webpages under real network conditions, without conditions can be challenging, and no existing tool or testbed the uncertainty of dynamic content and opaque server-side currently allows for this. In this paper, as in life, we argue networking stack. that unity makes strength: by sharing part of their experimenting The goal of WebTune is to reproduce, in a realistic but resources, researchers can naturally build their desired realistic controlled environment, the entities involved in a webpage conditions without compromising on the flexibility of synthetic tests. We take a step toward realizing this vision with WebTune, load. That is, the set of domains/servers responsible for a a distributed platform for web measurements. At a high level, webpage are replaced with machines from a testing network WebTune seamlessly integrates with popular web measurements instrumented to serve such domains. To achieve this, WebTune tool like Lighthouse and Puppeteer exposing to an experimenter adopts a cooperative approach where experimenters make fine grained control on real networks and servers, as one would hosting servers with their particular connectivity available in expect in synthetic tests.
    [Show full text]
  • Build Faster Websites Ebook
    Heart Internet Presents BUILD FASTER WEBSITES A web performance guide An ebook version of this book is available at: https://www.heartinternet.uk/blog/build- faster-websites-free-ebook-download/ 3 Contents Foreword 6 by Oliver Lindberg Performance Matters (and How to Convince 8 Your Clients) by Allison McKnight Performance Budgets: The What, Why, and How 22 by Marcos Iglesias You Don’t Need Permission to Build Fast Websites 40 by Ryan Townsend Perceived Performance Matters, Too 56 by Jason Lengstorf The Next Four Billion: How to Make Sites 68 Performant on Mobile Devices by Jem Young The Critical Path – A Quest to Render Pixels 80 Quickly by Stefan Judis 4 Optimise Prime: How to Optimise Images for 98 Performance Henri Helvetica Make Your Animations Perform Well 118 by Anna Migas Performant Web Font Techniques 138 by Matt James Measuring Performance 152 by Andy Davies 5 FOREWORD The editor Oliver Lindberg Oliver Lindberg is an independent editor, content consultant and founder of new web events series Pixel Pioneers (https://pixelpioneers.co), based in Bath, England. Formerly the editor of .net magazine, he’s been involved with the web design and development industry for more than a decade and helps businesses across the world create content that connects with their customers. 6 In 2017, the size of the average web page reached 3MB. The modern web is becoming more and more bloated, and page sizes continue to grow just as steadily as the number of devices we’re designing for. The need to optimise our sites and apps for performance has become more important than ever, especially as the next billion people are getting ready to come online, most of them on mobile in emerging markets.
    [Show full text]