Implementing responsive design pdf


 

IMPLEMENTING. RESPONSIVE. DESIGN. Building sites for an anywhere, . article, only to discover it's a PDF and nearly impossible to read on your tiny screen. website, wm-greece.info NOTICE OF RIGHTS . article, only to discover it's a PDF and nearly impossible to read on your tiny screen. This Book Review is brought to you for free and open access by the School of Professional and Continuing Studies at UR Scholarship Repository. It has.

Author:NANCY BOROWIEC
Language:English, Spanish, Hindi
Country:Rwanda
Genre:Art
Pages:123
Published (Last):04.03.2016
ISBN:730-5-38760-826-3
Distribution:Free* [*Sign up for free]
Uploaded by: LIBRADA

63454 downloads 156384 Views 16.54MB PDF Size Report


Implementing Responsive Design Pdf

Perpustakaan Universitas Indonesia >> eBooks (restricted). Implementing responsive design: building sites for an anywhere, everywhere web / Tim Kadlec. Ebooks archive. Contribute to Marslo/GoodEbooks development by creating an account on GitHub. Download Citation on ResearchGate | Implementing responsive web design for enhanced web presence | Modern companies, institutions, organizations.

Earlier issues. How do we actually know where we stand in terms of performance, and what our performance bottlenecks exactly are? Is it expensive JavaScript, slow web font delivery, heavy images, or sluggish rendering? And, most importantly, where do we even start improving performance and how do we establish a performance culture long-term? Back in the day, performance was often a mere afterthought. Looking back now, things seem to have changed quite significantly. Performance has to be measured, monitored and refined continually , and the growing complexity of the web poses new challenges that make it hard to keep track of metrics, because metrics will vary significantly depending on the device, browser, protocol, network type and latency CDNs, ISPs, caches, proxies, firewalls, load balancers and servers all play a role in performance. So, if we created an overview of all the things we have to keep in mind when improving performance — from the very start of the process until the final release of the website — what would that list look like? Happy optimizing, everyone! There are a couple of different models, and the ones discussed below are quite opinionated — just make sure to set your own priorities early on.

It might sound obvious but worth stating: Inian Parameshwaran has measured performance footprint of top 50 frameworks against First Contentful Paint — the time from navigation to the time when the browser renders the first bit of content from the DOM. You could examine your framework candidates and the proposed architecture, and study how most solutions out there perform, e. Baseline performance cost matters. According to a study by Ankur Sethi , "your React application will never load faster than about 1.

Your Angular app will always take at least 2. The users of your Vue app will need to wait at least 1 second before they can start using it. In exchange, your team gains maintainability and developer efficiency, of course.

But this consideration needs to be deliberate. A good starting point is to choose a good default stack for your application.

As with good ol' HTTP requests, when data is retrieved from an API, any delay in server response will propagate to the end user, hence delaying rendering. When a resource wants to retrieve some data from an API, it will need to request the data from the corresponding endpoint. A component that renders data from several resources, such as an article with comments and author photos in each comment, may need several roundtrips to the server to fetch all the data before it can be rendered.

Furthermore, the amount of data returned through REST is often more than what is needed to render that component. GraphQL provides a performant solution to these issues. Per se, GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data.

In addition, because GraphQL is using schema metadata that tells how the data is structured , it can already organize data into the preferred structure, so, for example, with GraphQL, we could remove JavaScript code used for dealing with state management , producing a cleaner application code that runs faster on the client.

A GraphQL Primer: For content-heavy websites that are dealing with a lot of third-party content, these options could potentially help speed up render times dramatically.

Unless they don't. AMP is not what makes the biggest difference from a performance perspective. A benefit for the website owner is obvious: Obviously, a presence in a walled garden places developers in a position to produce and maintain a separate version of their content, and in case of Instant Articles and Apple News without actual URLs thanks Addy, Jeremy!

