Pages

Banner 468

Tuesday, 19 July 2011

Up in the Cloud

0 comments
 
Surely, one of the most popular buzz words since Web 2.0 has to be "Cloud Computing".  The trouble is that there are many different schools of thought on what the Cloud is or should be.  "Platform as a Service", "Software as a Service", "on-demand computing" and "Internet as a platform" are just some of the phrases used to define cloud computing.  However you wish to call it, to me Cloud Computing is about history repeating itself, the next phase of a cycle.  We're shifting software and data back from our desktop PCs to remote systems known collectively as "The Cloud"

Think about it, back in the beginning of computing, software ran on mainframes and super (for the time) computers and accessed through dumb terminals (thin clients) in a hub and spoke fashion.  Fast forward a couple of decades and the personal computer is introduced, full of promise that software could now be installed on client machines.  This eventually led to the client-server model, where fat-clients running software locally accessed data residing on central servers. Today, the focus is shifting away from the client back to the server which is now provided as a service and resides on the cloud.  This does not mean that our clients are becoming thin again, quite the opposite - today's smart phones for instance really pack a punch hardware wise - however the applications themselves are being offered over the internet with no local installation necessary.

What's Great about The Cloud 

For starters you don't need to worry about software installations, compatibility/ and updates. Cloud applications are offered as a service and accessed through the browser without the need for local installation.  Another perk is the ability to be able to access your data and apps from anywhere, using any workstation. Since all your data and apps reside on the cloud, they can be accessed from anywhere greatly increasing your mobility. 

Scalability is also another plus point.  Businesses can request more processing power or storage on demand as required but can also scale back down again during off-peak/slow business periods, freeing up resources and lowering costs because you generally only pay what you use.  So the scalability offered by the cloud is also very flexible.

Cost considerations are somewhat a double edged sword but what's certain is that if you opt for the cloud, your initial set-up costs are dramatically reduced.  You will not be incuring costs for acquiring servers and no servers means no data centres with their high electricity bills.  Maintenance and operational costs are also considerably reduced.
Your business can also focus more on strategic objectives because there is much less time spent on deployment, maintenance and operations.

So, What's not to Love

The biggest issues with cloud computing relate to service reliability/accessibility, security and privacy, or at least how they are perceived with respect to the cloud.  Businesses that have their own data centres and have been sitting on their data since starting up will find it very hard to accept that moving that data to a 3'rd party's data centre might be the better option.  The perceived loss of control in most cases overshadows the benefits gained by moving to the cloud. 

Unfortunately, some of these concerns are well founded.  How reliable is the service being provided?  What kind of impact would temporary service unavailability have on your business?  Can a business make sure that it can completely delete any of its data?  What degree of control does the service provide?  What happens to your data if you decide to switch providers?  These questions are generally hard to answer.  Although the idea behind cloud computing is fairly old, its implementation was not possible until very recently and legislation in respect of cloud computing is generally weak.  To complicate things further, your data could be stored in different countries and different countries have different laws.  There is still a way to go as far as legislation is concerned until we can start answering these questions properly

Looking ahead

Legislation and perceptions notwithstanding, cloud computing is flourishing and seems to be the way forward.  Office apllications such as Google Docs and Microsoft Office 365 are good examples of successful cloud services.  CRMSs, online storage systems (Skydrive, DropBox etc) and other applications such as photo editing packages are all being offered as cloud services.

The real challenge will be the culture change required for businesses to shift their operations to the cloud.

Readmore...
Thursday, 14 July 2011

Social What?

1 comments
 
Social Networks have been around since before the internet itself.  Ever since computers could connect to each other, so did the users at each end.  The social networking heavyweights of today such as Facebook, Twitter and Google+ are just latest products of a long (and vicious) evolution of the genre.  I’ve always had this sort of love-hate relationship with social media and as the products evolve so too are my feelings evolving into a love-to-hate attitude.

The Evolution of the Social Network

The roots of social media can be traced back to the late 70’s with the birth of the Usenet system which let users read and post messages/articles to one or more categories (newsgroups), similar to modern-day forums.  Usenet systems sparked the development of newsreader clients which are themselves the precursors of today’s RSS feed readers.

Shortly after Usenet, the first Bulletin Board Systems (BBSs) started coming online which were initially hosted on personal computers.  Users could dial-in on the computer’s modem to gain access to the BBS and could leave messages or upload files on the host computer.  A major drawback of these systems was the fact that the number of concurrent users accessing the BBS was limited by the number of phone lines available.  This generally meant that only one user at a time could access the BBS.

Next came online services and Instant Messaging.  The pioneer of instant messaging was the (initially) UNIX-based Internet Relay Chat (IRC), developed in 1988.  Users could send messages and share files through IRC in real time, something which was not possible on BBSs.  IRC also introduced the idea of chat ‘channels’ and private-messaging and is still somewhat in use today.  Although IRC clients are now available for most platforms, the first instant messaging programs for PCs was ICQ which proved extremely popular when first released.  SPAM and privacy issues however all but killed it off in the US and Western Europe, but despite its shortcomings, it remains popular in Eastern Europe and Russia.

