Set up ASP.NET 5, Ubuntu, Docker and Visual Studio 2015

I am interested in rewriting some personal websites using ASP.NET MVC because that is the technology I’m most comfortable using at the moment. Those sites are written in PHP and are hosted on a shared Linux hosting.

After I heard about the open sourced ASP.NET 5 and various recent advancements done in the field of running .NET code on Linux, I felt like it’s a good time to do some research. Because I feel that using Azure or some other Windows hosting is too overkill for the websites I have in mind.

So, let’s see what we need for hosting an ASP.NET 5 MVC site on Linux:

  • a server. Ok, so let’s pick something cheap and good enough to play with:  the cheapest DigitalOcean droplet, at 5$ /  month.
  • a Linux distribution. Generally, when I use Linux, I choose Ubuntu because it’s very largely used and there’s lots of help available for it. The instructions below assume that Ubuntu version >=14 is used.
  • access to the server’s command line. DigitalOcean provides a nice in-browser HTML5 command console for quick access, but you are not able to copy and paste text and it disconnected itself for many times while I was using it. So, it’s nice to quickly access your Linux VM, but for the long run, a remote console through SSH is the better choice.
  • install a .NET runtime. This is where many paths can be taken. And that’s why I am going to go a bit into detail below.
  • develop & deploy a web app to the server
  • see it work (phew!)

Setting up an Ubuntu VPS

I like DigitalOcean very much for their clutter-free and minimalistic experience and good performance/price ratio. If you look around the web or ask friends who may work with something like it, you may find some discount vouchers. The VPS-es they create are called “droplets”. The cheapest one is 5$ / month and offers you (at the moment) 512 MB RAM and 20GB SSD disk. For a lightweight Linux server used for prototyping, this is very good and I was quite happy with the VPS’s responsiveness. Also, the Linux distributions on the droplets are pre-configured to use the best mirrors for downloading packages and indeed they are downloaded very quickly.

I chose the Ubuntu 14.04 distribution for creating a new droplet.

Continue reading

More to come!

Hello there!

Thanks very much for taking interest in my projects.

I have done quite a few software projects in the last 5+ years. Many of them can be successfully reused and I do not wish for them to sit quietly in the darkness of my various storage devices.

Hand-written UI sketch for a fictional operating system, that I did a while back

Hand-written UI sketch for a fictional operating system, that I did a while back

As I brush the virtual dust bunnies off my files, new projects will pop up in this section, for sure.

I started off with the easier ones… some jquery extensions I did. But after I gain some momentum, I will continue with some “bigger” stuff.

I look forward to updating the website, as well as my GitHub page, with a new project / repository every week.

jquery.skillset.js

jquery.skillset.js is a jQuery extension that helps you showcase your skills with nice progress bars and also group them by headings and sub-headings. You can also showcase other items, like project tasks completion and so on.

You probably already saw this script in action on the home page of this website. If not, head over there now. ;)

jquey_skillset

 

Features

  • Supports headings, subheadings, rows without progressbars
  • Accepts input data in a clean and simple JSON format
  • Optionally collapses the container to a specified height and expands it on click.

Read more & examples

jquery.readmore.js

jquery.readmore.js is a “read more” implementation on top of jQuery with verbose comments. It supports animation on expanding and the optional use of jquery-dotdotdot for smart text trimming.

jquery_readmore

This script was developed on a need-basis and it needed to be easy to modify by a fellow developer with less experience in javascript. Hence, the more “naive” approach in the code and the great quantity of comments.

I feel it has quite an educational purpose and it also has some functionality to help you achieve a nice state of the “collapsed” mode.

This is done by:

  • toleranceHeight parameter. If the height difference between the expanded and the collapsed element is not that big, maybe you want to not have “Read more” link shown.
  • using the jquery.dotdotdot library in conjunction with jquery.readmore. That library nicely trims a block of text and adds an “ellipsis” at the end. It also has some other useful parameters. jquery.readmore could use the trimming offered by that library to show the “collapsed” state.

More details & examples

Read more about jquery.readmore ;) on the GitHub page.

And see some examples here. (ugly pages, I know, but I’m taking them one step at a time. :)