stiefels.net Just another WordPress weblog

23Nov/081

Getting Started with iPhone Development

This weekend I finally found some time to watch [Bill Dudney](http://bill.dudney.net/roller/bill/)'s screencasts about iPhone development.
The screencast series is called '[Writing your first iPhone Application](http://pragprog.com/screencasts/v-bdiphone/writing-your-first-iphone-application)' and it is an ideal way to get started with iPhone application development.
All you need is a recent version of Xcode and some basic knowledge about Objective-C and Cocoa.
In 2,5 hours Bill shows you how to create a simple but nice recipe application where you can store recipes and its ingredients (sure, it is NOT a full-blown recipe database application but it serves its purpose). You learn a lot about table views, view controllers, navigation controllers and how to store your entered data persistently by using [SQLite](http://sqlite.org/).

I really enjoyed watching it and I'd recommend to write the application in parallel while you are watching it. That way you'll think more about how all the stuff works.
Every episode (five in total) costs $5 but I think it's completely worth the money.

10Sep/070

Full Perl-Compatible Regular Expressions in Objective-C

A few months ago I wrote about a mechanism which allowed simple [Pattern Matching with NSPredicate](http://www.stiefels.net/2007/01/24/regular-expressions-for-nsstring/).
Although it is a good method to check if a string matches a Regular Expression it lacks a lot of features you normally expect while you're doing something with Regular Expressions, such as capturing subpatterns or doing search and replace.

[Philip Hazel](http://www.uit.co.uk/exim-book/author-bio.htm) (who also wrote my favourite SMTP server, [Exim](http://www.exim.org) created a library called [PCRE (Perl-Compatible Regular Expressions)](http://www.pcre.org) a long time ago which implements the Regular Expression syntax used in [Perl](http://www.uit.co.uk/exim-book/author-bio.htm) (sometimes I miss that time) for the C Programming Language.
While PCRE is great for doing Regular Expressions in C, it's usage with Objective-C is some kind of cumbersome as NSString objects must be converted to plain C strings and back again.

But recently John Engelhart released an alpha version of his PCRE-based [RegexKit framework](http://regexkit.sourceforge.net), which provides a sweet object-oriented interface to Regular Expressions. It looks very mature and there is also a [very good documentation](http://regexkit.sourceforge.net/Documentation/index.html) available.

Thank you very much, John!

31May/070

STNPostgreSQL.framework Universal Binary and Examples

I updated the [STNPostgreSQL.framework project page](/projects/stnpostgresqlframework) with a download link to a Universal Binary of the framework and a few examples on how to use it.

24May/070

Preview: STNPostgreSQL.framework

I am very pleased to announce the public preview of STNPostgreSQL.framework.
STNPostgreSQL.framework is an open source Objective-C framework for accessing [PostgreSQL](http://www.postgresql.org) databases in a convenient object oriented way.

The current version is **pre-beta** so don't expect that much features or stability. The APIs are still subject to change!

I have a lot of ideas which will be released in future versions. If you have some questions, ideas for improvement or if you want to join me on this project please send me a [mail](/contact). Thanks!

More information and download instructions can be found on the [project page](/projects/stnpostgresqlframework).

1May/079

Unit Testing with Xcode

Unit testing is some kind of a controversial topic. There are many opinions by software developers whether to make unit tests and how frequently they should be used.
I don't want to start a preach here or discuss the pros and cons of unit tests in every little detail. It's just a little tutorial how Unit Testing works with Objective-C and Xcode.

Software needs to be tested, right? So, when is the right time to test your application?
Well, before I heard something about Unit Tests I did tests every time after I changed a function or added some functionality to my software and I think this is what most people do.
The problem is that mostly after these changes only a few parts of the application are tested. The application is/can never tested completely by the developer by hand and errors might occur when a end user uses it.
So the ideal test would be to go all through your software and test every little feature and functionality. I think that is not really possible. But this process can be automated. And at this point Unit Tests come into the play.