5 Stages of Building a Smart Website

From Strategy to Design

Today, almost every start-up has its own website or landing page. When building a website, we always expect it to please both the users and us, and, most importantly, build customer loyalty and generate income. But is that often the case? No! Most such sites don’t solve business problems; neither do they meet customer needs.

The truth is that to create a smart website, you need to pass through five important stages. And the design is the last of them (how often do companies start with it!). We are going to discuss these five key stages in this article. We’ll ask you some important questions. Try to answer them for yourself.

Why divide the process into stages?

In his book “The Elements of User Experience,” Jesse Garrett describes five stages of user interface design:

  1. Strategy
  2. Scope
  3. Structure
  4. Skeleton
  5. Surface.

The design process starts with the most abstract expressions about the project strategy and ends with very concrete models of the site.

Figure 1. Jesse Garrett’s view of the web development process. Work starts at the lowest stage (strategy) and ends at the surface.

The first thing to do is to categorize your project into one of two groups:

  • Software interface (online stores and service sites);
  • Information space (blogs and news portals).

The questions that we’ll ask at each stage will depend on this categorization.

The development process needs to be divided into stages to clearly distinguish between the responsibilities of different specialists. A UX designer is engaged in the project at the second or third stage, while the company’s head formulates the strategy at the first stage – before the team starts developing the site features.

You can’t start working on a set of features (feedback forms, calculators, shopping cart, comments section, etc.) without first defining the need for them in the strategic planning stage. It’s not possible to develop navigational items, implement module layout on a page, or develop contextual navigation without ready information architecture and an understanding of what content will be posted on the website.

If you’re interested in more, read Don’t Make Me Think. Rules of a User-Friendly Interface

Maslow’s hierarchy and Garrett’s scheme

In his 2012 book “Designing for Emotion,” which was warmly received by professionals, Aarron Walter uses the famous Maslow’s hierarchy to show how to properly set priorities when creating a website design. Maslow’s hierarchy is a simplified visualization of the hierarchy of needs, developed by American psychologist Abraham Maslow in 1943.

Figure 2. Maslow’s classical hierarchy.
Figure 3. How Aarron Walter sees the use of Maslow’s hierarchy of needs for web design.

Despite the fact that Garrett deals with the entire development process, while Walter is solely focused on design, we can see similarities between both approaches in their quest to segment user needs and website objectives.

If you test Garrett’s scheme (Figure 1) on Walter’s hierarchy (Figure 3), it turns out that strategy is the cornerstone of the whole development process – without strategy you can’t start. Here, design is the apex of the hierarchy, which is a logical extension and embodiment of the goals to be achieved by the team in previous stages. Besides, one can’t deny that a well-grounded strategy and the right content requirements are much more important than choosing button colours and font styles.

As you can see, design is just the tip of the iceberg, visible and very important, but it can’t exist without dozens of tons of ice, hidden under a layer of water. Work on the surface level is the very last thing to do because it is subject to results achieved in the previous stages.

If you’re interested in more, read Icons in Design: Nonsense, Necessity, or Decoration?

Stage 1: Strategy

In the first development stage, we need to answer two key questions:

  • What do we want to get out of our site?
  • What do users want to get out of the site?

It is essential here to pay due attention to the formulation of strategies because Garrett’s entire methodology assumes a ripple effect if there is a need for change. This means that wrong decisions at this stage will automatically make all the decisions taken at subsequent stages wrong or disputable.

Figure 4. Ripple effect of making a wrong decision.

Always REMEMBER that the approved objectives of the website should reflect the essence of the company’s business processes. User needs are easier to identify using user persona methodology and target audience segmentation.

What do you want to get out of your site? What do users want to get out of your site? When answers to these two questions are formulated accurately and clearly, then we can move to the next development stage – scope (features and functions of the site).

Stage 2: Scope

If you consider your site as a software interface, then at this stage, you’ll formulate and describe the features and functions, and prepare terms of reference for programmers. If your site is an information portal, then content requirements move to the forefront.

In determining the content requirements, it is necessary to find out the following:

  • What will be the site content: text, video, audio or image?
  • Why does the user need this content?
  • How often will the content be updated?
  • Who will be responsible for hosting, creation and editing?

Here is a good example of poor work on the scoping stage: thousands of business card websites that have a “news” section, but don’t have any useful information to publish or the news section isn’t updated.

This is because the customer just said, “We need a news page,” but didn’t think about what would be posted there, how often, and who would be in charge of it. So that’s why you end up getting sites with empty and useless news pages.

Figure 5. The website of a construction company has on its news page only 4 news items for 3 years.

In describing the functional specifications of a website, the following needs to be clarified:

  • Why should a particular feature be on the site?
  • How will users interact with it?

It’s all so simple: if in the first stage, you’ve found out that users will be visiting your site to watch videos, then it’s time to talk about what kind of videos those will be and who will create them.

If you’re interested in more, read
Part 1. Responsive Web Design Using Breakpoints
Part 2. Responsive Web Design. Mobile Devices

Stage 3: Structure

At the previous stage, we determined what content will be posted on the site, and which features will be offered to users. At the structure development stage, we’ll determine which particular pages will host the content and features.

SEO experts, marketers and editors are fully involved in the structure development stage. Before developing the navigation system, which is the most important part of the site, the number of pages, their type and relative location all need to be defined.

Experts classify information architecture arrangement into four types:

1. Hierarchical structure. Most online stores serve as a classic example. For example, when selecting specific men’s winter boots from a product catalogue, we normally navigate the following pages/categories: “men,” then “shoes,” “winter,” and then we choose a specific model.

Figure 6. Hierarchical structure.

2. Matrix structure. This lets you navigate through multiple axes. A good example is a blog where each post can belong to more than one category at once. For example, a post entitled “Cheap vacation in Bruges” can be posted in such sections as “Belgium,” “Cost saving,” and “New.” Thus, such a post will be seen by several target groups: people who want to know more about Belgium, people who are looking for cheap vacation packages, and people who regularly follow new posts.

Figure 7. Matrix structure.

3. Organic structure, This type has a very narrow range of application. This architecture can be used in entertainment sites or sites where the user is given the freedom to study materials just like when you visit a museum. This structure is suitable when there is no need to guide the visitor through the web pages, and the visitor doesn’t really care what section he is currently in.

Figure 8. Organic structure.

4. Linear structure. This is characteristic for landing pages. Landing pages are created with the involvement of marketing specialists and schemes such as PMHS (Pain, More pain, Hope, Solution) and AIDA (Attention, Interest, Desire, Action), gradually leading the customer to make a purchase or to another target action.

Figure 9. Linear structure.

An example of poor work at the structure stage is the eventual appearance of additional sections on a site, which was originally designed to be a landing site. This means that developers envisaged user behaviour incorrectly, or they don’t know how and what information needs to be placed on the site.

The structure can be designed via two possible approaches:

  • Top-down;
  • Bottom-up.

The top-down approach implies that the objectives of the site and user needs form the basis for selection of a structure, for example, starting from general categories of the online store and ending with pages of specific goods.

The bottom-up approach is based on content analysis and its requirements. First, we look at what kind of content we have available and what we can create in the near future, then we group it and get categories and sections of the site.

Stage 4: Skeleton

The skeleton stage is very similar to the previous stage, where the structure was considered. Here, it’s also all about placement of features and content – not on the site generally, but within a particular page. Once we have compiled a list of elements and text blocks for each page, it’s time to think about how these blocks will be placed.

It is not enough to tell the designer to make the homepage of your site contain a logo, global and local navigation, breadcrumbs, search, banner ads, and text. We also need to inform the designer how these elements should be arranged relative to each other.

Figure 10. Working on the skeleton stage – page prototype.

Navigation is the main aspect of work at this stage. When arranging elements, it is important to pay attention to how the user will navigate the page.

The main rule: the navigation system must allow the user to easily navigate the site, and it must reflect the interrelationship between pages and interrelationship between a page and the navigation system itself. Simply put, navigation should answer the following user questions:

  • Where am I now?
  • How do I get to where I want?

Prototypes can have different levels of detail, depending on the complexity of the project. A page prototype gathers all layout solutions into a single document, which serves as a bridge between the earlier stages and the visual design of the site.

If you’re interested in more, read How To Create Masonry And CSS Hybrid Grid Layout

Stage 5: Surface (Design)

Now it’s time to figure out what is design and how it depends on the other previous web development stages. All the work carried out at the previous stages (strategy, scope, structure, and skeleton) consists of a formulation of constraints that will be transferred to the designer in the form of input data, requirements and wishes.

These constraints are precisely what allows the designer to do his job efficiently. It enables your website design to meet its objectives. Experienced designers, with one voice, say: “A good design is born only from constraints.”

Experts say that the best design samples emerge from stringent requirements and constraints. A designer who is given a specific field for creativity will create a really nice design, while a designer who is asked to do “something very nice” without constraints will end up doing something that is not effective, even for a huge fee.

You can create the best design for the website of an online store (e.g. selling woollen socks) featuring a shopping cart, blog, material and colour filters, and weekly updated foot-care articles, made in corporate colours. The design can show your company’s logo as effectively as possible. But you can’t create or even imagine the best website design without stringent requirements. After all, these constraints will at the same time serve as evaluation criteria.

It is for the sake of gathering requirements and constraints before rendering the layout that the web development process should be divided into five stages.

Let’s summarize

If you decide to use this web development technique, you must remember that you can’t move on to the next stage until the previous one has been completed. Each development stage – from strategy to skeleton – formulates constraints and input data for a web designer at the surface stage.

Such an approach allows a team leader to narrow down and articulate tasks for each specialist involved in the development process, and secure a result that brings the company closer to having a well-functioning site. If a single web designer is developing the site, this approach would enable him to create a fully-fledged site on his own, giving adequate consideration not only to the layout but also to customer needs.

