Archive

Archive for July, 2019

Improve Your JavaScript Knowledge By Reading Source Code

July 12th, 2019 No comments
The source code for Mithril's hyperscript function

Improve Your JavaScript Knowledge By Reading Source Code

Improve Your JavaScript Knowledge By Reading Source Code

Carl Mungazi

2019-07-12T12:30:59+02:002019-07-12T11:06:35+00:00

Do you remember the first time you dug deep into the source code of a library or framework you use frequently? For me, that moment came during my first job as a frontend developer three years ago.

We had just finished rewriting an internal legacy framework we used to create e-learning courses. At the beginning of the rewrite, we had spent time investigating a number of different solutions including Mithril, Inferno, Angular, React, Aurelia, Vue, and Polymer. As I was very much a beginner (I had just switched from journalism to web development), I remember feeling intimidated by the complexity of each framework and not understanding how each one worked.

My understanding grew when I began investigating our chosen framework, Mithril, in greater depth. Since then, my knowledge of JavaScript — and programming in general — has been greatly helped by the hours I have spent digging deep into the guts of the libraries I use daily either at work or in my own projects. In this post, I will share some of the ways you can take your favorite library or framework and use it as an educational tool.

The source code for Mithril's hyperscript function

My first introduction to reading code was via Mithril’s hyperscript function. (Large preview)

The Benefits Of Reading Source Code

One of the major benefits of reading source code is the number of things you can learn. When I first looked into Mithril’s codebase, I had a vague idea of what the virtual DOM was. When I finished, I came away with the knowledge that the virtual DOM is a technique which involves creating a tree of objects that describe what your user interface should look like. That tree is then turned into DOM elements using DOM APIs such as document.createElement. Updates are performed by creating a new tree describing the future state of the user interface and then comparing it with objects from the old tree.

I had read about all of this in various articles and tutorials, and whilst it was helpful, being able to observe it at work in the context of an application we had shipped was very illuminating for me. It also taught me which questions to ask when comparing different frameworks. Instead of looking at GitHub stars, for example, I now knew to ask questions such as, “How does the way each framework performs updates affect performance and the user experience?”

Another benefit is an increase in your appreciation and understanding of good application architecture. Whilst most open-source projects generally follow the same structure with their repositories, each of them contains differences. Mithril’s structure is pretty flat and if you are familiar with its API, you can make educated guesses about the code in folders such as render, router and request. On the other hand, React’s structure reflects its new architecture. The maintainers have separated the module responsible for UI updates (react-reconciler) from the module responsible for rendering DOM elements (react-dom).

One of the benefits of this is that it is now easier for developers to write their own custom renderers by hooking into the react-reconciler package. Parcel, a module bundler I have been studying recently, also has a packages folder like React. The key module is named parcel-bundler and it contains the code responsible for creating bundles, spinning up the hot module server and the command-line tool.

The section of the JavaScript specification which explains how Object.prototype.toString works

It will not be long before the source code you are reading leads you to the JavaScript specification. (Large preview)

Yet another benefit — which came as a welcome surprise to me — is you become more comfortable reading the official JavaScript specification which defines how the language works. The first time I read the spec was when I was investigating the difference between throw Error and throw new Error (spoiler alert — there is none). I looked into this because I noticed that Mithril used throw Error in the implementation of its m function and I wondered if there was a benefit to using it over throw new Error. Since then, I have also learnt that the logical operators && and || do not necessarily return booleans, found the rules which govern how the == equality operator coerces values and the reason Object.prototype.toString.call({}) returns '[object Object]'.

Techniques For Reading Source Code

There are many ways of approaching source code. I have found the easiest way to start is by selecting a method from your chosen library and documenting what happens when you call it. Do not document every single step but try to identify its overall flow and structure.

I did this recently with ReactDOM.render and consequently learned a lot about React Fiber and some of the reasons behind its implementation. Thankfully, as React is a popular framework, I came across a lot of articles written by other developers on the same issue and this sped up the process.

This deep dive also introduced me to the concepts of co-operative scheduling, the window.requestIdleCallback method and a real world example of linked lists (React handles updates by putting them in a queue which is a linked list of prioritised updates). When doing this, it is advisable to create a very basic application using the library. This makes it easier when debugging because you do not have to deal with the stack traces caused by other libraries.

If I am not doing an in-depth review, I will open up the /node_modules folder in a project I am working on or I will go to the GitHub repository. This usually happens when I come across a bug or interesting feature. When reading code on GitHub, make sure you are reading from the latest version. You can view the code from commits with the latest version tag by clicking the button used to change branches and select “tags”. Libraries and frameworks are forever undergoing changes so you do not want to learn about something which may be dropped in the next version.

Another less involved way of reading source code is what I like to call the ‘cursory glance’ method. Early on when I started reading code, I installed express.js, opened its /node_modules folder and went through its dependencies. If the README did not provide me with a satisfactory explanation, I read the source. Doing this led me to these interesting findings:

  • Express depends on two modules which both merge objects but do so in very different ways. merge-descriptors only adds properties directly found directly on the source object and it also merges non-enumerable properties whilst utils-merge only iterates over an object’s enumerable properties as well as those found in its prototype chain. merge-descriptors uses Object.getOwnPropertyNames() and Object.getOwnPropertyDescriptor() whilst utils-merge uses for..in;
  • The setprototypeof module provides a cross platform way of setting the prototype of an instantiated object;
  • escape-html is a 78-line module for escaping a string of content so it can be interpolated in HTML content.

Whilst the findings are not likely to be useful immediately, having a general understanding of the dependencies used by your library or framework is useful.

When it comes to debugging front-end code, your browser’s debugging tools are your best friend. Among other things, they allow you to stop the program at any time and inspect its state, skip a function’s execution or step into or out of it. Sometimes this will not be immediately possible because the code has been minified. I tend to unminify it and copy the unminified code into the relevant file in the /node_modules folder.

The source code for the ReactDOM.render function

Approach debugging as you would any other application. Form a hypothesis and then test it. (Large preview)

Case Study: Redux’s Connect Function

React-Redux is a library used to manage the state of React applications. When dealing with popular libraries such as these, I start by searching for articles that have been written about its implementation. In doing so for this case study, I came across this article. This is another good thing about reading source code. The research phase usually leads you to informative articles such as this which only improve your own thinking and understanding.

connect is a React-Redux function which connects React components to an application’s Redux store. How? Well, according to the docs, it does the following:

“…returns a new, connected component class that wraps the component you passed in.”

After reading this, I would ask the following questions:

  • Do I know any patterns or concepts in which functions take an input and then return that same input wrapped with additional functionality?
  • If I know of any such patterns, how would I implement this based on the explanation given in the docs?

Usually, the next step would be to create a very basic example app which uses connect. However, on this occasion I opted to use the new React app we are building at Limejump because I wanted to understand connect within the context of an application which will eventually be going into a production environment.

The component I am focusing on looks like this:

class MarketContainer extends Component {
 // code omitted for brevity
}

const mapDispatchToProps = dispatch => {
 return {
   updateSummary: (summary, start, today) => dispatch(updateSummary(summary, start, today))
 }
}

export default connect(null, mapDispatchToProps)(MarketContainer);

It is a container component which wraps four smaller connected components. One of the first things you come across in the file which exports connect method is this comment: connect is a facade over connectAdvanced. Without going far we have our first learning moment: an opportunity to observe the facade design pattern in action. At the end of the file we see that connect exports an invocation of a function called createConnect. Its parameters are a bunch of default values which have been destructured like this:

export function createConnect({
 connectHOC = connectAdvanced,
 mapStateToPropsFactories = defaultMapStateToPropsFactories,
 mapDispatchToPropsFactories = defaultMapDispatchToPropsFactories,
 mergePropsFactories = defaultMergePropsFactories,
 selectorFactory = defaultSelectorFactory
} = {})

Again, we come across another learning moment: exporting invoked functions and destructuring default function arguments. The destructuring part is a learning moment because had the code been written like this:

export function createConnect({
 connectHOC = connectAdvanced,
 mapStateToPropsFactories = defaultMapStateToPropsFactories,
 mapDispatchToPropsFactories = defaultMapDispatchToPropsFactories,
 mergePropsFactories = defaultMergePropsFactories,
 selectorFactory = defaultSelectorFactory
})

It would have resulted in this error Uncaught TypeError: Cannot destructure property 'connectHOC' of 'undefined' or 'null'. This is because the function has no default argument to fall back on.

Note: For more on this, you can read David Walsh’s article. Some learning moments may seem trivial, depending on your knowledge of the language, and so it might be better to focus on things you have not seen before or need to learn more about.

createConnect itself does nothing in its function body. It returns a function called connect, the one I used here:

export default connect(null, mapDispatchToProps)(MarketContainer)

It takes four arguments, all optional, and the first three arguments each go through a match function which helps define their behaviour according to whether the arguments are present and their value type. Now, because the second argument provided to match is one of three functions imported into connect, I have to decide which thread to follow.

There are learning moments with the proxy function used to wrap the first argument to connect if those arguments are functions, the isPlainObject utility used to check for plain objects or the warning module which reveals how you can set your debugger to break on all exceptions. After the match functions, we come to connectHOC, the function which takes our React component and connects it to Redux. It is another function invocation which returns wrapWithConnect, the function which actually handles connecting the component to the store.

Looking at connectHOC‘s implementation, I can appreciate why it needs connect to hide its implementation details. It is the heart of React-Redux and contains logic which does not need to be exposed via connect. Even though I will end the deep dive here, had I continued, this would have been the perfect time to consult the reference material I found earlier as it contains an incredibly detailed explanation of the codebase.

Summary

Reading source code is difficult at first but as with anything, it becomes easier with time. The goal is not to understand everything but to come away with a different perspective and new knowledge. The key is to be deliberate about the entire process and intensely curious about everything.

For example, I found the isPlainObject function interesting because it uses this if (typeof obj !== 'object' || obj === null) return false to make sure the given argument is a plain object. When I first read its implementation, I wondered why it did not use Object.prototype.toString.call(opts) !== '[object Object]', which is less code and distinguishes between objects and object sub types such as the Date object. However, reading the next line revealed that in the extremely unlikely event that a developer using connect returns a Date object, for example, this will be handled by the Object.getPrototypeOf(obj) === null check.

Another bit of intrigue in isPlainObject is this code:

while (Object.getPrototypeOf(baseProto) !== null) {
 baseProto = Object.getPrototypeOf(baseProto)
}

Some Google searching led me to this StackOverflow thread and the Redux issue explaining how that code handles cases such as checking against objects which originate from an iFrame.

Useful Links On Reading Source Code

(dm, yk, il)
Categories: Others Tags:

How to make an affiliate marketing website

July 12th, 2019 No comments

