Articles

Retour vers le futur: Pages Web côté serveur avec Kotlin (Pt. 1)

Dans cette série, nous allons apprendre à créer des pages web côté serveur avec Kotlin. Vous découvrirez comment créer des applications web modernes et performantes. Prêt à voyager dans le futur ? Allons-y !

Le développement Web a subi de nombreux changements depuis que l’Internet est devenu populaire dans les années 1990 :

L’architecture du développement web a connu une variété de changements depuis que l’internet est devenu populaire dans les années 1990 :

Tout d’abord, il y a eu les pages HTML les plus basiques, complètement statiques, sans aucune dynamique. Plus tard, des technologies telles que l’interface commune de passerelle (Common Gateway Interface) ont permis de générer le code HTML d’une page de manière programmatique. Puis sont arrivés des moteurs de modèles tels que JavaServer Pages (maintenant Jakarta Server Pages), ASP.NET et Thymeleaf, qui ont permis aux développeurs de travailler avec des fichiers de modèles principalement « ressemblant à HTML » avec du code de programmation intermélangé.

Ensuite, des frameworks de « script côté client » basés sur Javascript tels qu’Angular, React et Vue sont apparus, ce qui a transformé le développement web en deux disciplines distinctes : le développement « backend » qui contenait le code traditionnel du serveur web et de la logique métier, ainsi que le développement « front-end » (en utilisant les frameworks ci-dessus) qui se concentrait sur la visualisation d’un site web et recevait des données du backend.

Cependant, cela ne signifie pas que les tendances de développement ne progressent que dans une seule direction et jamais en arrière. Par exemple, les bases de données NoSQL telles que MongoDB ont rapidement gagné en popularité en grande partie en raison de leur capacité à contenir des données non structurées par rapport aux bases de données SQL traditionnelles telles que PostgreSQL et MySQL, mais ces dernières ont également évolué et peuvent maintenant contenir des données non structurées via les types de données JSONB et JSON, respectivement. De même, de nouveaux frameworks Javascript tels que Next.js commencent à offrir des options pour le rendu côté serveur en plus de leurs capacités de rendu côté client traditionnelles. De nouveau, les moteurs de modèles côté serveur comme Thymeleaf ont également continué à évoluer, Thymeleaf lançant une nouvelle version du framework le mois dernier.

Source de l’article sur DZONE

Every day design fans submit incredible industry stories to our sister-site, Webdesigner News. Our colleagues sift through it, selecting the very best stories from the design, UX, tech, and development worlds and posting them live on the site.

The best way to keep up with the most important stories for web professionals is to subscribe to Webdesigner News or check out the site regularly. However, in case you missed a day this week, here’s a handy compilation of the top curated stories from the last seven days. Enjoy!

Web 3.0: How Web Design will Change Forever

Cookie Notice for Websites

The Most Popular JavaScript Frameworks of 2022

Exciting New Tools for Designers, February 2022

The CSS From-font Value Explained in 4 Demos

A UX Designer Walks into a Tesla Bar

Looking Ahead to WordPress 6.0: The Early Roadmap

What’s the Difference Between Good UI and Good UX?

22+ CSS Dropdown Menus

Famous Logos in the Grotesque Art Style Typical for the Middle Ages

Source

The post Popular Design News of the Week: January 31, 2022 – February 6, 2022 first appeared on Webdesigner Depot.

Source de l’article sur Webdesignerdepot

Vue.js is a highly advanced JavaScript framework that allows developers to build interactive user interfaces. It is mostly preferred to build single-page applications (SPAs), rightly because it offers cutting-edge development features. Today, many developers like to use Vue.js because it provides super scalability in development. This is one of the core reasons why Vue.js has become highly popular in the market, especially for front-end developers. 

Due to its innovative features, Vue.js is often termed as a “progressive framework” to create powerful web applications. Meanwhile, the lightweight nature of the framework is another reason why developers prefer it over other JavaScript frameworks. It provides super convenient features to build applications quickly, without going into many technical hassles. 

