Thursday, 13 October 2011

Newsstand review

I've previously reviewed the Metro app on this blog. After upgrading to the new shiny iOS5 for my iPad and getting the newsstand application I thought I would check it out. Now newsstand is a central location for you to receive all of your news/magazine content on your iPad and should replace the need for separate applications for each and every newspaper you read.

Now to get back to the Metro App I mentioned above for a second. Previously I complained that because I previously had a iPod Touch with no mobile internet access when on the bus that the application was a bit shit due to continually downloading content. So when I seen that Metro had a free paper on newsstand I thought I would give it a look.

What I've found is that the paper is now fully downloadable to your device which is great. As once it is downloaded you are able to read away with out waiting for pdf like pages to load content. Now the only fly in the ointment is that the version that I downloaded this morning has been updated and I've been asked if I wanted to update which I said yes and had to download the 18.1Mb file again. I thought the whole point of this new version of iOS5 was the we would receive delta updates for files.

Looks like Apple missed stepped here. This really needs to be fixed as delta updates would be brilliant for this. Wired's free sample was 156MB in size If that updates I don't want to be downloading all of that data again. Its my Bandwidth and I don't like wasting it.

Come on Apple get this fixed.

Saturday, 1 October 2011

Creating a boiler plate for nodeJS

Project : https://github.com/IrishAdo/NodeJS-BoilerPlate

The first thing you realise once you start to develop your first few nodeJS applications are that there is no one "Server" solution but rather a more a bespoke solution with some common functionality across most of these.

Let me explain, we can probably split them up into several categories of applications.  Of which we’ll consider the following two set-ups.

  • Our standard web based application (both client side and server side code),
  • A server only application (server data processing) i.e. a 3d game server or a web service.

With any client/server application you have your client and your server but if your client-side application is a binary application then your architecture decision is simple but if your client-side application is a web based application.  Then you have several choices to make like will we run two servers one for page retrieval (IIS/Apache) and the other for data retrieval (nodeJS)? If we do this then we will be building an application with two distinct technologies one for the rendering of pages using (HTML, PHP, ASP, Python, Ruby etc...  If we don’t then we have to handle all types of requests for our application, i.e. data retrieval, data processing, loading html pages, serving images and other binary files.  Both of these are valid options for our web based application. For example if you currently have a web based application that requests a lot of information from the server via AJAX and are having a bottleneck on the server serving the AJAX requests then a non-blocking solution is maybe an option. So in that case you would be developing an Ajax processing server with the complete solution would be a multi-technology solution.

What should our NodeJS BoilerPlate contain?
  • Well documented code for the beginner to understand.
  • A simple structured layout that separates the server side code from the client-side code.
What still needs done on it?
  • I need to write a Text streaming function to stream html files 
  • I need to write a Binary file streamer 
  • I want to modify the server.FindHandler function to automatically find and include handlers as needed.  this just means that you don't end up with 50 if statements to include 50 handlers which will also keep that function simple.
  • Will add a resources directory beside the Application directory so that served files are held seperate, For example the default web page, a favicon.ico, all the CSS, and and client side javascript.