Refining the Design
Once I had a viable end product design, I turned my attention to the configuration application or "builder" app. I knew that the schema for this part would be pretty straightforward. There were going to be iPhone solutions that contained forms, and those forms would contain objects.
I decided early on that I wanted to add a layer of automation that would create all the required forms for a particular solution on-the-fly so they could be easily changed. That meant I needed to create a flexible data repository to make all the form objects nearly as configurable as they are in the "regular" Servoy Developer.
Luckily, Servoy makes this easy by giving you the ability to create forms and objects programmaticallywith all the same properties and functions they have when you use the Servoy IDE.
I don't know about you, but when I'm working on a blue sky personal project like this, I want to create something that I would use. And because I had the luxury of not having a deadline, a set of hard requirements, or stakeholders and end users to please, I had a lot of flexibility.
I started with the basics. Create a solution. Create a form. Put form objects on the form. Generate the Servoy forms programmatically, check on iPhone.
I was really amazed at how quickly it all came together. I spent maybe 20 hours and about 800 lines of code getting the basics of both the builder application and the deployed iPhone application to work.
Alas, I then made the "mistake" of showing it to some colleagues and told them how easy it was to create some basic applications. They immediately fell in love with itand then the change and enhancement requests came flooding in.
At that point, I decided that because the basic concept was sound and the application was basically functioning, it was worth the time and effort to turn it into a full-blown, detailed application.
I added features such as reordering the forms and objects, added support for most of the object types that Servoy supports (text fields, text area, HTML areas, labels, buttons, and so on) and even added two custom objectsa Navigation Item and Spacer that were a result of not wanting to create a bunch of separate labels and graphics every time I wanted a navigation item.
As I continued to build iPhone applications for myself, I found I needed to show related data, filtered data, related value lists, and the like. So most of the time that has gone into the application has been spent in sandboxing all the GUI elements to make sure that users don't accidentally go astray. I wanted to make it as "user-proof" as possible.
As you've likely experienced, it takes more coding to make an application easy and smart than it does to rely on users entering the right thing in the right spot. The good news is that I don't have to write all the guts of the code as well, only the application logic and error checking. All the heavy lifting of database connections, data broadcasting, client state, HTML generation, AJAX calls, and the like is handled by Servoy.
As of this writing, the application is still technically in late alpha, but if you would like to check it out, you can download the free Community Edition of Servoy (www.servoy.com) and my iPhone Application Builder from Dr. Dobb's (see www.ddj.com/code/).