UI Frameworks. Is less more?

21 Feb 2017

Preface

Anyone who has sat down to develop a website from scratch (pure HTML or CSS) has probably had a bit of success. Maybe not much, just a tiny nugget of success. Perhaps, rather, they had a huge mound of success by creating a massive website with divs flying around, a perfect color scheme, and a mountain of style sheets three miles wide. At the end of the day there was a website but is that enough?

The person who created the beautiful website probably sat around thinking about how much time they spent working on the project, and most likely found that a lot of their css sheets are specific to the page they made. The person who only made a barely functional page was probably kicking themselves thinking of how they could have made the page prettier. Sadly the solution was just a google search away. Frameworks. But are they a good solution?

Brief

After having spent a fair amount of time working with Semantic UI I wanted to ask myself, was it worth it. For the purposes of this write-up I will be using Semantic UI for any examples given.

Several pieces of my semantic UI work can be found on my Github here. These are available for forking. For a live version of Semantic UI that I created for a personal project see Hackmeleon.ga.

The Pros of Frameworks.

They look amazing! It’s a matter of opinion but near any attempt with enough gall to sit down and work with a frame work can pump out a moderately pretty website in less than an hour. They say looks aren’t everything and that’s true but websites are a mostly visual medium. The ability to express what you want to in a pretty way has been an art that people have worked on since the beginning of humanity and it almost feels like cheating to write out a few words in the class list and be bestowed with such a gift.

This isn’t to say that a website that doesn’t use a framework won’t be pretty, but it helps. Furthermore, having a built in consistency across all of your work has it’s own magical effect. In the User Experience Theory consistency is shown to wield positive visceral responses from users. This ultimately boils down to the human desire to feel in control and to maintain understanding of the current situation.

You may be asking yourself, if ease of use and prettiness is what i want why not use a website builder with templates? It’s a fair strategy. Those who require minimal control can often find these helpful, but that lack of control steals something from the developer. Sure you could still change colors of things or perhaps have control of how many boxes you have appear, but working with framework allows the same freedom of working with the language with a little something extra peppered on top. It’s like finding the perfect level programming language. Most people don’t desire to create large scale games out of Machine Code or on top of another executable (although there exist outliers on both sides).

The Cons of Frameworks

Psh you’re to good for a framework. You’ve been writing css for years without any problem, you could bang out anything in those frameworks and sure it might take you a little longer but it would sure as heck take a lot longer for you to learn it. It’s natural, why learn a new language when english is already what you speak. This isn’t my personal view point (as an aspiring software engineer) and i imagine a lot of linguists would be on my side, but I can see the merit to it. Reinventing the wheel is a lot of work (but the first wheels were probably wooden so I suppose we’ve done it a lot).

My first reaction with learning Semantic UI was that there was a lot to memorize and almost none of it worked without the other stuff. There didn’t seem to be a good place to jump in to it, and it almost looks worse if you only put in the time to learn half of it. So i took a moment to stop, and think about the first time I actually started writing CSS and HTML. I deeply wanted to tell myself that it was the same but it wasn’t. There are good tags to learn first, HTML actually lends itself to being learnt in the fact that tags seem to come sequentially in the page, while Semantic UI does not have this benefit. In the long run this won’t be a con to anyone who deeply wants to use a framework, but at some point everyone has to learn something.

Conclusion

So should you use a framework? Almost certainly yes, if you have a design in mind and want to throw it together as fast as possible. This however doesn’t apply to people who want to understand how things work on the back-end. Personally I enjoy learning these sorts of things so making a framework would be right up my alley, but having the consistency, even if you have to make it yourself is something that is just too valuable.