Yaws API discussion

Eric Merritt cyberlync@REDACTED
Tue Jul 16 20:31:35 CEST 2002


> I think that you are mixing two kind of problem
> here. The MVC model you are
> talking about is dealing with framework/approach to
> organize your application.
> The template problem is about choosing a elegant
> formalize to describe the way
> to generate the dynamic final HTML code that the
> user will receive on their
> browser when they connect on the site.
> 
> MVC is often seen as a good approach to organise
> application logic.
> On the other side I consider that there is no widely
> accepted answer to the
> templating aspects. There are many different
> approach that are a trade-off
> between flexibility and efficiency.
> By the way an original approach of templating system
> can be found in Zope
 You are right, there is no generally accepted
approach. However I lump yaws, PHP, ASP, JSP
scriptlets together becuase they allow  *any* code to
be imbedded in the html page. This allows the
programmer to very easily violate the MVC
architecture. If you want to look at an embedded
scriptlet type architecture for java take a look a the
tea templating system. It only allows a very limited
subset of java to be embedded into the page. I
personally don't like this approach but it does
illustrate that MVC can be used with an embedded
langauge if the language is design/restricted right. 

Perhaps you are right in that I should not have lumped
templating and MVC into the same problem, but in my
mind these two ideas are firmly linked. A good
templating engine helps a programmer stick to MVC, not
to mention making the code more readable and
extensable. 


>
(http://www.zope.org/Documentation/ZopeBook/ZPT.stx).
> I am still not convinced
> yet that this approach is good but at least people
> are exploring new way of
> producing HTML.

 I have not actually spent very much time with zope,
but I will give it a look and see what its about.

> My point is that the Erlang community tends to find
> simple clever and
> straightforward answer to many common problem and
> that I wondering what would
> resort in such a debate.
> Maybe the dictionary aproach is the best (I am also
> still not sure yet because I
> tend to think that the templating issue is very
> sensitive, non trivial and most
> of the time a matter of taste).

  I think here you are right as well. You will
probably get flamed from someone no matter what
solution you come up with. However if you come up with
a good, straitforward, logical templating solution I
think allot of people would use if even if they didnt
like the syntax/semantics all that much.


> My only purpose is to collaboratively explore the
> web templating question and
> try to constructively propose interesting things.

That is laudable and I hope I have been/will be able
to contribute some to the discussion. 

If I get up on my soapbox to much just throw something
at me and I will get the message :)

Thanks,
Eric

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



More information about the erlang-questions mailing list