NSXML-like XPath Support in Cocoa Touch with TouchXML - I haven't done any real, serious iPhone development until recently. Sure, I tooled around a bit and even had a few false starts on projects, but not much came out. What killed me was that I had no real *idea*. Without a concrete goal in mind it was especially hard to wade through a platform so different from those which I'm used to. Well, that changed recently. I got an idea. Not a great one, but a good enough idea to keep me at my mac hacking something out. What's the idea? Well, I'm certainly not going to tell you yet! Besides, the actual app I'm writing isn't the focus of this post. What is, however, is TouchXML which is, according to their website, "a lightweight replacement for Cocoa's NSXML cluster...
My Tool List - One of the more popular thing's Scott Hanselman has done is maintain a tool List, essentially a list of applications and utilities that he's found useful. There are plenty of absolute gems in his list and rather than present my own I'd be very comfortable just pointing you to his... But what fun would that be? None! I also think there are a few more that I can add that are relevant to my personal experience. The list is rather short and there's a bit of overlap with Scott's but if all goes as planned I'll expand it over time as old useful tools come to mind or I discover new ones. Cloud iAWSManager - This is an iPhone app that lets you manage many of the functions of Amazon Web...
Basic Authentication with a NSURLRequest in Cocoa Touch - While working on a certain unnamed iPhone app lately I ran across the need to use basic authentication in communication with REST services. For something that seems to be such a fundamental need for mobile applications I figured most of the work would be done for me. Turns out that's not the case. A few details are left up to you, the Cocoa Touch programmer. What Basic Authentication is In order to implement basic authentication in Cocoa Touch it is important to understand how it works. Basic authentication tokens are essentially formatted into a string in the format: username:password They are then Base64-encoded and formatted into an "Authorization" HTTP header who's value looks like: Basic c2NvdHQ6dGlnZXI= where "c2NvdHQ6dGlnZXI=" is the encoded token pair and "Basic" is a hard-coded prependage. Easy enough...
Asynchronous Programming in Cocoa Touch - It's unavoidable. Pretty much anywhere you go as a programmer these days concurrency is important. It's no less important on mobile platforms like the iPhone. In this post I intend to outline the fundamental techniques necessary for asynchronous programming on the iPhone. While these techniques could very well apply to standard, desktop Cocoa I'll focus on Cocoa touch. I'll cover three basic approaches: NSObject's performSelectorInBackground message, NSThread and NSTimer. NSObject's performSelectorInBackground message NSObject's performSelectorInBackground message can be used to easily farm off tasks that run asynchronously. Here's an example that could be placed in a view controller. -(void) workerThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *str = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.chrisumbel.com"]]; [pool release]; } - (void)viewDidLoad { [super viewDidLoad]; [self performSelectorInBackground:@selector(workerThread) withObject:nil]; } performSelectorInBackground simply executed workerThread asynchronously. Not much...
Tags:
.Net .net framework 4.0 ADO.NET Android AppleScript Astoria BI BeOS C C++ Data Services EF GNOME GObject Groovy HTML Haiku JVM Java Lucene Mac MongoDB ORM Objective-C Operating Systems Oracle SSRS Solr VS 2010 Vala Web Services appengine c# clojure cloud clr cocoa touch concurrency couchdb cql curl database django dlr dynamic entity framework erlang exchange server filestream full-text functional go iPhone indexes ironpython ironruby jQuery linq lisp lucene mongodb monitoring natural language object oriented parallel performance podcasts powershell python rails refactoring remoting reporting services rs ruby scripting security setpolicies simpledb sql 2008 sql server systems programming testing tools vb virtualization wave webdav windows xml