So, design is simply a visualization of solutions within the framework of elements of user experience (adopted during the development process) in the first four stages. If the strategic objective of your site is to generate profit, if the user needs to buy woollen socks, then a good design should help you sell a lot of socks at a price favorable to you and reasonable for customers.

Don’t Make Me Think

Usability consultant and information architect Steve Krug has been in the usability art since 1989. He has years of experience as a user advocate for major companies as Apple, AOL, and Netscape. On the question of what’s the most important thing to do to make sure a site or app is user-friendly, he answered that it’s not “Nothing important should ever be more than two clicks away” but rather “Don’t make me think” – his first law of usability. This advice is also the name of Steve’s most famous book dedicated to user interfaces.

Steve Krug’s special gift is in his constantly fresh look and the ability to put into practice the experience he acquires from studying human behavior on the Internet. At the beginning of his professional career, Steve would look at the designer’s computer screen over their head while they are working, thus preventing them from being excessively fond of visual ideas that could throw ordinary users into confusion.

Krug’s technique was not to conduct experiments on focus groups, but to study the behavior of ordinary people when using websites.

In this article, I’ll talk about the main empirical observations that Steve formulated in his book, complementing them with my own experiences and opinions of designers who I know. I’ll begin by describing the general principles and problems and then move on to an analysis of particular mistakes, then I’ll give useful tips.

How the user defines simplicity

When assessing something, we use our experience and various coordinate systems. If you ask someone to assess a car, he will pay attention to the speed and driving. When selecting a house, we are likely to be most interested in the land size and location.

While appraising the simplicity of a website, the user will first indicate the time spent on getting what he wants from that site. If it takes a user more than five minutes to order a pizza on your website, then your interface has some problems.

First of all, don’t make the user do what you could do for him. Features such as geolocation, autocomplete forms and authorization via social networks instead of registration form simplify any interface significantly.

The designer is the one that thinks, while the user uses. Another factor that plays a role when assessing a website is the simplicity of thought processes. If you want to obtain the user’s phone number, then don’t make him ponder on which format to enter the number.

Anything we’re used to seems simple. Avoid being too different from competitors. If you’re a sushi seller, just make very delicious sushi – the customer has ordered for them a hundred times in the past and his brain has already developed a particular scenario. Any deviation from the usual scenario has to be reasoned: if your interface throws out the user, he will order the sushi only if they are much cheaper. Otherwise, he’ll return to that site where he has ordered for sushi many times before.

Below is an example of a site, delivering sushi in London. Why do they need the user’s date of birth? Why do I have to register to eat? Why can’t I log in via social networks?

An example of a site, delivering sushi in London.

In studying a site, the user has to think as follows: &quout;This key is for this, if I click this one I will be able to read about that, I can click here to make a call”. You shouldn’t generate questions in his head. A site is difficult, if by looking at it, the user thinks: &quout;What is this thing for? What happens if I click here? Where is this written about?”. All questions must be answered preventively.

From general to specific

I’ve identified and summarized the most important (in my opinion) principles of creating interfaces from the “Don’t Make Me Think” book. I’ve also tried by myself to deduce some specific rules from the philosophy of this book.

Ports of entry

Brion Gysin:
– How do you… How do you get into these paintings?
William Burroughs:
– Usually, I get in by a port of entry, as I call it. It is often a face through whose eyes the picture opens into a landscape and I go literally right through that eye into that landscape. Sometimes it is rather like an archway. … Any number of little details or a special spot of color makes the port of entry and then the entire picture will suddenly become a three-dimensional frieze in a plaster or jade or some other precious material.
The Beat Hotel by Barry Miles

You started to read this article from the heading, which is its point of entry. In studying an interface, the user looks for something from where to start. It is the designer’s task to make the entry point clear. Without the heading, you would not understand what the article is all about before starting to read.

Targeted action is a process consisting of several steps. If you don’t show the user where to start, he most likely will not ever start. Imagine a website of a manufacturer of computer components. For a user who wants to download a motherboard driver, the point of entry must be an element directing the user to the first step of the following process:

1. Selecting or searching for a device;

2. Selecting an operating system version;

3. “Download” button.

You shouldn’t create a page that performs several targeted actions, else it would have to host multiple entry points, which could confuse the user.

Lao Tzu once said that a journey of a thousand miles begins with a single step. But this step – no matter how important it may be – is not the entire journey. When asked about how many moves ahead he is planning, Garry Kasparov answered: “In chess, it is far more important not to calculate dozens of moves ahead, but to have a clear understanding of the situation on the board at that moment”.

Besides, to show the user the way, you have to accompany him along that way so that he doesn’t stray away. In constructing a route, nothing helps as knowing one’s location. A breadcrumb trail does an excellent job in helping users keep track of their locations within programs or website.

Users will not use a site if the navigation isn’t clear.

You can’t write art

Copywriters say that writing texts for a robust interface is an art, but not writing them at all is an even bigger art. Steve Krug says, “Get rid of half the words on each page, then get rid of half of what’s left”.

In the The Elements of Style by Elwyn Brooks White and William Strunk Jr., rule number 17 reads:

“Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences, for the same reason that a drawing should have no unnecessary lines and a machine no unnecessary parts”.

Most words on any web page just take up space. Removing unnecessary words has three aims:

  1. Reduces noise on the page;
  2. The user’s attention is focused on the remaining words, which make up the truly useful and important content;
  3. Reduces the size of the page, and the user can easily sweep his eyes over it in search of the necessary information.

All sorts of “Welcome to the site…” and “The site has a lot of very interesting things about…” should be removed ruthlessly. Users want to go straight to the point – all kinds of introductions only distract attention and waste time.

If you want to ask the user to fill out a form, instead of unnecessarily telling the user that the form would help improve the service, tell him that it won’t take him more than three minutes to fill the form.

What’s this button for?

Imagine that you visited a friend at his house, took the TV remote, and instead of turning down the sound, you mistakenly changed the channel because the volume buttons are identical to the switchover buttons. This is a clear example where the designer had not thought and made the user to sort out the interface by himself.

Inscribing a text on the button is, of course, the best tool that would explain to the user the function of that button. If this button is used to add an item to the shopping cart, then the phrase “Add to cart” or “To Cart” should be written on it. An experimental “Wishlist” or incomplete and indistinct “Add” will raise questions and make the user lose confidence. Another important rule: verbs on the buttons should always be in an infinitive form so that the user can quickly perceive their functions.

The user should clearly know what’s going to happen once he clicks the button. But that’s not even enough – clicking should give him exactly what he expects.

Harm caused by guidelines

The main sin committed by all guidelines present in any interface is that they shift mental work from the designer to the user. Besides, the presence of guidelines on an interface is often a sign of inefficiency by the designer.

Nobody is going to spend his time reading guidelines present on a site until several attempts to use the site, as it turns out, fails.

Even if the user needed to read the guidelines, he would unlikely do so if it is too cumbersome. In designing an interface, it is the designer’s task to remove any guidelines – all elements and user scenarios should be self-explanatory. If guidelines are really needed, they should be very brief.

Coincidence of interests

That which you want to show a user on a particular page must match with what the user is looking for on that page. Then the design will look simple and clear.

Let’s assume that people buy dishes and other kitchen utensils more and more often than construction tools and repair materials. This doesn’t mean that you should go hang the sign “Dishes at wholesale prices” at the entrance to your hardware store with the hope of attracting buyers.

Firstly, you will not get an inflow of the target audience to your store, and secondly, people will be deceived, which is not good. The same logic should be applied when creating the structure of a website. If your company deals in the repair and sale of computer hardware, share not only the target audience but also the sections of the site.

Don’t try to squeeze everything on a single page (cramming the description of repair services and the product catalog all in one page), else you might confuse potential customers.

Most burning issues of the day

In this article, I’ve shown that every designer can greatly simplify the lives of users through simple reflections. Let’s look at some examples of how this could be implemented on large and well-known websites.

On the FAQs page of the AT&T site, questions and answers are presented in the form of a fashionable accordion. This idea is very good if the concealed information is so large that it will be reasonable not to show everything at once, in order to make things simpler for the user to search for the appropriate question. But here we see that the answers are short and thus could be presented at once without any consequences. The designer should have thought about this and not make the user click on the plus sign.

Page with answers to frequently asked questions on the AT&T website.

On the Coca-Cola website, you can order a bottle bearing your own name or any inscription. After entering the name you want, you need to click on the “Preview” button. Oh, how nice it would have been without this button. They could, in fact, show the inscription on the bottle at once thus saving a click.

From Coca-Cola site. The user could do without the “Preview” button.

Another example: the screenshot of a site offering tours across China. The phone number is shown as an image, which is a link to the contact page. Why not just make it a text, and in addition – a link that enables the user to (by a click) call from his smartphone?

Screenshot of the site www.chinatravel.com

Ok, that’s enough of negative examples. Let me highlight a nice feature in the official online store of auto racing Formula 1. When you go to the checkout page, in the “Destination Country” field, the system automatically detects the user’s location. This is very nice. Keep it up!

Screenshot of the official online store of Formula 1.

Conclusion

“One man likes to push a plow. The other likes to chase a cow. But that’s no reason why they can’t be friends” – Broadway musical “Oklahoma” by Oscar Hammerstein.

The same questions constantly cause irreconcilable arguments and almost religious differences among web developers. In such disputes, you can rarely impose your views on the opponent. On the basis of what web developers do, they have very different views on the same issues.

I want to say that questions such as “Do users like a drop-down menu?” are detached from reality and don’t make any sense at all. Answers to them have no practical application. It is by far more productive and correct to state the question as follows: “Does this particular group of users like this particular drop-down menu on this particular site?”.

Endless arguments yield no result, but only waste your precious time. It’s more effective to test solutions in specific situations. All web development-related issues should be transferred from the “right or wrong” and “like or dislike” planes to the “working or not working” plane.

