What is meant by a 'wrapper'?

Discussion in 'iOS Programming' started by boyplunder, Mar 10, 2010.

  1. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #1
    I've done quite a bit of work on SQLite-based apps and am working on a few CoreData ones too, but I am uneducated in SQlite wrappers like FMDB.

    Not having used this wrapper, why should I use it? What benefit is there?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    If you look at FMDB you should see the answer.

    FMDB is written in Objective-C and has an OO design. The sqlite API is written in C and is very procedural. FMDB uses Objective-C memory management, sqlite API doesn't.

    If you're a competent Obj-C coder you can learn FMDB in a few hours. It's easy to use and has very few gotchas. The sqlite API is more complicated.

    Integrating sqlite API code into an Objecive-C app is doable but will engender some pain. FMDB will fit into your Objective-C app very easily.

    I've definitely been more productive and wrote code faster with FMDB than I would have if I used the sqlite API directly. If it didn't already exist I would have had to write something like it myself.
     

Share This Page