An affiliate program for making money is a great way to generate passive income, especially in unstable times. Everyone can create their own website and profit from it.

In this article, I will consider in detail how to create a site for making money specifically for an affiliate program and what types of sites can be used for this: blog, single page and portal (listing).

Before I begin to describe each of the site types, I would like to highlight the common features inherent in all of them.

Affiliate marketing website. What’s it about?

Before you start to run a blog or website, you need to think about a topic. This way, you will find it easier to navigate in the future, and there will be no problem of “blank paper” when there’s nothing to write about. Write down topics that would be of interest to you, e.g. you can make a niche resource and write only about blogs (how to create one, where to start, post ideas, etc.) or sites. Mashable’s blog started its career back in 2005 and focused only on social networking news. Now it is one of the largest foreign portals of the IT industry.

You can also pay attention to hosting services, domains, Internet earnings, and many other topics that somehow relate to the World Wide Web and everything in it.

Blog at Entrepreneur.com is a great example of the fact that you can write not only about hosting and domains but about the Internet and offline businesses in general. Detailed lessons, news, tips, and much more for all novice entrepreneurs and businessmen.

Don’t forget to check your competitors’ activity. Make a list of sprites, similar in topics, and, perhaps, that’s where you will get some ideas or a future “signature” of your resource. However, copy-pasting post ideas and topics are never a good thing to do, as no one will be interested in reading something they have already read somewhere else.

Choose the right domain name

The general rule that still applies today is to use a keyword or phrase in the domain. If you have chosen a hosting or social networking topic, you can use these words or phrases with them in the domain. When you select a domain, you can use a free assistant that will tell you which names are already occupied and which are ready for registration.

Now let’s consider what site to create in more detail. There are several types of sites that can help us in promoting affiliate links, and we will start with the simplest way – creating a blog.

Affiliate marketing blog

In general, a blog is a type of website, preferably consisting of text content. Recently, blog posts can contain any multimedia content. Blogs are used for both personal and business purposes. You can use this type of site for yourself, namely, get additional income not only from an affiliate link but also to writing custom articles or install banners.

Blog platform

Many people choose WordPress or Google Blogger as their blog creation platform or CMS (Content Management System). This is a great option for people who are not very good at web design or do not want to pay for a domain/hosting. By the way, in general, 27% of sites on the network are managed by WordPress.

  • WordPress is a free CMS with flexible settings. Read here how to install WordPress. https://wordpress.org/support/article/how-to-install-wordpress/

To start working with WordPress, you need to decide whether you want to be able to fully customize your blog or standard services are sufficient.

If you are not going to buy a domain and hosting and just want to try to work with a blog, then register at WordPress.com which already includes hosting WordPress and the ability to choose your custom site link.

In just 4 simple steps, you will have your own ready-for-work blog. It is worth noting that in the free version doesn’t let you choose the design, download high-quality video files or add plugins.

If you are ready to register a domain and buy hosting, then you only need to download WordPress and transfer it to hosting. Don’t be scared, everything is easier than it seems, especially if you use an auto-installer. All you need to do is fill in the blank fields and wait for a little, it will do everything automatically for you. You can also contact tech support on the site.

  • A good alternative to WordPress is Google Blogger. To get started with it, you need to have a mailbox on Gmail. Then you will be able to create your own blog by filling in corresponding fields.

This platform has very flexible settings, as well as a lot of plugins that will not only improve the work of your blog but also help to promote it. For example, you can download the “All In One SEO Pack” plugin and optimize your posts as needed for search bots. You can also purchase design templates for an extra charge.

Another advantage of working with this system is that, unlike WordPress, it does not require a separate hosting.

After registering your blog, you can start writing your first post.

Writing exciting content

We’ve come to the most interesting part – the content for the blog. Despite the fact that this blog is created exclusively for earning on an affiliate link, you should not neglect the quality of content. Here are a few tips to follow for writing a good text:

  • Uniqueness. Keep an eye on that when writing your articles. Never copy. No one is interested in reading this, and search engines can also “punish” your site.
  • Find a few topics and write them down. Think about your topics in advance, so you can write at least one article a day. The more new content you have on the site, the more readers you will have.
  • Even if you can’t find topics for your blog posts right away, don’t worry. You will most probably come up with some ideas during the day. Write them down right away. You can also use the help of a post-generator to find unusual headings for further writing a large article.
  • After you find a few ideas, check what your competitors write about that. You may want to refute some thesis or write your own based on an article.
  • Watch out for grammar mistakes in the text. You can correct them in a regular text editor or with the help of Grammarly-like apps.
  • Be an expert in what you write about. Read more about your chosen topics, take some time to study it and test it yourself.
  • Leave a link to an affiliate program unobtrusively. There is no need to devote a whole post to advertising. Better give your readers advice on, e.g. how to choose a hosting or how to create your own site, share a lot of helpful information with posting an affiliate link as well.
  • Find images/photos related to the topic and dilute them with text. At the moment, there are a huge number of free images with quality pictures and photos. You can also add video or animation to your message. Do not forget that an image can be sent to the desired site, prescribing it in the HTML-code.
  • If you are not ready or do not want to spend time on writing permanent, high-quality content, ask professional writers for help. They can be found on freelance exchanges.

Single pages for affiliate marketing

An alternative tool to promote an affiliate link is a single page site.

A single page, also known as a landing page, is a custom page – a site aimed at selling any products, in our case an affiliate link. Typically, it’s about the specific interests of a particular target visitor. Such a site has one full page with content which makes an ordinary reader a buyer. The advantages of such a site are that it can be relatively quickly made and filled. You can use a free site designer.

Creating a landing page

In order to create a single page, you can use the help of WordPress. This CMS, thanks to the flexible options and set of special possibilities, will help you make a site for earnings literally in a few minutes.

Landing page content

In general, creating a single page, there is a wide range of topics for content, as well as options in terms of earnings. You can create a site with a table comparing hosting companies, i.e. you can earn not only on an affiliate program but also with the help of other similar programs. An example of such a site is a single page Top 10 Web Hosting. Here you can find the ratings, rate, and read all the detailed information about a company. By the way, when you click “Visit site” button and automatically get to a provider’s site via an affiliate link.

Also, any step-by-step guide, e.g. how to make your own site, how to sell an e-book or an online course, can be used as a basis for creating a single page. One of the items can be a step-by-step guide on how to buy a domain, e.g. Websitesetup.org and startbloggingonline.com work on such a principle.

As for the site’s content on a website, a text that will be on a single page is called “selling text.” It is written according to certain rules. For example, there is a model of writing text as AIDA (Attract – Interest – Desire – Action). Many advertising booklets and articles are written based on this principle. If you are not sure that you will be able to apply this formula, then the task of writing a text can be given to a professional author, specialized in writing texts for target pages.

To wrap it up, I’ll leave 5 most useful tips when creating content for a landing page:

  • Highlight benefits, not the product. Describe why readers should use this hosting instead of any other.
  • Use specific graphs or numbers. The more specifics in the text, the greater the confidence.
  • Do not ask or beg. Write not as if you have a burning reason to give something to someone, serve it as friendly advice.
  • Be sure to leave a call-to-action at the end of your text or use special services, such as ShareThis to enhance your site and engage visitors.

Affiliate listing

Another way to promote an affiliate link is a portal (listing). The portal is a very large site with several sections (forum, blog, chat, etc).

To create a high-quality portal, you can ask for help from specialists that deal with any types of sites. Naturally, not for free. In this case, the price range starts from $20. And don’t forget that you can always use a CMS like mentioned WordPress.

Portal topic

So, you have dealt with the tech part and now the portal has to be filled with content.

Wpbeginner.com offers a very large list of providers and their services. The site is filled with a number of reviews, ratings, comparisons, and reports that help users decide who to work with, and who is better off.

The well-known Businessnewsdaily.com also has some helpful information on hosting providers and how to choose the best one.

As you can see, there are many ideas for creating this type of site. By the way, it is through the portal that you can get the maximum income by placing not only affiliate links but also banners or other ads.

A huge advantage over other types of sites is that thanks to the communication of a large number of people on the site, they themselves can later generate new content by offering their own news, topics for discussion, or other information that can be used on the page.

As for posts and articles, they can be made with the help of pictures, videos, and infographics that you can create on your own or order from professional designers. The more visual and useful content in the article, the more credibility to your site, and, therefore, the more willingly people click the link.

Also, when creating your text for a site, enter keywords that will help to quickly “promote” it in Google.

Should you need any further information, please do not hesitate to contact me, I am editor-in-chief of reclinerfaq.com.

Categories: Others Tags:

Weekly Platform News: HTML Inspection in Search Console, Global Scope of Scripts, Babel env Adds defaults Query

July 11th, 2019 No comments

In this week’s look around the world of web platform news, Google Search Console makes it easier to view crawled markup, we learn that custom properties aren’t computing hogs, variables defined at the top-level in JavaScript are global to other page scripts, and Babel env now supports the defaults query — plus all of last month’s news compiled into a single package for you.

Easier HTML inspection in Google Search Console

The URL Inspection tool in Google Search Console now includes useful controls for searching within and copying the HTML code of the crawled page.

Note: The URL Inspection tool provides information about Google’s indexed version of a specific page. You can access Google Search Console at https://search.google.com/search-console.

(via Barry Schwartz)

CSS properties are computed once per element

The value of a CSS custom property is computed once per element. If you define a custom property --func on the element that uses the value of another custom property --val, then re-defining the value of --val on a nested DOM element that uses --func won’t have any effect because the inherited value of --func is already computed.

html {
  --angle: 90deg;
  --gradient: linear-gradient(var(--angle), blue, red);
}

header {
  --angle: 270deg; /* ignored */
  background-image: var(--gradient); /* inherited value */
}

(via Miriam Suzanne)

The global scope of scripts

JavaScript variables created via let, const, or class declarations at the top level of a script ( element) continue to be defined in subsequent scripts included in the page.

Note:Axel Rauschmayer calls this the global scope of scripts.”)

(via Surma)

Babel env now supports the defaults query

Babel’s env preset (@babel/preset-env) now allows you to target browserslist’s default browsers (which are listed at browsersl.ist). Note that if you don’t specify your target browsers, Babel env will run every syntax transform on your code.

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": { "browsers": "defaults" }
      }
    ]
  ]
}

(via Nicolò Ribaudo)

All the June 2019 news that’s fit to… print

For your convenience, I have compiled all 59 news items that I’ve published throughout June into one 10-page PDF document.

Download PDF

The post Weekly Platform News: HTML Inspection in Search Console, Global Scope of Scripts, Babel env Adds defaults Query appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

Protecting Vue Routes with Navigation Guards

July 11th, 2019 No comments

