How to make our life better

03 Oct 2018

Introduction

How to make our life better? Use UI frameworks because they make our front-end design eaiser. Then, we have more time to do other things. UI frameworks provide a huge number of build-in classes in order to simplify the works of developers. In my opinion, the relationship between raw HTML + CSS and UI frameworks is similar to the relationship between programming languages and libraries. For example, if we need to sort an array, we can spend one hour to implement a quick sort class, or we can use a quick sort library which has been implemented and tested by other people. Obviously, most of us will choose the second option except those who are taking algorithm course. However, if the quick sort class is a special version, we still need use base programming languages to modify the function. UI frameworks make the process of development faster and easier, but they have constraints. Therefore we need raw HTML and CSS. In the rest of this essay, I will discuss pros and cons of UI frameworks.

Advantages

UI Frameworks speedup our approaches. In the past two weeks, I used Semantic UI to recreate some websites such as Islandsnow and Dell. Compared to the experience before we were introduced to Semantic UI, I spent less time but created more complicated webs. It is also good for demonstrating our ideas and concepts just like brainstorming because we can only use half an hour to build a simply version by using UI frameworks.
The second advantage is that our codes become much shorter after using UI frameworks. For example, we have to divide the screen and make four blocks per row if we want to create a view as shown below, but we only need to use the ‘four column grid’ class to approach this by using Semantic UI. From this example, we can also see that UI frameworks are consics and expressive. Instead of saying "there is an item; there is an item; there is an item; there is an item", saying "there are four items" is much easier and clearer because it is close to natural language.

The third advantage is that UI frameworks help us reuse our previous works. From the two WODs of this week, I found that it was very easy to reuse the project that I build last week. I think one of the reason was that by using UI frameworks, I put all the contents into several containers such that it was easy and convenient to modify the parameters of a block(container). The other reason was that the scripts were very clear and simple, so I could find the place I needed to make changes very fast.

Disadvantage

UI frameworks have many options for every elements, but users cannot get fully control of the scripts. For example, Semantic UI allows us use keywords ‘right’ or ‘left’ to place an item, but we don’t know which part of right or left the item will be allocated until we run the script on Chrome. Moreover, if we want to place an element at a specific place, we still need raw CSS to control it. This is similar to C and Javascript. Javascript has garbage collection feature that manages the usage of memory, which is convenient to users. We know the useless memory will be reused, but we don’t know how and when the interpreter does this. If we want to release a block of memory as soon as possible, C is the language we needed.

Conclusion

Even though UI frameworks sometimes are limited and not flexible, they reduce many works. Our codes become shorter and more readable, and we can spend more time in developing our designs rather than repeating the same process. While the UI frameworks can simplify the process of development, raw HTML and CSS are still useful since they provide the fully control of our scripts. I think we should use UI frameworks to approach our designs as the first step. Then, we can use raw HTML and CSS to adjust our designs. This is how UI frameworks make our life better.