Source de l’article sur DZONE

Jamstack (JAMstack), is one of the most popular (and rapidly growing) tools for app and website creation. A unique ecosystem of functionality, Jamstack promises developers the support they need to create powerful websites and progressive applications. 

For a while, Jamstack was mostly written off as just another buzzword in the developer space. However, today, it’s growing to become a powerful investment for many business leaders. Even big companies are getting involved, like Cloudflare, with Cloudflare pages, and Microsoft with Azure Static Web Apps. Elsewhere, we’ve seen brands like Shopify, PayPal, and Nike getting involved too.

So, what exactly is Jamstack, and is it time you transitioned over? Let’s find out…

What is Jamstack?

Jamstack, otherwise known as “JAMstack,” is the name of a developer ecosystem made up of JavaScript, APIs, and Markup (hence: JAM). The solution is a web development architecture allowing developers to access static website benefits, such as higher security and better performance, while still unlocking dynamic database-oriented CMS.

The Jamstack solution allows companies and developers to build a dynamic website where real assets are pre-rendered static files in a CDN. The dynamic environment runs on JavaScript client-side, through serverless functions. 

For a better insight, let’s compare Jamstack to the LAMP stack development strategy, which originated from the four open-source components many developers used to build sites: Linux, Apache HTTP, MySQL, and PHP.

With LAMP, each user request for a page forces the server to query a database — unless the page is cached — and combine the result with page markup data and plugins. Jamstack websites serve pre-built optimized assets and markup solutions quickly because the files are already compiled on a CDN. There’s no need to query the database. 

Jamstack workflows dramatically reduce cumbersome issues with development and excess maintenance, making them highly appealing to developers. 

What Are the Benefits of Jamstack?

Jamstack won’t be the ideal development tool for everyone, but it has a lot of benefits to offer. By fetching HTML from a CDN, the system doesn’t have to wait for HTML to be combined and returned to clients. The solution also provides an improved developer experience with static methods. 

Using Jamstack, developers can build fantastic static files ready to serve by request, hosted on a global CDN. Some of the biggest benefits of Jamstack include:

  • Performance: Because you’re serving pre-built static files from a CDN directly, you’ll achieve much faster loading times, unmatched by typical server-side rendering options. Because you’re serving static files, you’re also better equipped to handle any traffic spikes you might encounter, with minimal slowdown.
  • User experience: Better website performance significantly improves user experience and website traffic, as well as SEO efforts. User experience has always been a critical factor in ensuring the success of a website, and it’s essential to keeping your customers around for as long as possible. Websites optimized for performance will always delight users. 
  • Security: With Jamstack, there are no servers or databases to worry about. You use third-party solutions to handle these issues for you. The architecture of Jamstack means the back and front end of your development processes are decoupled, and you can rely on APIs to run server-side processes easily. Jamstack also comes with security benefits other approaches can lack. Clear separation of services is essential here. 
  • Hosting and scaling: Scaling and hosting can often be problematic in the development world, but because you’re serving files from a CDN, you’re less likely to encounter issues. CDNs are almost infinitely scalable, so you get excellent extensibility built into your development environment. CDN hosting for static files is also cheaper than traditional hosting, so you can keep costs low. 
  • Maintenance: Jamstack makes it easy to push your front end to the edge rather than managing infrastructure directly. Ditching plugins, databases, and other hosting services can help you to save more time and money on a significant scale. 
  • Developer experience: From a developer perspective, there are tons of benefits from Jamstack. You get the ease of a Github, CI/CD, CDN flow, and auto previews with simple rollback to reduce the need for backups. Local developer environments and the ability to run and debug cloud functions locally are all fantastic.

Does Jamstack Have any Limitations?

In a lot of ways, Jamstack is an innovative and revolutionary solution for development. It can help you to create a far more engaging website and present your company in an incredible way. Of course, that doesn’t mean there are no limitations to be aware of. 

