On 20/05/06, Nic Gibson <[EMAIL PROTECTED]> wrote:
I hate to sound negative but I think that's far less clear and far
less easy and takes us even further down the path of mixing up what
is a model, what is a view and what is a controller (my $0.02 worth -
I think Maypole does a really bad job of making the distinction but I
think that's almost inevitable in a web app).

I'm hoping that getting objects by name would make seperation clearer,
as you would have a single known point of interaction between the
model and the view. Hopefully this would mean you'd use template_args
less and so have the information passed between model and view in a
clearer way.

Having said that, I have had had uses for this in the past. I think
that component is the best approach for this sort of situation. It
keeps the code simple, both in the Maypole core and the application
itself.

But component also requires the extra work of the developer writing
and the server processing an extra template (or more) and building new
request objects etc.

Being able to get objects by name in the view would mean that you
could have something lighter and quicker in terms of both developer
and resource usage.

I don't see a problem with doing this as long as the current system
works just fine. I *really* would like to see us support something
like an 'object' method that returns a single object when we have one
because I've done three commercial biggish Maypole projects now and
they all have plenty of situations where we had just one object in
context.

Yes - This would simplify many templates and make them clearer. This
is something I've wanted to do for a while and will definately go
ahead with.

Also, as I said this will not change how things currently work, but
will allow you to do $r->objects(@array) and/or $r->objects($arrayref)
- there was a mistake in my last email  about the latter being changed
to an error.

I'm hoping it should be clear, and if it isn't I'll provide a
different method to get and set objects by name.

Cheers,

A.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel

Reply via email to