Icons in Design: Nonsense, Necessity, or Decoration?

When are They Used and Who Needs Them?

Icons have conquered the world. Mobile applications, web design, prints, motions and sometimes a host of icons, make you feel like you are in an Egyptian pyramid once you enter a site. The only difference is that instead of hieroglyphs, you find yourself surrounded by icons.

When providing an address or a phone number, a location pin and phone icons are given for the only reason “why not”. Sometimes it feels like if we let it run its course, an icon will precede every word.

More and more icons…

Mobile applications naturally borrowed the principles of interface design from desktop applications. Design-related fields then started borrowing these elements and solutions. Sometimes they were completely out of place but were just following the influence of trends.

As a result, mobile applications use icons not only for decorative purposes but also because of the shortage of space. Websites, especially landing pages, openly overuse icons (perhaps to compensate for uninteresting content).

It is important to try to figure out where and why the icon is needed, where it would be inappropriate, how transparent it should be, and why modern interfaces and icons look the way they look.

Sometimes a host of icons, make you feel like you are in an Egyptian pyramid once you enter a site…

Is your icon understandable?

Rule number one for an icon: it has to be transparent and obvious for speakers of different languages. However, how is it possible to determine the understandability? This question always causes many arguments.

In general, this type of a dispute is a fairly useless activity. It is partly a repetition of the historical competition of cultures in the creation of a written language. It is a battle of hieroglyphs vs. alphabets. Given a relatively small vocabulary, the representation of words that are described with these things was obvious.

However, with the concepts becoming increasingly complex, it was getting increasingly difficult to come up with a clear graphical image. As a result, it was understood that the meaning is not always obvious. However, there is a logic of understanding and some rules for reading. The ancient Egyptians and Chinese began to use hieroglyphs for the phonetic recording of words, using them not only as nouns, adjectives, and verbs but also as syllables and individual parts of words.

Fig. 1 – The Chinese character on the left means “man” and visually resembles a physical object. In the middle, there is a character “day” with a less obvious form. On the right, we see “yesterday” which is not transparent either. At least there is a noticeable logic of construction: the concept “day” was supplemented by the prefix “yester”.

How do one create an understandable icon?

It is difficult to create a completely understandable icon (even though it is often required from a designer). However, even easy understanding requires a minimal effort either by an individual (his/her logic, knowledge, outlook, culture) or by the society, which provides that individual with knowledge about the meaning of the image.

It is better to create signs that are based on some information which is already available for the target user of these signs. The icon should, therefore, be clear for a minimally prepared target audience. The wider the audience – the more common and accessible the sign that is required.

Pictograms and target audience

Articles on Wikipedia mark dead military commanders with a cross. For the Christian culture, this sign is clear. However, for readers from other cultures, it is not understandable. Therefore, this sign is not used for them in Wikipedia. Moreover, different language versions provide different versions of this cross. For example, refer to the article on the Battle of Marathon in different languages. The target audience is too broad to create a common sign. Therefore, it was necessary to apply localization.

Fig. 2 – Variations of crosses: on the left – for the English-speaking audience, on the right – for the readers from Spain and Russia.

The true purpose of the use of icons is not for ignorant people to understand the meaning, but for knowledgeable people to notice them faster. A sign is recognized faster than a word, although words are clearer.

Looking at Figure 3, how clear is this sign for a person that does not know how to drive a car and does not understand traffic regulations? However, for a driver or an informed person, the meaning is clear – no overtaking.

Fig. 3 – Signs. No overtaking

You start driving with the goal of not guessing the meaning of the signs but to quickly identify them. Many prohibitory signs with arrows, used in India (Fig. 3 – on the right), illustrate the meaning better. You will notice black and red cars faster. Let’s say you do not know the meaning of the sign with two cars and cannot guess what it is. I will tell it to you. The image is associative in general: there are two cars. Red means prohibition. A mnemonic chain is formed. You now think that everything is clear, and the sign is understandable to you.

Icons are often used for the labeling of various products. The purpose is to make everything clear after a cursory glance for conditional sorting by an important parameter without reading the text, which is listing these parameters. In these cases, the icons often do not speak for themselves. For example, on any network adapter of any of your devices, you can find several icons that are not quite understandable for a layman.

Though the icons on the clothing tags, describing the rules of clothes washing and ironing, still require specific understanding and are addressed to those who will perform these actions. It is important for these individuals to understand the properties of the clothes. Given that the image of an iron tells us that the product can be ironed, a crossed out triangle, most likely, says nothing (Fig. 4). For a housewife who cares about the look of the garment, this sign says that bleaching is not recommended for this piece of clothing. Therefore, since she knows the meaning, she pays attention to it.

Fig.4 – Labeling of clothing. On the left – “can be ironed”. On the right – “do not bleach”.

The icon “non-toxic material” uses the association with food, because the material is often used for food packaging. Military insignias are another kind of icons for quick identification.

Fig. 5 – On the left – a sign indicating non-toxic packaging material; on the right – a sign of a corporal or a sergeant in various armies.

Interface icons: the story of one button

The use of icons in computer interfaces is very similar. One of their main tasks is the fast transfer of information. A user should be able to quickly find the desired item, without grasping it in words. Even in a text-based interface (for example, Adobe products have several menus with drop-down lists), we do not grasp the meaning of options each time. We recognize them by the first letter, general outlines, the order, etc.

In addition to the rapid transmission of information, icons have a role in the interface by saving space. Standard menu (“hamburgers”) and option (dots) icons caused a lively debate just a few years ago. “Hamburger” had a reputation of a button “hated by designers and difficult for users to understand”. Nevertheless, soon there appeared a lot of articles “about the most popular button”. Although it preserves its original view, it attracts the attention of new less sophisticated users, with no problems in understanding it!

The situation mentioned above occurred. People were not born with knowledge about this button. Its meaning was explained to them by society or quickly recognized through their own experience. Nothing terrible happened when the user tried to push it, not knowing what it was. However, he immediately understood the meaning. There is no need to invent a more obvious image. Since this icon is used in products with millions of users, it has become something of a standard. It is unlikely that every user knows that the appearance of this button abstractly depicts three menu bars. However, once they have tasted it or seen others doing this, they memorize the meaning of this “hamburger”.

The interfaces tend to clarify things. There is a saying that if the interface is to be explained, then it is bad. However, though today a person does not have to procure his/her food (including brain food), it is still necessary to chew and digest it. The user should be trained. For serious problems, such as cloud-based industrial facilities management systems, there are special instructions, describing the characters. They suggest various clues such as “click the icon”, unobtrusive animation offering to try the tool in operation and pop-up tooltips on mouse hover. All of these clues help the beginner to quickly learn the ropes.

History repeats itself

Many commonly understandable and familiar icons have lost the associations that they initially had a long time ago. A classic example is a floppy disk icon that is used for saving. For more than 20 years, floppy disks were used for file storage. A modern user who is under 20 years of age may not recognize this symbol. However, he/she can quickly learn its function without delving into the details of its meaning.

In Photoshop, icons depict the actual tools of designers, photographers, and retouch artists of the pre-computer era. Most of the today’s professionals have never used these tools and may not even know that they have ever existed. They also did not know that designers managed to create layouts without computers and modern digital technologies.

Even the telephone handset icon is actually outdated. However, these symbols have been well-established and entrenched in the memory of society. Technical development progresses exponentially, and we just do not have time to get used to the image of new things.

The fact is that cassette recorders, television sets with cathode ray tubes, and rotary dial telephones have been in use for decades. Though their design varied, the overall shape was very similar. These images are forever etched in the memories of several generations. These icons have a certain charisma and they embrace the entire epoch.

There is something interesting to pay attention to while watching a detective or spy movie: if there is a scene showing someone conducting wiretapping, we would see a reel tape recorder with respectable rotating reels. However, at the time referred to in the film, there were already far more advanced devices. In films, they also use old devices because they create a strong artistic image.

A sound wave image on the monitor has recently become the only alternative. Designers have tried to modernize phone icons. As soon as they used the image of a smartphone with buttons, the image ceased to have a prototype and the associative array. Therefore, there is no point in trying to portray a modern view of a device in icon plots. This is because everything is changing too fast. No gadget will have the time to impress three generations of people with its views, like a floppy disk did.

Even though Youtube has successfully modernized its identity and icon plots, at the core there is still a warm pot-bellied cathode ray tube. The resemblance is also seen in the use of the word “tube” itself. To be more precise, almost all the icons are ideograms. They represent some meaning associated with an object or a concept, but not the object itself.

Cryptograms: to caption or not to caption?

Icons can be captioned. In web interfaces, captions were recommended in order to have greater visibility of the active area to click (Figure 6). This is true, but not critical. It is always more convenient to press a clearly defined area than just an icon.

Fig. 6 – The user will more carefully aim for the uncaptioned icon, unconsciously perceiving image dimensions as dimensions of the active area.

However, there is also the aesthetic factor. The interface consisting of buttons is not always pleasing to the eye. The balance between beautiful and convenient always requires effort. It is true that at times, something has to be sacrificed. For example, older versions of iOS offer users clearly defined buttons. The latest versions offer icons without visual boundaries, which means only a sense-bearing sign.

play
Fig. 7 – Icons to the right are more convenient to push, the area is visible, you can even tap or click somewhere on the edge. However, the icons on the left are more conceptual.

The following is the meaning of captions: a captioned icon is like two in one. On the one hand, the text clearly conveys the meaning and teaches the user. On the other hand, the icon helps the eye to quickly identify the option in the list (without it, an eye would screen the list by the initial letter, word length, and sometimes the user would have to read it carefully). It can actually tell the meaning of the option captioned in a foreign language.

icons
Fig. 8 – Examples of an icon and caption working together. Words convey the exact meaning and the icon helps to find the desired option quickly.

