473,474 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2184
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.