Authentication is a necessary part of every web application. It is a handy means by which we can personalize experiences and load content specific to a user — like a logged in state. It can also be used to evaluate permissions, and prevent otherwise private information from being accessed by unauthorized users.

A common practice that applications use to protect content is to house them under specific routes and build redirect rules that navigate users toward or away from a resource depending on their permissions. To gate content reliably behind protected routes, they need to build to separate static pages. This way, redirect rules can properly handle redirects.

In the case of Single Page Applications (SPAs) built with modern front-end frameworks, like Vue, redirect rules cannot be utilized to protect routes. Because all pages are served from a single entry file, from a browser’s perspective, there is only one page: index.html. In a SPA, route logic generally stems from a routes file. This is where we will do most of our auth configuration for this post. We will specifically lean on Vue’s navigation guards to handle authentication specific routing since this helps us access selected routes before it fully resolves. Let’s dig in to see how this works.

Roots and Routes

Navigation guards are a specific feature within Vue Router that provide additional functionality pertaining to how routes get resolved. They are primarily used to handle error states and navigate a user seamlessly without abruptly interrupting their workflow.

There are three main categories of guards in Vue Router: Global Guards, Per Route Guards and In Component Guards. As the names suggest, Global Guards are called when any navigation is triggered (i.e. when URLs change), Per Route Guards are called when the associated route is called (i.e. when a URL matches a specific route), and Component Guards are called when a component in a route is created, updated or destroyed. Within each category, there are additional methods that gives you more fine grained control of application routes. Here’s a quick break down of all available methods within each type of navigation guard in Vue Router.

Global Guards

  • beforeEach: action before entering any route (no access to this scope)
  • beforeResolve: action before the navigation is confirmed, but after in-component guards (same as beforeEach with this scope access)
  • afterEach: action after the route resolves (cannot affect navigation)

Per Route Guards

  • beforeEnter: action before entering a specific route (unlike global guards, this has access to this)

Component Guards

  • beforeRouteEnter: action before navigation is confirmed, and before component creation (no access to this)
  • beforeRouteUpdate: action after a new route has been called that uses the same component
  • beforeRouteLeave: action before leaving a route

Protecting Routes

To implement them effectively, it helps to know when to use them in any given scenario. If you wanted to track page views for analytics for instance, you may want to use the global afterEach guard, since it gets fired when the route and associated components are fully resolved. And if you wanted to prefetch data to load onto a Vuex store before a route resolves, you could do so using the beforeEnter per route guard.

Since our example deals with protecting specific routes based on a user’s access permissions, we will use in component navigation guards, namely the beforeEnter hook. This navigation guard gives us access to the proper route before the resolve completes; meaning that we can fetch data or check that data has loaded before letting a user pass through. Before diving into the implementation details of how this works, let’s briefly look at how our beforeEnter hook fits into our existing routes file. Below, we have our sample routes file, which has our protected route, aptly named protected. To this, we will add our beforeEnter hook to it like so:

