Posted by David Hamrick on
I’ve written before about wanting to create metadata driven applications but did not go in to specifics about how to achieve that. For many of the applications I have worked on that means creating plist files that ship with the application. Those plist files might contain details about what URLs to access in staging/test/production or styling details for UI elements.
This approach works well but I have always wished for more expressiveness, especially as these files grew in size as more and more things needed to be configured. I wanted to be able to use a scripting language to create this metadata. I even went as far as creating my own small scripting language based on Scheme. Creating my own scripting language had it’s advantages, but mostly disadvantages, mostly that I was spending time maintaining it instead of working on the logic that I wanted from the script.
Using a UIWebView instead of embedding a proper interpreter reminded me of something that Chris Hanson said.
Always use the highest-level abstraction available to you, and drop down to lower-level abstractions when measurement shows that they are needed.
If measurements show me that my approach is using too much memory, or too slow, I will then consider another approach. Until that happens I will use the more straight-forward approach.