Let’s create a Slider. Again…

Tags: , , , ,

Let’s create a Slider. Again…

Let’s create a Slider. Again…

There have been three posts about creating a Slider with Scala.js already. The first post was about how to do it in principal. The second post was about the ScalaCSS library in general and how one could use it with our Slider in particular. The third post was about how to use a JSON object with our Slider. Now it’s time to compare Scala.js with its closest alternative: I mean TypeScript (a typed superset of JavaScript that compiles to plain JavaScript). It’s fun: the first version of this Slider was written in CoffeeScript. It took me about 3 hours. I

Continue Reading

Slider 2: a JavaScript object instead of case classes

Slider 2: a JavaScript object instead of case classes

Two weeks ago we talked about how to create a beautiful Slider in Scala.js Our Slider works well (See Demo). But there was one thing that worried me. We need to define a Slider property as a Scala case class. It’s not bad, if our Slider is a part of a single Scala/Scala.js application. But what if we need to install our Slider into some HTML page. In that situation we should think how to pass some JavaScript object into the Slider. At first sight this is a frightening problem. It turned out that it is not. All we need

Continue Reading

Let’s create a Slider

Let’s create a Slider

I have started to write code on Scala.js half a year ago and I can’t stop doing it. I should say that I love JavaScript and I wrote hundreds of thousands lines of code. But there is one thing that always frustrates me in JavaScript: It hasn’t many useful things that other languages have. You should use some or other framework (I used yui and jquery in the past). I used CoffeeScript a year ago. Today it’s time for Babel. Nobody wants writing plain JavaScript anymore! I choose Scala. See the Demo to this post. A Slider is a program

Continue Reading