Re: Advice on OSX cocoa app with Python backend

From: Steve Holden (steve_at_holdenweb.com)
Date: 02/01/05


Date: Tue, 01 Feb 2005 08:24:32 -0500

Socheat Sou wrote:

> 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.
>
Sounds like a plan, for a Mac house.

> 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.
>
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.

> 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.
>
It isn't. Much too heavyweight, with much too steep a learning curve for
what appears to be essentially a simple project.

> 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?
>
Who told you that MySQL was OO? It's a bog-standard relational back-end
with transactional capabilities.

> 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).
>
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!

> 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.
>
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:

   http://www.python.org/pycon/2005/register.html

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


Relevant Pages

  • Re: Help with first VB application - Data Entry form
    ... I assumed a desktop / winform client application ... time' stamp from the database machine - control machine ... ... problem solved - web server is control system. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Help with first VB application - Data Entry form
    ... I assumed a desktop / winform client application ... time' stamp from the database machine - control machine ... ... problem solved - web server is control system. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Remobjects v KBM
    ... >> client query components) follow from that. ... Then, connections can be created to say SQL Server, Oracle, Interbase and ... can then be created from the abstract dataset definition in 'customers' to ... implicitly - this makes your code not be database connection specific). ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Help with first VB application - Data Entry form
    ... stamp from the database machine - control machine ... ... unnecessary data to the client ... ... and when building a database independent UI / Client - Server application, ... JavaScript, for example) and thus, will get the time from the web server, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Opinions needed about the best "Middleware suite" kbmMW vs. RODA
    ... kbmMW supports cross db in such way that all you need to do in your application is to set one property to switch to ... What one have to concentrate about is minimizing the amount of data moved from the app server to the client. ... C/S setup's usually have a quite active chatter going on between the client and the database, ...
    (borland.public.delphi.thirdpartytools.general)