In addition, in this case, it is not required to look for a very precise image for the icon. The icons on the Sony Playstation gamepad are just visually different and easily distinguishable.

sony
Fig. 9 – Gamepad for Sony Playstation

History of cryptograms: how it all began

It is necessary to address the subject of a fancy icon in the interface. It is now usually a conventional image without volume and with thin lines. Although some people would say that it is just a fashion trend, this type of icon is developed primarily because of technical possibilities. It is now used because it has been made possible, and not because an artist-discoverer happened to gain an insight. It is a demonstration of the saying “old is the new new”.

The appearance of icons in the interfaces marked the advent of the graphical interface itself. The graphics drawn pixel by pixel used to have a coarse pixel structure. Screen resolution did not allow for making detailed images with smooth contours. The pixel size was large relative to the icon. Images designed to resemble the graphics of that era are called pixel-art, or anything with the prefix “eight-bit”.

lisa
Fig. 10 – Graphical interface of the first Macintosh. Aside from the eye visible pixel structure, such a design is closer to the modern version than much of what has been created for more than 30 years since the appearance of the interface.

The fact that the old Mac interface was black and white, even played into the hands of designers. The closer the framework, the easier it is to find the optimal solution compared to the boundless opportunities. With the growth of computer power, which used to be consumed mainly by graphic performance, icon design has been developing and becoming more complex.

win3
Fig. 11 – Windows 3 icons in color, with simulated shadows

In Fig. 11, we can see the painted icons from Windows 3. However, there is still a screaming pixel structure. We now mostly do not see the pixel structure, since even desktop monitors can have a point density of more than 72 per inch. The modern pixel is 1.5-4 times smaller and almost unseen with the unaided eye. The pixel image in the 1980s was not really so acute. It turned out that another drawback – the blurring of pixels due to the glow of luminophore in cathode ray tubes, slightly offset this sharpness. Therefore, the icons were not as painful to look at as they seem to be now.

The pixel density per inch has not changed for a very long time. This is true up to the present day since monitors served as the output device – first CRT, then LCD. Over time, the number of displayed colors has increased significantly. This has affected the form of the icons. Artistic techniques and tools have also developed.

Fig. 12 shows the Windows 98 and MacOs9 icons. They still have a rugged pixel structure. However, they are able to use more colors. They have also obtained gradient fill, although with visible steps. For colors mixing, there is the use of diffusion (in the yellow folder, there is a shading effect to the bottom that is made pixel by pixel).

winda
Fig. 12 – Windows 98 and MacOS 9 icons

The antialiasing technique has become a revolution. It has allowed the seamless mixing of colors and the smoothing of the pixel edges. The mathematical processing of the image has opened the discussion of concepts such as the fractional parts of a pixel. This seems like a smooth transition from one color to another for a few pixels. It visually seems to be one pixel but with smoothed edges. The process of smoothing pixels is visualized in Fig. 13. It is interesting that there was no efficient font smoothing for a long time, while image smoothing has been used since the 1990s. This is because CRTs, due to the blurring of pixels, has smoothed the pixels of letters. Only after the final transition to LCD monitors, did the problem become acute again and was finally solved. As a result, smoothed fonts are now commonly used.

anti
Fig. 13 – The above picture shows the word typed with a smoothed font in a six-fold increase. The below picture shows the same thing but without antialiasing.

How has antialiasing affected icons? Its effect is almost the same as the effect of the iPhone and iPad release on application development. The design of MacOS 10, Windows XP, Windows 7 icons is not based on pixel-drawn icons anymore. The icons are created with photographic accuracy or modeled in 3D and scaled using antialiasing. It was the start of the skeuomorph era in design that has lasted for almost a decade.

Due to the smooth transition of colors and shades, there was an opportunity to represent glares, reflections, and imitate the surfaces of real materials. The icons used to compete with each other in complexity. They were different: three-dimensional and shining, “made” of glass and aluminum. Many people still remember the glass bubbles of SMS-chat on the first iPhones. Icons were limited due to the use of pixels and designers were quick to embrace the unlimited graphics capabilities. Since this design coincided with the beginning of the creation of sites with user-generated content, which were called Web 2.0 (in the future, social networks and blogs), the design was initially called “Web 2.0 design”.

sk
Fig. 14 – Skeuomorph icons of previous versions of MacOS.

Over time, the term “Web 2.0” fell out of favor. As a result, the design that simulates physical properties grew into a widely used skeuomorphism. However, these effects were overused. As a result, both designers and users flocked to contrast simplicity of flat and concise signs. It was not a random decision but one supported by the relevant technology.

Modern simple icons of mobile interfaces have become possible due to the high pixel density per inch of mobile devices (as well as thin and trendy fonts). The antialiasing mechanism uses two to four neighboring pixels to simulate a “single-pixel” image. When displaying icons with a line thickness of one pixel, a mathematical error occurs, and the lines may look a little broken and uneven. This is evident if the device has a traditional 72 or 96 dpi when each pixel can be seen by an unaided eye. In mobile devices, this is four times smaller, and the errors are completely indistinguishable. The designers are confident in having a beautiful display of icons in thin lines, which conceptually resemble icons on the first Macintosh computers.

The reasons not to be too enthusiastic about icons

Don’t mess with success.

Icons are often used for attention attraction. This is the right decision, but only within reason.

Prior to the era of skeuomorphism and during the first period of its predominance, there were a limited number of icons in stocks and public domains. Some 3D designers and vector illustrators used to specialize exclusively in creating icons for a specific project. This process was very time-consuming and unique.

When mankind satisfied its desire to digitize the world and had enough glass and metal buttons, highlights and reflections, icons returned to their traditional minimalist look, popularized by flat and material design. It has become technically easier to create such icons. The search query in the subject provides many options. As a result, icons are dominated by modern designs. It is a trend and there is a temptation to follow this trend effortlessly.

All trends usually have their explanations and a rational foundation. In mobile applications, icons performed in thin lines in vector format look the best. If your project is a desktop/laptop web interface of an industrial cloud service and you follow the recommendations of the mobile developers to make the icons in thin lines in vector format the end user will see these icons as being ineffective, even if you theoretically did everything right. Conventional rasterized icons are preferable because at least you can definitely capture their view.

In terms of artistic imagery and stylistic performance, icon plots are usually monochromatic and minimalistic. However, the typical image of the object will always look good. You can find these images throughout the era of the active use of icon plots in graphic design.

When viewing pictograms, icons, and signs that were done 30, 50 or even 100 years ago, you can always find some kind of repetition of what has already happened. In our culture, there is always a cyclical nature of decades. Decades later, we see the return of music or fashion preferences from the past but based on new technologies.

Identity of Olympic Games
Fig. 15 – Identity of Olympic Games in Mexico in 1968. At first glance, it can be confused with the iOS screen.

The influence of time and mood is inevitable but we will not see pixel art or buttons made of mahogany in mass production anymore. In the future, there may be a renaissance of skeuomorphism. It has partially returned in the form of long shadows with a hint of volume elements in a flat design.

When creating an image of an icon, one should think twice about the target audience and its level of training. Who can be trusted for user training: society, advertising, the interface or is it better for the user to gain experience independently? By trying to create the icons which will tell the users everything about the system you will face a problem – one of the famous Murphy’s laws:

“Build a system that even a fool can use, and only a fool will want to use it”.

Even an encyclopedic description of the concept of icon uses the word “specialized”. To eliminate confusion, you can always caption an icon.

When using icons, you need to remember what we want to convey to the user: a very precise meaning with all the nuances or quick information. If it is necessary to explain all the nuances and avoid misunderstanding, we use words supported by graphics rather than icons. In chatter, meaning can be conveyed by Emoji, stickers, and smiles.

If an icon does not improve the perception, it is not needed there. If you place an icon only for beauty, you should think twice whether it is really necessary. If this design looks like junk jewelry anyway, it might only cheapen your design. It is clear that it is not the author’s work, but stock images that are worth no more than a penny or even received for free.

asos
Fig. 16 – Icons are not used in the menu, as there are too many categories. In this case, alphanumeric sorting is preferable

If an icon is not functional, it is unnecessary. Functionality means assistance in a rapid search of the necessary material, attention attraction, formatting and structuring of information. Mobile interfaces, due to the shortage of space from the physical point of view (screen diagonals are from 5-10 inches), make designers use icons. However, the Web and other areas of graphic design are not burdened by this necessity. Therefore, the excessive use of icons is undesirable.

Remember:

  • Icons should be understandable for your target audience.
  • The wider the audience – the more common and accessible the sign that is required.
  • For mobile applications, it is recommended to use icons with thin lines and in vector format. For desktop/laptop versions, classic rasterized icons are preferable.
  • If the icon does not improve the perception and does not carry any function, it is better to remove it.
  • If you need the icon to quickly find the information, it should be accompanied with a caption.
  • Given any terms and objectives – do not make too many icons! Less is always better.

How To Create Masonry And CSS Hybrid Grid Layout

Today’s web design world has become so innovative. Table-based lists with offset pagination are rapidly falling out of favor, while masonry layouts with infinite scroll are now becoming the new trend. You are not aware of it yet? Think Pinterest, Interview Magazine, Windows’ Metro etc. To describe it in words, it’s an almost crazy paving effect whereby variable sized blocks of content are pieced together in an aesthetically pleasing style and often staggered. Masonry style layouts aren’t something new.

How To Create Masonry And CSS Hybrid Grid Layout

So why look at them now? After all there are some great solutions out there that can give you a masonry effect. This is true. However, can we push a pure CSS solution a little further? Can we leverage Flexbox to achieve a more desired effect and push the capabilities a little further?

Well, in this article, we try to provide an in-depth look at masonry layout and its main perks of usage.

Default Situation

Everyone knows that if you want to display a grid of elements (announcement of blog posts, online store goods, galleries, etc.), you’ll face floating and alignment problems where the height of blocks is unspecified.