const router = new VueRouter({
  routes: [
    ...
    {
      path: "/protected",
      name: "protected",
      component: import(/* webpackChunkName: "protected" */ './Protected.vue'),
      beforeEnter(to, from, next) {
        // logic here
      }
  ]
})

Anatomy of a route

The anatomy of a beforeEnter is not much different from other available navigation guards in Vue Router. It accepts three parameters: to, the “future” route the app is navigating to; from, the “current/soon past” route the app is navigating away from and next, a function that must be called for the route to resolve successfully.

Generally, when using Vue Router, next is called without any arguments. However, this assumes a perpetual success state. In our case, we want to ensure that unauthorized users who fail to enter a protected resource have an alternate path to take that redirects them appropriately. To do this, we will pass in an argument to next. For this, we will use the name of the route to navigate users to if they are unauthorized like so:

next({
  name: "dashboard"
})

Let’s assume in our case, that we have a Vuex store where we store a user’s authorization token. In order to check that a user has permission, we will check this store and either fail or pass the route appropriately.

beforeEnter(to, from, next) {
  // check vuex store //
  if (store.getters["auth/hasPermission"]) {
    next()
  } else {
    next({
      name: "dashboard" // back to safety route //
    });
  }
}

In order to ensure that events happen in sync and that the route doesn’t prematurely load before the Vuex action is completed, let’s convert our navigation guards to use async/await.

async beforeEnter(to, from, next) {
  try {
    var hasPermission = await store.dispatch("auth/hasPermission");
    if (hasPermission) {
      next()
    }
  } catch (e) {
    next({
      name: "dashboard" // back to safety route //
    })
  }
} 

Never forget where you came from

So far our navigation guard fulfills its purpose of preventing unauthorized users access to protected resources by redirecting them to where they may have come from (i.e. the dashboard page). Even so, such a workflow is disruptive. Since the redirect is unexpected, a user may assume user error and attempt to access the route repeatedly with the eventual assumption that the application is broken. To account for this, let’s create a way to let users know when and why they are being redirected.

We can do this by passing in a query parameter to the next function. This allows us to append the protected resource path to the redirect URL. So, if you want to prompt a user to log into an application or obtain the proper permissions without having to remember where they left off, you can do so. We can get access to the path of the protected resource via the to route object that is passed into the beforeEnter function like so: to.fullPath.

async beforeEnter(to, from, next) {
  try {
    var hasPermission = await store.dispatch("auth/hasPermission");
    if (hasPermission) {
      next()
    }
  } catch (e) {
    next({
      name: "login", // back to safety route //
      query: { redirectFrom: to.fullPath }
    })
  }
}

Notifying

The next step in enhancing the workflow of a user failing to access a protected route is to send them a message letting them know of the error and how they can solve the issue (either by logging in or obtaining the proper permissions). For this, we can make use of in component guards, specifically, beforeRouteEnter, to check whether or not a redirect has happened. Because we passed in the redirect path as a query parameter in our routes file, we now can check the route object to see if a redirect happened.

beforeRouteEnter(to, from, next) {
  if (to.query.redirectFrom) {
    // do something //
  }
}

As I mentioned earlier, all navigation guards must call next in order for a route to resolve. The upside to the next function as we saw earlier is that we can pass an object to it. What you may not have known is that you can also access the Vue instance within the next function. Wuuuuuuut? Here’s what that looks like:

next(() => {
  console.log(this) // this is the Vue instance
})

You may have noticed that you don’t technically have access to the this scope when using beforeEnter. Though this might be the case, you can still access the Vue instance by passing in the vm to the function like so:

next(vm => {
  console.log(vm) // this is the Vue instance
})

This is especially handy because you can now create and appropriately update a data property with the relevant error message when a route redirect happens. Say you have a data property called errorMsg. You can now update this property from the next function within your navigation guards easily and without any added configuration. Using this, you would end up with a component like this:

<template>
  <div>
    <span>{{ errorMsg }}</span>
    <!-- some other fun content -->
    ...
    <!-- some other fun content -->
  </div>
</template>
<script>
export default {
  name: "Error",
  data() {
    return {
      errorMsg: null
    }
  },
  beforeRouteEnter(to, from, next) {
    if (to.query.redirectFrom) {
      next(vm => {
        vm.errorMsg =
          "Sorry, you don't have the right access to reach the route requested"
      })
    } else {
      next()
    }
  }
}
</script>

Conclusion

The process of integrating authentication into an application can be a tricky one. We covered how to gate a route from unauthorized access as well as how to put workflows in place that redirect users toward and away from a protected resource based on their permissions. The assumption thus far has been that you already have authentication configured in your application. If you don’t yet have this configured and you’d like to get up and running fast, I highly recommend working with authentication as a service. There are providers like Netlify’s Identity Widget or Auth0’s lock.

The post Protecting Vue Routes with Navigation Guards appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

Frontend Masters: The New, Complete Intro to React Course… Now with Hooks!

July 11th, 2019 No comments

(This is a sponsored post.)

Much more than an intro, you’ll build a real-world app with the latest features in React including ? hooks, effects, context, and portals.

We also have a complete React learning path for you to explore React even deeper!

Direct Link to ArticlePermalink

The post Frontend Masters: The New, Complete Intro to React Course… Now with Hooks! appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

That Was SmashingConf Toronto 2019

July 11th, 2019 No comments
Slide showing a graphic of the pacman rule

That Was SmashingConf Toronto 2019

That Was SmashingConf Toronto 2019

Rachel Andrew

2019-07-11T15:00:59+02:002019-07-11T15:36:14+00:00

We all enjoyed returning to Toronto for the second Smashing conference, and in this post, I am sharing some of the things that took place as well as the resources that were shared over the course of the two conference and two workshop days. Look out for the videos of all the presentations which will be released very soon.

The team worked hard to create a friendly welcoming space for everyone at the conference. We all know how it can be a little overwhelming to walk into a room of a few hundred strangers, knowing that you would love to make friends and have interesting discussions, but finding it hard to get started.

In order to avoid that, we asked everyone to read and follow our Code Of Conduct, try to create a range of spaces and activities where people can meet like-minded people, and also encourage everyone to follow “The Pac-Man Rule” when standing in a group.

Slide showing a graphic of the pacman rule

Pac-man rule for conversations (Large preview)

I’m not usually a conference Twitter person, but I have to shout-out the fantastic job @smashingconf have done of making this such a warm, welcoming, inclusive place.

Some places talk inclusivity, but here you can feel it, even in the little things. Thanks y’all!#SmashingConf

— Em Domingues (@MiaSparkles) June 26, 2019

“It’s a genuine friendliness that the Smashing team possesses, and that serves as the foundation for an inclusive, approachable event. It turns out that little things like launching balloons to kick off the event and advocating for the Pac-Man Rule go a long way towards making everyone feel welcome.”

Dan Rose

The Presentations

The first thing you think about when attending a conference is to wonder who is speaking, and what they will be talking about. At SmashingConf Toronto, we had an amazing lineup of speakers, with people you might know quite well plus some new faces. As many of our speakers presented without slides, we don’t have a huge number of slide decks to share. However, the list below links to some of the resources our speakers shared. We will also have videos available very soon!

Stage with people throwing candy into the audience

Vitaly and Phil throw candy to audience members (Photo credit: Marc Thiele)

Day One

The Day One Collaborative Doc created by attendees is full of takeaways from day one of the conference.

In 45 mins @sarah_edo:
– creates SSR Vue app
– with multiple routes
– beautifully styled (with flex grid)
– SVG animated
– calls 3 party APIs
– hooks up state management
– pushed to GitHub
– and deployed

Incredibly impressive!@smashingconf #SmashingConf pic.twitter.com/omN3EB3cVT

— Alex Okrushko @ ng-MY (@AlexOkrushko) June 25, 2019

Speaker Name Talk Title
Brad Frost Let’s Build a Design System
Sarah Drasner Let’s Write a Vue App From Scratch
Phil Hawksworth JAMStack: Silly Name. Serious Stuff.
Chris Gannon Make It Move! Create a Web Animation From Scratch
Kristina Podnar Help! I’m Your Ailing Website. The Digital Policy & Standards Rehab Hour
Steven Hoober Authentic Digital Design By The Numbers

Sarah onstage coding

Sarah Drasner writes a Vue app on stage. (Photo credit: Marc Thiele)

Day Two

Check out the Day Two Collaborative Doc for more resources and thoughts from our attendees and speakers.

Our mystery speaker was Seb Lester, and many of you were thrilled to get to hear his talk.

This is the type of inspiration one needs in their life every morning! So humbled and honored to hear @SebLester chat with us about his journey and process ?? Thanks @smashingconf for making this happen! #mysteryspeakersolved #nasa #apple #doritossalsa ? pic.twitter.com/rlCPtlDFvb

— Shane (@ShainaSilver) June 26, 2019

We then enjoyed talks covering a wide range of topics from our day two speakers.

Speaker Name Talk Title
Phil Nash Diving Into Service Workers, Live
Jules Forrest For The Love Of The Grid
Dan Rose Seeing The Pages For The Components
Diana Mounter The Secret Lives of Color Systems
Scott Jehl Move Fast & Don’t Break Things

We found a few blog posts sharing takeaways from these talks. Arshabhi Rai recapped Day 1 and Day 2; and kinopo shared their takeaways in What a lovely SmashingConf.

Workshops

Auditorium style lecture room with people working on laptops

Vitaly shares responsive design knowledge with his workshop group (Photo credit: Marc Thiele)

Our workshops are a big part of each of our Smashing conferences. In Toronto, we had two days of full-day workshops, with some attendees choosing to do a workshop day before and after the conference. Workshops this time round were as follows:

Name Talk Title
Rachel Andrew Next Steps With CSS Layout
Chris Gannon Designing Delightful Animations For The Web
The Deque Team How To Translate Wireframes Into Accessible HTML/CSS
Vitaly Friedman Smart Responsive UX Design Patterns
Scott Jehl Lightning Fast Web Performance
Sarah Drasner Intro To Vue.js
Brad Frost The Design System Process
Vitaly Friedman New Front-end Adventures, 2019 Edition
Cloudinary Hacking Lizard Brain: Improving Visual Experience On The Web

A great day learning about everything #designsystems with the talented Mr. @brad_frost! The cherry on top to a wonderful week at #SmashingConf ?? Can’t wait to share all this knowledge with the rest of the Hulu design family ?????? pic.twitter.com/EaTndwlFxm

— Shane (@ShainaSilver) June 27, 2019

Side Activities

A conference isn’t just about the talks and speakers. We want to make spaces where attendees and speakers can learn from each other and share experiences in a more informal setting. To help with that, we ran various other things over the conference. At lunchtime, we had lunch sessions run by Deque on Day 1, and Netlify on Day 2, attendees could grab a plate of lunch and settle down in a more cozy environment to take part in those sessions.

How to test your website with AxePro and build better accessible websites with @theHarrisius at the @dequesystems lunch session. #SmashingConf pic.twitter.com/7f79jFEqdn

— SmashingConf (@smashingconf) June 25, 2019

We had a great lounge area, with the talks live-streamed for folks who wanted to step out of the movie theater for a while.

People on sofas watching a presentation via a live stream

Our lounge area (Photo credit: Marc Thiele)

Morning Run

If you follow me on Twitter, you’ll know that I’m a keen runner, and it’s always nice to have some company on an early morning run. For a few conferences now, we’ve been organizing pre-conference runs — Toronto was no exception. We had 12 runners on Day 1, and 6 hardy souls on Day 2 joining us despite having attended the party. We only got slightly off-track once, and got a nice view of Toronto to take our photos.

Doing a lovely morning run with#smashingconf Toronto peoples pic.twitter.com/rFmCKRZRxP

— Jarijn (@jarijn) June 25, 2019

Jam Session

First Jam Session talk at @shopify of the evening, @tiffany_tse talking about Building Accessible Experiences, while the volunteers dogsit Walnut. #SmashingConf pic.twitter.com/oCwnURjGHs

— SmashingConf (@smashingconf) June 25, 2019

On the evening before the conference, we had a Jam Session at Shopify hosted by Tiffany Tse (and her lovely assistant Walnut). There was a speaker panel featuring Steven Hoober, Scott Jehl, Kristina Podnar, Brad Frost, Jules Forrest, Phil Hawksworth and myself, plus lightning talks from Tiffany Tse, Kelly Harrop, April Ellsey, Steve Pereira, and Christine Fowler.

Graffiti And Photo Walks

On the day before and last evening of the conference, walks took place to explore graffiti around Toronto and take photos of the city. A great way to meet people and explore the location for those coming from out of town.

People in a street taking photos of graffiti

On the graffiti walk (Photo credit: Scott Whitehead)

Conference Party

There has to be a party, and we always try to do something fun and perhaps a little unusual for our conference parties. This time, we went bowling — courtesy of sponsorship by SpeedCurve.

Focus On The Local Community

Between sessions on stage, we invited organizers of community groups in the Toronto area on stage to share information about their groups. We hope that local attendess found some new meetups to go to. The groups that we featured were:

Name Details
Women Who Code Toronto Twitter: @WomenWhoCode,
Introduced by Stephanie
DevHub Toronto & Vancouver Twitter: @devhubTO
Events, educational programs, collaboration, and co-working
Introduced by Emma
The DevOps Toronto meetup Twitter: @devopsto
Introduced by Steve
Designers & Coffee Twitter: @Doriganic
Meetups, hands-on design challenges and feedback sessions, to casual networking nights.
Introduced by Dorsa
DevTO Twitter: @DevTO
Coding stories, eats and drinks. Join us on the last Monday of every month!
Introduced by Nael.
Serverless Toronto meetup Introduced by Daniel Zivkovic
Toronto Web Performance Group Twitter: @towebperf
Introduced by Henri Helvetica

Want To Join In The Fun?

We packed a lot into those few days! If you were there, we hope that you enjoyed it as much as we did. It was great to meet so many of you.

Audience members throwing balloons

SmashingConf Toronto opened with balloons (Photo credit: Marc Thiele)

If you would like to be part of the SmashingConf fun next year, we already have tickets on sale for SmashingConf San Francisco and you can leave your email to be the first to know when SmashingConf Toronto 2020 goes on sale. The rest of the 2019 events (New York and Freiburg) are already sold out! There are a few workshop-only tickets available for New York 2019, but be quick!

(il)
Categories: Others Tags:

Portfolio WordPress Themes for Creatives: The best in 2019

July 11th, 2019 No comments

When building a website portfolio involves little more than slapping a bunch of pictures on a page, the author can’t expect to get decent results unless the pictures themselves are exceptionally good. Image order, size, organization, and text placement are important, as is the text itself.

Building a decent portfolio takes thought, effort, and the right tool for the job, and there are plenty of themes on the market that will give you a head start toward building a decent portfolio website.

There’s absolutely no need to settle for “decent” though. What you need to create something that’s truly awesome can (1) either involve a tremendous amount of hard work or (2) finding a theme that’s either dedicated to the job or doesn’t have any of the more common limitations or constraints that could prevent you from doing so.

The second approach is far easier, and the results are just as good.

As is the case with the following 8 WordPress themes:

Be Theme

Bigger doesn’t necessarily always mean better, but in the case of premium multipurpose WordPress themes the biggest of them all, Be Theme, puts forth a pretty strong argument for being among the best.

Be Theme is easy to use and it gives web designers all kinds of flexibility thanks to its 40+ core features highlighted by a library of 450+ professionally- crafted, customizable pre-built websites. These pre-built websites cover specialty website types such as one-pagers, blogs, and portfolio websites. 30 industry sectors are covered as well.

A favorite among several pre-built websites that would be a portfolio website builder’s dream is BeAgency. While BeAgency can be used for a variety of business purposes, it’s beautiful Ajax portfolio has made it a favorite of many agencies seeking to showcase their work.

Be Theme is responsive and SEO-friendly and you can have a portfolio website you’ll be proud to own up and running in as little as 4 hours.

Kalium

Minimalist in its design, powerful, and flexible is a good description of Kalium. This highly rated theme features an impressive selection of top-quality demos, layout designs, and theme options, together with a wide array of drag and drop content elements.

Website portfolio creators have a rich selection of design features and options to work with. A great deal of attention is directed toward portfolio design. Options include 2, 3, and 4-column formats with or without titles, and with or without margins, plus several Masonry-style layouts and options.

Browse Kalium’s showcase of user inspired and created websites and you should get a good idea of how this WordPress theme can help you create the “Perfect” portfolio website, or at least one that stands head and shoulders above the competitions’.

Kalium is well supported with documentation even though it’s easy to work with.

Uncode

If building a pixel-perfect portfolio website is your goal, you’ll want a pixel-perfect creative WordPress theme to help you build it; which is precisely what you get with Uncode.

Although Uncode is a multipurpose theme, its real strength lies in helping users create superlative blog and portfolio websites. Its 50,000 sales to date and its standing as an all-time ThemeForest best seller more than suggest Uncode will be an outstanding choice for your upcoming portfolio website project.

Your portfolio will shine brightly and correctly on PC and handheld device screens alike, and the cascade options system guarantees you’ll have total control over your layout design.

If you have any doubts, visit the Uncode site and browse its showcase of user-created websites. Your doubts will vanish – guaranteed.

Hello

Hello is an excellent starter theme; and especially so for Elementor users. It’s worth noting that whenever Elementor tests a new upgrade, a major portion of the testing is done on Hello, the fastest and lightest WordPress theme on the market.

And, when you’re using Hello, you’ll pleasantly discover that there’s nothing to slow you down. Plugins can create problems, but not with this free, open-source theme.

Bridge

Bridge has established itself as the top-selling creative theme on ThemeForest. Its use by 110,000+ happy customers would seem to bear that out, but the real reason may be its 376+ pre-built websites backed up by a huge array of design aids and features and its open-ended customizability.

The Bridge theme is a perfect choice for building an engaging portfolio website, or any other type of business-oriented website.

The Gem

TheGem has acquired a solid reputation as the ultimate website-building tool. Since a significant percentage of its design elements, features, and options are dedicated to creating portfolios, it could be described as the ultimate portfolio website-building tool as well.

TheGem’s package includes 20+ portfolio designs, flexible page layouts, portfolio sliders, masonry, metro, and other portfolio grid options.

Pofo

This multipurpose theme lends itself well to blog, portfolio, and eCommerce website building or, creating a website featuring all three entities. Artists, photographers, creative teams, and agencies have found a great deal to like about this premium theme.

An excellent selection of home and demo pages, a customizing tool, custom shortcodes, and the WPBakery page builder and Revolution Slider plugins are included in the package.

Movedo WP Theme – We DO MOVE Your World

You’ve decided on formats and page layouts for your portfolio website, but you’re not done yet. You still have to import content, an area in which the design process can really slow down.

That won’t be the case with MOVEDO with its clean, modern design and easy to use import features. There are plenty of other exciting features as well that will ensure your portfolio website avoids any look of “sameness” compared to other portfolio websites and will stand out from the rest.

Conclusion

It’s always good to know that you have a few hundred multipurpose themes to choose among that appear to have what you need to create a portfolio website. Searching can take time however, and you might even have to undergo some trial and error activity before find one that really meets your needs.

It’s easier when you have only 8 themes to choose from. Since any one of these 8 will be more than up to the task, you’re faced with a can’t lose situation. Pick what you think will work best for you and you won’t be disappointed.

Read More at Portfolio WordPress Themes for Creatives: The best in 2019

Categories: Designing, Others Tags:

Inspired Design Decisions: Pressing Matters

July 11th, 2019 No comments
Pressing Matters magazine cover

Inspired Design Decisions: Pressing Matters

Inspired Design Decisions: Pressing Matters

Andrew Clarke

2019-07-11T12:30:59+02:002019-07-11T15:36:14+00:00

As I’d always been at the top of my class during high school, I headed to art college full of confidence that one day I’d be an accomplished painter. This over-confidence didn’t last long though, because when I arrived, I found myself surrounded by conceptual artists, filmmakers, painters, performance artists, printmakers, and sculptors, who all seemed much more talented than I was.

This was especially true of my friend Ben, a gifted painter who went to his studio late every night to work on several large canvases. Ben’s paintings had incredible depth because he built up hundreds of subtle layers of paint over several months.

I didn’t have any of Ben’s patience. I needed to see results quickly, so my paintings were anything but deep or subtle. Compared to Ben’s, mine looked like paintings by numbers. It didn’t take me long to realise that painting just wasn’t the right medium for me.

Luckily, the course I’d chosen wasn’t structured, and it didn’t have a formal curriculum. This allowed students free movement between disciplines, so I moved from the painting studio to printmaking and spent the next few years happily making prints.

I found the printmaking process incredibly satisfying. I loved making prints from linocuts, and in much the same way that I’m often entirely absorbed by writing code today, I regularly lost myself carving thousands of tiny marks until the floor was covered in sharp shards of lino.

Printmaking and writing code have plenty in common. Both can quickly transform a blank canvas into finished work, without waiting weeks watching paint dry. Both benefit from regular iteration and testing. In fact, there’s very little difference—except inky hands — between running a test print and refreshing a browser window.

Pressing Matters magazine cover

Pressing Matters magazine. (Large preview)

I haven’t cut lino for thirty years, but I still appreciate the art of printmaking. On a recent trip to London, I popped into Magma and picked up a copy of Pressing Matters. It’s an independently published magazine which “hones in on the people, passion and processes behind the art form of printmaking.” Its publishers hope to inspire newcomers to printmaking, but as I thumbed through its pages, I found there is plenty about the design of Pressing Matters which can inspire web designers too.

Andy Clarke
May 2019

Andy Clarke reading Pressing Matters magazine

Pressing Matters has a distinctive, but simple style. (Large preview)

Pressing Matters: The Passion And Process Behind Printmaking

I may not have made any prints for thirty years, but I’m still fascinated by the process of printmaking as much as I appreciate the end results. Picking up a copy of Pressing Matters (pressingmattersmag.com) on a recent trip to my favourite magazine shop and flicking through its pages, I was immediately transported back to art school where my fingers were almost always covered in cuts from lino cutting tools, and I smelled like ink and turpentine.

Pressing Matters has a distinctive, but simple style. It uses a limited palette and often connects the colour of headlines and other typographic elements with colours found in nearby photographs and prints. The result is a design which feels connected.

Pressing Matters magazine spread

© Pressing Matters Magazine. (Large preview)

Pressing Matters’ Creative Director John Coe uses layout patterns which produce a rhythm which flows throughout the magazine. Differently sized modules speed you past pages packed with prints, then the pace slows to allow you to linger on larger artwork reproductions. These layouts frame the magazine’s content perfectly, and while they’re original, they’re also discreet enough not to detract from the subject matter.

What struck me about Pressing Matters initially was how the magazine includes a variety of layout styles but allowed for various types of content, but still maintains a high degree of consistency throughout.

Pressing Matters magazine spread

© Pressing Matters Magazine. (Large preview)

When I looked closer at how its pages were constructed, I discovered a layered compound grid comprised of two and three columns running through the magazine. Using a compound grid makes perfect sense for a magazine devoted to printmaking, which itself often involves multiple layers of ink to form something deeper and richer than can be achieved with a single layer.


You might think that a complex grid could stifle creativity and would result in designs which look stiff, but in Pressing Matters, the compound grid feels fluid and full of energy.

Pressing Matters magazine spread

© Pressing Matters Magazine. (Large preview)

While many of Pressing Matters’ pages rely on symmetrical two or three- column layouts, it’s when the two and three-column grids are combined that the magazine really comes to life.

Not only is this grid adaptable to accommodate various types of content, the variety of possible layout permutations also allow for changes in visual pacing throughout the magazine.

I’ll teach you all about Karl Gerstner and his mobile grid later in this issue, but just like Gerstner’s iconic work for Capital magazine, Pressing Matters uses large facing images to slow reading down.

Whitespace opens up around running copy to allow for easy reading. Text wraps around the fluid shapes in images. Pages packed with prints are arranged masonry-style. Text split across two columns runs alongside images which are arranged on a three-column grid, and these techniques combine to create an engaging and enjoyable reading experience.

Pressing Matters magazine spread

© Pressing Matters Magazine. (Large preview)

Pressing Matters proves that compound grids can have a profound effect on the experience of reading a magazine. The same layout principles which make Pressing Matters so appealing can also be applied to products and websites, despite them being very different media.

These principles are not new and they have guided art direction and design for decades. They matter just as much on the web as they do in the pages of a glossy magazine. Whether your readers are offline or on, grids are fundamental to their understanding of your stories, and you can use them for more than aligning content.

Next time you’re passing your nearest magazine store, pop in and pick up a copy of Pressing Matters. You won’t get inky fingers, but you will get your hands on inspiration for your next project.

Making Sense Of Compound Grids

Grids have a long and varied history in design, from the earliest books, through movements like constructivism and the International Typographic Style, right up to the present-day popularity of grids in frameworks like Bootstrap and material design.

A generation of product and website designers have grown up with grids from Bootstrap, the 960 Grid System before it, and even the Blueprint framework before that. In frameworks like these — and in plenty of work built on them — grids are used mostly for aligning content to columns.

An unimaginative design based on Bootstrap

I guess you’ve seen those “Which one of these two layouts are you designing today?” tweets, lamenting the current state of design on the web. Does Bootstrap create unimaginative designs? No, people do. (Large preview)

When you use grids imaginatively, they do much, much more than align content. A grid brings cohesion to a composition. It helps people understand the stories you’re telling by suggesting hierarchies. Grids inform people what to read first, then next, and how much attention to give it.

They define the position of valuable information or a call to action. A thoughtfully chosen grid leads to a wealth of possibilities and any number of exciting designs.

The use of grids for web design has improved consistency, legibility, and usability, but using grids included with frameworks including Bootstrap has also led to a generation of homogenous layouts and uninspiring designs.

When I teach design classes, I often ask my students to draw what a grid means to them. Nine out of ten sketches twelve symmetrical columns. Symmetrical multi-column grids have become a staple mainly because twelve columns can be easily divided into halves, thirds, quarters, and eighths. Because they’re so easy to learn, grids like the ones included with Bootstrap have become a staple.

In fact, they’re now so ubiquitous that starting a new design without sketching three or four columns can be incredibly difficult as it involves changing your mental model and the way you think about grids. It’s important to know that symmetrical column-based grids are only one of several options. Compound grids are one of those options but despite the enormous flexibility they offer — something incredibly important for today’s multi-device designs — they’re rarely spoken of with product and website design.

Way back in July 2009, Diogo Terror wrote “Lessons From Swiss Style Graphic Design” for Smashing Magazine which mentions Karl Gerstner and includes many fabulous examples of Swiss Style Graphic Design.

Capital Magazine

In the 1940s and ’50s, designers including Josef Müller-Brockmann made using grids to create consistent and creative layouts one of the defining aspects in what became known as the International Typographic Style or Swiss Design.

Capital Magazine covers

Capital Magazine 1962. (Large preview)

Swiss artist and typographer Karl Gerstner was one of the first designers to exploit the creative flexibility of using grids, and it’s the compound grid which Gerstner designed in 1962 for Capital magazine that has become one of his best-known creations.

Capital Magazine spread

Capital Magazine 1962. (Large preview)

The concept behind Capital was to provide “a human view of economics, an economic view of humanity” and so its content and Gerstner’s design had to be accessible, clear, and engaging. Given the potential variety and unpredictability of Capital’s content, Gerstner also needed a grid which would help him to lay out any content consistently and without restrictions.

Karl Gerstner's mobile grid

Karl Gerstner’s mobile grid; a compound grid he designed for Capital magazine in 1962. Confused? So was I. (Large preview)

Gerstner designed what he called a “mobile grid,” although it’s not the type of mobile you and I are used to. This grid is the one most likely to be found when searching for compound grids, but it’s also the one most likely to baffle on first look.

The compound grid Gerstner designed for Capital looks incredibly complex when seen as it does above, so to explain how he created it — and how you can use it — I’m going to break Gerstner’s grid down into its constituent parts.

Example based on Karl Gerstner's mobile grid

(Large preview)

There are 58 columns and rows in Gerstner’s mobile grid, but he started with just one. Content in this single module fills the full width of the page.

Example based on Karl Gerstner's mobile grid

(Large preview)

Then Gerstner divided his single module into two columns and rows. Using two columns in this way results in a reassuring symmetrical design.

Example based on Karl Gerstner's mobile grid

(Large preview)

That large module can also be sub-divided into three columns and rows. Have you noticed how the gutters between the divisions in Gerstner’s grid are always the same size?

Example based on Karl Gerstner's mobile grid

(Large preview)

By splitting the large module into four, these columns of content feel formal, and the overall impression is that this design is a serious one.

Example based on Karl Gerstner's mobile grid

(Large preview)

When the full-page module is divided into five columns and separated into two spacial zones by a flowline, this design feels more technical. With Gerstner’s mobile grid, you can use each set of columns and rows separately. You can also turn them into a compound grid by either overlaying or stacking them.

Example based on Karl Gerstner's mobile grid

(Large preview)

Dividing the page into six columns and six rows of modules, enables an incredible variety of layout options. The flexibility of a compound grid comes from the interplay of two or more grids and how that affects the position and size of elements. This often makes a compound layout far more interesting than one grid in isolation.

Say Hello To Compound Grids

A compound grid is two or more grids of any type — column, modular, symmetrical, and asymmetrical — on one page. They can occupy separate areas or overlap.

If you’re still unsure about using modular grids as Karl Gerstner did, you can start by making a compound by overlapping two column grids; one with two columns, the other with three.

It’s the interplay of the two grids which makes this compound layout more interesting than a single grid. The flexibility of a compound grid becomes apparent when I make the grid lines visible.

4+6 compound grid

4+6 compound grid. (Large preview)

If you’re watching closely, you should notice how compound grids will take your design in a different direction than twelve symmetrical columns.

By laying a three-column grid over one with two columns, you create four columns where the outer two are twice the width of those on the inside. I like to think of this as a rhythmic pattern; 2|1|1|2.

Rhythmic patterns

By using any number of equally-sized columns or rows, your layouts form a consistent pattern and an even rhythm which does not change across the page. Think of each column as a beat and tap twelve of them on your desk. It doesn’t sound very inspiring, does it?

Example based on 2+3 compound grid

2+3 compound grid. (Large preview)

Compare that with the rhythm from a 2|1|1|2 pattern and you should understand how using compound grids can change both your mental model and the layouts you create. Using this 2|1|1|2 pattern for my first layout. I place the main body of content — including the headline, standfirst paragraph, and running text, into the first column in my two-column grid. I use a single column from my three-column grid to place supporting information about the Jaguar E-Type series, without question the most beautiful car ever made.

A blueprint image of that astounding automobile crosses the remaining space, creating a visual connection between the two areas of content.

Example based on 2+3 compound grid

2+3 compound grid. (Large preview)

For an altogether different design (above) — one which uses both layout and italic type to suggest the movement and speed of the E-Type — I stagger my standfirst paragraph and running text using grid lines from both the two-column and three-column grids.

Changing the compound formation to combine three-column and four-column grids (3+4) creates an altogether different rhythmic pattern of 3|1|2|2|1|3.

Example based on 3+4 compound grid

3+4 compound grid. (Large preview)

With a compound of two grids (above,) you might use widths from one or the other. Or you could combine widths from both to form columns which don’t conform to either. You can use these new widths to inform the sizes of images and text. While the standfirst paragraph starts on the three-column grid, the running text which follows begins on the four-column grid.

Example based on 3+4 compound grid

3+4 compound grid. (Large preview)

That same combination of grids (above) can make a very different impression by combining columns widths from both grids to inform the width of my column of running text. This column matches the width of my large vertical image to balance both sides of this design.

Example based on 4+5 compound grid

4+5 compound grid. (Large preview)

This time, I set the main block of running text across two columns and derived their widths by combining column units of 4 and 3.

As for those very narrow columns, whose width is only 1 unit, they’re perfect for informing the size of typographic elements including this bold drop cap.

Example based on 4+5 compound grid

4+5 compound grid. (Large preview)

Overlaying four columns with five (above) leads to a highly unusual rhythmic pattern of 6|1|4|3|3|4|1|6.

For this alternative design, I use that same pattern in a different way by running my text over three columns. I use the widths from the five-column grid to inform the width of my supporting information and the image of this E-Type’s curvy rear end.

Example based on 4+6 compound grid

4+6 compound grid. (Large preview)

In this version of the design (above,) a large image shows off the iconic shape of E-Type’s body and fills almost all the width of my page.

A solid block of running text sits directly under the Jaguar’s wheels and derives its width from both the four-column and six-column grids.

My next design (below) literally places the E-Type at the centre of the action and text wraps around it on both sides. Remember, it’s not necessary to fill every grid module with content. By limiting the width of my standfirst paragraph and leaving space elsewhere in the layout empty, I create a dynamic diagonal which adds energy and movement to this design.

Example based on 4+6 compound grid

4+6 compound grid. (Large preview)

Of all the possible grid combinations, the combination of four and six-column grids is the one I use most often in my work. It’s flexible enough to handle many different types of content and makes an incredible variety of compositions possible.

Example based on 4+6 compound grid

Left: The pull quote feels disconnected from the story. Right: The edge of this quote aligns to lines in the six-column grid. (Large preview)

While the overall feeling from this final design feels balanced — largely due to a centred block of running text, the pull quote feels disconnected from the story as it occupies only the width from one column in the six-column grid. I can improve this design by aligning the edge of this quote to lines in the six-column grid, so it feels part of the story.

… (Box)

Setting the pace

Six differently paced layout modules

Magazine designs often use differently sized areas to vary the pace. (Large preview)

Rhythm is an essential factor, not just within the page, but also across the pages of an entire product or website. Compound grids are not only flexible enough to accommodate a wide variety of content types, but they also allow you to vary this visual pacing. Magazine designs often use differently sized areas to vary this pace. Repeating smaller modules speeds up the movement, while larger ones slow it down. People naturally spend longer looking at larger spacial zones, and we can use the same technique at particular moments in someone’s journey to slow them down and make them take notice.

Stacking Grids

You can combine column grids with hierarchical and even modular grids. When pages contain two separate subjects or different types of content, stacking grids can be a great way to make that difference more obvious.

At the top of this next page is a story about the Jaguar E-Type. Underneath there’s an altogether different story about the famous Le Mans 24 hour race. To leave someone in little doubt these stories are separate, use a different grid for each. I base the top story on a four-column grid, the bottom on a six.

4+6 column grids, stacked

4+6 column grids, stacked. (Large preview)

Above, I make the difference between these two stories obvious by placing the second against a grey background. I also use paragraph spacing instead of first-line indentations.

4 columns and a modular grid, stacked

4 columns and a modular grid, stacked. (Large preview)

I make the difference between these two stories obvious by placing the first against a grey background. In the second story I also use bolder type and paragraph spacing instead of indenting the first line.

Karl Gerstner

Karl Gerstner (1930–2017) was a Swiss artist and one of the most influential typographers. He began work when he was only 19, studied under Fritz Büler, and then went on to co-found GGK, one of the most successful Swiss creative agencies of the ’70s.

Books about Gerstner’s work have been out of print for decades, and copies often run to hundreds of Pounds so I wouldn’t be surprised if you haven’t seen his designs first-hand. But, you’ll have seen plenty of other peoples’ work which was inspired by it.

Gerstner made unjustified, ragged-right text famous as up until then, columns of type were usually justified. He also developed the idea of using typefaces and typographic design to create connections between words on a page and their meaning. While this concept might seem obvious to us today, this idea seemed revolutionary in the 1960s.

Karl Gerstner’s probably best known for his iconic work on the quarterly Capital Magazine, starting in 1962. In fact, it’s through my research into Capital, and the compound grid Gerstner created for it that I first became aware of him and his work.

dvertisements for Sinar, by Karl Gerstner

Advertisements for Sinar, by Karl Gerstner. (Large preview)

By a strange coincidence, I recently discovered that Gerstner’s agency also created advertisements for Sinar, the Swiss large format camera maker I worked with during the early 1990s. In these advertisements, the shape of the word “Sinar” resembles the results of using the swing and tilt movements on a large format camera.

Developing Compound Grids

When you first see Karl Gerstner’s mobile grid, you might think compound grids are challenging to implement. Whereas developing compound grid would’ve been a complicated process using traditional methods, today’s layout tools, including CSS Grid, now make it simple.

Designing layouts using compound grids requires a shift in your mental model, and developing them is no different. However, CSS Grid line numbers combined with new flexible length units (fr) will make that shift smoother.

Following the order I used earlier, I’ll start with a compound of two-column and three-column grids (2+3) which has a rhythmic pattern of 2|1|1|2.

Example design

(Large preview)

Translating that pattern into values for grid-template-columns couldn’t be easier, but first I need to apply CSS Grid to the body element of my page, then set a gap between columns which is relative to the width of my viewport. As I don’t want these styles applied at smaller screen sizes, I enclose them within a media query:

@media screen and (min-width : 48em) { 
body {
display: grid;
grid-column-gap: 2vw; }
}

Now, I use fr units to specify the pattern for my compound grid. The result is four columns where the width of the outer columns occupy twice the space of the inner two:

body {
grid-template-columns: 2fr 1fr 1fr 2fr; }

Example design

(Large preview)

A combination of three-column and four-column grids (3+4) will result in six columns and a rhythmic pattern of 3|1|2|2|1|3. My flexible length units will be:

body {
grid-template-columns: 3fr 1fr 2fr 2fr 1fr 3fr; }

Example design

(Large preview)

Finally, combining four-column and six-column grids (4+6) creates eight columns, two of them much narrower than the rest. To create a rhythmic pattern of 2|1|1|2|2|1|1|2 my flexible length units will be:

body {
grid-template-columns: 2fr 1fr 1fr 2fr 2fr 1fr 1fr 2fr; }

With these Grid properties applied, all direct descendants of a grid-container become grid-items, which I can place using areas, line numbers, or names.

The design I’m developing requires only the most basic structural elements to implement it, and my markup looks like this:

<body>
<h1>….</h1> 
<p>…</p>
<img> 
<main>…</main> 
<aside>…</aside>
</body>

I use the eight columns from the 4+6 compound grid above. Here are the styles to implement that:

@media screen and (min-width : 48em) {
body {
display: grid;
grid-template-columns: 2fr 1fr 1fr 2fr 2fr 1fr 1fr 2fr; 
grid-column-gap: 2vw;
grid-row-gap: 2vh; align-content: start; } 
}

The elements above are direct descendants of the body. I place them on the grid by using line numbers. First the headline, the paragraph which immediately follows it, and finally my main element. These elements all start on grid line 4 and end on line 8:

h1, h1 + p, main { 
grid-column: 4 / 8; }

The blueprint image of my beautiful Jaguar E-Type should be wider than other elements in this design, so I place it using different line numbers. It starts at line 2 and extends the full width of my page:

img {
grid-column: 2 / -1; }

Now, I place the aside element which contains my supporting information about the three series of E-Type. As I want this element to align to the bottom of my layout, I add the align-self property with a value of end:

aside { 
grid-column: 1 / 3; 
align-self: end; }

Final example design

(Large preview)

Finally, as I want both main and aside elements to appear next to each other on the same row, I give them identical row number values:

main,
aside { grid-row: 4; }

All that’s left is for me to add some small typographic touches to improve my design. I don’t need a presentational class attribute value to style the paragraph, which immediately follows my headline. I can use an adjacent sibling selector instead:

h1 + p { 
font-weight: 700; }

To style the first line of the first paragraph in my main element, I use a combination of descendant, pseudo-element, and pseudo-class selectors:

main p:first-of-type::first-line { 
font-weight: 700; }

Finally, to indent every following paragraph which is does not immediately follow my headline, I use both a :not() negation pseudo-class selector and two adjacent sibling selectors:

p:not(h1 + p) + p { 
text-indent: 2ch; }

NB: Smashing members have access to a beautifully designed PDF of Andy’s Inspired Design Decisions magazine and full code examples from this article.

(ra, yk, il)
Categories: Others Tags:

Design Trends That Have Been Taking Over This Year

July 11th, 2019 No comments

So you thought you could make a functional website and leave it at that.

Don’t worry, it’s a mistake that happens often, mostly because consumers frequently emphasize the importance of functionality when it comes to (web) design. However, they forget to mention that there’s nothing that catches their eye more than an interesting design.

To put it simply, functionality is the bare-boned proposal, but a fancy design is what’s going to seal the deal.

Since 2018 was a whirlwind in many fields (especially in AR/AI development), web design found itself at a crossroads. We’ve never had as many features that can be included to enhance customer satisfaction, nor have we ever had so many opposing thoughts when it comes to web design.

We have been seeing and expecting great things from web design this year, and these web design trends we’re witnessing may just change the way we drive conversion.

#1 – The Rise of Interactive Visuals in Web Design

While simple design works okay, you wanna channel your inner kangaroo when it comes to web design.

How?

By jumping through hoops to keep your customers entertained.

2018 saw a rise of web designers customizing their approach to customers who want to be entertained. After all, you don’t have to be an entertainment company to keep your website visitors engaged.

The rise of interactive visuals in web design and different types of content (more than the traditional text & image formula) will become even more prominent in 2019. The old Romans said panem et circenses (food and games), so let’s do as Romans do. If you’ve got a great offer, give the people fun, as well.

A good example of fully using interactive visuals is The Disruption Company.

[GIF source]

The Disruption Company use animations and videos to keep their customers engaged. Then they absolutely raise the bar for the rest of us commoners by switching up the content visitors see every time they visit their site.

This provides the website visitors with a unique and interesting experience and raises their conversion rate automatically.

Another great example of interactive content that website visitors enjoy is APPS’ site. APPS is a company for apple cider production, and they show how much effort they put into their main product by having a cider-making action simulator on their front page.

[image source]

You can go through their entire cider-making process as though you were a part of it and even though most of us couldn’t make a cider to save our lives, APPS makes it fun and interesting from the very start.

2019 is going to be the year of consumer journey, so it’s important to integrate features that enrich the end consumer’s journey. If APPS gets anything, they get the need for a vivid experience.

Consumers today want interaction, not just plain text and images. They’ll lose their appeal in 2019, especially since many companies are already catching on to the interactive trend.

And speaking of interaction, another big trend to expect in 2019 is…

#2- Gamification in Web Design

Gamification has been a big deal in design and marketing this past year, but only as a keyword. If you Google gamification, you’ll see a lot of articles but very little substance – especially on how you can use it to boost your marketing efforts.

The trick to gamification is helping customers fully immerse themselves into the process of consuming the product. Good marketers and designers know that this immersion starts with the website.

Gamification can be used in different ways, such as:

  • Visitors and consumers competing with each other (with the goal of winning a prize)
  • Comparing results
  • Interactivity
  • Actual games

Obviously, everything about gamification is pretty fun and serves to engage visitors, but there’s nothing like real mini-games.

Now, you can integrate them into the site as a separate product, but you can also create entire websites with gamification in mind.

A great example of gamification is Polish Christmas Guide.

[image source]

Polish Christmas Guide is a website that helps visitors learn more about Christmas traditions in Poland, and even though it’s not a typical example of a for-profit website design, there’s a lot to learn from it.

Polish Christmas Guide uses animated SVG graphics and scroll-triggered CSS animations with custom SFX effects. The main mission behind the project is to motivate visitors to donate to Nobody’s Children Foundation, which helps abused children.

This design is driven by visuals, and visitors play a game where they ride around in Santa’s sleigh and collect presents while also learning about Polish traditions.

It’s great content, as far as content marketing goes, as it ultimately serves its main two purposes: consumer education, and emotional conversion.

Again, gamification really strives to create unique consumer experiences that can be considered separate products, but in coexistence with the actual product create an entire story.

For example, Habitica allows you to gamify your life and motivate yourself to achieve your goals.

[IMAGE SOURCE]

It’s essentially a habit-tracker that uses the mechanics of role-playing games such as achieving points, earning rewards (snazzier armor, weapons, pets, etc.), and battling monsters with other friends.

While the web design itself isn’t as interactive, gamification starts from the get-go. The website is designed with the end experience in mind, allowing consumers to immerse themselves into the experience even before they’ve downloaded the apps.

Gamification is incredibly effective, especially because 70% of business transformation efforts fail due to lack of engagement. Gamification successfully combats that and increases both engagement and conversion.

Plus, it’s really darn fun. And we all need a bit more fun in 2019.

#3 – Mobile Design Giving as Much as Web

In 2015, we saw that mobile searches increased in comparison to web searches, and that trend kept rising in the last few years.

People use their phones more than they use desktop, and Google is the alpha and omega of resources, so it doesn’t surprise anyone to find that Google’s algorithms are also prioritizing mobile over web.

When it comes to web design and marketing, we’ve had to adjust our efforts to accommodate the rise of mobile. A lot of constraints come with that new direction of design, but we shouldn’t compromise on quality.

Consumers still want what consumers want, and an important trend in 2019 is going to be adjusting mobile to provide as much as web design does. This means that mobile shouldn’t only be an addition to standard design of your website, but a design in its own right.

A great example of mobile design that will gain even more significance in 2019 is the website of Adrian Zumbrunnen, a UX designer and writer.

[GIF source: https://blog.hubspot.com/hs-fs/hubfs/adrian-zumbrunnen.gif?width=350&name=adrian-zumbrunnen.gif ]

Zumbrunnen’s mobile website experience is conversation-driven, and the customers can “have a conversation” with him, telling him more about their needs.

Again, interactivity is going to be huge in 2019 so if you don’t want to miss out, you can learn from Zumbrunnen.

Mobile isn’t the perfect platform for a lot of animations and videos, but great designers and marketers know that they don’t have to make compromises when it comes to unique user experience. It’s the main way of converting prospects to customers, so when thinking about mobile design, think interesting.

Then adapt to platform.

Lean Labs does the same, as they understand that mobile design is different from website design – but equally as important. They’re a marketing agency, and have a “10x formula.”

[IMAGE source: https://blog.hubspot.com/hs-fs/hubfs/lean-labs-mobile-website-2.png?width=350&name=lean-labs-mobile-website-2.png ]

Customers can understand their 10x formula by scrolling through the site, and everything is adapted to the sleekness and simplicity of the mobile experience.

Lean Labs also show their expertise in the field of design and marketing by using appropriate typefaces, color schemes and visuals.

When we take a look at Zumbrunnen and Lean Labs’ websites and compare them to other mobile sites which weren’t created with mobile-first in mind, a few things become immediately clear:

  • Mobile isn’t the second-place prize.
  • Interactivity is just as important with mobile (and it’s achievable).
  • Content matters, but so do the visuals.

We’re going to see a lot more mobile-first websites in 2019 so forget about scaling your usual website CTA buttons, and focus on creating a different, unique, but on-brand experience.

#4 – A Different Kind of Design Minimalism

Back in the day (by which we mean 2016, as that seems like it was twenty centuries ago), minimalism meant black & white color schemes, and not much to see.

Fortunately, we’ve grown up and realized that minimalism in the traditional sense won’t give the consumers what they need. So today, we’re seeing a paradigm shift towards content-first meaningful experiences that are focused on one goal (e.g. everything driving the consumer to sign up, as opposed to stuffing them with information and providing very little direction).

In order for the design to function properly, this design minimalism should be empowered by visual choices. With minimalism, colors are used to stimulate the purchasing decisions depending on the industries, and each design choice may be small, but it says a lot about the designers and marketers’ decisions.

Evoulve starts off mesmerizingly and cosmically. They’re a digital innovation company, and it becomes clear that they’re seamlessly passing through previously untouched frontiers from their website design.

[IMAGE SOURCE: http://evoulve.com/]

Their brand message is conveyed with their website’s minimalist design. From the very start, visitors are motivated towards bigger and better things with the color scheme and the planet animation.

Evoulve only has a simple left side bar where visitors can navigate to find more information on the company. When pressed, there’s a translucent layover over the main animation, and a navigator with information on the company and technologies, and getting in touch with them.

This example is a great example to show how design and field of work can go hand in hand, especially when the principles of minimalism are utilized for that purpose.

With minimalism, each design choice goes on to say a lot about the purpose of the company. A great example of that is a product designer’s, Mikiya Kobayashi’s site.

[IMAGE SOURCE: http://www.mikiyakobayashi.com/ ]

Kobayashi’s site’s main focus is on the products that he creates. He only briefly mentions his name and invites website visitors to scroll and focus on how he creates the products.

Some designers may even say that the placement of images in regard to his brand name is unfortunate. However, it’s a very bold and minimalist design choice that conveys the “product first” message from the very start.

In 2019, minimalism is going to take on a different meaning – one that will be more meaningful for the end consumers.

And designers who understand that minimalism is essentially a focus towards the central purchasing decision will be the ones making the most out of web design in 2019.

#5 – Chatbots and Machine Learning Integrated with Web Design

Bots and machine learning have changed the way we communicate, especially in sales.

Instead of manually fielding emails and customer questions, companies are increasingly using chatbots and machine learning to reduce the workload – and provide customers with much faster responses.

It’s only natural that changed design, as well. Currently, we’re seeing a lot of website integrations (usually in the form of ZenDesk pop-up on the right side) that are only a passing solutions.

Marketers and designers who want to fully utilize the possibilities of chatbots and machine learning will have to adapt their design to new technology in 2019, and make it a crucial part of website user experience.

Chatbots and machine learning are another feature of the push towards a more all-encompassing user experience. Hipmunk, a platform that helps people search for flights, hotels and rental cars, understand that, and they’ve created Slack, Facebook and Skype integrations to help users communicate with them when they need them.

[IMAGE SOURCE: https://www.impactbnd.com/hs-fs/hubfs/Hipmunk-Messenger-Chatbot-example.jpg?width=600&name=Hipmunk-Messenger-Chatbot-example.jpg ]

Again, the convenience of web design is again exemplified by features that a company offers their customers. The goal is providing a complete service.

Landbot.io, even though they’re a chatbot provider, has a great website that shows exactly how their chatbots work.

[IMAGE SOURCE: https://landbot.io/ ]

If you remember the conversational website that was a great example of interactivity, then you’ll see how much Landbot.io helps with that. Customers can have full-blown conversations (that range from product offers to customer service) with websites.

This not only helps provide excellent customer service but also cuts overhead costs for many companies, so chatbot integration is going to become a major design player in 2019.

Let’s just hope Skynet doesn’t take over the world.

#6 – Visually Intriguing Design Choices

Websites are no longer just resources – they’re becoming a major conversation and conversion drivers. Engagement matters, and it starts with them.

That’s why visually intriguing design choices will become a big trend in the way we design websites in 2019. It’s important to capture attention and provoke engagement, and what better way to do it than by making bold choices that stand out from the majority?

When we talk about visual design choices, we can talk about animations, cinemagraphs, and we can also talk about design lines and points of focus.

Traditionally, we’ve used straight and horizontal lines to separate different content. However, using diagonal line design has been proven as more effective.

An example of using diagonal line web design is Startup Giraffe. It’s immediately clear that this is a company that’s trying to present itself as fun and comfortable, but that brand image is further empowered by their design choices.

[IMAGE SOURCE: https://www.bluecompass.com/filesimages/News%20and%20Blog/Design/startup-giraffe-pin.jpg ]

These angled lines not only come off as interesting to website visitors, but also motivate visitors to keep scrolling and find out more.

Startup Giraffe’s website is a great example of a website that uses visually intriguing design to motivate conversions and education, but they can also be used to create a more dynamic user experience.

Dunlop Tires use angled lines for the purpose of creating a dynamic feeling, which is on par with their industry (automotive).

[IMAGE SOURCE: https://www.bluecompass.com/filesimages/News%20and%20Blog/Design/dunlop-tires.jpg ]

Generally, there are a lot of ways that diagonal lines can be used, but the main appeal of them (for companies and customers alike) is that they’re visually interesting and stand out from the crowd.

A lot of designers have already started using these principles in the way they shape user experience for their clients, and as a marketing tool, they’re incredibly powerful. That’s why we’ll be seeing a lot more of them in 2019.

Another way to choose something more interesting for your web design in 2019 is to use bright colors.

Gradients and grayscale have been very popular in the last few years, but we’re seeing a push towards bright colors, which will only become more prominent in 2019.

For example, MamboMambo’s website is very striking. From the collage elements to bright colors which immediately stand out, they’re presenting their brand identity from the very start.

[IMAGE SOURCE: http://mambomambo.ca/ ]

Again, their website is very minimalist, but their color palette shows everything a visitor should know in order to become a customer as soon as possible.

Mambomambo also utilize scroll features and micro-animations to add to the visual appeal and show how dynamic their creative work is.

There are a lot of ways to design with curiosity in mind, and the best thing is that in 2019, that’s exactly what customers will need.

#7 – Different Scrolling in Web Design

When we think about traditional scrolling, we think from top to bottom. However, that’s become the standard, and if we’ve learned anything that we want to take into 2019, it’s that the best way to approach web design is with diversity in mind.

An increasing number of web designers are now experimenting with different scrolling. This is great from the customer’s standpoint, as it automatically creates an experience (which increases engagement and conversion rates).

There’s always competition, and creating a unique experience for the customer comes off as a promise that the purchasing experience will be more unique, as well.

A great example of different scrolling in web design which will get more popular in 2019 is Aces, a baseball recruiting agency.

[ANIMATION SOURCE: https://www.bluecompass.com/filesimages/News%20and%20Blog/Design/aces-v2.gif ]

The first thing Aces do right is starting the page loading by showing how many baseball careers they’ve secured. And when customers reach the loaded page, they’re invited to scroll.

Scrolling is diagonal, and each movement opens up a new player whose career Aces managed. Additionally, Aces also provide statistical information about the work they do, successfully showing customers from the very start what their mission is.

They negotiate deals by showing results, not by talking, and it’s something that’s positioned them very highly in the world of baseball. However, it’s important that their web design follows suit, as well.

Long scrolling is also another type of different scrolling that can help brands tell their story more seamlessly, as opposed to stuffing website visitors with content that they can’t process.

Le Mugs is a restaurant that successfully uses long scrolling and different visual perspectives to create a unique user experience.

[IMAGE SOURCE: http://le-mugs.com/ ]

Website visitors are immediately invited (and pulled in) to explore their hedonistic offer, and immerse themselves into the gourmet experience.

They use bold and striking visuals and unique scrolling mechanisms to keep the attention on their site and their offer.

Long scrolling is also great for websites where it’s important for visitors to explore, and reach the purchasing decision through that.

Parallax scrolling is typical for the entertainment industry, but it can also be used to great success in different professional areas if done right. When we talk about parallax scrolling, we presume that there are two images which move at different paces.

This makes it a perfect option for storytelling and creating more dynamic in a website.

A great example of parallax scrolling is the website for The Walking Dead. A TV show about zombies, their website sticks to comic format.

[IMAGE SOURCE: https://www.cabletv.com/the-walking-dead ]

When scrolling, we follow the character in the yellow shirt through different scenes. Some of them contain additional animations but even if they didn’t, it would still be an interesting way to scroll. Who’d say no to the show after that?

Additionally, keep scroll-triggered animations in mind. When visitors scroll, this triggers different engagement-provoking animations and interactions. Again, the focus in 2019 is definitely going to be on creating an all-encompassing user experience, and scroll-triggered animations are a very interesting way to keep the visitors on your site and convert them to customers.

[ANIMATION SOURCE: https://www.bluecompass.com/filesimages/News%20and%20Blog/Design/igor.gif ]

A great example of this is Igor, a website for an IoT company. Visitors are invited to scroll through to see the entire offer, and can see a variety of resources which they may find useful.

When it comes to different scrolling types which are a big trend for 2019, keep in mind that loading times are incredibly important.

If you don’t want to compromise on the experience just so your website is faster, try to create an interesting loading page that will stop the visitors from navigating away.

#8 – Big and Bold

If you’ve got it, flaunt it. That’s going to be website design in a nutshell in the upcoming year, so make sure you’re not falling behind.

Many web designers use a combination of big statements (literally, the font size is going to be huge) and simplified details to create a dynamic user experience. Think of billboards, only on the screens of laptops or mobile phones.

This is another play on interesting visuals and bold statements which can create a very powerful effect for customers.

A great example of big and bold as a mission of web design in 2019 is Austin Eastciders. A cider-production company, they use their slogan “Cider Y’All” as an inspiration for their design.

Austin Eastciders use big and bold titles with smaller copy, and let the animations and video direct the customers towards purchases.

The videos show different occasions where people can enjoy their ciders, and that’s another example of storytelling done right. People don’t buy because products are great – they buy because they want the lifestyle.

Austin Eastciders win in this category because they know that the appeal of the lifestyle in 2019 starts with web design.

#9 – Making Footers Interesting

The trend of interactivity and experience improvement in 2019 also means that each part of the website should be fully used to create a great experience for the end user and consumer.

This means that we can no longer be content with WordPress themes and a footer that contains basic information, and call it a day.

Instead, 2019 is going to make us go all kangaroo again and start jumping around in an effort to provide more to customers, instead of breaking the 4th wall with an uninspiring footer.

After all, details matter. And they’ll matter even more in 2019.

Consider 360gardalife’s website. A website for sports activities on Lake Garda in Italy, every design choice on the site caters towards the customer experience. They show details about diverse offers, offers instructions on how to book, and everything else athletic people visiting Lake Garda may enjoy.

However, the real magic starts when you reach their footer and realize that it’s not just basic information.

[IMAGE SOURCE: https://360gardalife.com/en ]

Instead of just providing visitors with basic contact information, Lake Garda designers also use the footer to display: weather reports, webcams, and icons reminding people of their diverse offer.

Additionally, visitors can also select sports they’re interested in, add their email address, and receive a personalized offer with activities that suit their preferences.

Naturally, this creates a more inclusive feeling to the entire web design (which will be an absolute necessity in 2019), and if visitors weren’t convinced, they will be upon seeing the footer.

#10 – 3D Web design

People want to be entertained, and using the principles of three-dimensionality can be a great way to provide more flavor.

There are typically two ways of using 3D web design, and that’s either through 3D elements (creating depth in the visuals) or by using animations.

A great example of 3D web design which uses animations is Future Living. Designers behind the site were inspired by the topic and created a variety of animations and micro-interactions to improve user experience.

[IMAGE SOURCE: http://future-living.tv/en/home]

They reimagine the way we live, creating a future with shell cities that are capable of protecting themselves and to drive the point home, they’ve created incredible animations that’ll make the most of us go full-blown eco.

Again, web design in 2019 will be centered on storytelling and immersing the visitors into a unique experience. Future Living realize that, and they’ve created a beautiful website with illustrations (which evoke positive feelings) and simple explanations.

When it comes to using the principles of three-dimensionality, Future Living also create depth with shadows and different colors, not only animations.

However, the best example of using colors to create the 3D effect is Mortgage Hub. While not heavy on animations, the mortgage providers create depth by mixing different color tones and visuals.

[IMAGE SOURCE: https://www.bluecompass.com/filesimages/News%20and%20Blog/Design/mortgage-hub.png ]

Since they also consider themselves to be a friendlier way to mortgage, they’ve selected designs that help the visitors feel as though they’re friends with them.

However, the principles of three-dimensionality also go a long way towards creating a dynamic (as opposed to flat) feeling of design, and add to the user experience.

2019 Is Going to Change the Way We Design for Web

But it won’t be bad.

In fact, the trends we’re currently seeing, and the ones we’ll see in 2019, will help all of us become more creative.

Of course, innovative design raises the bar, but companies which understand their consumers’ journeys (and are willing to step forward and approach them in the right way) will see an increase in revenue.

Why?

Because of creativity.

After all, we have a lot of technology at our disposal, and customers know it. It’s time our design started showing just how far we’ve come.

Read More at Design Trends That Have Been Taking Over This Year

Categories: Designing, Others Tags:

The Fight Against Layout Jank

July 10th, 2019 No comments

A web page isn’t locked in stone just because it has rendered visually. Media assets, like images, can come in and cause the layout to shift based on their size, which typically isn’t known in fluid layouts until they do render. Or fonts can load and reflow layout. Or XHRs can bring in more content to be placed onto the page. We’re always doing what we can to prevent the layout from shifting around — that’s what I mean by layout jank. It’s awkward and nobody likes it. At best, it causes you to lose your place while reading; at worst, it can mean clicking on something you really didn’t mean to.

While I was trying to wrap my head around the new Layout Instability API and chatting it out with friends, Eric Portis said something characteristically smart. Basically, layout jank is a problem and it’s being fought on multiple fronts:

The post The Fight Against Layout Jank appeared first on CSS-Tricks.

Categories: Designing, Others Tags: