473,387 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jul 18 '05 #1
4 2192
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Bear | last post by:
I would like some advice on what crypto lib to use. I am writing a cgi app that will store sensative data in a backend postgresql server. I have some simple numeric data I would like to make as...
5
by: John Hunter | last post by:
I have a question about what it takes to trigger GPL restrictions in python code which conditionally uses a GPL library. Here is the context of my question. matplotlib, which I develop, is a...
0
by: Paul Prescod | last post by:
February 1, 2005 Creating OS X Cocoa Applications Using XML and Python, Dethe Elza This talk will cover the use of Renaissance and Python to develop programs for OS X, focussing on both rapid...
2
by: matt | last post by:
Hi all- I'm trying to port an ajax spell-checker (http://www.broken-notebook.com/spell_checker/index.php) to use with the moin moin wiki and have been somewhat successful. (By successful I...
2
by: Lin-Chieh Shangkuan | last post by:
It's known that combining GTK+ or Qt with Python could enable the GUI design with pygtk/pyqt. In Mac OSX, it's suggested that use Cocoa be the GUI framework. Is there py-cocoa framework?
1
by: dwelch | last post by:
I've read many times on this newsgroup over the years that you can write "just about anything" in Python, except perhaps a full operating system (maybe even that...?). So, with this spirit in mind,...
3
by: sapsi | last post by:
Hi, I managed to create a python class and instantiate that from my Objective C Cocoa App (its not a python app). Essentially, i made two classes in IB and then another class(ogle) with outlets...
7
by: digimotif | last post by:
All, I'm currently working with a small development company on a PHP application they already have. There are several processing tasks that could be scripted in Python and run in the background...
15
by: lixinyi.23 | last post by:
Hi! I'm currently working on a scientific computation software built in python. What I want to implement is a Matlab style command window <-> workspace interaction. For example, you type...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.