Single Page Application from scratch. Part 2: View Layer

In the previous post we wrote simple event emitter that allows us to do simple subscribe/publish events logic. Also I did some overview of inheritance in JavaScript, and today by combining all this stuff together we will build UI that might be changed according to the user interaction.

Continue reading


Inheritance in JavaScript

As I have already mentioned I am .NET developer and something what is natural for js for me is just strange, one of such things is that JavaScript has only functions. Authors of other languages developed a lot of stuff, for example in C# we have:

  • Classes (static, abstract and usual)
  • Structures
  • Interfaces
  • Enums
  • Methods
  • Properties
  • Arrays
  • Delegates
  • Events
  • Anonymous Methods
  • Partial methods and classes
  • other…

Continue reading

Stupid facts about JavaScript #1

During the first week of learning JavaScript I have found a few things that just confused me, things in which I could not believe until I test it, and today I am going to share some of them with you.

All of you familiar with holy wars at work regarding “Java or C#”, “comment or not comment”, “test or not to test”, “spaces vs tabs” etc. It’s like “to be or not to be” for developers, but it’s almost nothing in comparison with next lines of code:

var func = function(){
 // some logic here

 return {
 //some result here


var func = function(){
 // some logic here

 //some result here

What might be wrong here? Does it really matters what code style we are using in this case and where that curly bracket is? Continue reading

Single Page Application from scratch. Part 1: Simple Event Emitter on JavaScript

I am .Net developer for more than 4 years, I was working with almost all aspects of .Net development from Console applications to Web, Windows Phone, WPF, WWF and services. And all that time I was bad in JavaScript. Only a few days ago I understand that I need to change it as too many interesting things currently happen around Web.

This will be my first blog from the series in which I will build MVC like Single Page Application (SPA) from scratch using native JavaScript, HTML 5 and CSS.

Continue reading

Let’s rock

So finally I did it! I have started to learn JavaScript, the language that breaks my mind as a .NET developer. I get used to all this C# features and the best IDE in the world and now I have switched to smt completely different, I need to use simple editors instead of VS, I have problem with autocompleting and once I have declared variable it might be used for anything. On the other hand I might develop where I want even on my iPad and it will work almost enywhere!

Subscribe and get the latest news from dark side of the moon.