she swears <i>geek</i> is a term of endearment

The LeVous on delicious iPhone links

Atlanta iPhone Developer MeetupMy second (the fourth?) Atlanta iPhone Developer meetup was a success tonight.  Forgive me for forgetting names, I’m getting old. We had an excellent presentation using xml web services to populate a UITableView with search results from Amazon linked to a UIWebView.  I liked how (Brian?)  walked step by step through how the code interacts with the Cocoa framework.  I think he stated it well that you play a game of “Whose in charge?” using View Controllers.  You set up some outlets and actions and then wait for the user to trigger an event that’s tied to an action that you defined.  Once that action is invoked, you have the ball.  ice analogy for IB.Where’s the Documentation? Several people asked me to post some links to a few things I mentioned while stroking my   showing off my app.  While I haven’t done anything profound, I have applied my experience in enterprise development to iPhone app development.  I feel the examples you find today are lacking in strong design fundamentals.  I suppose, in an effort to baseline simple concepts, Apple opted to present the flea’s eye view in order to demonstrate specific solutions to granular problems.  That’s fine but I still want to sprinkle a little awesome in my app.This Again? Common cross cutting concerns: data transfer, persistence, caching, authentication, remoting. OK.  We’ve been here before.  How do we sove these common and prevasive software problems?  One at a time.Data Persistence I have something that I want to save.  What are my options?  I could send it via a web service call to my server, where I have the code that manages such things. or I could store it locally.  I want both.  Locally, I have file system access and SQLite.  I like SQL.  That’s personal but I prefer to stuff text in a DB rather than to file.  I am a big fan of theRepository Pattern.  My repository is going to accomplish both for me.  When I say “load” it will first look for a local copy and then try to update from the server.  Same thing for saving.  Considering that I’m jumping across language and platform boundaries and need to refer to the same data constructs across these disparities, we need something consistent between them.  Xml works but its verbose and tedious.  SOAP killed the internet star so we’re going with JSON.Here’s JSON in a nutshell.If <person><name><first>rusty</first><last>zarse</last></name></person>Then {”person”:{ “name”:{ “first”:”rusty”,”last”:”zarse” } } } Why is this better?  Its shorter (no closing tag, let typing) and its more consistent (should “first” be an attribute or an element? aw bugger)Part of my inspiration for pursuing a JSON solution was my first experience with the iPhone Xml parser.  Its germane and, frankly, annoying.  Here’s how to install JSON for the iPhone. and here’s how to use JSON for the iPhone.Got it, Keep itNow that we’ve retrieved our JSON, let’s cache it to avoid unnecessary or impossible return trips to the server.   I LOVE SQL.   However, I have no desire to write object mapping SQL.  None.  Zero.  EntropyDB sounds nifty!  Note:  (big note) this version doe NOT INSTALL on the iPhone device.  Sorry for the shout but it caused me some lost time.  However, there is a device friendly build of EntropyDB  that does not work in the sim.  Its not in the files section of the Gogle code project and is near impossible to find.  Regardless, the library woks well enough to be worth the trouble of renaming the files to switch from simulator to device.   Entropy will serialize your object and save it to SQLite.  I a not enough of an expert to explain exactly how.  The fact that it’s meeting my business need without worrying out exactly how is testament to why its a valuable utility.  The Google project author indicates he intends to charge a license fee.  Pay it and don’t waste your time writing repetitive SQL unless that’s  fun stuff for you.What , no Code?I prefer code when I read tech blogs.  Sorry.  I’m lazy tonight.  I you would absolutely LOVE some code examples: comment or email me.  I’ll ablige.I’ll post more when I can…   

Leave a Reply