10 Things You Need to Know About CSS

How to
10 Things You Need to Know About CSS
Image generated by ChatGPT (DALL·E)

CSS may look as a simple language. In fact it can be simple only to use, but definitely not simple to maintain. Observing that the maximum number of people who can productively simultaneously work on CSS is one – @threedaymonk The skills required to write good CSS code are by and large the same skills required to write good code in general. – Lea Verou Everybody who used to work on a large-scale projects knows how hard it can be to keep constantly growing CSS sources readable and consistent, styles reusable and loosely coupled.

Creating a web-component: VanillaJS vs X-Tag vs Polymer

HTML5
Creating a web-component: VanillaJS vs X-Tag vs Polymer

It seems like these days the most trending concept in the HTML5 world is web components. But what the fuss is all about? In order to make such a simple thing as a container expanding on click in past we needed to write CSS and JavaScript. Today thanks to checkbox-hack and :focus or :target pseudo-selector we go on with CSS-only. In fact by using summary/details elements we do not need any tricks with CSS to make it working, considering that browser already supports this feature.

Pure CSS Magic: Creating Stylish Modal Windows Without JavaScript

CSS
Pure CSS Magic: Creating Stylish Modal Windows Without JavaScript

What we are going to do is a modal window that opens in the center of the screen by pressing a link while everything that underlies the window becomes blurred. It can be done by [Dialog element](http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-dialog-element “Dialog` element”), but these day we don’t need any JavaScript realy to solve this task. Well, there are two main techniques to handle onClick events in CSS – checkbox-hack and selection by :target. The second way binds our modal window to a URL hash.

JavaScript MV* Framework - Making the Right Choice

JavaScript
JavaScript MV* Framework - Making the Right Choice
Image generated by ChatGPT (DALL·E)

JavaScript frameworks have been proliferating recently with a frightening rate. Just take a look at TodoMVC that provides dozens of MV* framework-specific implementation for a single task. It gives a felling how must be confused a developer making a choice for a framework. Some time ago I even ran into a manifesto (http://bitworking.org/news/2014/05/zero_framework_manifesto) against JavaScript frameworks. I do not completely agree with the author, yet he has a point – it’s too many of them, too many of meta-languages to study that you as a web-developer may not need at all.

Enabling Templates in Client-Side JavaScript with CJSC

JavaScript
Enabling Templates in Client-Side JavaScript with CJSC

In spite of most server-side languages JavaScript was not designed for templates. Yet we have plenty of template engines for client-side JavaScript now. They allow us processing templates, but what about declaring a template? As you know JavaScript doesn’t provide a decent way to assign a multiline text to a variable. Well, you can go with string spitted by back-slashes, but in this case a trailing space would break your JavaScript.

Modular JavaScript in the browser with CommonJS Compiler

JavaScript
Modular JavaScript in the browser with CommonJS Compiler

JavaScript was designed as a script language that is easy to embed in a larger host system and meant to manipulate the objects of the host system. With the advance of HTML5 formerly mostly static web-pages are turning into sophisticated web-applications. Now we expect JavaScript code to be scalable and modular. But how when JavaScript has no built-in facilities to combine distinct scripts? Surely, you can insert a script element into the DOM and therefore have outer scripts loaded dynamically.

Mastering Responsive Web Design with HTML5

How to
Mastering Responsive Web Design with HTML5
Image generated by ChatGPT (DALL·E)

Bobby Solomon, from the Disney team, stated last year: “Honestly, our team is bored of talking about responsive design. It’s how any self-respecting website should behave in 2012”. Well, responsive web design (RWD) is no panacea, but definitely that is an indicator of good quality in the times when diversity of access point devices steady grows. If simply put, RWD is a way to provide a decent user experience (UX) on a web-site agnostic to the devices or platform it is accessed from.

Seamless Development: Mastering Live Reload

JavaScript
Seamless Development: Mastering Live Reload
Image generated by ChatGPT (DALL·E)

We all are taught not to repeat ourselves while coding. Nonetheless we keep repeating the same operation over and over – pressing F5/Ctrl-Rfor browser reload every time we have to examine the results of our last changes. After watching some of Paul Irish screencasts where he was showing the magic of live reload under Sublime Text 2 I wondered if I could employ something alike while keeping working with my beloved NetBeans IDE.

Importing External Files in JavaScript

JavaScript
Importing External Files in JavaScript
Image generated by ChatGPT (DALL·E)

As JavaScript application grows, navigation on the code becomes a hell. It comes on mind how useful would be to have ability including JavaScript files. For example, thanks to include/require statements we can build an expressive file structure in PHP. Let’s say following PSR-0 standard we have one class per file (or one prototype object per file in JavaScript) and class name (namespace) reflects the location of the file where it belongs.

Mastering HTML5 Forms: Validation, Inputs, and Beyond

HTML5
Mastering HTML5 Forms: Validation, Inputs, and Beyond

Since the very beginning of HTML there were no much of changes regarding forms until recently. Yet, there was an attempt to bring a new API with XForms, but it was never really supported by any of major browsers. Now we have a comprehensive consistent Form API which allows us to create full-fledged forms even with not help of JavaScript. Everything sounds so exciting until you try to use HTML 5 Forms on real projects.

Google Analytics in Your App: Unlock Insights Without Leaving Your Dashboard

PHP
Google Analytics in Your App: Unlock Insights Without Leaving Your Dashboard
Image generated by ChatGPT (DALL·E)

Reasonably statistic analyses belong to CMS ACP reports. So, CMS vendors tend to include some into their products. However, they often make statistical data collection and analysis a part of CMS. It usually gains some primitive reports and affects application performance. I believe any sound statistic analysis can be delivered only by a dedicated specialized application. Meantime CMS can be used to represent the reports prepared by that application. Have you ever fancied displaying Google Analytics Reports in your CMS?

JavaScript Asynchronous Dependency Loader

JavaScript
JavaScript Asynchronous Dependency Loader
Image generated by ChatGPT (DALL·E)

A substantial web application doesn’t need to wait until all the required JavaScript libraries loaded. Usually most of them can load asynchronously and start acting whenever they are ready. Most commonly used approach here would be AMD. That’s a sophisticated and time-proved solution. However to use it with libraries, you must have them converted to modules. I don’t appreciate the idea to interfere with 3-rd party library code. At the same time I still need non-blocking loading and dependency being resolved in my code.