About YouTeeRock Online

When Dropbox changed the way it serves public documents and files, I know that my Heroku sites are in trouble because they simply show their videos from Dropbox. It's been years since I last dabbled in Ruby on Rails so my knowledge is rusty, so I looked around for a way to host my sites including all the videos in it, so I got me a Linode box.

I decided on using Vibe.d because once I compile the code, the web server and the web pages are there in one bundle. After uploading the compiled code, I upload the CSS, images, videos and javascripts into the /public subfolder, with the compiled code automatically becoming the document root. One thing I have to get used to is the usual edit-save-refresh cycle became edit-save-compile-wait-refresh cycle (with the wait part fluctuating in length). After compiling the 'final' code, I upload the compiled file to my Linode box, run the file as background process, and I get my site working.

After the initial configurations (MongoDB, Nginx as proxy, Let's Encrypt for HTTPS), all I have to do is edit my code, compile, upload-and-overwrite (using Filezilla), kill the running program (I'm a fan of 'sudo killall'), run the new copy of the program, and the new version is up! Vibe.d is so convenient for a guy who doesn't have infinite time on his hands maintaining his web server and is not an expert Linux admin.

The projects here were originally in Ruby on Rails and converted to Vibe.d. The find.your.tutor site is a fully working production app.


About Vibe.d

From their website: "Vibe.d is a simple, fast and productive web application framework. It is a full HTTP(S) stack with client, server and proxy implementations. It has native database drivers for MongoDB and Redis. It uses asynchronous I/O to maximize speed and minimize memory usage."

It uses Diet templates yet you can still use HTML. It prefers fibers to threads. You can separate the concerns to follow the MVC pattern, but it's up to you, you have the freedom, it is not an opinionated framework like Rails. All the features of a modern web framework are there: REST, WebSockets, NoSQL/RDBMS access, asynchronous I/O, you name it. The authors of Vibe.d are not keen on advertising themselves, and I like that.

What I really like about Vibe.d is it is slow to change. You will say "What?!" (or, more apt, "WTF!?"). That's right, it is slow to change, and I like that. That means if people find new tutorials or new books about it, they will not find them already obsolete. That's what happened with Ruby on Rails (and now, sadly, Meteor). They keep changing so fast that by the time people stumble on tutorials or books, they are already obsolete, and people were turned off. Vibe.d has been around since 2012 yet as of this writing (July 2017), it is just in version 0.8.0. All I can see from that careful, studied slowness is stability, reliability and consistency.

With Rails and Meteor, the potential to dominate the landscape was there as they were already inherently revolutionary products. However, frequent changes kept them from gaining a critical mass of adherents. They were a moving target, so potential users kept away. They thought they have to change to keep themselves relevant and attract more users by constantly adding the latest buzzwords, but the opposite effect was achieved. PHP is slow to change, that is why new and young people keep learning it because they can just pick up any old book or tutorial, and that is why it has maintained its dominant position until now.

In Vibe.d, your projects compile to native code since you write your code in the D language, as Vibe.d is basically a library written in D. Which means you need a D compiler and you have to learn (some) D.


About D

From their website, "D is a systems programming language with C-like syntax and static typing. It combines efficiency, control and modeling power with safety and programmer productivity."

The D language was created by Walter Bright with the latter collaboration of Andrei Alexandrescu (who subsequently wrote "The D programming Language" book, and speaking of books, Ali Cehreli's Programming in D is the book for learning D -- and it's free!).

For me, D is a better, saner, tamer C++ (or Java!), but they tried to cram into the language most of the features of C++ that took years to gestate (which resulted into C++ being bloated), so the result is a pretty humongous language (for my taste, that's my opinion). I mean, look at Google's Go language. It is very minimalistic but still productive (and popular), yet implements most of the concepts of a modern language.

But thankfully, you don't have to learn all of D's intricacies to be productive. You can just learn the C-like parts and you are good to go, then learn the other parts as you need them. That's what I do anyway, I learn by increments.