You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ted Steen <te...@gmail.com> on 2006/05/02 23:15:37 UTC
Tapernate squeezer implementation generates loong sp:s
James,
As long as you just save the class name and id when squeezing an
entity the squeezed result could as well be just the class name and
the id (as in the example in the wiki).
It would generate much nicer url:s
Or maybe you got some secret plans for the EntityIdentity? :)
/ted
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapernate squeezer implementation generates loong sp:s
Posted by Ted Steen <te...@gmail.com>.
If the entityName and the id where somehow accessible outside
EntityIdentity I could just implement an EntityIdentitySqueezer that
would behave as the EntityIdentityTransformer you mentioned, but you
are right. The id is just a serializable and could also be a composite
id, so a nice general solution seem to be hard to come up with.
I guess I will have to learn to live with those ugly url:s. Pretty
url:s are _so_ 2001 ;)
Keep up the good work!
/ted
On 5/3/06, James Carman <ja...@carmanconsulting.com> wrote:
> Ted,
>
> I agree with you and the good thing is that the implementation can change
> without really affecting any of your code. I would like to keep folks from
> being able to just change a character in the URL and be able to look at
> something that maybe they're not supposed to. Also, you can't always just
> parse the Maybe we can make the URL generation strategy pluggable? Perhaps
> we can have an interface like this:
>
> public interface EntityIdentityTransformer
> {
> public String transform( String entityName, Serializable id );
> }
>
> I'll have a default service which implements this, but you can override the
> implementation. How does that sound? The trick is that the "id" can be any
> serializable object. So, for the general case, I can't just append it to a
> string. What if it's a composite id? You do have to "squeeze" the id at
> least.
>
> James
>
>
> -----Original Message-----
> From: Ted Steen [mailto:ted.steen@gmail.com]
> Sent: Wednesday, May 03, 2006 3:10 AM
> To: Tapestry users
> Subject: Re: Tapernate squeezer implementation generates loong sp:s
>
> Of course, but the url:s would be a lot prettier and, as I like to be
> picky, there would be a small performance gain too as the squeezer
> doesn't need to compress and convert to Base64... and also there would
> be somewhat less data to transfer between client and server :>
> Anyway, it wouldn't be hard for me to modify the code my self if I
> want that behaviour.
>
> But I do think that it would be nice to get rid of as many of those
> big ugly serialized objects in the url:s...
>
> On 5/3/06, James Carman <ja...@carmanconsulting.com> wrote:
> > Well, people could also "spoof" the classname/id stuff quite easily.
> >
> > -----Original Message-----
> > From: Ted Steen [mailto:ted.steen@gmail.com]
> > Sent: Tuesday, May 02, 2006 5:16 PM
> > To: Tapestry users
> > Subject: Tapernate squeezer implementation generates loong sp:s
> >
> > James,
> >
> > As long as you just save the class name and id when squeezing an
> > entity the squeezed result could as well be just the class name and
> > the id (as in the example in the wiki).
> > It would generate much nicer url:s
> >
> > Or maybe you got some secret plans for the EntityIdentity? :)
> >
> > /ted
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Tapernate squeezer implementation generates loong sp:s
Posted by James Carman <ja...@carmanconsulting.com>.
Ted,
I agree with you and the good thing is that the implementation can change
without really affecting any of your code. I would like to keep folks from
being able to just change a character in the URL and be able to look at
something that maybe they're not supposed to. Also, you can't always just
parse the Maybe we can make the URL generation strategy pluggable? Perhaps
we can have an interface like this:
public interface EntityIdentityTransformer
{
public String transform( String entityName, Serializable id );
}
I'll have a default service which implements this, but you can override the
implementation. How does that sound? The trick is that the "id" can be any
serializable object. So, for the general case, I can't just append it to a
string. What if it's a composite id? You do have to "squeeze" the id at
least.
James
-----Original Message-----
From: Ted Steen [mailto:ted.steen@gmail.com]
Sent: Wednesday, May 03, 2006 3:10 AM
To: Tapestry users
Subject: Re: Tapernate squeezer implementation generates loong sp:s
Of course, but the url:s would be a lot prettier and, as I like to be
picky, there would be a small performance gain too as the squeezer
doesn't need to compress and convert to Base64... and also there would
be somewhat less data to transfer between client and server :>
Anyway, it wouldn't be hard for me to modify the code my self if I
want that behaviour.
But I do think that it would be nice to get rid of as many of those
big ugly serialized objects in the url:s...
On 5/3/06, James Carman <ja...@carmanconsulting.com> wrote:
> Well, people could also "spoof" the classname/id stuff quite easily.
>
> -----Original Message-----
> From: Ted Steen [mailto:ted.steen@gmail.com]
> Sent: Tuesday, May 02, 2006 5:16 PM
> To: Tapestry users
> Subject: Tapernate squeezer implementation generates loong sp:s
>
> James,
>
> As long as you just save the class name and id when squeezing an
> entity the squeezed result could as well be just the class name and
> the id (as in the example in the wiki).
> It would generate much nicer url:s
>
> Or maybe you got some secret plans for the EntityIdentity? :)
>
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
/ted
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapernate squeezer implementation generates loong sp:s
Posted by Ted Steen <te...@gmail.com>.
Of course, but the url:s would be a lot prettier and, as I like to be
picky, there would be a small performance gain too as the squeezer
doesn't need to compress and convert to Base64... and also there would
be somewhat less data to transfer between client and server :>
Anyway, it wouldn't be hard for me to modify the code my self if I
want that behaviour.
But I do think that it would be nice to get rid of as many of those
big ugly serialized objects in the url:s...
On 5/3/06, James Carman <ja...@carmanconsulting.com> wrote:
> Well, people could also "spoof" the classname/id stuff quite easily.
>
> -----Original Message-----
> From: Ted Steen [mailto:ted.steen@gmail.com]
> Sent: Tuesday, May 02, 2006 5:16 PM
> To: Tapestry users
> Subject: Tapernate squeezer implementation generates loong sp:s
>
> James,
>
> As long as you just save the class name and id when squeezing an
> entity the squeezed result could as well be just the class name and
> the id (as in the example in the wiki).
> It would generate much nicer url:s
>
> Or maybe you got some secret plans for the EntityIdentity? :)
>
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
/ted
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Tapernate squeezer implementation generates loong sp:s
Posted by James Carman <ja...@carmanconsulting.com>.
Well, people could also "spoof" the classname/id stuff quite easily.
-----Original Message-----
From: Ted Steen [mailto:ted.steen@gmail.com]
Sent: Tuesday, May 02, 2006 5:16 PM
To: Tapestry users
Subject: Tapernate squeezer implementation generates loong sp:s
James,
As long as you just save the class name and id when squeezing an
entity the squeezed result could as well be just the class name and
the id (as in the example in the wiki).
It would generate much nicer url:s
Or maybe you got some secret plans for the EntityIdentity? :)
/ted
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org