Software Hierarchy of Needs

Feb 13, 2011

Abraham Maslow is a famous figure in the field of psychology. Interestingly he only studied the minds he considered the healthiest of the population. Perhaps this perspective is how he came up with Maslow’s hierarchy of needs. The concept describes the various levels of needs and wants that a human should fulfill before they will desire to fulfill a goal in the next level. It is my proposal that for most non-trivial real world software systems, a similar hierarchy of needs is required to help give you a sense of how to best direct your development efforts.

I learned about Maslow’s hierarchy of needs many years ago at university in an introductory Psychology course. I had long since forgotten about the idea until recently, when after working as a developer at an enterprise software company for many years, I drew the analogy between Professor Maslow’s hierarchy and my own thoughts about prioritisation in the development process.

Maslow's Hierarchy of Needs

Initially I had simply been thinking about balancing the interests of customers and the company. What this means in practice varies,** **but generally speaking the customer’s interests should come first, since they are the person paying the money. If the customer’s interests are not paramount, you could be working for a failing company (or a government organisation :)). It’s also clear that the company has to consider how to best allocate its resources, which inevitably involves some kind of prioritisation. From here I realised that Maslow’s hierarchy provided a useful structure for showing the relative importance of the customer’s various needs.

Looking at it from a customer’s perspective, I have defined these general needs that map closely to Maslow’s hierarchy:

  • Innovation/Improvement (Self-actualisation)
  • Performance (Esteem)
  • Cost/Usability (Belonging)
  • Security (Safety)
  • Existence/Deployment (Physiological).

Software Hierarchy Of Needs

Once again from a customer’s perspective, these are my justifications:

  • Software does not exist unless it can be deployed and used.
  • Once it can be used, they want to rest assured that they can use the software without any risk to their security. Some examples of things that need protecting could be health, property, employment, safety, etc. Customers invest a lot of trust in companies and software at this level, and breaking this trust is probably a deal breaker.
  • After customers can securely use your software  they want to be able to easily use your software at a competitive price.
  • Once software is easy to use the next expectation is that the software meets performance expectations.
  • After software is performing well the next expectation is that the software is not stagnant and is improving and innovating over time.

Keeping the software hierarchy of needs in mind might help you rationalise what the next priority should be for your software system.

Server-Sent Events in ASP.net MVC

Dec 2, 2010

Google Chrome (Chromium) recently released a version of their browser with support for server-sent events. I used this technology and ASP.net MVC to create a WebSlides application.

I created a nifty throw-away demo called WebSlides that switches between slides (PNG images). The slide show presenter navigates to a URL on their smart phone and is able to tap on back or forward links to change the current slide. The audience and the computer running the projector run a browser that points to another URL. As the presenter changes the slide all the clients connected see the updated slide.

What is a server-sent event?

Basically a server-sent event is a draft web standard that (on the ball) web browsers support to allow updates from the server to be “pushed” out to the browser. It is similar to WebSockets which has been all the rage (with cool experiments) but it is not a duplex communication channel. When you see the term “pushed” in regard to server-sent events you should note that what is actually happening is that the browser is actually polling a server URL. You can easily see this when you intercept traffic with fiddler. What it means though is you will not have to write the JavaScript to do the polling and it also gives you a way to only send data to the client when it is required. In my case I use it to update the slide the browser is showing when the presenter changes the slide.

How did I do it?

I created the WebSlides demo using ASP.net MVC, I believe I am the first to create something like this as support for server-sent events is pretty fresh. I found that this guy created a chat client with cold fusion on the server-side which is pretty cool.

In my demo I created a new ActionResult called ServerSentEventResult that does all the heavy lifting you need to do make the browser happy.

So all you have to do is use it like this in your controller.

ServerSentEventResult eventStream = new ServerSentEventResult();
Follower followerModel = new Follower();
eventStream.Version = followerModel.Version;
eventStream.Content = () =>
{
    JavaScriptSerializer serializer = new JavaScriptSerializer();
    return serializer.Serialize(followerModel);
};

Another interesting point to note about my implementation is the lambda used to get the content, you may remember that the browser will poll the server to get events, so why make the server serialize data if it is not necessarily going to send it every request.

The rest of the magic happens on the client side with jQuery, If you have come this far I will leave it to you to dig around on github to see how that works.

My History of the Web

Sep 30, 2010

The web has rapidly evolved over the last 10 to 15 years. Recently there has been a lot of talk about the Internet or Facebook generation. So I thought it might be interesting to tell the kiddies about ancient web history, but purely from my own point of view (rather than Wikipedia’s).

When I first started out on the Internet, it was at libraries or other people’s homes. When I finally got the internet it home it was over a 33.6K modem. Imagine that folks – the internet being that slow and using up the phone line while you are on it.

My first website was created using an image editor called ‘Corel Draw’, which saved the picture as ‘html’. It was hosted on a url like this: www.isp.com/~myispusername. The image would take ages to download and there was only one page, but designing it was nice.

From there I progressed to WYSIWYG editors like FrontPage, HomeSite or HotDog. These tools allowed you to create static html. Hosting at the time was done on a free server like geocities which would give you a url like www.geocities.com/crazycitynametogroupcontent/yourusername and they would put banner ads on your pages. The trend at the time was to put up ‘under construction’ images, and replace it when you were finished with a page full of flaming and spinning animated gifs. I swear it’s true, half the internet was either under construction, spinning or on fire.

After animated gifs went out of fashion the next craze was to steal javascripts to put on your site that didn’t really do anything useful, but it was cool.

Then came the age of the guestbooks and hit counters. Everyone needed to use a guestbook and/or hit counter service so that your friends and family could prove that they went to your web page.

After guestbooks and WYSIWYG editors we all started to learn html because many of the WYSIWYG editors showed the html as well as the design surface. We also wanted to have a navigation bar that allowed easy navigation between multiple pages, but we didn’t want to design a navigation bar on every page. So we resorted to iframes.

Then we all realised that iframes meant the URL that appeared in the address bar was not very useful. By this time, because we used guestbooks and counters we started to get cluey about CGI perl scripts and probably even PHP. Now we could use these CGI technologies and html tables for the layout, to create a navigation bar on every page without having to write the html for it many times over. But just imagine the excitement of being able to dynamically create content on your web page! However, not many hosts allowed server side scripting, not for free anyway.

It was around this time that broadband came out, so now with an always-on connection and the availability of dynamic DNS services it became possible to host your home page on your own server. No ads, no hosting fees, all the server side scripting you want, and… a domain name!

Because we were now running our own webservers, server side web applications became much easier to cobble together, and we could actually create something useful, like shared calendars or photo albums.

Now I missed this craze because I was too cheap or sensible to buy windows for a server, but because scripts were nasty non-object oriented demons, ASP.net WebForms abstracted that pesky webby stuff away from the developer. Sadly the html it created was nearly as crap as the WYSIWYG age, and some times abstractions get in the way.

Then Google started to make web application really nice to use and powerful, so now any idiot on the internet can do more with the free services than the elite gurus that wrote or hacked together scripts and hosted them on their own server at home.

Around the same time hosting became free or close to free. The cost of electricity to run your own server made the exercise seem redundant.

Now with ASP.net MVC, .net developers are following Java and Ruby developers and remembering how the web works and how to write html, how to layout content with CSS and how to do actual useful stuff with javascript or jQuery (to get cross browser compatibility).

And that is how it happened, kiddies.