Professional Web Applications Themes

Database development - Mac Programming

Can anyone offer any insights regarding development of database applications on OS X. I am a developer who is new to Mac development, and I am looking at producing an OS X version of an existing Windows product. The Windows product uses an Access database to store most of the information that can be displayed by the application. So far I am leaning toward using XCode to create the OS X app and SQLite to store the data, but I am open to other ideas. In addition to any general suggestions anyone might have to offer on producing a Mac ...

  1. #1

    Default Database development

    Can anyone offer any insights regarding development of database
    applications on OS X. I am a developer who is new to Mac development,
    and I am looking at producing an OS X version of an existing Windows
    product. The Windows product uses an Access database to store most of
    the information that can be displayed by the application. So far I am
    leaning toward using XCode to create the OS X app and SQLite to store
    the data, but I am open to other ideas. In addition to any general
    suggestions anyone might have to offer on producing a Mac equivalent
    to this, I have the following specific questions:

    1. What database environments are available for this sort of embedded
    database on OS X (and are they accessible from XCode)? I've looked at
    BerkeleyDB, dtF, mySQL, Valentina and many others. Price is something
    of an issue, though, since the ultimate distribution of this version
    of application is still hazy. Are there any ODBC (or ODBC-like)
    solutions that might allow me to use the existing Access database from
    the Mac application (I'm not sanguine, but it can't hurt to ask - I
    hope)?

    2. Are there any "data grid" products available to ease the display of
    database resultsets in a Mac OS X application. (I would prefer
    something that I could use in XCode, but I might be able to persuade
    my employer to look at other development environments, if necessary.)

    3. Are there any good references for Objective-C database programming?
    I've looked around on developer.apple.com, macdevcenter.com, etc.,
    but I can't find any good references/examples to get my feet wet with.
    Is there anything at all comparable to any of the Microsoft database
    access technologies available in the Windows world (DAO, RDO, ADO,
    etc.)?


    Thanks for any help.


    Still mostly lost in Mac-land (but enjoying it),

    Jon
    Jon Guest

  2. #2

    Default Re: Database development

    In article <google.com>,
    com (Jon) wrote:
     

    Depends on how complex the DB is. If you are using Access then it can't
    be too complex.

    In which case take a look at FileMaker (a wholly owned Apple subsidiary)
    and itis a relatively nice choice since you can develop on either
    platform and run on the other all pretty much "hands off". I speak from
    experience here having done it both directions. The price is not
    horrendous and is certainly less than what it would cost you to write it
    in XCode [which is the IDE] (either in C or C++ or Obj-C or Java).

    Also if you get the developer version you can deploy a runtime with no
    royalties (unless you need server type architecture).

    For serious big time backends there are free SQL engines in particular
    MySql and Progresql. You still need the frontends and since FileMaker
    handles ODBC this might be a way to go. There are others out there.

    From the info you have provided I would not think XCode/Obj-C is the way
    to go.

    Feel free to contact me offline at peter dot teeson at rogers dot com if
    you wish.

    respect...

    Peter
    Peter Guest

  3. #3

    Default Re: Database development

    In article <google.com>,
    com (Jon) wrote:
     

    I offer up STEnterprise:

    http://www.subsume.com/cgi-bin/go.pl?k=STEnterprise

    And there you'll also find a number of alternatives for using Cocoa to
    access a database. If you really *do* want to run without a server
    process, SQLite as the back-end is fine choice regardless of how you
    wrap it.
     

    It all really comes down to what you want to *do* with the database.
    STEnterprise, for example, is built on the idea that a Cocoa developer
    should implement NSCoding methods, so it uses that same API for database
    persistence. Bundles for specific databases can be added, so in theory
    you could wrap calls to your existing Access database, but whether or
    not that makes sense still depends on the details of the application.
     

    This is trivially accomplished with the standard NSTableView. I have an
    application that takes an SQL query, pushes it through STEnterprise's
    SQLite bundle, and then populates a table with the results. Including a
    command/result history, it's just a couple hundred lines of code. I
    keep meaning to throw it out there as an open source example, but never
    convince myself it's important enough to release; someone bug me if they
    want to see it.
     

    Enterprise Objects Framework (EOF) used to *rock* until Apple chained it
    to a Java-only WebObjects. They've really ed themselves from an
    enterprise perspective by not allowing easy database access from desktop
    apps. There is nothing common enough for a feet-wetting; you have to
    pick something and dive in.
    Doc Guest

  4. #4

    Default Re: Database development

    On 02/06/2004, Jon wrote in message
    <google.com>:
     

    Have you made certain that such a product does not already exist
    for Mac OS X ? It's a common mistake by Windows users to assume
    that just because a product with the same name doesn't exist,
    there are no applications which do the same job. If one does
    exist, your new product must be as good or better.
     

    Excuse me while I laugh my head off.
     

    The Mac equivalent of Access is FileMaker Pro (which runs on both
    Windows and Macs). However, since it's an expensive program where
    most of the expense is in the user interface (which you don't want
    to use) I think that using a SQL back end may be the right decision
    for you. For people who want to use a SQL back end under OS X,
    most people use MySQL which comes built into OS X Server and is
    slowly taking over the 'cheap SQL' market. However, I don't know
    what its costs are for commercial applications and SQLite may be
    better in this respect.
     

    Nothing reasonable.
     

    Writing Cocoa code to take the results of a SELECT and display it
    in a table should take you all of a day. Don't forget that Cocoa
    already supplies everything you need for tables, rows and columns,
    changing the order of rows, changing the width and order of
    columns and changing the values of cells. You don't have to write
    any of that stuff.
     

    Are you asking for help with Obj-C or with database programming ?
    Install the Developer Tools CD on your Mac and look through the
    extensive doentation which comes with it. There's three quarters
    of a gigabyte of doentation there and it's pretty good. If
    you have a specific question, feel free to post here.

    Don't forget, if you're using a SQL solution, you'll hardly be
    doing any database programming. SQL handles the database; you
    handle the user interface.
     

    You don't need any of that those with SQL. You just talk to it
    in text format. Think of SQL as its own interface standard: one
    standard which is used by hundreds of different database engines.

    Simon.
    --
    Using pre-release version of newsreader.
    Please tell me if it does weird things.
    Simon Guest

  5. #5

    Default Re: Database development

    If the license for mySQL does not make you flinch (GPL does not work for
    everyone), I would strongly advise you to read up on the ODBC available
    to you from mySQL.

    http://dev.mysql.com/downloads/connector/odbc/3.51.html

    This gives you a good start.

    If Filemaker fits your model, lots of time can be saved, but you
    mentioned using Objective-C.

    Actually you can use RealBasic to get to the data once you install mySQL
    and ODBC.

    As for a data grid... start with the available classes in the
    development environment (start with NSTableView). Not knowing your
    environment I cannot be sure that this will do it for you, but most
    'data' can be represented without resorting to outside environments.

    Of course if you have the original source in C or C++, do only the UI in
    Objective-C and re-use the middle tier.
    MDL Guest

  6. #6

    Default Re: Database development

    Jon wrote:
     

    PostgreSQL -- right price with BSD license.

    You can access it with Unix ODBC -- which is not nicest
    thing on the earth, but, they mimic Windows couterpart
    OK. Google PostgreSQL with MacOS X.
     

    Cocoa: NSTableView
    CodeWarrier: Geez, I forgot the name. But, there is one.

    They are not as buzzword rich as Objective grid, but,
    it does OK.
     

    With Unix ODBC, the syntax of calling ODBC is ramarkably
    similar to Windows ODBC. But, as you might have known,
    the ideosynchracy of each database is there, and no
    examples help you from that.


    Naoyuki Guest

  7. #7

    Default Re: Database development

    Thank you all for you responses. I very much appreciate all of the
    input. Rather than attempt to reply to all of the generous
    contributors, I'll just post another reply to my original message (and
    hope that doesn't violate some Usenet convention that I'm unaware of).
    I'd like to clarify the requirements of this application a little,
    just in case that sparks any more ideas.

    The application (the existing Windows version and any Mac version that
    I manage to create) is/will be completely "stand-alone", distributed
    on a CD, with the database, application, and all other supporting
    material included. The user simply installs and runs the application,
    which offers an interface to view the database contents and the other
    materials.

    For someone familiar with Objective-C/XCode, this might not be too
    daunting, but for a clueless newbie like me, it doesn't look easy. I
    was hoping to find some sort of "data-aware" components that would
    ease the development process, since the database access portion of the
    existing Windows application makes use of MFC classes, and so can't be
    easily/quickly ported to the Mac. I have no trouble with the SQL, but
    I'd love to find a book or article or tutorial that offers a basic
    introduction to connecting to a local/embedded database so I can send
    my SQL, get back resultsets, use those resultsets to populate my
    NSTableView, or whatever other interface I use, and then allow the
    user to navigate through the records. The developer doentation
    provides a good walk-through of creating a "master/detail" view of
    information using NSTableView, but I haven't had much luck figuring
    out how to hook the data source up to that yet.

    From the research I've done so far, it looks like mySQL is out for
    licensing reasons (this will be a commercial app), and PostgreSQL
    seems to require a server process (correct me if I'm wrong). I looked
    at Firebird, too, but I saw some mention (I can't recall exactly
    where) of problems using it as an embedded database on OS X. My
    employer is leaning away from Filemaker as a development tool in large
    part due to the appearance of the applications that they've seen (I
    don't know if this is a shortcoming of Filemaker or of the developers
    of those application). Right now I'm considering going with REALbasic
    in order to get a first version of this application done within my
    timeline, unless I can convince myself that I'm up to making it work
    in XCode (which I would _love_ to do).

    Anyway, as I said, I do appreciate all of the input I received. It's
    nice to have a friendly group to ease this newcomer into Mac
    development.

    Jon
    Jon Guest

  8. #8

    Default Re: Database development

    In article <google.com>, Jon wrote:
     

    Take a look at sqlite: http://www.sqlite.org
    It's a single DLL.

    Dave Cook
    David Guest

  9. #9

    Default Re: Database development

    In article <google.com>,
    com (Jon) wrote:
     

    It's primarily because of the developers. After all remember FileMaker
    is an Apple company. Also remember that developing in Filemaker lets you
    deploy on both platforms using the same files. Plus it meets your
    requirement for embedded DB.

    If your employer has carefully examined the technical capabilities of
    FileMaker and decided it won't work that's a reasonable decision.

    Deciding not to investigate it on the basis of visual appearance is
    hardly a valid criteria IMHO. Rather it indicates lack of rational
    judgement.
    Peter Guest

  10. #10

    Default Re: Database development

    If you can deal with a non-sql db, you may also try 4D at www.4D.com, it
    looks like what you're looking for, since you can create an executable with
    an embedded database. The initial license for un anlimited deployment can be
    pretty heavy, but it's available.

    Eric

    Eric Guest

  11. #11

    Default Re: Database development

    Peter Teeson <com> wrote:
     [/ref]

    []
     

    Being strictly a _user_ of FM applications, I must say I dislike using
    them. They look and 'act' funny. For instance the scrollbars seem out of
    place, they look like they were held over from System 1 and they don't
    do live scrolling nor do they have proportional thumbs. It's just not a
    'real' OS X app.

    That's not to say there is something wrong with the internal workings of
    FM, just that I allways feel I have to compromise when I'm using a FM
    application.

    As an aside, looking at the amount of interest in DB development both
    here and for instance on Apple's Cocoa mailing list, I think it would be
    a good thing if Apple were to introduce a 'DBKit' for Cocoa at this
    month's WWDC :-))

    In fact, not doing so would probably be a pretty big mistake...

    Patrick
    Patrick Guest

  12. #12

    Default Re: Database development

    On 09/06/2004, Jon wrote in message
    <google.com>:
     

    Almost all forms of SQL use a server/client architecture which
    requires some setting up at low level. If your users expect the
    application to 'just run' then this is not a good way to do it.

    You've already dismissed FileMaker for good reasons. Perhaps
    Valentina would be a good system for you to use.

    Simon.
    --
    Using pre-release version of newsreader.
    Please tell me if it does weird things.
    Simon Guest

  13. #13

    Default Re: Database development

    In article <cadasn$r0s$1$demon.co.uk>,
    Simon Slavin <demon.co.uk>
    wrote:
     
    >
    > Almost all forms of SQL use a server/client architecture which
    > requires some setting up at low level. If your users expect the
    > application to 'just run' then this is not a good way to do it.
    >
    > You've already dismissed FileMaker for good reasons. Perhaps
    > Valentina would be a good system for you to use.
    >
    > Simon.[/ref]

    SQLite (http://www.hwaci.com/sw/sqlite/) can be embedded in your
    application.

    --
    Mike Cohen - mike3k <at> suespammers <dot> org
    Personal: http://www.mc-development.com/
    Mac News: http://www.macmegasite.com/
    Mike Guest

  14. #14

    Default Re: Database development

    Jon <com> wrote:
     

    Jon,

    I was going to ask what your time constraints were. REALbasic is a good
    way to get ahead and program the concept. Handling events is not always
    intuitive, but a bit of lateral thinking helps! I produced an app. that
    I needed for my way of working with URLs. I had a basic app. working (no
    bells or whistles) within the 30 day trail time. I was impressed! Since
    buying a copy of REAL basic I now have a working version that I use
    regularly.

    There is a company producing a path from REALbasic to Cocoa(?) that uses
    the REALbasic interface to produce a more conventional application. I am
    sorry but I can't remember the tool name. Someone else may come up with
    it, hopefully.
     

    --
    Regards, Shane
    "A closed mouth gathers no feet!"
    Website: http://www.wonk.demon.co.uk/
    Shane Guest

  15. #15

    Default Re: Database development

    > 3. Are there any good references for Objective-C database programming? 

    Sounds like you and I are in a similar situation... I'm coming from a
    Windows/VB/Access/SQLServer software development background, and I've
    been trying to get started with XCode/Cocoa/Objective-C development.

    A good friend of mine recommended Aaron Hillegass' book, "Cocoa
    Programming for Mac OS X (Second Edition)," and I'm really enjoying
    it.

    Here's the Amazon link if you want to check it out:

    http://www.amazon.com/exec/obidos/ASIN/0321213149/

    BTW, RealBasic looks like an awesome tool as well (I've only played
    around with it a bit), and it might be worth it for you to take a look
    at it. Personally, I'd like to stick with learning Objective-C &
    XCode, but the option is always there as a backup. ;)

    Hope this helps!

    -Evan

    P.S. Thanks to everyone's great suggestions on database systems - I'm
    going to check them out too!
    Evan Guest

  16. #16

    Default Re: Database development

    Jon <com> wrote: 

    If this is a single-user application there is no reason to use a
    database.

    Stephan
    Stephan Guest

Similar Threads

  1. Database development
    By gerryj in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: May 9th, 08:40 AM
  2. Refresh development database
    By chongsoon in forum Oracle Server
    Replies: 2
    Last Post: October 22nd, 11:54 AM
  3. Replies: 4
    Last Post: August 6th, 10:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139