By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

Advice on OSX cocoa app with Python backend

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
Jul 18 '05 #2

P: n/a
On Tue, 01 Feb 2005 02:28:29 -0500, Socheat Sou
<so**********@iomanip.com> declaimed the following in comp.lang.python:

<snip>
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.
<snip>
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.
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.
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?
<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.
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).
Clients connecting to application server that connects to RDBMS?
-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #3

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


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

Jul 18 '05 #4

P: n/a
On Tue, 01 Feb 2005 12:12:15 -0500, Socheat Sou
<so**********@iomanip.com> wrote:
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.


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
http://www.freenetpages.co.uk/hp/alan.gauld
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.