BLOG      #webdev      Internet is drunk!

Text Size:

Internet is drunk! June 28, 2015

I believe this whole direction is rooted in laziness to learn CSS.

Automation

This blog is not about Richard and his mom

Introduction: The hype

CSS pre-processors and command-line coding is not only cool but very effective when done right. SASS mixin parameters with the combination of tools like Gulp made web development really fast and nice. Automation is great!

But it flipped overboard and this article by Cole Peters is great: On writing real CSS (again)

Setting up a workflow with CSS pre-processors and command-line tools takes time and commitment to the technology powering those tools.

Looking at it, it seems as back-end developers, forced to do front-end development, figured out a way to make front-end development as advanced as back-end development.

AngularJS is a Javascript framework that became an internet religion. ReactJS is another Javascript framework religion. These frameworks are awesome for advanced DOM manipulations and real time user interactions: Hacking the web to do things it wasn't built for. You can get hired by just master one of these frameworks!

Let's talk about ReactJS, it's a framework much like AngularJS promoting writing code that honor said framework above common web standards and rules. To be fair most frameworks do this. ReactJS is promoting inline coding. Meaning instead of keeping logic and GUI separated it combines it.

ReactJS gave AngularJS a run for popularity and out of this came Radium: Inline Styles are the Future and video presentation "Inline Styles are About to Kill CSS"


The war against CSS

It seems to me that web developers has become the tool of their tools! (JS) Frameworks come and go, CSS is 20 years old and as integrated into the browser as Javascript.

An Example: While I utilize inline CSS in occasions where an element won't be repeated manually again, it however means I can let my favorite CMS or Programming Language repeat that element as long as I only have to edit the inline code in ONE PLACE.

The whole point of NOT using inline code is we want 1. Separation and 2. GLOBAL control! MVC/OOP aside I can't imagine or grasp a website where there isn't an overall stylesheet and everything is being coded inline. // I suspect Facebook will soon have 16,000 different styled elements :D

What did you say? “styleGlobals” - are you telling me that LOADED Javascript will read from a STYLESHEET (In Javascript syntax) to determine what INLINE CSS code it should assign each element!? Now you ship an external file like we did with CSS. "It can include event state of the element!" - oh, you mean like CSS Click Events + another link

I don't understand why we want Javascript and CSS to compete with eachother... Style is style. Logic is logic. Keep'em separated!

This is fixing shortcomings Javascript developers has with CSS pre-processors (According to Colin Megill no one has coded real CSS since 2007). If we are out to "fix things" (=BS) why not use browser language and C++ then? - THINK!

I've been coding websites since 1997. Nothing is more awesome on the web than CSS. It can drive you crazy when browsers won't support same features, but that applies to Javascript as well. I believe this whole direction is rooted in laziness to learn CSS. The talk about teams with CSS grown to unmanageable sizes, tells me they SUCK as a team. Are we to believe that Javascript injected INLINE styling will fix this!?

I am not against change. I read about Rachel Andrews CSS Grid Layout with great excitement and I got tempted to learn Ruby on rails after watching this presentation: A Maintainable Style Guide But once again:

"A common question has been how do we handle CSS and JS related to these components. Unfortunately I don't have a clever answer for this at the moment, it's a mostly manual process."

Eric Elliott makes the case that the inline coding happens in components and as of such only needs to be edited in one place.

He says "React is all about separation of concerns." I read: "React adds a new layer of logic and style to huge websites where developers have lost control over CSS and let it grow to unmanagable sizes." Am I reading it wrong?

Yet Another Article about Fixing CSS
"Introducing Incremental DOM"







"Basically, both Google and Facebook are desperate to find a baseball cap that they can put on backwards. Angular is Google's baseball cap. React is Facebook's."






Conclusion

Take a shower, get sober and go learn some REAL CSS - while taking a break from CSS pre-processors!




// jQuery, still undisputed:




Please comment! Am I being too cynical? :)


Do NOT follow this link or you will be banned from the site!