Jonathan Cusick

iPhone Development: MVC Design Pattern

If you are planning on developing applications for the iPhone chances are you will be familiar with object oriented programming. Design patterns promote code and design reuse along with making an entire application easier to understand and why a certain structure was adopted.

It is important to note that a design pattern is not a blueprint for an application that just has to be written in your development language of choice, but rather a blueprint for how to implement your code in order to enable stronger code maintainability, testing and to avoid a wide range of issues that could otherwise occur with unstructured (spaghetti) code.

The iPhone platform makes use of the Model View Controller (MVC) design pattern.

    Model – Manages the data for the application and how the state of the data should be updated.

    View – Will handle how the data is displayed on the screen.

    Controller – Deals with the inputs from the user such as utilising all the available on screen elements such as buttons and keyboard functions.

With the MVC design pattern it means that when developing for the iPhone you will have a better way of maintaining and testing your applications. Overall this should mean that better quality applications are created.

MVC-JC2

On a side note I used Balsamiq Mockups to create the above diagram, I would highly recommend giving it a try. This has quickly become one of my favourite applications.

Updated: Diagram updated to show two way relationship between model and view (well spotted by David Rice)

Photography Experiment #15 – Baseball

Some photos of a baseball I got signed last year while at the San Francisco Giants Vs Atlanta Braves game in the famous AT&T park.

Baseball

Baseball2

Baseball3

Adobe: Creative Suite 4 – Web Premium

Last week I received the Adobe CS4 Web Premium software which I won at the Build Conference, a massive thanks to Giant Training and Adobe for this.

The following is the complete story:

On November 5th I attended the Build conference in Belfast, during the event Ian Sayers from Giant Training held a prize draw for the chance to win a copy of Adobe CS4 Web Premium or Design Premium worth a whopping £1500. I was extremely lucky when Eric Meyer pulled my name out of the box, I seriously couldn’t believe I had won and opted for CS4 Web Premium.

With CS4 a wide range of new and exciting opportunities have presented themselves. I am currently developing several iPhone applications which will now have their entire interface redesigned in PhotoShop which will give them a much more professional presence.

As an amateur photographer I will now have the ability to add a new dimensions to my photos in addition to designing and developing a new website to showcase them.

These tools will significantly help me on a daily basis with all my personal development and design projects.

Many thanks to Giant Training and Adobe!

Jonathan Cusick

CS4

OS X Quick Tip #5 – Read & Write to NTFS HDDs

On the OS X operating system you can read NTFS external drives but you will not be able to write to them by default. There is a simple solution for this that comes in the form of a couple of applications MacFUSE and NTFS-3G.

MacFUSE-NTFS3G

Utlising these tools makes writing to NTFS drives seamless and you won’t have to worry about performing any complex configurations, the NTFS drives will just work as with any other HDD.

Best of all both of these applications can now be installed from a singe source over at SourceForge as part of the Catacombae project.

Enjoy!

My Lucky Streak: Jase Bell – Discussion

I have had an incredibly lucky streak this year where I managed to win an iPhone 3GS at Refresh Belfast which was provided by Ecliptic Labs and then a CS4 Web Premium applications package at the Build Conference from Ian Sayers at Giant Training.

Jase Bell has now created an iPhone app proposal that I feel if developed should be implemented in competitions across the land!

Although in all seriousness I have been extremely lucky at these two events and I am putting both the iPhone and CS4 suite to very good use. Hopefully there will be a post here in the not to distant future referring to the launch of an iPhone application.

Photography Experiment #14 – Iomega: HDD

I picked up a passport size 320GB Iomega HDD from Tesco’s a few months ago. It really is an extremely useful piece of kit to keep in my laptop bag.

IMG_1694

IMG_1697

IMG_1701

OS X Quick Tip #4 – Extend QuickTime Video Support

If you want to extend the video files that QuickTime can support on OS X a great little component to install is Perian.

Perian

Perian also known as ‘The Swiss-Army knife for QuickTime’ is open source and supports a wide range of formats, as stated on their site:

    File formats: AVI, DIVX, FLV, MKV, GVI, VP6, and VFW

    Video types: MS-MPEG4 v1 & v2, DivX, 3ivx, H.264, Sorenson H.263, FLV/Sorenson Spark, FSV1, VP6, H263i, VP3, HuffYUV, FFVHuff, MPEG1 & MPEG2 Video, Fraps, Snow, NuppelVideo, Techsmith Screen Capture, DosBox Capture

    Audio types: Windows Media Audio v1 & v2, Flash ADPCM, Xiph Vorbis (in Matroska), and MPEG Layer I & II Audio, True Audio, DTS Coherent Acoustics, Nellymoser ASAO

    AVI support for: AAC, AC3 Audio, H.264, MPEG4, and VBR MP3

    Subtitle support for SSA/ASS and SRT

The Perian control panel can be accessed from the ‘Other’ section of your system preferences.

Enjoy!

OS X Quick Tip #3 – Show/Hide Hidden Files

In OS X there is a very easy method that can be used in order to show and hide hidden files.

First open a terminal from your Applications->Utilities folder:

Terminal

Once you have a terminal opened enter the following command to show all files:

defaults write com.apple.finder AppleShowAllFiles TRUE

If you want to hide the system files again simply change the ‘True’ parameter to ‘False’ when entering the command into the terminal:

defaults write com.apple.finder AppleShowAllFiles FALSE

This may require you to log out and log in again to see the results.

Photography Experiment #13 – Flickr Meetup: Ulster Museum

Last Saturday I attended a Flickr meetup in Belfast where we descended upon the newly opened Ulster Museum which has just gone through a major refurbishment.

Skull2

Skull

Skeleton

FloorDesign

Jonathan Coulton: Dublin

Last Friday I embarked on a road trip to Dublin with Stuart Gibson to catch the Jonathan Coulton show at the Academy 2, which was part of his UK/Ireland 2009 tour. Jonathan was supported by a comedy music duo Paul and Storm who gave a superb performance and made me a fan.

Jonathan as expected rocked the house and we were lucky enough to briefly talk to Paul, Storm and Jonathan who are extremely nice people and also kindly signed our tickets. Hopefully they will all be back to do another UK/Ireland tour next year!

JoCoTicket