durusmail: quixote-users: separation of code and presentation
separation of code and presentation
2001-11-05
2001-11-05
separation of code and presentation
akuchlin@mems-exchange.org
2001-11-05
On Mon, Nov 05, 2001 at 05:41:42PM -0800, Quinn Dunkan wrote:
>And it's important to have a clear idea of what "UI level" is and what "the
>other level" is.  If you've got that from the beginning, things tend to
>decompose nicely, but if you've got a sticky mess it can hard to see how to
>untangle it.

My standard for this separation is: if we decided tomorrow that the
Web sucks and from now we're going to write Tkinter clients for our
code, we'd delete the mems.ui code, but the code outside of mems.ui
would still be useful.  So, objects don't know how to render
themselves into HTML or Tk widgets, and performing a basic operation
on a ProcessRun doesn't assume there's a HTTPRequest object around.

>Maybe when I'm done with this and have some free (hah) time, I'll write up a
>doc and example code so other people won't fall into the trap I fell in.
>There should also possibly be a standard library of UI code... wait, I guess
>that's what 'form' is.

I expect that more useful high-level widgets will need to be written.
For example, there have been a few times I wished I had a Quixote
equivalent of DTML's tree tag.  It's not clear what widgets are
needed, though; our site is fairly plain, though not straightforward,
so there's been little call for fancy widgets so far.

>Sometimes I feel like I'm reinventing Zope, but at
>least it's a Zope I understand :)

Motto!  (If only there was a ZODB we fully understood...)

--amk


reply