Yaws API discussion
Mon Jul 15 21:02:06 CEST 2002
I am glad that you had success. I would guess (not
having looked at the code I could very well be wrong
here) that you may have used parts of MVC even if you
didn't use a framework or werent thinking about it
conciously. I have seen this happen quite allot with
other types of patterns. Programmers reinvent patterns
(like singletons in OO) all the time without ever
knowing it. Even if you didnt go this route I think
that a decent coder can make either approach work. I
would make the argument that using MVC makes it much
easier and increases your chance of success especially
for mediocre programmers or those without allot of
experience. In my opinion, really good coder could
probably write a dynamic, extensably app in brainf**k
but I would want to do it myself. For that matter I
wouldnt want to be the one to maintain it after he
As for Microsofts solution IBM tried to do the
samething with a project call Net.Data that failed
pretty miserably. My other argument is that Microsoft
(like many companies) tends to target the lowest
common denominator with its products. In this
instance, I woulds say that the lowest common
denominator here are those mediocre programmers
mentioned above. Doing things right and according to a
set pattern makes things much more difficult in the
begining, but over time it pays off. Many programmers
either just want to get it done quick, or dont think
about the long term, hence the preference for the
embedded solutions like PHP/ASP. This may be the
reason Microsoft decided to go back to the 'old'
In any case, I congradulate you on your success and
thank you for your opposing viewpoint.
Ps. please excuse my terrible spelling, yahoo still
hasn't gotten the spellcheck feature to work in
--- Alex Peake <> wrote:
> Let me state a counter-point.
> Microsoft, in its release of ASP.NET also took this
> approach of separating the UI from the data.
> However, they have just released a product called
> WebMatrix, which goes back to the "old" way - my
> guess is that too many people are comfortable with
> the "mixed" approach and so Microsoft responded.
> From my own point of view, I have built large
> dynamic web sites with this mixed approach, and have
> had no problems evolving the solution at all.
> > -----Original Message-----
> > From:
> > [mailto:]On
> Behalf Of Eric Merritt
> > Sent: Monday, July 15, 2002 10:14 AM
> > To: ;
> > Subject: Re: Yaws API discussion
> > Mickael,
> > Per your request I am going to make a few
> > suggestions. I would, however, warn readers that I
> > will be swimming in what some consider a holy war
> > area. I do not intend any kind of little war here,
> > am just providing suggestions based on my
> > and knowlege.
> > I believe that the problem you are having stems
> from a
> > core problem with the paradigm yaws has adopted.
> > like PHP and JSP Scriptlets, is founded upon the
> > that actual logic should be embedded in the html
> > This is a bad thing(TM). It limits scalability of
> > application by quite a bit. I am not refering to
> > scalability in terms of speed or performance, but
> > scalablity in terms of application size,
> > reliablity/maintenance, and extensablility.
> > I am rambling here so forgive me. Back in the
> > '80s users of smalltalk realized that the ui
> > paradigms of the time were lacking for large
> > To address the issue they came up with a paradigm
> > called MVC (Model, View, Controller). This
> > stated that your model (data, logic) should be
> > seperated from your controller (flow control
> > and all of that should be seperated from your view
> > code. It eventually was expoused that the view
> > should be extreamly limited. In that it only
> > you to manipulate data provided from your model
> > This was a really good idea for UIs, and when the
> > came about it proved to be a really good idea for
> > webapplications as well.
> > To use some hisorical examples, the inventors of
> > realized this same issue after they released the
> > JSP specification. In that original specification
> > allowed only scriptlets (which is java code
> > in the html and delimited by <% %> tags). This
> > approach was obviously not MVC like in any way. In
> > fact, it cuased quite allot of headaches for
> > developers then (and even in somecases now). Thier
> > next release included the idea of 'TagLibs' which
> > custom tags that use data from provided from some
> > backend process (via session and request
> > Now the use of scriptlets are frowned upon almost
> > universally and are actaully not allowed to be
> used in
> > most big projects. This still wasn't really a
> > MVC solution as the coder had to code allot of the
> > controller and logic framework himself, but it did
> > provide a foundation. Projects like Struts have
> > good use of this foundation and provide full blown
> > frameworks now. Using these frameworks has made
> > application programming much much easier.
> > Well to get back to your problem. If your
> > Model/Controller layer only provided data to your
> > and your view simply made use of that data all you
> > would need to do is include the header and it
> > make use of all the data that was globally
> > in the page. In JSPs that is simply an <@include
> > location'> directive. The included page then
> > makes use of the data already provided.
> > I realize that the yaws api is based to quite a
> > extent on PHP, but PHP is a very poor choice for
> > large, extensable applications. Don,t get me wrong
> > is a great thing for quick and dirty applications.
> > Basically for those applications that only span a
> > pages or that are only designed to live a short
> > Anything beyond that and PHP starts to fall down.
> > I would suggest that you take a look at some of
> > Java page rendering technology. They have allot of
> > experience in this type of thing by now. Probably
> > start out with the taglib stuff and then take a
> > at Struts (available at
> > Perhaps also take a look at webmacro
> > (www.webmacro.org) and velocity
> > (jakarta.apache.org/velocity). I personally like
> > idea of taglibs and compiled pages (I think they
> > much faster), but the template engines and thier
> > restricted data manipulation langauges are nice as
> > well.
> > I guess I went kind of long, sorry. I also hope I
> > not get anyone too angry.
> > Thanks,
> > Eric
> > --- wrote:
> > > Hello,
> > >
> > > I feel that there is a need to improve an aspect
> > > yaws api.
> > >
> > > The ssi function can be used to include some
> > > external html template. My need is to be able to
> > > some dynamic generated values (for example the
> > > in the html header portion)
> > >
> > > I am thinking on the best way to do that. The
> > > evident thing is to pass a dictionnary of
> > > substitution that needs to be performed in the
> > > included file.
> > >
> > > I think it might not be interesting to implement
> > > nested evaluation of included files.
> > >
> > > What do you think ?
> > > Any clever idea ?
> > >
> > > --
> > > Mickakl Rimond
> > > http://www.erlang-fr.org/
> > >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Autos - Get free new car price quotes
> > http://autos.yahoo.com
=== message truncated ===
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
More information about the erlang-questions