E.g., indicating the float:left property – even with the same width for all blocks – would lead to the following mess:

How To Create Masonry And CSS Hybrid Grid Layout
Pic. 1 – Default alignment.

Another option is more pleasant to the eye – when the blocks are arranged line-by-line on a vertical grid (frequently used for the goods catalog) or masonry grid with vertical customization of blocks (used for blogs).

How To Create Masonry And CSS Hybrid Grid Layout
Pic. 2 – Line-by-line block layout.
How To Create Masonry And CSS Hybrid Grid Layout
Pic. 3 – Masonry layout.

Responsive grid with line-by-line display of blocks of different heights

Well, it may seem that everything is obvious here. But it isn’t.

Let’s assume we have blocks of the same width, displayed on a 4-column grid and have the float:left property. After every 4th block (the last in line), we use the clear:left property or display each line as a separate block. But for a responsive layout, it’s a doubtful decision to make block-lines with block-columns inside because the layout will be reconstructed and the number of columns will be changed. Moreover, one should be careful when clearing context due to column variability.

How To Create Masonry And CSS Hybrid Grid Layout

Therefore, we proceed as follows. Let’s take a sample layout in which we need to display a maximum of 6 columns and a minimum of one. First, we should ensure that starting from the 7th element, every 6th element is displayed from a new line. Then, due to narrowing of the display area, the rule should be dropped, while another one adopted – every 5th element starting from the 6th one will be placed on a new line and so on, till the layout takes a one-column form.

In the article Responsive Web Design Using Breakpoints, we mostly focused on the principle on which properties of screen size ranges are overlapped. And this is precisely the case when it’s really convenient to use media-queries like “from and to” with properties applied to the strictly specific range.

Before writing the code, let’s denote ranges:

  1. Everything that is more than 1600 pixels – 6 columns.
  2. 1400-1600 – 5 columns.
  3. 1400-1200 – 4 columns.
  4. 1200-900 – 3 columns.
  5. 900-600 – 2 columns.
  6. Less than 600 – 1 column.

When we transform it into CSS, it will look like this:

.element {
float: left;
padding: 0 15px;
margin: 15px 0
}

For definition above 1600 pixels, we need to set a value such that each 6th element starting from number 7 is placed on a new line.

@media screen and (min-width: 1600px) {
.column:nth-child(6n+7) {
clear: left
}
.column {
width: 16.666%
}
}

Our new command works similar to the range of 1400-1600 where every 5th element starting from number 6 is placed on a new line, and so on in descending order.

@media screen and (min-width: 1400px) and (max-width: 1600px) {
.column:nth-child(5n+6) {
clear: left
}
.column {
width: 20%
}
}

Well, the result is as follows:

How To Create Masonry And CSS Hybrid Grid Layout
Pic. 4 – clear:left on every 4th element, starting from the 5th one, we get a four-column grid. The red frame is the border column; the gray color fill is an imitation of the content with unspecified height..

Source 1

At the above layout, we see that the height of the column cells is equal to the height of the content. If you want the height of the columns to be the same (equal to the largest column) in one line, then all you need to do is to indicate the following for the wrap block:

.wrap {
width: 100%;
display: -webkit-flex;
display: -ms-flexbox;;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap
}

Pseudo-classes: nth-child, mentioned above would be unnecessary in this case (see Source 2).

But this is not quite our topic for discussion because we are most interested in display of brick blocks of different heights (pic.3).

If we want the vertical distances between blocks to be equal, we should use jquery plug-ins instead of css.

Jquery plugins for masonry layouts

There are so many different jquery plugins. They have been there for a long time and have been generally performing well. Masonry, Isotope & Freetile are among the most well-known plugins. Historically, the first and foremost duty of these plugins has been to create galleries. Some of them still don’t go beyond this role, while some acquire more optional features (sorting, animations). If you have a gallery and variegated images by size, then this is the perfect solution you’re looking for. As a rule, it is enough to add a class either to a parent block or to the elements located inside it and then launch the plug-in.

How To Create Masonry And CSS Hybrid Grid Layout

But we are mostly interested in displaying grid tiles of both text and images. Well, yes, they allow to do this indeed, but there is one catch…

At least, all the plugins known to the author are based on the same principle:

With Javascript, a new absolute positioning is set for the elements and coordinates are recalculated. As a result, each of them is assigned with the properties left and top in pixels. When you change the size of the browser window, the absolute values are recalculated.

Although these plugins are of high quality but they sometimes witness some failures in their operations.

1st case: sometimes blocks are placed end-to-end to each other without any margins (probably because the plugin has been triggered just right before all the necessary elements were loaded for correct calculation of position). To overcome this, you can activate plug-in initialization once again after the document has been fully loaded:

$(window).bind("load", function() {
YourPlugInStart();
});

where pluginStart is the function of plug-in launch.

The second detected trouble stems from the fact that since system resources (all operations occur in the RAM) are required for constant rearrangement of blocks and recalculation of coordinates, the site may hang with high data sufficiency. This almost never happens with desktop versions, but there’s a great chance that it may happen when the site is displayed on an iPhone. Especially if the plugin uses different effects of movement visualizing and block emergence.

Therefore we decided to follow a fundamentally different approach. Although this way is not a universal one but it is less resource-intensive and lightweight in which a simple grid and masonry will be combined. Consequently, positioning issues will be solved by means of CSS instead of JS, which will give additional flexibility to our plugin.

Masonry & Grid Hybrid

As you can see from the title of the chapter, we’ve decided to combine the grid structure of adaptive layout to solve the problems connected with positioning by means of CSS. We’ve also made blocks vertical without changing their coordinates, but placing them in the columns of our layout by using JS.

a) Run

The source code of plugin & sample. Demo.

<link href="anotherbrick.css" rel="stylesheet" type="text/css"/>
<script src="anotherbrick.js"></script>

As in the case with the above-mentioned plugins, we’ve placed tile blocks inside the wrapping block. The parent block is given the the-wall class. Elements which will be further aligned are given another-brick class.

<div class="the-wall">
<div class="another-brick">...</div>
<div class="another-brick">...</div>
...
<div class="another-brick">...</div>
</div>

Initialize

AnotherBrick();

b) Operation principle of the plugin & its main perks

After launching JS, the responsive grid is formed with empty columns.

Depending on the width of the display area, the number of columns varies from 12 to 1 by means of CSS (this can be changed. If you have such a need, please, see source).

The borders for transition to a different column number can be changed in the plugin file anotherbrick.css. The whole logic here is:

  • For windows with 2900 pixels, it will be 12 columns (100%: 12 = 8.3333%).@media screen and (min-width: 2900px) {
    .brick-col {
    width: 8.3333%
    }
    }
  • If the area is less than 2900 pixels, then we already have 100%: 11 = 9.09% and then the column number 12 should be disabled..brick-col {
    width: 9.09%
    }
    .brick-col:nth-child(12) {
    display: none
    }
  • If the area is less than 2600, similarly, we should define a new column width and remove the column 11..brick-col {
    width: 10%
    }
    .brick-col:nth-child(11) {
    display: none
    }

    And etc. (please, see css-file).

Therefore, we have fully imposed the task of mutual positioning of blocks on css, which means that no calculation of positions of elements is done and extra cpu resources are not used.

How To Create Masonry And CSS Hybrid Grid Layout

We have a grid of empty columns, but we should enter the content in it. Then the plug-in sorts a list of elements alternately arranging them in columns based on the principle: the 1st element in the 1st column, the 2nd element in the 2nd column, etc. When the plug-in reaches the last column, it keeps on filling the elements starting with the 1st again.

But one should keep in mind that the number of columns varies. Therefore, the plugin monitors the situation and as soon as there is transition from one number of columns to another, it rearranges the content in columns.

But one should keep in mind that the number of columns varies. Therefore, the plugin monitors the situation and as soon as there is transition from one number of columns to another, it rearranges the content in columns.

AnotherBrick(N);

where N stands for the number of columns

Summary

Well, our plugin really has no weak point, but rather a technical feature. Due to its focus on the grid structure of layout, it cannot be used for tasks where “bricks” have different width and the layout has no grid.

How To Create Masonry And CSS Hybrid Grid Layout

Questions of this kind are solved using “classic” masonry-plugins. Also one should be realistic: our plugin have no tile customization mechanism with a priority to fill the space as uniformly as possible. It just sorts them (tiles) out by columns. While masonry, isotop and others customize tiles on the priority of maximum density and sometimes can create more visually balanced layout.

Therefore, it’s better to use them in cases when the height of one block is 600 pixels and another is 100 pixels. If the height of blocks doesn’t vary by more than 3 times and there are more than 20 blocks, then the pattern will be the same in all plugins including ours. Major advantages of Another Brick include the css-mechanics, facility, and ability to adapt to user’s needs.

Moreover, there is a chance that the distribution of blog posts with our plugin will be more readable in terms of chronology. Since masonry plugins are placed close to each other, it often occurs that the dates are a bit mixed.

Part 2. Responsive Web Design. Mobile Devices

We brought up an issue of breakpoints for a desktop/laptop responsive site version in the previous article Responsive Web Design Using Breakpoints. Now it is time to talk about the mobile layout. Let us make two features clear for you to take full advantage of the information below. These features are viewport meta tag settings and the DPI. Though simple at first sight, these things cause much confusion.

Viewport Meta Tag

Let us leave lengthy theorizing aside and go straight to the practice.

Viewport Meta Tag is a command telling to the gadget how to scale the website. We would like to make an honest agreement on not trying to squeeze the mock-up evenly into the screen’s size, making the user’s vision blurry.

Responsive Web Design. Mobile Devices
Pic.1. Viewport is set incorrectly or absent
Responsive Web Design. Mobile Devices
Pic.2. The settings are correct, but styles for mobile devices are absent
Responsive Web Design. Mobile Devices
Pic.3. A fully functional mobile version of a site with correct settings and styles for mobile devices.