Jamstack is developer-friendly, for instance, but it’s not beginner-friendly. You will need at least some knowledge of web development to start unlocking the benefits. You’ll need to understand things like Vue or React, but you should develop a tool anyone can use with a bit of work.

There’s also a handful of things you can’t pre-generate, like user-specific and real-time data. So, this means you may not be able to use Jamstack effectively on projects requiring these kinds of data. Building an analytics dashboard, for instance, probably isn’t a good idea with Jamstack. Other issues for some developers may include:

  • API complexity: It can be overwhelming to try and find the right solution for your needs among so many different options. Of course, this could also be something you’d say about the WordPress ecosystem and its huge variety of plugins. An API usually won’t break your production website, at least. 
  • Long building processes: If you have a large number of pages, there’s more likely to be an extensive building process to think about. Whenever you make a change to a single page, even a little one, you’ll need to rebuild your entire website. This is a problem if you run into a website with thousands of pages. There are solutions to this problem available, however.
  • Handling dynamics: Going with Jamstack doesn’t mean abandoning your backend. An important part of the approach is accessing serverless functions, which are becoming more effective over time. These serverless functions can also be executed on the edge. The backend parts of your website will require regular maintenance as they scale.

Best Jamstack Tools to Check Out

Now you know the basics of Jamstack, let’s look at some of the tools you can use to design an incredible website or application within the Jamstack environment. 

The Git Tool Landscape

There are tons of tools within the Git ecosystem common among Jamstack developers. Starting with Git itself. Git represents a powerful free, and open-sourced distributed version control system. With this solution, companies can handle everything from small to enterprise-level projects with efficiency and speed. The solution is extremely easy to use and learn, and outclasses a range of tools like Perforce, ClearCase and Subversion. 

GitHub Pages and GitLab pages are two hosting services for Git repositories with built-in services to host static pages from out of your codebase. This makes the two solutions fantastic for when you’re building a Jamstack website. You can access the functionality for free too. 

GitLab gives you a comprehensive DevOps platform to work with, where you can enjoy a comprehensive CI/CD toolchain out of the box. The comprehensive solution, delivered as a single application, changes the way security, development, and Ops teams integrate and collaborate. Gitlab helps to accelerate software delivery on a massive scale.

AWS Amplify

AWS Amplify, created by Amazon Web Services, is a development platform packed full of useful features for people in the Jamstack environment. The Amplify offering aims to reduce the complexities associated with Amazon Web Services for mobile and web deployment. You get 12 months of hosting for free with new accounts, and you get Storage with Amplify too. 

The Amazon Amplify solution dramatically improves the regular AWS workflow, especially if you’re just a novice user. There’s a huge documentation hub to help you too, which is way more convenient than Amazon’s usual documentation solutions. Amplify is still accessed from a somewhat bloated console, however. 

With AWS Amplify, companies can access features like a comprehensive data store to sync data between the cloud and websites. There’s also easy-to-use interface access across all different categories of cloud operations. The service works well with a range of JavaScript central tools. 

Netlify

Netlify is a pioneering solution in the Jamstack environment, allowing users to go dynamic with their websites and applications on their own terms. You can access a range of add-ons and integration, access your favorite tools, and make your own. The flexible environment enables developers to run websites on a multi-cloud infrastructure designed for speed and scale automation. 

Built to be entirely secure from the ground up, Netlify makes it easy to build a site that’s custom-made for performance and deployed directly. You don’t need to worry about managing, scaling and patching web services, which means you can more quickly implement your Jamstack architecture. 

Unlike other large legacy apps, Jamstack projects are neatly separate from your front-end pages and UI from the backend databases and apps with Netlify. Using this service, the entire front-end can be pre-built with highly optimized static assets and pages, and developers can deliver new web projects faster than ever before.

Next.JS

Inspired by the functionality of PHP, Next.JS is a solution for pre-rendered JavaScript modules. The solution allows developers to easily export the components of their apps and perform individual tests to determine how each element works. You can also access a wide range of components and modules from NPM. The Next offering allows developers to save time, removing the need to use webpack bundles and transform with compilers. 

