THE BLOG
05/01/2014 11:23 am ET Updated Dec 06, 2017

4 High-Level Languages for Front-End Developers

Note: Any good developer knows about the technology advancements in the web, and will most likely be aware of the technology available for making the programming workflow easier. If you know of the popular CSS preprocessors, and languages like TypeScript and Dart, this column might not be of any good use to you.

High-level languages involve giving the programmer all the necessary tools to make his/her life a lot easier. These high-level programming languages are more human, and more friendly to the eyes. Thus, a high-level language will usually be much easier to read, write and maintain.

I've worked with several of these languages, but mostly Sass, a CSS pre-processor which makes CSS development fun and exciting. I guess you could say it enables you to 'program' in CSS, rather than 'script' your way through. I hope that you'll get excited enough to try any of these high-level languages in your next project.

Sass

2014-04-30-SassSyntacticallyAwesomeStyleSheets.png

Dan Cederholm - Co-Founder of Dribbble - wrote a magnificent piece on why you should use Sass. I think the biggest incentive for me was the ability to 'variable' my stylesheets, enabling me to avoid constant blocks of repeated CSS code.

Sass (short for Syntactically Awesome Stylesheets) plugs the holes in CSS as a language, allowing you to write DRY code that is faster, more efficient, and easier to maintain.

Besides variables, Sass also has 'mixins', which you can translate to the CSS equivalent of programming functions. You can easily build rules, then implement and mix those rules with other sets.

LESS

2014-04-30-LESS.jpg

Less is more, right? You can apply that metaphor to any of these high-level languages. Many developers have opinionated the differences between Sass and LESS, one of those developers is Chris Coyer - he goes through a detailed review of both languages, and shows us the crucial parts which make all of the difference.

I recommend to see this GitHub gist, it's a comparison of the syntax of both languages, and perhaps can help to make a better decision on which one to use.

LESS compiler is written in JavaScript, it's easy to just throw it inside of your pages, alongside the LESS stylesheet you've built. After that, the compiler takes care of making your LESS code convert to CSS, whenever the page is loaded. Today, developers advise for compiling LESS directly to CSS, and only then serving the compiled version.

Dart

2014-04-30-DartStructuredwebapps.png

I find it funny that the homepage of Dart states that it's a 'new platform', when it has been around for over three years. Dart experienced a lot of difficulties during the early launch days, but has managed to attract a reasonable sized community of structured web enthusiasts.

Dart is a web programming language with libraries, a virtual machine, and tools. Dart helps developers build structured modern web apps, and it compiles to JavaScript to run across the entire modern web.

Dart code can be executed in two different ways: either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript. This means you can write a web application in Dart and have it compiled and run on any modern browser.

TypeScript

2014-04-30-TypeScriptLanguage.jpg

Earlier this month, Microsoft announced TypeScript v1.0 - which is a clear indicator that this language is being actively developed, and given attention. TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.

If you dig deep enough, you'll learn that many businesses are switching over to TypeScript. Among these reasons is a really great type system, their determination to implement the latest ES6 features, and the fact that TypeScript provides quite readable code, once you compile it.

TypeScript is known for having a really slow compiler, which is a big let-down for many, but that shouldn't stop you from exploring TypeScript more.

Scott Hanselman wrote a tiny introduction to TypeScript, back in 2012, which led to the community exploding in both rage, and insightful revelations in the comment section. I highly recommend this as a starting point.

High-Level Programming

It's not as bad as it might seem at first, some of these languages are truly remarkable, and are taking away a lot of strain from the traditional development environment. How can you say no to variables in functions in CSS? Do you really enjoy typing all those blocks? I guess, it's great the first couple of months, while you're learning.