This document discusses various techniques for optimizing the performance of Vue.js apps, including code splitting, lazy loading components and libraries, minimizing initial bundle size, prefetching resources, and using service workers to improve caching. Some key recommendations are to split code by route, lazily load off-screen components, defer non-critical libraries, and prefetch lazily loaded resources to improve performance and user experience. Measuring tools like the coverage tool, bundle analyzer, and import cost plugin can help identify optimization opportunities.
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...Shem Magnezi
"Micro Frontends" is the new buzzword in the Frontend world, but too many times people use it in the wrong context or with different things in mind.
Micro Frontends can refer to different kinds of solutions that solve different types of problems - starting from using different UI frameworks on the same app or letting different teams work on separate parts of the code independently.
In this session, we'll go over the different problems we have when building a big app and how different micro-frontends solutions can help with this.
Microservices is a well-known term for recently year. But the truth is that it mostly focused on backends site while the frontend is still a monolithic application. This presentation intends to provide the necessary tooling to achieve independent apps loaded separately and run on different parts on a single web page in complete isolation which is officially called micro-frontends.
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...Shem Magnezi
"Micro Frontends" is the new buzzword in the Frontend world, but too many times people use it in the wrong context or with different things in mind.
Micro Frontends can refer to different kinds of solutions that solve different types of problems - starting from using different UI frameworks on the same app or letting different teams work on separate parts of the code independently.
In this session, we'll go over the different problems we have when building a big app and how different micro-frontends solutions can help with this.
Microservices is a well-known term for recently year. But the truth is that it mostly focused on backends site while the frontend is still a monolithic application. This presentation intends to provide the necessary tooling to achieve independent apps loaded separately and run on different parts on a single web page in complete isolation which is officially called micro-frontends.
Overview of Aeternity Blockchain - Sophia smart contracts, state channels, oracles and current devtools.
Presentation from Silesian Blockchain Meetup #9 (Katowice 18.03.2019)
Here is the blog: http://www.aurorasolutions.io/architecture-workflow-of-modern-web-apps/
In the IT industry the biggest problem we regularly face is the abundance of choice. We have tons of frameworks, languages, tools, platforms, etc. Although for competition purposes; multiple choices are ultimately very good but we usually find ourselves in paralysis when we have to choose among them for our next project.
People usually still consider that (frontend) of web applications are created by mixing together HTML, CSS & JavaScript without giving any thoughts about the frontend architecture, workflow and testing; but things have definitely changed now since last couple of years and in this presentation I try to explain that how JavaScript and it’s related stuff has become first class citizen and how the new workflow looks like. And I will also explain that how the architecture of modern web applications is migrating from thick server-side applications to smart clients and services on their journey North to pure Microservices.
Here is the list of different tools and frameworks that have been discussed in this presentation:
* Yeoman: (http://yeoman.io/) Yeoman is the web’s scaffolding tool for modern webapps. Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive.
* Bower: (http://bower.io/) Bower is used for dependency management, so that you no longer have to manually download and manage your scripts. Web sites are made of lots of things — frameworks, libraries, assets, utilities, and rainbows. Bower manages all these things for you.
* Grunt: (http://gruntjs.com/) Grunt is a task-based command line build tool for JavaScript projects. When you work on large projects you have couple of things that you do regularly and you would like them to be automated; Grunt is the tool to solve that problem!
* HTML5 Boilerplate: (https://html5boilerplate.com/) HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
* Twitter Bootstrap: (http://getbootstrap.com/2.3.2/) Sleek, intuitive, and powerful front-end framework for faster and easier web development.
* Jasmine: (https://github.com/jasmine/jasmine) Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
* Karma: (https://github.com/karma-runner/karma/) A simple tool that allows you to execute JavaScript code in multiple real browsers.
* PhantomJS: (https://github.com/ariya/phantomjs/) PhantomJS is a headless WebKit scriptable with JavaScript.
* Protractor: (https://github.com/angular/protractor) Protractor is an end-to-end test framework for AngularJS applications.
Visual Studio: The best tool for web developers.Robert MacLean
The slides from my talk @ the JSinSA 2013 conference. The talk covers amazing features in Visual Studio for any web developer, regardless of platform.
You can watch a video of this talk at http://youtu.be/QQUAZHU3swk
Micro Frontends
“Extending the microservice idea to frontend development”.
What does it really mean? Is it just abusing a certain hype? Should I consider it? How should I approach it?
These are just some of the questions one might ask when presented with this notion. Long story short – Micro front-ends are a reality! However, it is not for everyone.
In this session, we’re going to demystify micro frontends. We’re going to establish what it is, when it should be considered and the decisions to be made
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...Shift Conference
Good frontend development is hard. Scaling frontend development is even harder because you need to ensure that multiple teams can work on a big and complex project simultaneously and without any blockers. Today you often hear about micro frontends which are one of the more controversial Web topics. What are they? Are they worth all the fuzz? Should you implement them? As someone who worked at integrating this in Infobip’s Web Interface, I want to use our example to show you our way of thinking: how did we know that we have problems, how did we decide to approach the implementation of micro frontend architecture and why did we decide to go with it, and which problems we ran into. We will also look at alternate available possibilities useful for anyone.
Web Development and Web Development technologies - Temitayo FadojutimiTemitayo Fadojutimi
This is the Slide I used at the Lagos Web Meetup where I talked on Web Development and Web Development Technologies.
It outlines most of what was discussed at the meetup.
While many things (Composer, PSR compliance, MVC, API layer, and test coverage) about Magento 2 will feel familiar to modern PHP developers, what better way to dig into how the framework works than by building a module? This live coding exercise demonstrates both Magento's modular architecture and its plugin system for customizing core behavior.
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
Joomla as a mobile App backend.
Presented at J & Beyond, 2015 in Prague.
This talk described ideas, principles and methods related to building mobile App backends in Joomla. The Joomla front end is an ideal tool to provide app content administrators the ability to control their app. We'll look at several examples of this process for Apps developed for the UK education sector. The Apps typically use RESTful JSON interfaces to pull and push data to and from the Joomla backend.
Within Joomla the FieldsAttatch a jBackend are used and extended upon. We'll look at the Joomla solution, what we used and what we added. We'll also touch on App development, including cross platform native app development with Ti Appcelerator, continuous integration of multiple rolling releases, team skill-sets, privacy issues and business cases.
It'll be a narrative of the project's journey, ideas, paths and reflections.
Although there will be some technical detail, it should appeal more generally too.
The talk was recorded and is on YouTube at...
https://www.youtube.com/watch?v=OGw-bjM4kt8
J & Beyond page...
http://jandbeyond.org/programme.html?view=session&id=45&return=L3Byb2dyYW1tZS5odG1s
Progressive Web Apps are an emerging approach to solving the problem of having the Web, everywhere: different mobile devices, IoT devices, and areas with low bandwidth or poor connectivity. For developers accustomed to PHP and server-side rendering, there are several factors to consider.
Drawing on our experiences working with Google to build a PWA development experience for Magento, this talk introduces the elements of PWA, the challenges of providing online+offline functionality, and the limitations of this nascent approach.
A great idea can be built with almost any technology. The success or failure of your project has more to do with vision, leadership, execution, and market than technological choices.
Besides the vision, a lot of startups focus on culture. what isn’t often mentioned is that the technical decisions will have a direct effect on the company culture. Great things have been built with each of the technologies. But they do come with a culture.
The purpose of this presentation is to help developers, managers, founders, etc. to make an insightful decision about the framework they want to use to create their product.
Filip Rakowski "Web Performance in modern JavaScript world"Fwdays
In mobile-first era where network connectivity is not always stable and low-end devices are widely used it’s extremely important to keep your web applications smooth and optimized. During the talk we’ll take a look at the performance challenges we are facing every day and how modern JavaScript technologies such as PWA and AMP can help solving them. We will investigate how to optimize our app loading time, make JavaScript parsing faster, how to deliver reliable waiting experience to our users and much more.
Overview of Aeternity Blockchain - Sophia smart contracts, state channels, oracles and current devtools.
Presentation from Silesian Blockchain Meetup #9 (Katowice 18.03.2019)
Here is the blog: http://www.aurorasolutions.io/architecture-workflow-of-modern-web-apps/
In the IT industry the biggest problem we regularly face is the abundance of choice. We have tons of frameworks, languages, tools, platforms, etc. Although for competition purposes; multiple choices are ultimately very good but we usually find ourselves in paralysis when we have to choose among them for our next project.
People usually still consider that (frontend) of web applications are created by mixing together HTML, CSS & JavaScript without giving any thoughts about the frontend architecture, workflow and testing; but things have definitely changed now since last couple of years and in this presentation I try to explain that how JavaScript and it’s related stuff has become first class citizen and how the new workflow looks like. And I will also explain that how the architecture of modern web applications is migrating from thick server-side applications to smart clients and services on their journey North to pure Microservices.
Here is the list of different tools and frameworks that have been discussed in this presentation:
* Yeoman: (http://yeoman.io/) Yeoman is the web’s scaffolding tool for modern webapps. Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive.
* Bower: (http://bower.io/) Bower is used for dependency management, so that you no longer have to manually download and manage your scripts. Web sites are made of lots of things — frameworks, libraries, assets, utilities, and rainbows. Bower manages all these things for you.
* Grunt: (http://gruntjs.com/) Grunt is a task-based command line build tool for JavaScript projects. When you work on large projects you have couple of things that you do regularly and you would like them to be automated; Grunt is the tool to solve that problem!
* HTML5 Boilerplate: (https://html5boilerplate.com/) HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
* Twitter Bootstrap: (http://getbootstrap.com/2.3.2/) Sleek, intuitive, and powerful front-end framework for faster and easier web development.
* Jasmine: (https://github.com/jasmine/jasmine) Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
* Karma: (https://github.com/karma-runner/karma/) A simple tool that allows you to execute JavaScript code in multiple real browsers.
* PhantomJS: (https://github.com/ariya/phantomjs/) PhantomJS is a headless WebKit scriptable with JavaScript.
* Protractor: (https://github.com/angular/protractor) Protractor is an end-to-end test framework for AngularJS applications.
Visual Studio: The best tool for web developers.Robert MacLean
The slides from my talk @ the JSinSA 2013 conference. The talk covers amazing features in Visual Studio for any web developer, regardless of platform.
You can watch a video of this talk at http://youtu.be/QQUAZHU3swk
Micro Frontends
“Extending the microservice idea to frontend development”.
What does it really mean? Is it just abusing a certain hype? Should I consider it? How should I approach it?
These are just some of the questions one might ask when presented with this notion. Long story short – Micro front-ends are a reality! However, it is not for everyone.
In this session, we’re going to demystify micro frontends. We’re going to establish what it is, when it should be considered and the decisions to be made
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...Shift Conference
Good frontend development is hard. Scaling frontend development is even harder because you need to ensure that multiple teams can work on a big and complex project simultaneously and without any blockers. Today you often hear about micro frontends which are one of the more controversial Web topics. What are they? Are they worth all the fuzz? Should you implement them? As someone who worked at integrating this in Infobip’s Web Interface, I want to use our example to show you our way of thinking: how did we know that we have problems, how did we decide to approach the implementation of micro frontend architecture and why did we decide to go with it, and which problems we ran into. We will also look at alternate available possibilities useful for anyone.
Web Development and Web Development technologies - Temitayo FadojutimiTemitayo Fadojutimi
This is the Slide I used at the Lagos Web Meetup where I talked on Web Development and Web Development Technologies.
It outlines most of what was discussed at the meetup.
While many things (Composer, PSR compliance, MVC, API layer, and test coverage) about Magento 2 will feel familiar to modern PHP developers, what better way to dig into how the framework works than by building a module? This live coding exercise demonstrates both Magento's modular architecture and its plugin system for customizing core behavior.
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
Joomla as a mobile App backend.
Presented at J & Beyond, 2015 in Prague.
This talk described ideas, principles and methods related to building mobile App backends in Joomla. The Joomla front end is an ideal tool to provide app content administrators the ability to control their app. We'll look at several examples of this process for Apps developed for the UK education sector. The Apps typically use RESTful JSON interfaces to pull and push data to and from the Joomla backend.
Within Joomla the FieldsAttatch a jBackend are used and extended upon. We'll look at the Joomla solution, what we used and what we added. We'll also touch on App development, including cross platform native app development with Ti Appcelerator, continuous integration of multiple rolling releases, team skill-sets, privacy issues and business cases.
It'll be a narrative of the project's journey, ideas, paths and reflections.
Although there will be some technical detail, it should appeal more generally too.
The talk was recorded and is on YouTube at...
https://www.youtube.com/watch?v=OGw-bjM4kt8
J & Beyond page...
http://jandbeyond.org/programme.html?view=session&id=45&return=L3Byb2dyYW1tZS5odG1s
Progressive Web Apps are an emerging approach to solving the problem of having the Web, everywhere: different mobile devices, IoT devices, and areas with low bandwidth or poor connectivity. For developers accustomed to PHP and server-side rendering, there are several factors to consider.
Drawing on our experiences working with Google to build a PWA development experience for Magento, this talk introduces the elements of PWA, the challenges of providing online+offline functionality, and the limitations of this nascent approach.
A great idea can be built with almost any technology. The success or failure of your project has more to do with vision, leadership, execution, and market than technological choices.
Besides the vision, a lot of startups focus on culture. what isn’t often mentioned is that the technical decisions will have a direct effect on the company culture. Great things have been built with each of the technologies. But they do come with a culture.
The purpose of this presentation is to help developers, managers, founders, etc. to make an insightful decision about the framework they want to use to create their product.
Filip Rakowski "Web Performance in modern JavaScript world"Fwdays
In mobile-first era where network connectivity is not always stable and low-end devices are widely used it’s extremely important to keep your web applications smooth and optimized. During the talk we’ll take a look at the performance challenges we are facing every day and how modern JavaScript technologies such as PWA and AMP can help solving them. We will investigate how to optimize our app loading time, make JavaScript parsing faster, how to deliver reliable waiting experience to our users and much more.
"You’re probably using Lighthouse wrong: How do we misuse the most common too...Fwdays
These days, web performance is one of the most important things everyone wants to optimize on their apps, and it's clear to everyone how dramatic the impact of a poorly optimized website is on business. Yet we as an industry completely fail in recognizing its complexity and widely misuse the most common tool to measure it — Google Lighthouse. If you’re one of those people thinking that good performance equals a good Lighthouse score, you’ve also fallen into this trap and this talk is for you. You will learn when the Google Lighthouse audit results can trick you and how to make good decisions based on its output.
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...Marco Cedaro
General purpose Javascript frameworks are the ones that made the language popular in the past, but right now it is a risk to think about our application development and architecture just in relation to our favorite framework.
This talk highlights risks and suggest some techniques (from design patterns to snippet of code) to avoid being coupled to a specific framework
Refactoring to Go modules: why and howLeon Stigter
Go modules are here to stay and it’s about time to start modularizing your code. In this lightning session, we’ll:
* fly through what Go modules are and why you need them
what the benefits are of using modules
* the differences between modules and the things we did before that
* We’ll look at what you need to do to "switch" to modules.
Web Components: The Future of Web Development is HereJohn Riviello
With the updates to iOS and Android phones released earlier this year, Web Components are now supported natively. With libraries such as Polymer that are built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. In this workshop, we'll begin with a brief introduction to Web Components and Polymer, and then dive into hands-on experiences with the core aspects of Web Components: the <template> tag, Custom Elements, and the Shadow DOM.
microXchg 2019, Berlin: Talk by Mario-Leander Reimer (@LeanderReimer, Principal Software Architect at QAware)
=== Please download slides if blurred! ===
Abstract: Only a few years ago the move towards microservice architecture was the first big disruption in software engineering: instead of running monoliths, systems were now build, composed and run as autonomous services. But this came at the price of added development and infrastructure complexity. Serverless and FaaS seem to be the next disruption, they are the logical evolution trying to address some of the inherent technology complexity we are currently faced when building cloud native apps.
FaaS frameworks are currently popping up like mushrooms: Knative, Kubeless, OpenFn, Fission, OpenFaas or Open Whisk are just a few to name. But which one of these is safe to pick and use in your next project? Let's find out. This session will start off by briefly explaining the essence of Serverless application architecture. We will then define a criteria catalog for FaaS frameworks and continue by comparing and showcasing the most promising ones.
Workshop: Introduction to Web Components & Polymer John Riviello
From Little Rock Tech Fest 2017
With the updates to iOS and Android phones released earlier this year, Web Components are now supported natively. With libraries such as Polymer that are built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. In this workshop, we'll begin with a brief introduction to Web Components and Polymer, and then dive into hands-on experiences with the core aspects of Web Components: the <template> tag, Custom Elements, and the Shadow DOM.
This workshop assumes an understanding of HTML, CSS & JavaScript. No prior experience with Web Components, Polymer, or any library or framework (Web Components or otherwise) is required.
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG🎤 Hanno Embregts 🎸
What source control software did you use in 2010? Possibly Git, if you were an early adopter or a Linux kernel committer. But chances are you were using Subversion, as this was the product of choice for the majority of the software developers. Ten years later, Git is the most popular product. Which makes me wonder: what will we use another ten years from now?
In this talk we will think about what features we want from our source control software in 2030. More speed? Better collaboration support? No merge conflicts ever?
I’ll also discuss a few products that have been published after Git emerged, including Plastic, Fossil and Pijul. I’ll talk about the extent to which they contain the features we so dearly desire and I’ll demonstrate a few typical use cases. To conclude, I’ll try to predict which one will be ‘the top dog’ in 2030 (all information is provided “as is”, no guarantees etc. etc.).
So attend this session if you’re excited about the future of version control and if you want to have a shot at beating even (!) the early adopters. Now if it turns out I was right, remember that you heard it here first.
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentJustin James
It has never been easier to build hybrid applications by using the Ionic Framework with technology that you already know and love such as AngularJS and Html 5. You will learn to love mobile development again.
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...Marco Cedaro
General purpose Javascript frameworks are the ones that made the language popular in the past, but right now it is a risk to think about our application development and architecture just in relation to our favorite framework.
This talk highlights risks and suggest some techniques (from design patterns to snippet of code) to avoid being coupled to a specific framework
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
Italy Agriculture Equipment Market Outlook to 2027harveenkaur52
Agriculture and Animal Care
Ken Research has an expertise in Agriculture and Animal Care sector and offer vast collection of information related to all major aspects such as Agriculture equipment, Crop Protection, Seed, Agriculture Chemical, Fertilizers, Protected Cultivators, Palm Oil, Hybrid Seed, Animal Feed additives and many more.
Our continuous study and findings in agriculture sector provide better insights to companies dealing with related product and services, government and agriculture associations, researchers and students to well understand the present and expected scenario.
Our Animal care category provides solutions on Animal Healthcare and related products and services, including, animal feed additives, vaccination
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...JeyaPerumal1
A cellular network, frequently referred to as a mobile network, is a type of communication system that enables wireless communication between mobile devices. The final stage of connectivity is achieved by segmenting the comprehensive service area into several compact zones, each called a cell.
27. Dependency graph is a graph of modules in
your application. Starting from entry point
webpack is recursively adding all imported
modules to the graph and bundles them into
(usually) one file.
@filrakowski
35. Code splitting allows you to split your code
into various bundles. You can think about this
as deferring a piece of your dependency
graph to be loaded later.
@filrakowski
36. Lazy loading loading chunk of code on demand
usually as a response to user action.
@filrakowski
62. Rule #5 - Make use of cache for static assets
@filrakowski
63. Service workers essentially act as proxy
servers that sit between web applications, the
browser, and the network (when available).
They can be used to serve network responses
from cache instead of a network.
@filrakowski
90. Thank you!
If you already forgot something - don’t worry.
I’ll share the slides :)
@filrakowski
Editor's Notes
How many of you think performance is important?
For those who did not raised their hands I will pretend that I’m smart and show some numbers to prove my point that web performance is extremely important.
First of all as you can see only one second of waiting is enough for the user to make a mental context switch and potentially leave our website. Now let’s see how performance affects other numbers
Given all this number we can assume a simple equation. Speed equals money. Do you agree?
Now when I hope you’re convinced you how important web performance is let’s find main factors affecting it
When we want some resource we need to request it and wait for resource. The bigger file is - the longer it takes to download it.
Next JavaScript engine needs to parse it. Again the bigger file is - the longer it takes.
Once parsing is finished and our JS engine created a nice AST that browser can work with it’s time to execute the code and guess what - the more code it’s to execute the longer it takes.
Ok so it looks like the main factor influencing loading performance is file size.
As a frontend developers we mostly can optimize the execution and parsing phase but we will see later that there are some things that we can do to improve response time.
For now let’s focus on the area that we certainly can fully control.
Let’s see what problems we can encounter by creating simple app
It usually starts like this. An entry point with Vue attached and a root component. But over time the application grows
We almost certainly will add a Vue-router. Following this we will add some routes, probably another 3rd party libs.
Our initially downloaded JS bundle will grow with every module we add
As we remember speed equals money so does it mean that more features equals less money?
As you probably guessed it doesn’t To understand how to solve performance issues with growing bundle we need to understand how this bundle is constructed
It appears that web pack under the hood is creating something called dependency graph. It’s just recursively checks the imports in JS modules and adds them to the graph starting from your entry point. To better understand this process lets see an example
The problem with bundling all modules into one file is that we might not need some of the modules depending on current state of the application
This is why webpack has feature called code splitting. It allows you to split your code into different bundles and load them on demand.
Lazy loading is just loading this code splitter chunks on demand. So we are cutting some modules and loading them when they are needed
We can tell webpack which parts of the code it should split by doing a dynamic import. Instead of a regular import dynamically imported module is an entry point for a completely new bundle. The bundle will be lazily loaded ONLY when this function is invoked.
By dynamically importing routes we are making sure that only the visited route will be downloaded
Code-splitter JS bundles generated by webpack will look like this.We have three bundles instead of one big file
If you are using Nuxt you have this feature out of the box
So rule number one…
Per-route code splitting will give you more than any other lazy code splitting technique but we can do more
There are still many things that are not needed right after user enters your website and can be loaded lazily
Like popups
Sidebars or any other off-screen components
So rule number 2
You can use v-if to conditionally load offscreen compoennts. V-if not true -> no render - no invocation - no download. It’s a great way to conditionally load components
It appears that most of the 3rd party libs can also be loaded lazily.
And the syntax is the same. Import function returns a promise with the lazily loaded lib
When speaking about 3rd party libs there is a common approach to keep all of node modules in vendor bundle.
Don’t do this. It’s much better to k keep 3rd party libs in route bundles or even better load them lazily whenever it’s possible. Otherwise users will download redundant code
You’ll probably say ‚Hey Filip it leads to code duplication aren;’t vendor bundles meant to prevent it?’
What if we will have loads imported in two routes. How to deal with this duplication?
Now the shared modules will be bundled into a separate file and therefore downloaded only once
Staying in the 3rd party libs topic there are tons of them and not all of them are good for your use case, or good overall so choose them carefully
There is a great website that can help you with choosing appropriate libraries - bundle phobia
It will give you all the information on how adding some particular library will affect your apps performance
what is even better - it will also suggest you alternatives so you can really choose the best option
Previously I mentioned that as a frontend devs we don’t have influence on how fast the server responds but it turns out that there are some things that we can do to improve this part of the process
We can reduce the number of network requests by making use of assets that we already downloaded
And we can use SW for this. They work as a proxy between your client web app and server
We are sending request to the service worker which proxies it to the network
But it can also proxy this request to the cache if asset was previously downloaded and respond almost instantly. Service Worker cache persists even when browser has been closed.
You can either install Vue-cli PWA plugin for this
..or Nuxt PWA module
In both cases you will see cached data under application tab of your devtools. Of course you can configure it as you wish
We can make use of prefetching
Which is just downloading assets before they are needed
So rule number 5
We can explicitly tell which chunks of code we want to prefetch with web pack magic comments that will dynamically add prefetch link to the head of our application
Or use more general solutions with regular expressions
If you are using Vue-cli 3 it’s prefetching code-splitter chunks out of the box
If you are using Vue-cli 3 it’s prefetching code-splitter chunks out of the box
Ok we learned a lot about performance optimization but it’s equally important to know where to optimize and measure our results.
You can use devtools „coevrage” tool to see how much of the shipped code was actually executed
You can also use Webpack Bundle Analyzer to actually see the size of your modules. This one is a must-have.
…and instalation is extremely easy
You can use ‚bundlesize’ package to make sure that you are not exceeding the reasonable size of the package.
..it also has a very nice GitHub integration
And you can use import cost plugin to keep track of size of your imports