Some consider dating sites as the birth of social networks but the first real modern-day social network was Six Degrees, launched in 1997.  Unlike its contemporaries, Six Degrees allowed its users to create comprehensive profiles and add people as friends - essential features of a modern social network.   There were/are numerous others: LiveJournal, Hi 5, LinkedIn, MySpace and of course FaceBook and Twitter.  Google is also running beta tests of Google+, which promises to be the next big thing in social networking.

Why so many? From the outset it was apparent that social media was a powerful thing, but social media projects are also some of the most volatile out there.  Six Degrees was launched in 1997 and  perished in 2001, but went out of fashion even before that.  In just 4 years, it went from launch to shut-down, such is the vicious nature of the social media phenomenon.  Sites like Hi 5 and MySpace also lost most of their popularity.  Why?  Users are quick to switch from one system to the next just to gain that extra feature or keep with the latest trends.  Loyalty means next to nothing in this environment, it's all about trends and the next big thing.  Failure to stay ahead of the game (and keep users interested) spells the loss of your user-base in a matter of months if not weeks.  

My Perspective


There's no denying Social Networks are great but I'm hardly what you could call a fan of the things.  I don't have a facebook or twitter account and I only have a Google+ account because Google created it for me!  Funny thing is it's hard for me to explain why I'm not inclined to have such accounts.  It's got nothing to do with age, profession or social standing - social networks are made up of people from all walks of life.  I guess privacy issues are a part of the problem.  Personally, I never feel the need to share a photograph of myself with the rest of the world - no matter how 'private' a system portrays itself to be - but that is still something I can control, it's my choice.  What gets me is the fact that you may feature in someone else's photograph, even in the background, someone recognizes you and suddenly you're tagged - which is something you have no control over.  It's also hard to be sure who's on the other side unless of course chatting live using a web cam.    

I'm also perplexed at how people can be so reserved in person but all inhibitions are out the window the minute they're on-line. This behavior begs another question.  Why do we find it so easy (and feel so uninhibited) in sharing personal information on the net but then find it so hard to open up to people (in person) and build relationships?

Another issue that bothers me is the fact that these systems tend to become addictive.  I have plenty of friends that cannot go an hour without checking their accounts let alone a day.  I vividly remember an episode which at the time made me laugh:  I was giving a course on web design to a class of teenage students some time ago.  Come lunch time of the first day I simply said "You may go outside and have your lunch now" and the whole class instantly loaded up their browsers and logged onto Facebook.  Some of them took out their lunch and to eat and when I pointed out that no food or drink was allowed in the lab, most of them just put their lunches back in their bags!   This happened for the rest of the one-week course.  Most of the class never bothered to eat.

It's not all bad however.  Social networks are a great way of keeping in touch with distant loved ones for example or long lost friends.  There is no denying that they take communication to a whole other level.  But at what cost?  Maybe I'm being paranoid but aren't these companies in a position to build complete profiles of their user base, habits, likes, dislikes, personal histories... personalities even?  Given today's powerful data analysis methods it's not hard to imagine how these companies can exploit this data - which we are all too happy to supply - to their advantage.  Personally, I find that invasive and too high a price for the sake of keeping in touch.

Conclusion

I guess it's just me against the world :)
Readmore...
Sunday, 3 July 2011

Mobile Devices and Geolocation

0 comments
 
The topic of mobile phone development is a minefield of myths, false truths and misconceptions. In this post I will try to clear things up a bit as much as I can and also take a look at how to exploit geolocation from our mobile devices.

The Mobile Web

One of the most common misconceptions I come across is that there is no need for a website to adapt to a mobile device. The reasoning behind this idea is the fact that the internet is platform independent and that the browser should do the dirty work. When faced with such an argument I tend to respond with another: “If the website will not adapt to a mobile device, can that mobile device adapt to your website?” The typical response I get is: “Sure, why not? You might need to scroll a bit more but it looks fine.” Let’s set the screen resolution topic aside for a moment and consider the following example: Let’s say your website uses cascading menus which open up when the user hovers over them with the mouse. Let’s also say that we are going to browse the website using something like an iphone or similar multi-touch smartphone. Will that menu work? Can you “hover” over the menu using a touch screen? Not to my knowledge, so one of your more important features on your homepage is lost on a mobile device. And this is not some mobile phone from the late 90’s we’re talking about, but a latest-generation smartphone running a proper HTML browser. It’s not that the phone is not willing to adapt to the site, it simply can’t.

Screen resolution is another factor. I remember back at the beginning of my career as a developer (late 90’s) we had desktop machines that boasted an 800x600 screen resolution (1024x768 if you were lucky) while our end users only managed 640x480. It was company policy however that all the software we produced had to target 640x480, irrespective of what resolutions we were able to push. Today, the sheer variety of devices out there pushing all sorts of different resolutions is quite staggering and scary at the same time, but makes it even more important for developers to be aware of screen real estate and its effect on user experience.

