Posts

Showing posts from 2009

C++ IS useful - Click Once workaround

Image
[Concrete/ Quite Interesting] Me and C++, we’re old mates – the sort you find on Friends Reunited. I was fortunate to work with Microsoft and Glockenspiel in the late 80’s, working in MFC 1.0 and beyond. Later I would teach C++ for QA Training and others. I really loved the language and managed to build some sizeable solutions in C++, MFC and ATL.
Then came .Net and C# and for me as with many others, we could now start to focus on the problem domain, design and patterns to solution rather than pointers, memory and language syntax. In C# almost every line of code looks cleaner and addresses the issue at hand, something C++ never seemed to achieve. Look at this simple example taken randomly from the MSDN: HTTPWebRequest in C++#using <System.dll> using namespace System; using namespace System::Net; using namespace System::Text; using namespace System::IO; // Specify the URL to receive the request. int main() { array<string^>^args = Environment::GetCommandLineArgs(); Http…

Cosy Orbs – Web App Games in HTML5 for the iPhone

Image
[Concrete/Interesting] In this article I’m going to talk about HTML5 Canvas and graphics programming for web apps. I’ll be focusing on my experience and as way of example, I will be talking about ‘Cosy Orbs’ – a very simple, interactive graphics web application. Installing Cosy OrbsYou can install Cosy Orbs onto your iPhone by following the link below in Safari:http://www.lowrieweb.com/iphone/cosyorbsOnce the page has loaded, ‘Add to Home Screen’ by selecting the ‘+’ icon on the navigation bar at the bottom of the Safari page. Cosy Orbs will now be placed on your home screen and can be run by clicking the application icon.  About Cosy OrbsIn 1999, the moon was knocked out of its orbit by a nuclear waste explosion, sending all 311 inhabitants of Moonbase Alpha into outer space. Also, like a lot of other people, I was looking at Java and Java Applets. Working my way through the SDK and samples, I came across a sample called ‘Graph Layout’. I was quite impressed with Java but I was blown…

iPhone Offline Web Apps – the RESTful Way – Part 2 of 2

Image
[Concrete/Very Interesting] Ok, so hopefully you got the static application working offline. I was quite satisfied when I got it working, though not nearly as much fun as watching Push in HD on my Samsung 6000 LED TV (thinner than my laptop – wow).
Now for the RESTful part. We need to make REST calls when online and work from a cache when offline. Cache Manifest White listAs well as defining the resources that are cached, you can specify resources that should not be cached in your manifest file:CACHE MANIFEST# Version 0.9.4.1129.007NETWORK:/iretailpassportsvc/clientservices.svcCACHE:index.htmimages/arrow.png Any resources named under the ‘NETWORK:’ label are considered white listed and should not be fetched from the cache. Notice that you can name cached resources after a ‘NETWORK:’ section by using the ‘CACHE':’ label.Naming white listed resources allows us to access resources in our web app that are not in the cache. This solves a serious problem for us. Imagine trying to ad…