473,289 Members | 1,923 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,289 software developers and data experts.

Building a GUI agnostic database application

I am wanting to write a database application using Python.

I want it to be GUI agnostic. The GUI will probably be Python/wxPython, but
I would also like the option of a Webbased (PHP?) gui, and possibly GUI's
in Java or C++, Visual Basic etc.

The Python 'backend' may run on the same machine as the client (thick
client), or on the same machine as the database (thin client).

My main requirements are:
1. Reasonably light-weight
2. Secure authentication between the GUI and the backend.
3. Ideally runs wherever Python runs, and at least on Linux, Mac and
Windows.

http://www.markcarter.me.uk/computin...on/python.html has a list of
possible candidates.

These include:
Corba, OSE, SOAP, Spread, Twisted, XML-RPC and Yami

It looks to me like XML-RPC run over SSL is probably the simplest solution,
but I'd be interested in other peoples views.

Thanks,

Rasjid.

Jul 18 '05 #1
4 2177
Take at look at PAF http://www.dctools.org

Uwe

Rasjid Wilcox wrote:
I am wanting to write a database application using Python.

I want it to be GUI agnostic. The GUI will probably be Python/wxPython, but
I would also like the option of a Webbased (PHP?) gui, and possibly GUI's
in Java or C++, Visual Basic etc.

The Python 'backend' may run on the same machine as the client (thick
client), or on the same machine as the database (thin client).

My main requirements are:
1. Reasonably light-weight
2. Secure authentication between the GUI and the backend.
3. Ideally runs wherever Python runs, and at least on Linux, Mac and
Windows.

http://www.markcarter.me.uk/computin...on/python.html has a list of
possible candidates.

These include:
Corba, OSE, SOAP, Spread, Twisted, XML-RPC and Yami

It looks to me like XML-RPC run over SSL is probably the simplest solution,
but I'd be interested in other peoples views.

Thanks,

Rasjid.


Jul 18 '05 #2
Uwe Grauer wrote:
Take at look at PAF http://www.dctools.org

Uwe

Rasjid Wilcox wrote:
I am wanting to write a database application using Python.

I want it to be GUI agnostic. The GUI will probably be
Python/wxPython, but
I would also like the option of a Webbased (PHP?) gui, and possibly GUI's
in Java or C++, Visual Basic etc.

The Python 'backend' may run on the same machine as the client (thick
client), or on the same machine as the database (thin client).

My main requirements are:
1. Reasonably light-weight
2. Secure authentication between the GUI and the backend.
3. Ideally runs wherever Python runs, and at least on Linux, Mac and
Windows.


Why not just make a database model that doesn't know anything about the
GUI? The model can a python compliant database driver (say odbc or
whatnot) and you can supply the proper business logic in a concise model.

For example

class model:
def connect(self,...)
def adduser(self,...)
def addPurchase(self,user,item,cosperunit,units):

Now using this database model you can control it with a webbased gui or
a wxPython gui. I don't think that there is a need to use a wire
protocol in this case to attach to your database code which itself uses
a wire protocol to attach to the database. Just consolidate your code
into a model.

This is a typical model->view->controller approach. In my experience
the best way to program this is to write the model first without using a
gui, just a lot of test cases. Once the model does what you want, hook
it up to a gui. This helps to ensure that the model works in at least
two independent environments, the python interactive environment and
also your gui code.

Brian

Jul 18 '05 #3
Uwe Grauer wrote:
Take at look at PAF http://www.dctools.org
Interesting. Should I worry about it only being a 0.1 release? Is it
mostly just a packaging of several existing established components, or is
it something more than that. It does seem to cover pretty much everything
I was thinking about.
Brian Kelley wrote: Why not just make a database model that doesn't know anything about the
GUI? The model can a python compliant database driver (say odbc or
whatnot) and you can supply the proper business logic in a concise model.


This is _precisely_ what I was planning to do.

The issue is that the 'client' program (GUI or text based interface or some
other scripted component or whatever) may or may not be running on the same
machine as the 'business logic' backend component, which may or may not be
on the same machine as the database.

I am aware that there are several frameworks around that resolve this
problem, and am just having trouble working out which to choose. I guess
what I'm really after is some pro's and con's of the alternatives.

I probably did not phrase the original question clearly enough. Although I
understand the concepts, I'm still learning the lingo.

Cheers,

Rasjid.

Jul 18 '05 #4
Rasjid Wilcox wrote:
Why not just make a database model that doesn't know anything about the
GUI? The model can a python compliant database driver (say odbc or
whatnot) and you can supply the proper business logic in a concise model.

This is _precisely_ what I was planning to do.

The issue is that the 'client' program (GUI or text based interface or some
other scripted component or whatever) may or may not be running on the same
machine as the 'business logic' backend component, which may or may not be
on the same machine as the database.

This can still be handled the same way.

Version I

View
^
|
v
Controller <--> Model

Version II

View
^
|
v
Controller <-> (Adapter <-> wire protocol <-> Model)

Now, if the Adapter behaves exactly the same as the oroginal Model you
are in luck and you can replace I with II without ever having to change
the view and the controller.

Of course, this means you will need a good Model to start with the
enables it being used as an Adapter.

A good wire protocol that I have used in the past is pyro
(pyro.sourceforge.net) that almost seamlessly wraps python objects and
can use them remotely. As long as you don't use your model in ways that
pyro can't you can transparently replace the model with the remote calls.

Brian

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RWC | last post by:
Hi Folks, I should begin by saying I'm fairly new to SQL Server. I'm an application developer who has built front ends atop Server, but have never done much in the way of design / development....
1
by: Darius Blaszijk | last post by:
Hello, I have a rather unusual question. I would like to build a demo application that is completely local. So no client-server at all (at least not in the sense it is usually used). The purpose...
0
by: s | last post by:
I need to develop a multiuser database application to be used by four people(The number of users are not likely to increase). It is for storing records of different versions of particular papers. I...
0
by: Lemune | last post by:
Hello. I need some help on building my sms services application (using modem). My application is to do some scheduling task based on daily, weekly and monthly. On the daily the choice are everyday,...
2
by: Max André Bündchen | last post by:
Hi, I'm starting a project that will work in many clients and a requiriment is a plataform agnostic system. The idea behind the project is a winform client based interface with a webservice...
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...
6
by: ARC | last post by:
I'm almost ready to build an upgrade routine for a commercial app that will need to import data from an existing Access 97 back-end database to an Access 2007 back-end blank database. Ideally, it...
8
by: Brett | last post by:
I wrote an ASP.NET application that queries a SQL Server database (on a different box from the web server) and displays the result in a GridView. The datasource for the GridView is a SQLDataSource....
3
by: Gordon | last post by:
Has anybody had any success compiling a PHP build for Leopard, specifically for Leopard running on a 64 bit Intel architecture? I have been using the Entropy builds up to now but there has been a...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.