Notice that CDNs can serve and offload dynamic content as well. So, restricting your CDN to static assets is not necessary. Double-check whether your CDN performs compression and conversion e. Assets Optimizations Use Brotli or Zopfli for plain text compression. In , Google introduced Brotli , a new open-source lossless data format, which is now supported in all modern browsers.

In practice, Brotli appears to be much more effective than Gzip and Deflate.

It might be very slow to compress, depending on the settings, but slower compression will ultimately lead to higher compression rates. Still, it decompresses fast. You can also estimate Brotli compression savings for your site.

At the highest level of compression, Brotli is so slow that any potential gains in file size could be nullified by the amount of time it takes for the server to begin sending the response as it waits to dynamically compress the asset. With static compression, however, higher compression settings are preferred. The catch is that files will take around 80 times longer to compress.

The strategy? Make sure that the server handles content negotiation for Brotli or gzip properly.

Implementing responsive web design for enhanced web presence - IEEE Conference Publication

Other options are available , too. With JPEG, we can serve a "decent" user experience with the half or even quarter of the data and load the rest later, rather than have a half-empty image as it is in the case of WebP.

Your decision will depend on what you are after: On Smashing Magazine, we use the postfix -opt for image names — for example, brotli-compression-opt. Every single image optimization article would state it, but keeping vector assets clean and tight is always worth reminding.

Make sure to clean up unused assets, remove unnecessary metadata and reduces the amount of path points in artwork and thus SVG code. Thanks, Jeremy! The future of responsive images might change dramatically with the adoption of client hints.

Client hints are HTTP request header fields, e. As a result, the server can decide how to fill in the layout with appropriately sized images, and serve only these images in desired formats.

With client hints, we move the resource selection from HTML markup and into the request-response negotiation between the client and server. Client hints provide annotations on resulting image requests that enable resource selection automation. Service Worker provides full request and response management capabilities on the client. It holds true not only for image assets but for pretty much all other requests as well.

Unfortunately, client hints still have to gain some browser support. Under consideration in Firefox. Not good enough? Well, you can also improve perceived performance for images with the multiple background images technique. Keep in mind that playing with contrast and blurring out unnecessary details or removing colors can reduce file size as well. Ah, you need to enlarge a small photo without losing quality?

Consider using Letsenhance. These optimizations so far cover just the basics.

Implementing Responsive Design

Addy Osmani has published a very detailed guide on Essential Image Optimization that goes very deep into details of image compression and color management.

For example, you could blur out unnecessary parts of the image by applying a Gaussian blur filter to them to reduce the file size, and eventually you might even start removing colors or turn the picture into black and white to reduce the size even further. In the land of good news though, video formats have been advancing massively over the years.

For a long time, we had hoped that WebM would become the format to rule them all, and WebP which is basically one still image inside of the WebM video container will become a replacement for dated image formats. AV1 has compression similar to H. The H. AV1 just like H. For now, the most widely used and supported encoding is H. Boris Schapira provides exact instructions for FFmpeg to optimize videos to the maximum.

Of course, providing WebM format as an alternative would help, too. Need a quick win? Zach Leatherman has a quick min tutorial and case study to get your fonts in order. Otherwise, font loading will cost you in the first render time. Still, it might be a good idea to be selective and choose files that matter most, e.

Nobody likes waiting for the content to be displayed. With the font-display CSS descriptor , we can control the font loading behavior and enable content to be readable immediately font-display: However, if you want to avoid text reflows , we still need to use the Font Loading API, specifically to group repaints , or when you are using third party hosts. Unless you can use Google Fonts with Cloudflare Workers , of course.

Talking about Google Fonts: Always self-host your fonts for maximum control if you can. In general, if you use font-display: Use preconnect for faster cross-origin font requests, but be cautious with preload as preloading fonts from a different origin will incur network contention. Also, it might be a good idea to opt out of web fonts or at least second stage render if the user has enabled Reduce Motion in accessibility preferences or has opted in for Data Saver Mode see Save-Data header.

