Re: N-tier development and modeling

John Lenton <[email protected]> Thu, 11 Mar 2004 16:19:00 -0300
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
Sender: John Lenton <[email protected]>

On Wed, Mar 10, 2004 at 04:45:59PM -0500, Tom Hallman wrote:
> 
>  Thanks for that input. A question - would using such a method (via Pyro, 
> etc.) bind us to using clients exclusively written in Python? For example, 
> if we wanted a client to be written in PHP or Java, we wouldn't be able to 
> use that Distributed Objects method. Is that correct?

pyro es python-specific; what it does is a pickle/unpickle,
essentially. Note that as modeling stands now you can't pickle the
objects (because they're actually weakrefs), so you'd have to write an
EditingContextProxy or something like it to hide that. Once you've
done that, you are a step away from being transport-independant. Pyro
is easy, and fast, so I'd recommend using it at first; however, once
you have that working, if you find you need to use corba or xmlrpc,
you'd just have to subclass the EditingContextProxy.

  I'd like to point out that cimarron, the sub-proyect of PAPO I'm
  currently busy with, aims to do what Matthew describes: in an MVC
  triad, Modeling is the M  (the classes Modeling generates are the
  place to put the business logic), cimarron is the View, and you
  program the Controller. The idea behind cimarron is rather like that
  of anygui, in that you write the controller once, and cimarron is
  able to render it via any of a series of concrete frontends (unlike
  anygui, however, it's designed for strict MVC-like separation
  :)). We currently only have a Gtk2 frontend, but we will be adding
  at least curses and web (either via zope, or direct html generation)
  at some point in the future. It is still rather green, but we're
  already using it to reimplement PAPO's flagship proyect (Luca), so
  it should be stabilizing quickly.

  Let me point out, just in case it wasn't clear, that cimarron
  neither knows nor cares if it's dealing with local modeling objects,
  remote objects obtained via some kind of rpc, or plain python
  objects; likewise, in whatever you decide to do, this separation is
  crucial.

-- 
John Lenton ([email protected]) -- Random fortune:
Imitation is the sincerest form of television.
		-- Fred Allen


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click