gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] web client via pyjamas


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] web client via pyjamas
Date: Sat, 10 Jul 2010 08:53:21 +0200
User-agent: KMail/1.13.3 (Linux/2.6.33-6-desktop; KDE/4.4.5; i686; ; )

Am Freitag 09 Juli 2010, 23:34:42 schrieb lkcl:
 
> what i recommend instead is SimpleJSONRPCService.py which is based on
> SimpleXMLRPCService.py, which is part of the standard python distribution
> (but SimpleJSONRPCService.py is not).
> 
> as both SimpleXMLRPCServer and SimpleJSONRPCServer are based on
> SimpleCGIServer, which is based on SimpleHTTPServer, you have the
> simplicity of:
> 
> a) doing everything from python.  no apache web server needed
> 
Sounds good. For GNUmed it would need a maximum of 10 clients at a time I 
would guess.

> b) not having any complex or unnecessary dependencies: django is _huge_ and
> the only bits of it you're going to really use is... its ORM!
> 
Not even that I guess. I personally have no interest in rewriting a single 
line of middleware.

> 
> so there's absolutely no need for any web server like apache, or in fact
> any web server framework at all: all you're doing is GET of static files,
> POST of multi-part forms and JSONRPC.  _nothing_ else.  no HTML templates
> - nothing.
> 
are HMTL template (e.g. cheetah) useful in that case to seperate markup and 
data or does this concept not apply here ?
> 
> lastly it's worth reiterating that i strongly advise you not to tackle two
> tasks at once: write a wrapper which takes psycopg return results and
> returns lists of dictionaries with strings, ints, floats and None in (dates
> aren't supported in json but you can do "class hints" so could conceivably
> write a date "class"...) then return that munged data from a jsonrpc call.
> 
> job's done: you've converted (boringly) the entire GNUmed middleware into a
> JSONRPC service, which you can even write unit tests for (as previously
> mentioned, lovelyjsonrpc or jsonrpclib.tgz).
> 
> what's neat about writing unit tests is that _later_ you can convert away
> from psycopg and use sqlalchemy, sqlobject or even django's ORM (because of
> the features offered by django south i seriously strongly recommend it).
> 
That won't happen anytime soon. We are using features that are not supported 
in MySQL.

Sebastian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]