To measure the web font loading performance, consider the All Text Visible metric the moment when all fonts have loaded and all content is displayed in web fonts , as well as Web Font Reflow Count after first render. Obviously, the lower both metrics are, the better the performance is. They give designers a much broader design space for typographic choices, but it comes at the cost of a single serial request opposed to a number of individual file requests.

That single request might be slow blocking the entire typographic appearance on the page. Now, what would make a bulletproof web font loading strategy?

Set up a spreadsheet. Define the basic core experience for legacy browsers i. When optimizing for performance we need to reflect our priorities. Load the core experience immediately, then enhancements , and then the extras. On its own, cutting-the-mustard deduces device capability from browser version, which is no longer something we can do today. For example, cheap Android phones in developing countries mostly run Chrome and will cut the mustard despite their limited memory and CPU capabilities.

At the moment of writing, the header is supported only in Blink it goes for client hints in general. Parsing and executing times vary significantly depending on the hardware of a device. With compiling in play, just prep work on JavaScript takes 4s on average, with around 11s before First Meaningful Paint on mobile.

To guarantee high performance, as developers, we need to find ways to write and deploy less JavaScript. There are many tools to help you make an informed decision about the impact of your dependencies and viable alternatives:. An interesting way of avoiding parsing costs is to use binary templates that Ember has introduced in Thanks, Leonardo, Yoav! Measure JavaScript parse and compile times. We can use synthetic testing tools and browser traces to track parse times, and browser implementors are talking about exposing RUM-based processing times in the future.

Bottom line: Also, you might want to consider learning how to write efficient CSS selectors as well as how to avoid bloat and expensive styles. Feeling like going beyond that? You can also use Webpack to shorten the class names and use scope isolation to rename CSS class names dynamically at the compilation time. Code-splitting is another Webpack feature that splits your code base into "chunks" that are loaded on demand.

Not all of the JavaScript has to be downloaded, parsed and compiled right away. Once you define split points in your code, Webpack can take care of the dependencies and outputted files. It enables you to keep the initial download small and to request code on demand when requested by the application. Alexander Kondrov has a fantastic introduction to code-splitting with Webpack and React. Where to define split points? Umar Hansa explains how you can use Code Coverage from Devtools to achieve it.

Typical use cases for web workers are prefetching data and Progressive Web Apps to load and store some data in advance so that you can use it later when needed. And you could use Comlink to streamline the communication between the main page and the worker. Still some work to do, but we are getting there. Workerize allows you to move a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.

Alternatively, you could use worker-plugin as well. In real-world scenarios, JavaScript seems to perform better than WebAssembly on smaller array sizes and WebAssembly performs better than JavaScript on larger array sizes.

For most web apps, JavaScript is a better fit, and WebAssembly is best used for computationally intensive web apps, such as web games. However, it might be worth investigating if a switch to WebAssembly would result in noticeable performance improvements. Note that these days we can write module-based JavaScript that runs natively in the browser, without transpilers or bundlers. For lodash, use babel-plugin-lodash that will load only modules that you are using in your source.

Your dependencies might also depend on other versions of Lodash, so transform generic lodash requires to cherry-picked ones to avoid code duplication.

This might save you quite a bit of JavaScript payload.

You might also like: FURNITURE DESIGN PDF

Shubham Kanodia has written a detailed low-maintenance guide on smart bundling: As a result, we help reduce blocking of the main thread by reducing the amount of scripts the browser needs to process. First, set up metrics that tracks if the ratio of legacy code calls is staying constant or going down, not up. You can use Puppeteer to programmatically collect code coverage and Canary already allows you to export code coverage results , too.