Another myth I sometimes hear is that people are not using their mobile phones to browse the web. This might be true of people using ‘classic’ phones but it would be naïve (or rather stupid) to think that smartphone users (which are on the rise) aren’t. We as end-users still want to use the same websites we use on our desktop machines on our mobile devices, it’s the way we use them that’s different.

These are just a few considerations on why developing for mobile phones/devices should be treated differently. For a product to be successful, developers must be aware of the platform they are targeting, and let’s face it…

It’s a Jungle Out There

As mentioned earlier, the sheer variety of mobile devices available today is staggering and their capabilities are equally varied. The evolution of the mobile phone in particular is quite remarkable. The mobile phone started out as being just that, a phone which you could carry around and use anywhere you liked. We then had low-end mobile devices with very basic web support and limited memory. At this stage a mobile phone stopped being just a mobile phone and became a device. These were followed by devices that supported HTML and Java applications. Today’s smartphones are literally hand-held PC’s running fully fledged OS’s – my Android “phone” has a 1Ghz processor, half a gigabyte of RAM and 8Gb internal storage. I use it to browse the internet, check my email, run office apps and sometimes, even phone people up . The number of people using such devices is constantly on the rise and so the landscape of web development is rapidly changing. In some cases, mobile device browsers are better at handling cutting-edge HTML5 and CSS 3 features than their desktop counterparts for instance. Try http://www.html5test.com from your favorite desktop and mobile browsers, you might be surprised at the results!

If a web product is to be successful in this varied landscape, it is vital that the developers understand the targeted devices, not just at a software level, but even at the hardware level. What does the device support? What does it allow it’s users to do and how? I recently came across this article by Dan McKenzie that deals with how to go about designing for Android which is currently the most popular smartphone platform out there. Quite an interesting read.

We’ve seen some of the “limitations” brought by mobile devices, such as smaller screen real estate and no “hover” but it would be wrong to think that it’s all bad news. Mobile devices also bring to the table interesting and powerful features which are missing from their desktop counterparts. One of these features is geolocation.


Geolocation

Geolocation is one of those features that brings with it a whole range of possibilities for our web applications. Location-based services, geo-marketing, geo-tagging, geo-targeting and web analytics are just a few examples. Gelocation adds meaning to global positioning where rather than just a simple set of co-ordinates, your position is described in terms of street name and how far you are from the closest restaurant!

Your device can determine its position in various ways including GPS and, WiFi positioning and even through Cell information of your mobile phone network. One way of making use of this information is through the W3C Geolocation API, an effort by the W3C to standardize the way a mobile device retrieves positioning information.

So, how do we use this API? The first thing we need to determine is whether our browser supports it by querying the “navigator.geolocation” object:

If (navigator.geolocation==undefined) {
   alert (“Your browser does not support Geolocation API”);
}

If the API is supported we can go ahead get our current location by calling the “getCurrentPosition” function. This is an asynchronous call which receives two callbacks, one for handling the returned position and another to handle any errors. You can also (optionally) specify additional properties to improve accuracy for instance. Here’s an example:

function pageLoaded(){ //this function is called from the body's onload event
   
   if(navigator.geolocation==undefined){
      document.getElementById("MSG").innerText = 'Geolocation is not supported';
   } else {
      document.getElementById("MSG").innerText = 'Geolocation is supported';            
      navigator.geolocation.getCurrentPosition(userLocated, locationError)
   }
} 

function userLocated(position)
{
   var lat = position.coords.latitude;
   var lon = position.coords.longitude;
   var alt = position.coords.altitude;
   var tim = position.timestamp;

   // display the returned values on the page     
   document.getElementById("LAT").innerText = lat;
   document.getElementById("LON").innerText = lon;
   document.getElementById("ALT").innerText = alt
}
 
function locationError(error){
   //handle error;
}


We can also use the W3C Geolocation API to track the device’s location. By tracking the location we can also determine other factors such as speed, distance and direction of movement which can be used by our application. Here’s an example:

var watchID = false;
function toggleTracking(){
    
   if (watchID==false){
      watchID = navigator.geolocation.watchPosition(userLocated, locationError);
      document.getElementById("btn_trk").value = "Stop Tracking";
   } else {
      navigator.geolocation.clearWatch(watchID);
      watchID = false;
      document.getElementById("btn_trk").value = "Start Tracking";
   }
}

To track the device's position, a call is made to the "watchPosition" method of the geolocation object which accepts two callback functions just like the "getCurrentPosition" method. "watchPosition" also returns an handler to the watch (watchId) which is used later to stop tracking by calling the "clearWatch" method.

I must confess that I had trouble testing the tracking function, especially while on foot. I tried creating a function that calculated the distance being travelled as well as the direction but could not test it very well as the response time was jerky at best. I admit that walking up and down the corridor of my house might be too small a distance for proper testing but it was the best I could do since I was editing javascript on my laptop and copying files to and from my mobile phone. I did register some position changes at times but it was sporadic and not enough to draw any conclusions. I have however installed a code editor on my mobile phone such that I can edit the code on the go. The plan is to test the code while travelling to work to see if I can get more encouraging results. I’ll also play around with the A-GPS settings to see what effect they have on accuracy. I’ll let you know how it goes.

Readmore...