Advice on OSX cocoa app with Python backend

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Socheat Sou

    Advice on OSX cocoa app with Python backend

    After a brief, but informative, discussion on Freenode's #zope
    chatroom, I was advised to consult the gurus on c.l.p.

    I'm working for a small company who is in desperate need to rewrite it's
    15+ year old, flat-file, client-tracking database. The staff uses OSX,
    while I administer the couple linux servers we have to run our website
    and some internal sites. In our initial brainstorming session, we
    decided to go with a Python backend server, handling the database and
    business logic, and a native Cocoa application on the client side, with
    enough glue to make the two stick.

    Also, after a bit of research, I discovered Twisted and PB. I figured
    I'd have to write a customized backend to meet our needs. However,
    seeing as how 1) I've never written a netwo
    rk application before, let alone a multi-threaded application and 2) I'm
    the sole developer
    on this project, I was looking for as many API's, modules, frameworks,
    and/or prebuilt solutions as possible to help me out.

    I initially thought of Zope because I had often heard it referred to as
    an application serv
    er, so I thought it might be something I could use as a basis, write the
    business logic, and have the Cocoa application, with some PyObjC,
    communicate with the Zope server. We're definately not looking for a
    web-based application, so I wasn't quite sure Zope was what I wa
    nted.

    For those that are interested, we're looking at using MySQL as the DBMS.
    From what little I know of OODBMS it doesn't seem like the right choice
    because aside from data entry and client record lookups, the biggest use
    of the database would be to generate reports and tabulated data on an
    arbitrary set of fields. I've read that this isn't exactly the strength
    of OODBMS?

    We are also looking at a server-client architecture, rather than
    individual clients connecting to the database over the network, because
    there are some features the staff would like (such as something similar
    to message passing between each other, and also being able to administer
    connected users).

    Does anyone here have any experience building an OSX application with
    Python running the show behind the scenes? I hope I didn't come off as
    asking "tell me what to do", but rather I would appreciate any advice or
    links to resources that might be helpful in this project.

    Thanks for your time!
    Socheat


  • Steve Holden

    #2
    Re: Advice on OSX cocoa app with Python backend

    Socheat Sou wrote:
    [color=blue]
    > After a brief, but informative, discussion on Freenode's #zope
    > chatroom, I was advised to consult the gurus on c.l.p.
    >
    > I'm working for a small company who is in desperate need to rewrite it's
    > 15+ year old, flat-file, client-tracking database. The staff uses OSX,
    > while I administer the couple linux servers we have to run our website
    > and some internal sites. In our initial brainstorming session, we
    > decided to go with a Python backend server, handling the database and
    > business logic, and a native Cocoa application on the client side, with
    > enough glue to make the two stick.
    >[/color]
    Sounds like a plan, for a Mac house.
    [color=blue]
    > Also, after a bit of research, I discovered Twisted and PB. I figured
    > I'd have to write a customized backend to meet our needs. However,
    > seeing as how 1) I've never written a netwo
    > rk application before, let alone a multi-threaded application and 2) I'm
    > the sole developer
    > on this project, I was looking for as many API's, modules, frameworks,
    > and/or prebuilt solutions as possible to help me out.
    >[/color]
    First of all, note that Twisted applications needn't be multi-threaded,
    as Twisted makes use of asynchronous interfaces. You *can* write
    multi-threaded code under Twisted, but you don't have to most of the time.
    [color=blue]
    > I initially thought of Zope because I had often heard it referred to as
    > an application serv
    > er, so I thought it might be something I could use as a basis, write the
    > business logic, and have the Cocoa application, with some PyObjC,
    > communicate with the Zope server. We're definately not looking for a
    > web-based application, so I wasn't quite sure Zope was what I wa
    > nted.
    >[/color]
    It isn't. Much too heavyweight, with much too steep a learning curve for
    what appears to be essentially a simple project.
    [color=blue]
    > For those that are interested, we're looking at using MySQL as the DBMS.
    > From what little I know of OODBMS it doesn't seem like the right choice
    > because aside from data entry and client record lookups, the biggest use
    > of the database would be to generate reports and tabulated data on an
    > arbitrary set of fields. I've read that this isn't exactly the strength
    > of OODBMS?
    >[/color]
    Who told you that MySQL was OO? It's a bog-standard relational back-end
    with transactional capabilities.
    [color=blue]
    > We are also looking at a server-client architecture, rather than
    > individual clients connecting to the database over the network, because
    > there are some features the staff would like (such as something similar
    > to message passing between each other, and also being able to administer
    > connected users).
    >[/color]
    So you need a(t least one) layer between the database and the client,
    which you plan to write in Python. This makes perfect sense. Almost
    everything you find about writing servers in Python is going to work for
    you, so Google away!
    [color=blue]
    > Does anyone here have any experience building an OSX application with
    > Python running the show behind the scenes? I hope I didn't come off as
    > asking "tell me what to do", but rather I would appreciate any advice or
    > links to resources that might be helpful in this project.
    >[/color]
    Mostly, remember that OSX is effectively just another U**x environment,
    so server structures that work under BSD and Linux will tend to work
    under OSX. The unique parts of OSX appear (from the outside) to be
    Carbon/Cocoa and the funky GUI stuff. So have at it and come back for
    advice when you need it. Good luck with your project.

    [OBPyCon: of course, if you come to PyCon DC 2005 you can discuss this
    stuff with experts:

    The official home of the Python Programming Language


    The numbers tell us this could be the biggest PyCon ever!]

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119

    Comment

    • Dennis Lee Bieber

      #3
      Re: Advice on OSX cocoa app with Python backend

      On Tue, 01 Feb 2005 02:28:29 -0500, Socheat Sou
      <socheat-news@iomanip.co m> declaimed the following in comp.lang.pytho n:

      <snip>
      [color=blue]
      > and some internal sites. In our initial brainstorming session, we
      > decided to go with a Python backend server, handling the database and
      > business logic, and a native Cocoa application on the client side, with
      > enough glue to make the two stick.
      >[/color]
      <snip>
      [color=blue]
      > I initially thought of Zope because I had often heard it referred to as
      > an application serv
      > er, so I thought it might be something I could use as a basis, write the
      > business logic, and have the Cocoa application, with some PyObjC,
      > communicate with the Zope server. We're definately not looking for a
      > web-based application, so I wasn't quite sure Zope was what I wa
      > nted.
      >[/color]
      Doesn't sound like what you'd want. Zope, CMF, Plone (if you
      want the capability progression <G>) appear to be designed to put almost
      everything on the server side, with access via a browser.
      [color=blue]
      > For those that are interested, we're looking at using MySQL as the DBMS.
      > From what little I know of OODBMS it doesn't seem like the right choice
      > because aside from data entry and client record lookups, the biggest use
      > of the database would be to generate reports and tabulated data on an
      > arbitrary set of fields. I've read that this isn't exactly the strength
      > of OODBMS?
      >[/color]
      <blink><blink > If MySQL is an OO database system, then M$ Jet
      originated the concept...

      MySQL is still gaining full transactional capability: MyISAM
      tables being fast, but not transactional, InnoDB tables supporting
      transactions at the trade-off of a slightly slower run time. Okay, they
      are adding data types for GIS (?) applications (mapping regions, etc.)
      that correlate to some of the types PostgreSQL has had for years -- and
      I have seen the latter referred to as an "object-relational" system.
      [color=blue]
      > We are also looking at a server-client architecture, rather than
      > individual clients connecting to the database over the network, because
      > there are some features the staff would like (such as something similar
      > to message passing between each other, and also being able to administer
      > connected users).
      >[/color]
      Clients connecting to application server that connects to RDBMS?


      --[color=blue]
      > =============== =============== =============== =============== == <
      > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
      > wulfraed@dm.net | Bestiaria Support Staff <
      > =============== =============== =============== =============== == <
      > Home Page: <http://www.dm.net/~wulfraed/> <
      > Overflow Page: <http://wlfraed.home.ne tcom.com/> <[/color]

      Comment

      • Socheat Sou

        #4
        Re: Advice on OSX cocoa app with Python backend

        On Tue, 2005-02-01 at 08:24 -0500, Steve Holden wrote:
        [color=blue]
        > Who told you that MySQL was OO? It's a bog-standard relational back-end
        > with transactional capabilities.[/color]

        After re-reading my message, I saw how unclear I was. :) I didn't mean
        to say that MySQL was OO. I meant that, we were going to use MySQL as
        the RDBMS, but some have suggested looking into OODBMS, like PostgreSQL,
        but from what I know of OODBMS they don't seem like the right fit for
        this project.

        Thanks for the advice guys! So it sounds like I have the general idea
        right, but there isn't anything (in the way of already written programs)
        that will ease the creation of the backend app. Just get my hands dirty
        with the frameworks and write it myself, eh?

        Socheat

        Comment

        • Alan Gauld

          #5
          Re: Advice on OSX cocoa app with Python backend

          On Tue, 01 Feb 2005 12:12:15 -0500, Socheat Sou
          <socheat-news@iomanip.co m> wrote:[color=blue]
          > the RDBMS, but some have suggested looking into OODBMS, like PostgreSQL,
          > but from what I know of OODBMS they don't seem like the right fit for
          > this project.[/color]

          Calling PostGres an OODBMS might be stretching it a wee bit, but
          it does have some OO features certainly. However if you are
          simply using the DB as persistence in the server and for
          reporting then an RDBMS should be fine and the technology is well
          understood.

          Alan G.
          Author of the Learn to Program website

          Comment

          Working...