As Andy Davies noted, you might want to collect code coverage for both modern and legacy browsers though. There are many other use-cases for Puppeteer , such as, for example, automatic visual diffing or monitoring unused CSS with every build. After that, you set that specific image as a background on the corresponding selector in your CSS, sit back and wait for a few months if the file is going to appear in your logs. If there are no entries, nobody had that legacy component rendered on their screen: Add bundle auditing into your regular workflow as well.

You can even integrate these costs with a Lighthouse Custom Audit. This goes for frameworks, too. Feeling adventurous? You could look into Prepack. Alternatively to shipping the entire framework, you could even trim your framework and compile it into a raw JavaScript bundle that does not require additional code. Svelte does it , and so does Rawact Babel plugin which transpiles React. But there are applications which do not need all these features at initial page load. For such applications, it might make sense to use native DOM operations to build the interactive user interface.

Hence, every interactive element is receiving a probability score for engagement, and based on that score, a client-side script decides to prefetch a resource ahead of time. You can integrate the technique to your Next.

Project overview and site setup

A good use case would be prefetching validation scripts required in the checkout, or speculative prefetch when a critical call-to-action comes into the viewport. Need something less sophisticated?

Quicklink is a small library that automatically prefetches links in the viewport during idle time in attempt to make next-page navigations load faster. To avoid it, always break up the execution of functions into separate, asynchronous tasks, and where possible use requestIdleCallback. The metric is defined by looking at the first five-second window after the initial content is rendered, in which no JavaScript tasks take longer than 50ms.

If a task over 50ms occurs, the search for a five-second window starts over. As a result, the browser will first assume that it reached Interactive, just to switch to Frozen, just to eventually switch back to Interactive. Once we reached Interactive, we can then — either on demand or as time allows — boot non-essential parts of the app. Unfortunately, as Paul Lewis noticed , frameworks typically have no concept of priority that can be surfaced to developers, and hence progressive booting is difficult to implement with most libraries and frameworks.

If you have the time and resources, use this strategy to ultimately boost performance. So, client-side or server-side? Perhaps you could even pre-render some of your content with static site generators and push them straight to the CDNs, with some JavaScript on top. Limit the use of client-side frameworks to pages that absolutely require them. Server-rendering and client-rendering are a disaster if done poorly.

Consider pre-rendering at build time and CSS inlining on the fly to produce production-ready static files. Addy Osmani has given a fantastic talk on the Cost of JavaScript that might be worth watching. As Yoav Weiss explained in his must-watch talk on third-party scripts , in many cases these scripts download resources that are dynamic. What options do we have then?

Iframes can be further constrained using the sandbox attribute, so you can disable any functionality that iframe may do, e. Each of the limitations can be lifted via various allow values on the sandbox attribute supported almost everywhere , so constrain them to the bare minimum of what they should be allowed to do.

Consider using Intersection Observer; that would enable ads to be iframed while still dispatching events or getting the information that they need from the DOM e. Preferably self-host and use a single hostname , but also generate a request map that exposes fourth-party calls and detect when the scripts change.

You can use Harry Roberts' approach for auditing third parties and produce spreadsheets like this one. Harry also explains the auditing workflow in his talk on third-party performance and auditing.

Use Cache-control: Additionally, most of the sites that are using it have the directive set on assets that have a long freshness lifetime. Access provided by: Implementing responsive web design for enhanced web presence Abstract: Modern companies, institutions, organizations, individuals, etc. However, it is not sufficient anymore just to have an appearance on web and to be recognized through various web search engines.

People are increasingly using smartphones and tablets for accessing the Internet, not just desktop personal computers and notebooks, therefore websites need to be optimized for all these devices in order to provide the best user experience. Responsive web design provides a website with a flexibility to adapt to any of these devices, i. The paper presents statistics and predictions of market trends regarding the devices and user experiences in web browsing and m-commerce.

Responsive web design is researched, along with its benefits and potential problems. Published in: Persistent Link:

Related articles:


Copyright © 2019 wm-greece.info.
DMCA |Contact Us