Add meta tag with parameters:

<head>
<meta name="viewport" name="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>

Set any width supported by the device, launch the site in a 1:1 scale and forbid further zooming.

What Happens When You Ignore Viewport:

Devices will scale the mock-up at random, leaving you no way to find out, how many pixels are actually displayed in the browser’s window.

DPI

DPI is a quantity of pixels (dots) per inch.

Modern mobile phones and some PCs have the pixels density of over 72. However, we do not believe their producers: they do not tell us the whole truth about coordinates used to display mockups. The mere size of screens in pixels does not say enough to do the math.

The thing is, mobile browsers use their own points, not equal to the physical pixels of a device. Usually these points are divisible by two in order to make information volumes visually comparable, considering the physical dimensions of devices. For instance, 1000 pixels for a smartphone is the size of a palm, 1000 pixels for a PC is the size of an A4 landscape sheet. That is why a mock-up which looks easy-to-eye on PC will look small and unreadable on the display’s screen.

iPhone 6 Example

iPhone 6 is 750 pixels wide. However, the browser divides this value by two and thinks that the full width mock-up has 375 pixels. A 750 pixels-mock-up will be either displayed only in half or squeezed in, depending on viewport settings.

Our honest agreement, however, keeps us from squeezing. It leaves us only displaying the mock-up correctly in 375 pixels, which are the said points in terms of high DPI mobile devices.

2 pixels of the gadget’s screen horizontally equal 1 pixel (point) for browser. The same in vertical direction.

Mobile Device Detection

We remember from the first part to use an abstract styles.css file with all styles and a responsive.css file containing breakpoints and styles for different statuses of the desktop version of a site.

Now we need 2 additional css files, for tabs and for smartphones. The files are added in this order:

  1. styles.css
  2. responsive.css
  3. phone.css or tab.css

To identify device type, use a server-side method: for example, PHP class mobile detect.

<head>
<meta name="viewport" name="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<link href="/css/styles.css" rel="stylesheet" type="text/css"/>
<link href="/css/responsive.css" rel="stylesheet" type="text/css"/>
<?php
require_once 'Mobile_Detect.php';
$detect = new 'Mobile_Detect';
if ($detect->isMobile() && !$detect->isTablet()) {
echo '<link href="/css/phone.css" rel="stylesheet" type="text/css">';
}
if ($detect->isTablet()) {
echo '<link href="/css/tab.css" rel="stylesheet" type="text/css">';
}
?>
</head>

All the CSS styles for mobile devices are written in the phone.css and tab.css files; we also include media queries to avoid a pileup of files. The logic of breakpoints activation is the same as for desktop/laptop versions, namely a cascaded inheritance of properties from the largest scale to the smallest one (see Part 1). Sometimes you only need 2 variants of style to be coded, for landscape and for portrait orientation. The minimal width is 320 pixels, while the said iPhone 6 Plus is 414 px wide: that is why some elements need to be adjusted to the size of the browser’s window.

Server Side Vs CSS & JS Detection

Traditionally gadgets have a high dots density, a higher than 1.5 pixel ratio, and smaller screens than desktops. However, technologies change and limits become more and more blurred. Apple laptops and desktops, for one, already got retina displays with a higher dots density. Resolutions of tablets and laptops have been already comparable for a while.

If you do not have a bulletproof solution for CSS-detection you will google to find a great deal of variants. All else being equal, the service-side device detection method is useful for small and medium web projects (see Part 1), as it:

  • works easily and reliably
  • does not require you to make up conditions by searching parameters of devices
  • enables an easy fine-tuning of interface elements and content design

All CSS files can be divided according to purpose:

  1. Common files for the UI and content + desktop/laptop styles (the latter can be made separately or placed into the 2nd file of this list).
  2. File for supporting the desktop version responsiveness.
  3. Mobile devices only.
  4. File containing only css-animations.

The code will be more readable and less cluttered. While tuning your work with separate files, each having a specific function.

Consider animations: they are, including durations and easings, pretty bulky. Being kept in a separate file, they will not interfere with the adjusting of main styles, and in case of doubt you can turn them off until you find the problem.

JavaScript is another method of device detection. However, if you do not want to reinvent the wheel, you have to install an external script or plugin. You will assign class mobile to tag body according to results and build up styles for devices of the .mobile .element { } type without dividing the styles into separate files.

The server-side device detection method has an advantage. It turns a small chunk of your code within the head tag containing conditions for linking style sheets into a somewhat of a headquarter, where tasks are distributed. This way you can enable not only different style sheets, but JavaScript files and chunks of code for specific devices as well.

It is simple and it works. You need less time to do that than you have already spent on reading this article.

More About CSS for Mobile Device

Media queries in CSS for smartphones are set like in the main site version. Don’t be confused that in css pixels are pointed out. This is css notation. The same points are meant here.

@media screen and (max-width: 640px) {
}
@media screen and (max-width: 480px) {
}
@media screen and (max-width: 375px) {
}

Here are some media queries to detect device orientation:

@media screen and (orientation: landscape) {
}
@media screen and (orientation: portrait) {
}

The combinations with coordinates and orientation may also be useful:

@media screen and (orientation: portrait) {
@media screen and (max-width: 1200px) {
}
@media screen and (max-width: 1024px) {
}
}
@media screen and (orientation: portrait) {
@media screen and (max-width: 1024px) {
}
}

Two Lifehacks

Lifehack # 1

iPhone – to prevent shortsightedness, apparently – enlarges fonts it finds too small without asking. To avoid this, write in the file phone.css:

html {
-ms-text-size-adjust: none;
-webkit-text-size-adjust: none;
}

Lifehack # 2

This inappropriate situation makes iPhones and iPads ignore viewport settings, interfering with fine tuning. There is often a bar navigation element with different buttons, fixed in the upper part of your mock-up and having the following properties:

width: 100%;
height: 40px;
position: fixed;
top: 0;
left: 0;
min-width: 990px;
z-index: 10p;

The property min-width: 990px is necessary only for the main version; you do not need it for the mobile one. You expect the element to spread out of screen boundaries, as its minimal width is too big. Far from it! iPhone decides to ignore viewport and forcefully squeezes whole mockup in such a way so that this element can fully fit into a screen so that entire website content badly decreases (see Pic.1). Stay alert and set the minimal width for fixed elements, as sometimes gadgets work against any logic.

Summary

  • Detect device type with the server-side method using php class (you can find similar solutions for other languages).
  • Continue making breakpoints with the size of the browser’s window reducing; the same way as in the main design version (the methods are covered in the previous article). It means your mobile layout inherits properties from the most compact desktop design.
  • Using the methods described for adding the necessary style sheets and scripts for each specific device as your construction kit, you can separate the CSSs of mobile and desktop versions to make them visually independent.
  • Remember to set specific viewport parameters.

It is unlikely that you will need additional media queries detecting retina to optimize graphics. Now all smartphones have a high DPI, so the styles in phone.css are completely suitable for them.

Download source files.

Part 1. Responsive Web Design Using Breakpoints

By the way, I have a few more helpful hints.

One side will make you grow taller…

….and the other side will make you grow shorter.

— Lewis Carroll, Alice’s Adventures in Wonderland

“Another article about responsive design. Really?!”, the surprised reader asks. Not quite. There is an infinite stream of posts about relationships: theoretically true, but in fact absolutely useless because of generalizations. We, however, are going to step aside from academicism and tell you how to succeed without generalizing too much. Namely, how to make life easier when working on relatively simple web projects.

Responsive Web Design Using Breakpoints

Though there is more than enough information on media queries, many people still get confused. They do not understand what the conditions for breakpoints activation are and how to control them. That is why we’d like to tell you in this article how to tackle the responsiveness of mock-ups and how to confidently use breakpoints.

Introduction to Breakpoints

Under the simple projects mentioned above we mean, generally speaking, everything not overloaded with user interface elements. These are corporate and portfolio websites, landing pages, websites for advertising brands and special offers, microsites, blogs and even small eCommerce shops. Along with making such sites mobile friendly, the responsive web design provides for a good presenting of their content and interface on laptops and desktops with various resolutions.

Drawing on the principles of web application development, the task of responsive web design is often solved by using CSS frameworks and CSS preprocessors. However, this approach makes things difficult if you work mostly with the layout, not front-end development. And the fine tuning of responsiveness using framework tools for a non-templated design is problematic and exhausting.

The point of the method is not new; we by no means claim sole authorship. This information has been always on the surface. One of the first books on responsive design, Responsive Web Design by Ethan Marcotte, even used it in its examples.

Although the reader was given the right ingredients, the order of putting them in the dish, though mentioned, was not stressed enough. We would like to tell you about the order that actually matters.

Limited Scale Range Example

Our example is a desktop-first website that can easily take a mobile friendly form. Our first tip is to work with two CSS files. The first file is a common one, let us name it styles.css: you code all the necessary styles in it. It will be added first. The second one, responsive.css, codes responsiveness and contains all media queries. Activate this file second to prioritize it.

Responsive Web Design Using Breakpoints

Write your HTML code exactly by your sketch. Do not think for now about responsive features and what to do with scaling the browser’s window smaller. For example, your mock-up is designed for 1200 pixels. Most likely, you expect it to be scaled and stretched further. In most cases it means you create the layout setting the width for each block in percents. (Probably not a problem for you: otherwise read the perfectly described solution in the mentioned book by Ethan Marcotte).

Eventually, you create a mock-up that looks well in the plus-minus range of scaling your original sketch. Say your content and control elements stretch correctly in a range from 1150 to 1500 when changing the screen size; then you have the familiar elastic layout.