The full solution is extremely intuitive, ensuring developers can create solutions quickly. What’s more, the technology you build will allow you to load only the bundle needed from your JavaScript workflow, rather than all the JavaScript at once. Pre-fetching, one of the features of Next.JS, also picks up where standard code-splitting leaves off, allowing for optimized bundles of code to load seamlessly. 

Next.JS also supports hot-module replacement. This means instead of reloading an entire application when you change the code, you only recreate the modules you’ve altered.

Angular

Probably the most widely-recognized of all the JavaScript frameworks, Angular, designed by Google engineers, appeared first in 2012, offering developers a new way to create dynamic pages. Before this technology, there were other opportunities for creating dynamic pages, but they were nowhere near as convenient or speedy. 

Angular is probably one of the most essential tools companies can use when building a Jamstack website or environment. The front-end web development tool attracts developers from all over the world. Every version is packed with features and constantly upgraded to ensure you can generate the best results. 

Angular extends HTML file functionality with powerful directives, and it requires very little effort to enable these directives too. All you do is add the ng- prefix to your HTML attributes and you’re ready to go. Angular also allows developers to create widgets leveraging editable data with two-way binding. This means developers don’t have to write code that syncs constantly between the model and view. 

With Angular, developers also get access to things like virtual scrolling, which can help with displaying large lists of elements performantly, rendering on the items that fit on the screen to reduce loading times. 

React

Another must-have tool in the JavaScript world for Jamstack, the React solution was launched first in 2013, and has won thousands of customers across the globe thanks to fantastic functionality. Today, the full landscape is maintained by Facebook, along with all the members of the standard developer community. The solution is used by some of the biggest giants in the tech industry, like Netflix, PayPal, and Apple. 

React is a true pioneer in the Jamstack ecosystem, with its sensational approach to simple and straightforward solutions for JavaScript management. You’ll be able to access batched and virtual DOM updates, which makes it easier to unlock components quickly, and write your components the way you see them. There’s also the added benefit that React is compatible with a lot of tools. 

You can build a comprehensive app or website with the help of React, and you’ll have no trouble accessing some of the top features, particularly with plenty of support available from the React community. 

Gatsby

Created from the ground up to improve user experience on a comprehensive level, Gatsby is a static site generator with heavy focus on things like SEO, performance, and accessibility. The solution offers plenty of out-of-the-box features to help developers deliver the most immersive solution for their users, without unnecessary complexity. 

Gatsby users pre-configuration to develop static websites giving developers faster loading pages, stronger code splitting, and server-side rendering. You can also access features like data prefetching, asset optimization, and quick image loading. Gatsby boasts excellent documentation and starter packs to help you get your site up and running more quickly.

The GraphQL data layer of Gatsby also means the system can collect your data from anywhere, including your CMS, JSON, Markdown, and APIs. More than just your standard site generator, this is a tool built specifically with performance in mind. 

Agility CMS

Developing an effective Jamstack website means having access to the right CMS technology. Agility CMS wasn’t the first CMS solution to support Jamstack, but it is one of the better-known options. As one of the first headless CMS solutions to hit the market, the company has quickly captured the attention of a huge range of developers worldwide.

Agility CMS is a Jamstack pioneer, capable of helping developers to build a foundation for any online ecosystem. The technology is an API-first CMS with support for REST APIs, so developers can connect all the third-party apps and front-end frameworks they like.

The technology also gives developers the freedom to code their solutions their way. You don’t have to follow a specific set of guidelines for how content is created, but templates are available to fast-track development. Agility CMS also hosts and abstracts your database, so you don’t have to worry about connection strings, backups, and maintenance. 

With a strong content architecture to help companies manage digital content and a partnership with Gatsby, Agility is ideal for Jamstack development strategies. 

Building Your Jamstack Website

The Jamstack solution is more than just a buzzword in today’s development world. This unique approach to building incredible development experiences delivers an excellent advantage to both developers and their end-users. Fast, scalable, and full of solutions for customization, Jamstack is a powerful way to bring websites to life with simplicity and speed. 

Every day, more companies take advantage of the Jamstack environment, and we’re constantly seeing a wide selection of new tools, APIs and offerings emerging to help enhance the Jamstack landscape too. This environment is definitely worth consideration for any developer looking to significantly speed up their development strategy.

 

Featured image via Pexels.

Source

The post Is it Time to Transition to JAMStack? first appeared on Webdesigner Depot.

Source de l’article sur Webdesignerdepot

PageSpeed Insights is a free performance measurement tool provided by Google. It analyzes the contents of a web page for desktop and mobile devices. It provides a single number score (from 1 to 100) that summarizes several underlying metrics that measure performance. If you have not run PageSpeed Insights on your website, then you should stop and do it now. It’s an important indicator of how Google scores and ranks your site.

If your PageSpeed Insights score is below 80, don’t panic. You are not alone. Many websites are not optimized for performance. The good news is that you can take steps that should immediately improve your score.

You will notice that PageSpeed Insights highlights issues that cause slow page loading. However, you might need more guidance to resolve these issues. Below, we walk you through how to resolve four common issues related to images. We also show you how ImageEngine, an image CDN, can simplify, automate, and deliver the best image optimization solution possible.

Performance Drives Google SEO Rankings

Why does the PageSpeed Insights score and performance matter? Isn’t SEO ranking all about content relevance, backlinks, and domain authority? Yes, but now performance matters more than it did a year ago. Starting in 2021, Google added performance metrics to the factors that impact search engine rankings. In a market where websites are constantly jockeying to match their competition’s pages (for content relevance, keywords, and other SEO issues), performance is making a difference in keyword search engine rankings.

What Are Core Web Vitals Metrics?

PageSpeed Insights relies on a set of performance metrics called Core Web Vitals. These metrics are:

Largest Contentful Paint (LCP): Measures the render time (in seconds) of the largest image or text block visible within the viewport, relative to when the page first started loading. Typically, the largest image is the hero image at the top of pages.

First Input Delay (FID): Measures the time from when a user first interacts with a page (i.e. when they click a link, tap on a button, or use a custom JavaScript-powered control) to the time when the browser is actually able to begin processing event handlers in response to that interaction.

Cumulative Layout Shift (CLS): Measures the layout shift that occurs any time a visible element changes its position from one rendered frame to the next.

Images and JavaScript are the Main Culprits

PageSpeed Insights breaks down problems into categories based upon how they impact these Core Web Vitals metrics. The top two reasons why you might have a low score are driven by JavaScript and images.

JavaScript issues are usually related to code that either blocks or delays page loading. For example, lazy-loading images might involve JavaScript that blocks loading. As a rule of thumb, do not use a third-party JavaScript library to manage image loading. These libraries frequently break the browser’s built-in image loading features. Lazy-loading may make above-the-fold images load slower (longer LCP) because the browser starts the download later and because the browser first has to execute the JavaScript.

Another JavaScript issue involves code that is large or unnecessary for the page. In other words, code bloat. There are good resources for resolving these issues on the web. However, in this blog, we will focus on image problems.

Images are a major contributor to poor performance. The average website payload is 2MB in 2021, and 50% of that is images. Frequently, images are larger than they need to be and can be optimized for size with no impact on quality…if you do it right.

Four Image Issues Highlighted by PageSpeed Insights

Largest Contentful Paint is the primary metric impacted by images. PageSpeed Insights frequently recommends the following four pieces of advice:

  1. Serve images in next-gen formats.
  2. Efficiently encode images.
  3. Properly size images.
  4. Avoid enormous network payloads.

That advice seems straightforward. Google provides some great advice on how to deal with images in its dev community. It can be summarized in the following steps:

  • Select the appropriate file format.
  • Apply the appropriate image compression.
  • Apply the right display size.
  • Render the image.
  • Write responsive image code to select the right variant of the image.

