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)

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.

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.

OS X Quick Tip #2 – Burning Disks

In OS X if you ever need to burn a variety of disks and don’t have a large budget, a nifty and free tool that can be added to your software arsenal is Burn.

Burn is a simple and yet full featured disk burning package that offers burning data, music, video and disk images.

The Burn menu makes utilising these options as easy as a single click.

BurnMenu

Sub menus can also be used in order to narrow down exactly what format of disk you require.

BurnVideoSubMenu

For the more advanced users there are also an array of features including being able to use custom ffmpeg files, allowing overburining, selecting audio codecs along with the video and audio bitrates.

Burn has many the features of high end alternatives, so if you are looking for a free lightweight and easy to use disk burning utility I would highly recommend checking it out.

OS X 10.6 Quick Tip: Lock Screen With Running Apps

Windows users utilise the famous ctrl + alt + del command to allow them to quickly lock their screen and leave background applications running. On the Mac using OS X 10.6 Snow Leopard, I will show you how this can be as easy as a single mouse click.

First enter the system preferences:

SystemPreferencesIcon

Next click on the security options icon:

SecurityIcon

Then under the general tab select ‘Require password immediately after sleep or screen saver begins’:

PasswordOption

Once you have done this go back into the system preferences menu and click on the option for ‘Desktop & Screen Saver’:

DesktopScreensaverIcon

From here select the button on the bottom left side of the screen called ‘Hot Corners…’:

HotCornersIcon

Hot corners enables you to set the screen saver to activate by clicking on a corner of the screen, you can select any or multiple corners by picking the option ‘Start Screen Saver’ from the relevant drop down menu:

HotCornersMenu

Now when you click on your selected corner(s) your screen saver will start, you will then be prompted for your password when you next use the machine and all your background applications will still be running.

Review: Lookaly.com

Lookaly

Lookaly is a new service that has been developed in order to act as a gateway for people based in Belfast and Northern Ireland to share their experiences of goods and services provided by local businesses.

When you first visit Lookaly the first thing that will standout is the design, this has clearly been taken very seriously and a lot of thought placed on making the user experience as smooth as possible through a clean and well structured interface.

The businesses that are available for browsing have been placed into a range of categories which include:

    Automotive
    Eating, Drinking and Nightlife
    Financial and Legal
    Leisure and Sports
    Public Services, Education and Careers
    Travel and Transportation

Once you have located the business you are interested in you can simply view all the reviews, photos and contact details that are associated with it. If you own a business or have an experience you want to share I would highly recommend adding it to their directory, so far it has helped me several times on choosing where to go for lunch in Belfast.

Lookaly also provides a blog which covers topics such as local events, products and of course businesses.

Another nice feature from Lookaly comes from utilising the social networking platform Twitter, they will often tweet a summary of reviews that have been posted, so it is a good idea to follow @Lookaly if you are a Twitter user.

Overall I think Lookaly is an extremely useful service and I am looking forward to seeing it grow as more businesses are added to the directory.

FOWD: Belfast 2009

Yesterday I was fortunate to attend the first leg of the FOWD (Future of Web Design) Tour which started in Belfast.

A great line up to speakers who are all experts in their respective fields included:

  • Andy Clarke who opened the event with with an excellent lesson on design and gave a makeover to the NI Direct website which looked great and can be seen over at his blog. Andy also ended the day by giving a talk on how to design for the browser, this was fantastic and got an interesting reaction from the crowd when discussing designing on the browser as an alternative to Photoshop. I agree with his approach…although I would being a developer.

  • Martha Rotter gave the second talk of the event which was an overview of a new Microsoft product called SketchFlow, SketchFlow is designed in order to help prototype user interfaces quickly and efficiently. In terms of designing UI SketchFlow looks top class especially when obtaining feedback from clients as they have the ability to add notes and sketches to anything that is produced.

  • Drew McLellan introduced us to Microformats which I was previously unfamiliar with until now and also provided an insight into cost effective web development which has given me a good perspective on how to avoid some potential issues that could otherwise arise with clients.

  • Chris Murphy and Niklas Persson gave us an excellent overview of web standards and they also have a whole book on the subject which is available now – HTML and CSS Web Standards Solutions: A Web Standardistas’ Approach

  • Lee Munroe was the local speaker at the event, he did a great job with his talk ‘Rounding the Edges of your Website’.

  • Morgan McKeagney showed us how we could effectively marry creativity and logic just like Steve Jobs!

  • During the day there was also time for 25 minutes of ‘Speed Networking’ where you could quickly hand out business cards and meet people working in the same fields.

    Overall it was a great day and I hope FOWD makes an appearance in Belfast again next year.

    FWOD