However, expanding beyond this range results in gaps, and the information starts to look somewhat small. A considerable scaling down causes troubles as well. Parts of content overlap, the interface falls apart, and some elements just do not fit. The latter brings back scrolling and other relics from the “dark ages” before media queries.

Responsive Layout for Any Range

Well, let us type the queries in. The most common mistake web designers and html coders make is coding the styles exceptionally for a specific resolution in the range “from min-width to max-width only”. (Or relying on the conditional classification of screens offered by frameworks).

Range 1

For example, they code a lot of styles for different blocks in the range from 1400 to 1500. For convenience, we name it “Range 1”.

The media query is:

@media (min-width: 1400px) and (max-width: 1500px) {
}

Then “Range 1” is a set of properties that work only within the range of 1400-1500. For any other conditions, >1500 or <1400, these properties will be simply ignored.

Well, it makes sense that scaling the mock-up down 1400 doesn’t meet the condition any more, and the styles do not work. What is wrong?

Range 2

Let us add another condition. It is obligatory, as you need to set parameters of the elements for other resolutions. We name it “Range 2”.

@media (min-width: 1200px) and (max-width: 1400px) {
}

Naturally, the styles are set only in the 1200-1400 range. And here comes the problem. What if you need a part of “Range 2” elements to change, unlike the default styles, but in the exactly the same way the elements did in “Range 1”? And we have not inherited anything going from “Range 1” to “Range 2” as we unequivocally set each range to have its own parameters. In this case, you obviously have to copy some of the style elements changed in “Range 1” to “Range 2”. Then it accumulates like a snowball. Next ranges will have a bunch of duplicates. If the code needs fixing, more duplicating follows with a high chance for you to get absolutely confused. One may think of the pre-processors, keeping in mind that they smooth the situation with duplications. However, we are going to prevent this scenario from happening at all.

That is why styles for groups of elements should NOT be written ONLY for “Range 1”, ONLY for “Range 2”, or ONLY for “Range 3”. It is better to use the following method: for “Range 1” and all following points, for “Range 2” and all following points, for “Range 3” and all subordinate points, etc. They follow as if in a cascade, implementing fixtures as the website layout narrows in the browser.

Using Inheritance for Better Responsiveness

The superior “Range” cannot see the styles of the subordinate one. The styles, however, are inherited by the subordinates, and can be also modified by them or completely replaced and transferred further into the cascade. We get a mathematical description of a physical action. You compress the browser window, and additional modifying styles are applied to the existing ones as specific limits are met. It is more logical, natural and resembles training of muscles. Each change of the condition is caused by the downsized workspace (the increase in the workload on a body). The website’s elements initially were prepared for a slight change, then for a bigger, then for even bigger one. It makes sense to modify a “leveled-up” element which has already experienced an increased workload and become ready for more action.

Responsive Web Design Using Breakpoints

To begin to “level up” our mock-up for better responsiveness, we set the maximum possible width that does not make the mock-up look too pathetic. Say the mock-up’s width is 1500: it looks stretched but still not bad. This will be the starting point for scaling the mock-up down.

We have already agreed to code all the styles responsible for its current appearance in the default file styles.css. All the rules for media queries will be written in the file responsive.css.

Minimum Range Responsive Layout

Imagine we compress the browser window to 1400 and see an element to be shifted out of place while others still look as planned. We compress it by 10 pixels more and see that one more element will not behave. Well, in this case, you need to write a rule for the group of elements not “feeling comfortable” at the point of 1400. One small tip: do not go for the numbers standing for the standard display resolutions (1480, 1380, 1280, 1024, etc.). Keep in mind the scrolling width that varies in different browsers, so there is no magic in these digits.

Now:

@media (max-width: 1400px) {
}

In this rule we write a new parameter in the condition that became incorrect for this resolution.

For example, the element has a class with a bunch of styles, a 5% left margin and a 100% width. We still like everything about it, except the margin-left parameter: it is too high. So we tell the element to change it:

@media screen and (max-width: 1400px) {
.element {
margin-left: 4%
}
}

We deal likewise with every element craving our attention. After this we see that as soon as we reach the 1400 pixels point, the properties of the element are corrected. It is quite obvious that the new properties will not change during the further scaling down.

Say we compress the element down to 1200 pixels to see that this element with the new fixed properties does not look good to us anymore. Add the “When the width is <=1200, it will be like this» rule:

@media screen and (max-width: 1200px) {
.element {
margin-left: 4%
width: 70%
}
}

We have again reduced the left margin value and changed the width value. This way the object of our experiments will get these changes on reaching the 1200 pixels limit. These properties will remain as the workspace will shrink.

Let us continue our experiment. We compress the element to 990 pixels and see that the margin does not suit us again, though the width is acceptable. We add the “When the width is<=990, it will be like this” rule:

@media screen and (max-width: 990px) {
.element {
margin-left: 2%
}
}

We correct the required parameter in the rule (in our case, the left margin). The width parameter remains the same after the previous correction (on reaching the 1200 pixels limit).

The order of assigning styles within the CSS lets us use this logic:

  • from 1400 the margin=5%, the width=100% – our starting point;
  • from 1200 to 1400 the margin=4% (set), the width=100% (initial) – assign as soon as the 1400 limit is reached;
  • from 990 to 1200 the margin=3% (set), the width=70% (initial) – assign as soon as the 1420 limit is reached;
  • from 0 to 990 the margin=2% (set), the width=70% (initial) – assign as soon as the 990 limit is reached.

All this does not mean simply duplicating styles. What works in the range over 1400 pixels, works also in the range from 0 to 1400, unless we change these values for others as we scale mock-up down.

If we wrote only one rule –

@media screen and (max-width: 1400px) {
}

– then its content would be applicable to the range from 0 to 1400.

As soon as we add the rule –

@media screen and (max-width: 1200px) {
}

– we receive a separate control over the range from 0 to 1200, while the previous rule remains valid.

We enable the rule –

@media screen and (max-width: 960px) {
}

– and focus on the range from 0 to 990 without cancelling the rules for ranges 0-1400 and 0-1200.

It is as if we were “guiding” our mock-up as we scale it down, prompting necessary changes, removals and additions. However, we advise against aiming for zero: it is better to set the minimal resolution of a laptop or a desktop (for example, 990) as the limit.

Ethan Marcotte will insist that you should go on and write more new rules until you reach the minimum of 320 pixels on mobile devices. It is possible but exhausting for you to make all these fake-breakpoints, keeping an eye on the properties of your elements pixel by pixel. Besides, Ethan Marcotte simply did not know how to define the device type, so he relied on the identification by size (if it is small, then it is a phone). The more complicated the website is, the more breakpoints are needed.

The trickiest range is 800-960 pixels, not even seen by most users. There is no point in compressing the website browser to less than 990 pixels on a laptop or a desktop. And stretching the browser window to this scale on a phone is physically impossible. The maximum to reach is 600-800 browser pixels in the landscape orientation. It makes more sense to separate the styles for the responsive desktop and for the likewise responsive tablet/smartphone physically. Furthermore, the mock-up for phones usually requires more major changes. We plan to cover displaying the mock-up on mobile devices in a separate article.

To sum it up, we have “banned” our mock-up from compressing down 990 pixels (min-width: 990px, you know).

Maximum Range Responsive Layout

We still have a very wide display problem. As you remember, we started with launching the website in the widest possible quality resolution and then worked on its correct downsizing. Now let us see what happens if we bite from another side of the mushroom.

Most likely, it is not that bad if you have already set the maximum values for the website to stretch in the default style (max-width). There is still a chance, however, that some elements and font sizes need fixing.

Let us add a rule to the very bottom of our list:

@media screen and (min-width: 1800px) {
}

making rules for the mock-up in the range from 1800 to infinity.

If something makes us uneasy as we scale the workspace up to 2500, then we can write another rule in addition to the existing one:

@media screen and (min-width: 2500px) {
}

Setting Responsive Mock-Up Height

It may be essential to change the styles in your mock-up not only according to its width but also according to its height. The rules for that are written on the same principle.

The styles when the height is from 0 to 600:

@media screen and (max-height: 600px) {
}

The styles when the height is from 0 to 500; all styles of the range 0-600 that are not reassigned remain the same:

@media screen and (max-height: 500px) {
}

It is important to understand the priorities. You may have the situation when the rules for width values tell the element to be this, while the rules for height values demand it to be that. If you place the rules for defining the height at the end, after the rules for defining the width, the former will be applied in case of doubt. And if you place the height rules in the beginning, they will be canceled out by the identical rules for width.

For finer adjusting of the height rules together with the width values you can add a new query, separate from the common rules:

@media screen and (max-width: 1400px) {
@media screen and (max-height: 600px) {
}
@media screen and (max-height: 400px) {
}
}

Summary

By clicking this link you can download an example of the file with various rules for responsive design. We also would like to point out that we have nothing against the method we criticized at the beginning. Using specific properties for a certain range has only been completely acceptable if you need the styles of your code to work only within it and not anywhere else.

In general, media queries offer a lot of possibilities for various logical conditions; there are plenty of variants and methods for their use.

How the method works is shown in the following diagram (the margin and width values were chosen randomly, without any particular design in mind and purely for a mathematically visual demonstration):

Responsive Demo

We have cast a little light upon the independent use of breakpoints in responsive mock-ups with efficiency and confidence. This can be applied both to interface elements and content alignment. We have shown how to stop believing in the miracles of bulky ready-made solutions and start using simple and reliable methods. All this helps to avoid making projects difficult for no reason.

Think Big! Create Your Own 3D World

Think Big!

Firstly, we would like to tell you a little bit about our team. We specialize in mobile projects, which consist of many modern features, including augmented reality, which we discovered and started to learn about some time ago.

And here’s our story about the greatest discovery we made within two days. No chance you will ever guess it! It’s all about creating an augmented reality on our own!