We call Google’s process the “Build-Time Responsive Syntax” approach. If you have a relatively static website where you don’t generate new pages or switch out images frequently, then you can probably live with this approach. However, if you have a large and dynamic site with many images, then you will quickly feel the pain of this approach. Google itself stresses that developers should seek to automate this image process. Why? Because the process has some serious workflow drawbacks:

  • Adds storage requirements due to a large increase in image variants.
  • Increases code bloat and introduces more code complexity.
  • Requires developers’ time and effort to create variants and implement responsiveness.
  • Requires logic to account for different browser’s support for next-gen image formats.
  • Doesn’t adapt to different contexts. It relies on best-guess (breakpoints) of what device visits the web page.
  • Needs a separate CDN to further increase delivery speeds.
  • Requires ongoing maintenance to adapt to new devices, breakpoints, image formats, markets, and practices.

Key Steps to Achieving High-Performance Images

Instead of using the Build-Time Responsive Syntax approach, an automated image CDN solution can address all of the image issues raised by PageSpeed Insights. The key steps of an image CDN that you should look for are:

  1. Detect Mobile Devices: Detection of a website visitor’s device model and its technical capabilities. These include: OS version, browser version, screen pixel density, screen resolution width and height, support for next-gen image and video formats. This is where ImageEngine is unique in the market. ImageEngine uses true mobile device detection to further improve image optimization. It has a huge impact on the effectiveness of the image optimization process.
  2. Optimize Images: An image CDN will leverage the device’s parameters to automatically resize, compress and convert large original images into optimized images with next-generation file formats, like WebP and AVIF. Frequently, an image CDN like ImageEngine will reduce the image payload by up to 80%.
  3. Deliver by CDN: Image CDNs like ImageEngine have edge servers strategically positioned around the globe. By pushing optimized images closer to requesting customers and delivering them immediately from the cache, it often provides a 50% faster web page download time than traditional CDNs.

Easy Integration Process for Image CDN

After signing up for an ImageEngine account and free trial, you will receive a Delivery Address. After adjusting your <img /> elements to include the Delivery Address, ImageEngine will start to pull the original images from your website (no need to move or upload them), automatically optimize them, and deliver them.

You can automate the addition of the Delivery Address to the img src tag by using plug-ins for WordPress and Magento. Developers can also use ImageEngine’s React, Vue, or Angular JavaScript frameworks to simplify the process.

Additionally, there are many ways to simplify implementation via adjustments to templates for many CMS and eCommerce platforms.

Results: Improved Performance, Better SEO

Most ImageEngine users see a huge improvement in LCP metrics, and consequently, a big improvement in the overall PageSpeed Insights score. ImageEngine provides a free demo analysis of your images before and after image optimization. In many cases, developers see improvements of many seconds on their LCP and Speed Index.

In summary, performance drives higher search rankings, and better UX, and increases website conversions for eCommerce. The steps you take to improve your image performance will pay for themselves in more sales and conversions, streamlined workflow, and lower CDN delivery costs.

Source

The post 4 Steps to Improve PageSpeed Insights Score and SEO first appeared on Webdesigner Depot.


Source de l’article sur Webdesignerdepot

On this episode of Eat Sleep Code, Jen Looper and Diana Rodriguez discuss Vue Vixens, an organization of people who identify as women and who want to learn Vue.js to make websites and mobile apps. Jen and Diana share their story of creating and building a successful developer community and growing Vue Vixens into a worldwide organization.

You can listen to the entire show and catch past episodes on SoundCloud. Or just click below.

Source de l’article sur DZONE

Recently, I was asked to attend a session at a large corporation. The room was filled with technology-based executives, development managers, and enterprise architects. Also in attendance were a few of my peers from 

Upon leaving this discussion, I found myself wondering just how many other corporations are facing this same dilemma.

Source de l’article sur DZone (Agile)