[Seaside] Seaside2: separation between content and presentation

Alain Fischer seaside@lists.squeakfoundation.org
Tue, 3 Dec 2002 00:22:33 +0100


Le Lundi 2 d=E9cembre 2002, =E0 02:56 , tblanchard@mac.com a =E9crit :

>
> On Sunday, December 1, 2002, at 11:03  PM, Alain Fischer wrote:
>
>> But I wanted to know the vision of all seasiders about separation=20
>> between content and presentation.
>> When I make a web site for a customer, the common way to proceed is=20=

>> that I receive an html prototype
>> of the pages I must generate then I transform them using the=20
>> webObjects tools in templates.
>> It's easy if the templates are not organised too hierarchicaly,=20
>> otherwise it could be difficult.
>
> Yeah, I get that sometimes - the other way is to do it from back to=20
> front - each business entity likely needs 3 views created for it - a=20=

> quick line view for picking from a list, a detail viewer, and a form=20=

> for entering attributes for a new one (also used to edit an existing=20=

> one).  The last two are often the same object with conditional html=20
> replacing fields with labels.

I agree with you, this how I make business applications but in this=20
case, I choose my own presentation
for these page (which is very simply designed) because they are seen by=20=

a few people that prefer
fonctionality over beautifull pages. But when you must make an=20
application where the graphical
look is important for your customer, you must integrate you content with=20=

the presentation he give you
and this is not allway easy and time consuming.

> Then there's a css sheet done for styling and a bunch of task oriented=20=

> pages are done which just incorporate these views in a higher level=20
> application structure.

CSS style sheet are great but limited in attribute of the html element,=20=

you could not change in a big way
the layout of your page.

>> Has I see it, there is multiple way to do this:
>>
>> 1) Using the templates of seaside0.94
>>     + very near to WebObjects, easy for simple templates
>>     - hard to do when the templates are hierachical.
>
> No sure about this.  I just did a WO forms builder that uses lots of=20=

> switch components for rendering various kinds of components in a =
higher=20
> level layout.  Its pretty complex but the parts are highly reusable.  =
I=20
> also had the unhappy situation of needing to use single table=20
> inheritance in my entity model - this approach worked really well for=20=

> helping me cope.

I have such component that are higly configurable but with the time they=20=

are growing with more and more
functionality, and there is no easy way to refactor them. Finaly=20
sometime I prefer to rewrite a simpler one
by duplicating some behavior (which is bad and fall on your feet one=20
time).

>> 2) Using XML/XSL style sheet (transformation could be on client=20
>> browser or on the server side)
>>      + w3c standard
>>      - not well supported on browser, authoring tools and web =
designer.
>
> Probably my last choice.  I find XSL impenetrable and essentially=20
> write-only.  So do the people I work with.

Yes XSL and XSL Translation seem a big monster and I will let some tools=20=

like Explorer, Netscape or on the server
side Xalan do their work. But I couldn't imagine doing something in=20
squeak (there is a lot of more fun area to explore).

>> 3) Converting html page in HTMLGenerator code
>>     A way to explore. Perhaps coupled with the refactoring browser to=20=

>> cut one page in hierachical component.
>
> I quite like the idea of this one.  I'd definitely prefer to work with=20=

> a widget set that happens to render to html.  If such a parser build=20=

> more abstract widget views I'd be quite happy.
>
> _______________________________________________
> Seaside mailing list
> Seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>