We are sure everyone knows about the latest achievements in such fields as computer graphics, virtual and augmented realities in video games, promo, demo versions of applications and so on. No doubt, today such things look very impressive, considering the fact that five years ago all of it seemed far away in the future. Sometimes it seems like a fantasy world has already come knocking on our door.

Nevertheless, we have to tell you that not all of these things are as simple as they seem.

In practice, all of these features are extremely difficult. Trust us, when you try to deliver them to our world, you are going to be faced with all kinds of insuperable problems. Eventually, it may just seem like too much of a hassle!

Think Big!

First steps on our way to success

As usually happens, we spent one evening in an attempt to solve all kinds of problems connected with studying and comprehending augmented reality. We didn’t know what to do, but we had to do something, since we needed to complete our task. Time went by…

We experienced only feelings of fatigue and hopelessness, wishing we were somewhere else. We remembered about Oculus Rift, Google Cardboard and other similar things. Once more, we were surprised about such a thing as Cardboard, which literally gives everyone the chance to see and feel another reality, and it costs so little.

At some point someone slipped in the thought: our real world looks different if we look at it by means of virtual reality. Then, as usually happens, there was lots of giggling and hours of discussion and counter-argument. Then we finally decided to check it out in practice.

What a pity – we did not have a Cardboard but …. we had two iPhones instead! Two eyes, two cameras and two iPhones – what else did we need?

We decided to observe the world using an iPhone camera and to check if we were right. Then we remembered that we did need something, in the place between our eyes and the screen. In half an hour of frenzied discussion about virtual reality glasses, we concluded that Google Cardboard was the right choice, if we compare its price and quality. We did not want to reinvent the wheel and embarked upon the usual collection of lenses and a magnifying glass. Previously we had agreed that this would be more suitable for a prototype.

Sometimes we wonder how it happens that we badly need something but it is just not there. So, we went to the nearest shop and bought magnifying lenses. There were several options, which differed in size and optical power. You would not believe it, but we had a confab near the counter to decide what type of lenses would suit us best of all! As a result, we also bought some plasticine, which would be of great help as a fixing material.

Think Big!

It took us no more than five minutes to rush back to our office. Then we all in turn scrutinized our prototype, estimating nuances of perception. The world through iPhone cameras looked surprisingly complete, even a little cartoonish. The feeling was similar to what you get at a 3D movie theater; the only difference being that all actions happen in the immediate vicinity.

This could have been where the story ends…

Unusual thinking – the core of the success

However, we were really inspired by the results. We wanted to continue our search for what we wanted to achieve. Firstly, it became clear to all of us that we needed to create a more reliable construction since plasticine does not hold an iPhone really well, it is difficult to wipe off and the adjustments get constantly changed.

Also, some technical aspects of the future design had to be resolved, for example, the optimal distance between the eyepieces, the distance between the two iPhones, the required optical power of lenses, and the need to correct distortions.

Think Big!
Think Big!

All that we needed was at hand: an AutoCAD application and the drawing. We did have some experience with these. The very next day we had a plywood model of a Cardboard, but only for two iPhones! The effect was even better. We began thinking more about what to do next. While it was still only a project, it was very cool to look at our own legs through this device!

It did not take much time for the next idea to hit us. In fact, we were fully engaged in augmented reality, and, for example, were able to impose any pieces we liked on markers, pictures, video or three-dimensional models. After some time spent on the pros and cons of programming, we decided, for a start, to try to impose a three-dimensional model. Then, just like little kids, we watched the world through this invention and estimated the progress of humanity in the field of augmented reality.

All our assumptions, which we were afraid to voice out loud – have come true. Despite all the difficulties of imposing three-dimensional models over markers and never-ending problems with bad accuracy and stability, the world through two iPhones has turned out to be really complete.

Accuracy of definition of points and the plane of a marker have become sufficient to place any model on two iPhones in the correct position. The fact is that not only the actual model seems solid, but you can also walk around it, and get closer and examine all its details. It has become just like a part of the real world!

Think Big!
Think Big!
Think Big!
Think Big!

The greatest fruits of our labor!

We were blown away by the results. It was just like a revelation! On the one hand, it is a very obvious and simple piece of technology, which is literally available to everyone and is no more expensive than a Cardboard (of course, you need to have a second iPhone). On the other hand, the effect is much better than the usual augmented reality everyone can get via one camera.

Later it became clear that there is practically nothing comparable in real life to our creation!

Nevertheless, the most amazing thing in this story is that you do not need anything out of the ordinary in order to create a similar device. If you wish to make it, then you need just to have two identical mobile devices, for example, two iPhones.

Think Big! Create Your Own 3D World

We have an excellent device, but how do we use it?

If we use our imagination, we can think of a number of situations for which this device would be useful. Let us look, for example, at the idea which came to IKEA Store management. This company has developed an application, which, thanks to augmented reality, makes it possible for you to place a 3D model of their furniture in your interior. Such a method helps you to understand the possibilities of buying particular items of furniture: by seeing them on a scale of 1:1 you can see whether their size will suit your interior.

The device we created is similar to this application, but it has already moved into the stereo. If we consider that the stereo effect provides the possibility of estimating the depth of space, then the potential of such device becomes even greater. In addition, in the long term, such an approach would be able to improve the quality of recognition of markers and the imposition of models.

We have also decided to make a demo version of this project for all visitors who come into our office. We are planning to prepare a set of markers and we will make a new design in our office so that everyone can see an alternative world through a similar device which delivers augmented reality.

Our plans for the future

We decided to make a plan for the immediate future and set the following tasks:

  • Synchronize applications on two iPhones so that animation and transformation of three-dimensional models will be synchronous;
  • Make a record and process a video stream on two different devices (iPhones) simultaneously in order to receive video in stereo;
  • Increase the frame rate of each layer. (It turns out that smooth display for a flat image lags while watching a video in stereo);
  • Design glasses from materials which are more available on the market and overcome the current deficiency.

In our view, our device should:

  • be smaller in size;
  • be more convenient for hands-free use;
  • allow the installation of various mobile devices.

It is important to add the possibility of adjustment for differences in people’s eyesight. In order to achieve that, we have to choose the most suitable lenses from those which are currently available on the market.

Now you can see that the model we have created can be compared to Oculus Rift and Cardboard technologies. However, if we try to look further, then we will understand that our creation can be much better than any technology on today’s market. But we need time…

Maybe you have something to share with us about your own views of this project?

Top 5 reasons to use Angular.js

Hard times, when we have to deal with the legacy code, that during its long existence in web, moved from developers without documentation, thus bringing with itself a bunch of complicated interfaces & making the code more & more complicated.

AngularJS

It’s a common knowledge, that a developer never built things keeping maintenance and support in mind. But now they are in search of the best way-out to fix these dents & restore the sanity in applications.

Developers who were looking for alternative ways to stack upcoming applications can use AngularJS to bring sanity to apps. AngularJS is a relatively new JavaScript framework from Google, designed to make front-end development a piece of cake. It possesses a wide range of frameworks and plugins.

But one should keep in mind, that while adding AngularJS to the web app, one needs some careful evaluation. It’s connected with the usage of JQuery or JQuery UI & other javaScript libraries in the app, because adding extra lines of code may slow down your own JavaScript execution. Anyway, for all that, we cannot ignore the following long-term benefits.

1. More close to MVVM Architecture:

AngularJS integrates original MVC software design pattern to build client-side web applications. However, AngularJS doesn’t implement MVC in the traditional sense, but rather something closer to MVVM (Model-View-ViewModel), where:

  • Model is the data in the application, a plain old JavaScript object (POJO). Users do not need to inherit from framework classes, wrap it in proxy objects, or use special getter/setter methods.
  • ViewModel – ViewModel helps to maintain specific views. ViewModel is the $scope object that lives within the AngularJS application. $scope is a simple JavaScript object comes with a simple API designed to detect and broadcast changes. Rather it is the specialized controller important to settle augmenting $scope in the initial state. It does not store states and neither interacts with remote services.
  • View – is the HTML that exists after AngularJS has parsed and compiled HTML to include markups and bindings. MVVM is a solid foundation to design applications. $scope shares reference to data, controller defines objects behavior and view handles the layout.

2. Have a Declarative User Interface

To define app’s user interface AngularJS uses HTML. HTML is less likely to break than an interface written in JavaScript. Special attributes in the HTML determine which controllers to use for the elements. With HTML, app development simplifies in a sort of WYSIWYG. So stop spending time on program flows and what loads first, simply define what you want, Angular will take care of the rest.

3. Two-Way Data Binding

Two-way binding is the most awesome concept in AngularJS. Not only visually pleasing feature, but also has a fascinating real-time concept. Data-binding directives provide a seamless projection of models to the application view. Because of its seamless, no efforts needed from developers. With Angular two-way binding, the view and model no longer require fresh cycles as they may be prone to bug or simply need a lot of redundant and tough to maintain the render code – it handles the synchronization between the DOM and the model, and vice versa.

4. Uses POJO Data Models

Data models in Angular are POJOs, so you no longer need the getter/setter functions. add or change properties directly on it and loop over objects and arrays. This makes the code look clean and intuitive.

5. Easy Adjustable Filters

Before any data reaches View, filters help to clean the data and involves in something simple such as formatting decimal places, reversing the order of an array, filtering an array based on certain parameter or making changes in pagination. Filters are similar to directives as it works as standalone functions that are separate from your app, but it only bothers about data transformations.

Conclusion

In this article, we’ve covered 5 features of AngularJS that our developers consider to be the most winning. These 5 features can help you to get an idea why nowadays AngularJS is trending. For sure, AngularJS is not a panacea for all web apps, but it can stand the generic apps in good stead.

Anna Vasilevskaya
AI modified real photo
Anna Vasilevskaya
Account Executive

Get in touch

Drop us a line about your project at
[email protected] or via the contact
form below, and we will contact you soon.