Re: Changes to tag and rest controllers
Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> Sun, 19 May 2013 15:39:29 +0200
| Newsgroups | gmane.comp.web.gallery.devel |
|---|---|
| Message-ID | <CA+z51A4Uiyd-QHdUZ5bMAh1YJ-cXqVNOK2RHhgkpKVBx2Bd18Q@mail.gmail.com> |
--===============1277598447327617144== Content-Type: multipart/alternative; boundary=001a11c2901c9d138904dd12595d --001a11c2901c9d138904dd12595d Content-Type: text/plain; charset=UTF-8 (cc devel) Hmm... I think I see what you mean. The idea is that it'd be useful to use the tag "blue" in two different contexts, right? Actually, it seems like either of our approaches would enable this. If the tags were hierarchical, then "flowers/blue" and "birds/blue" would be different. If they were "anded" together, then "flowers/blue" (or "blue/flowers") would only fetch photos that are tagged with both "blue" and "flowers". Thoughts? Take care, Shad On 18 May 2013 19:40, Chad Kieffer <[email protected]> wrote: > Some might find it desirable to be able to categorize photos in > hierarchies where they might reuse a tag. > > birds flowers > / \ / \ > blue red blue red > > > This is a probably a moot point in the context of routing for a flat tag > system. > > > On May 17, 2013, at 12:56 PM, Shad Laws wrote: > > I'm not sure I follow the question... > > What I meant by my idea was that, rather than use extra URL fragments to > denote hierarchy, it'd denote an "and". So, "gallery3/tag/foo/bar" would > show things that have both foo and bar tags. Thoughts? > > Sent from my Swiss Army Phone > On May 17, 2013 8:03 PM, "Chad Kieffer" <[email protected]> wrote: > >> Should routes reflect hierarchy? >> >> On May 17, 2013, at 10:39 AM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote: >> >> Hmm... good question. >> >> My first inclination isn't to make a hierarchy, but rather an extra >> cross-reference. For example, "gallery/tag/me/you" would find photos >> tagged with both me and you. Thoughts? >> >> Take care, >> Shad >> >> >> On 17 May 2013 17:56, Chad Kieffer <[email protected]> wrote: >> >>> Although tags are strictly flat now, how might hierarchical structures >>> be routed in the future? I think even if support for taxonomies isn't part >>> of G3 now, it might be worth considering as part of this discussion. >>> >>> - Chad >>> >>> On May 17, 2013, at 9:15 AM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote: >>> >>> Hmm... I'm not sure I agree. For example, this would make folks with >>> photos about 90210, 356, and 1776 really annoyed at the new system. The >>> simplest rule is the one we don't need :-) >>> >>> My preference is this: >>> - make the new system simple, flexible, and exactly what we want. >>> - provide enough redirects for old URLs to keep most old sites happy >>> during the conversion. >>> >>> Thinking again, there's actually a better rule we can use to deal with >>> old redirects: >>> gallery30x/tag/123/321 --> tag id 123 (which coincidentally has name >>> 321, but this isn't checked) - old canonical URL >>> gallery31x/tag/123/321 --> tag id 123, name 321 (sees slash and tries >>> this), then 301 redirect. >>> gallery31x/tag/123 --> tag name 123, or if none exists, look for a tag >>> id 123 and 301 redirect. >>> gallery31x/tag/321 --> tag name 321 (which coincidentally has id 123, >>> but this isn't checked) - new canonical URL >>> >>> The only oddball case here is old URLs that were truncated *and* >>> coincide with new URLs, for which I don't think we should break our new >>> system to support... >>> >>> Take care, >>> Shad >>> >>> >>> >>> On 17 May 2013 17:06, Bharat Mediratta <[email protected]> wrote: >>> >>>> >>>> I'd prefer to have a simpler rule of "no numeric tag slugs" because >>>> that way we'll have consistent behavior in all cases. I like simple rules >>>> :-) >>>> >>>> >>>> On Fri, May 17, 2013 at 7:55 AM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote: >>>> >>>>> Yah, that's easy enough to keep. Just as you said, the only slight >>>>> wrinkle is numeric tag names, but even then we don't need to *enforce* that >>>>> slugs are non-numeric. Rather, we just can't forward old URLs that >>>>> coincide with new URLs of numeric tags. >>>>> >>>>> For example: >>>>> gallery30x/tag/123 --> tag id 123. >>>>> gallery31x/tag/123 --> tag name 123, or if none exists, look for a tag >>>>> id 123 and 301 redirect. >>>>> >>>>> Take care, >>>>> Shad >>>>> >>>>> >>>>> On 17 May 2013 16:42, Bharat Mediratta <[email protected]> wrote: >>>>> >>>>>> >>>>>> Keeping around support for tag/<id> shouldn't be too hard, right? It >>>>>> just means that the user-defined slug can't be purely numeric to avoid >>>>>> conflicts. >>>>>> >>>>>> >>>>>> On Fri, May 17, 2013 at 6:34 AM, Dave Moore <[email protected]>wrote: >>>>>> >>>>>>> On 2013-05-15 8:29 PM, Bharat wrote: >>>>>>> > The tag/<id>/<name> approach was essentially a fix because >>>>>>> originally >>>>>>> > we did tag/<name> but that was causing problems when we tried to >>>>>>> map a >>>>>>> > slugified tag name in the url back into a tag in the database. >>>>>>> That has been some concern for me and for others as well. I would be >>>>>>> nice if we could get to: /tag/<name> without the <id> in the url. If >>>>>>> that could be sorted out then that would make some/lots users/me >>>>>>> happy. >>>>>>> I don't know about backwards compatibility with tag/<id>/<name> is >>>>>>> required or not. I guess it depends on the amount of work required. >>>>>>> I >>>>>>> guess it would be good or if some workaround in the .htaccess could >>>>>>> be >>>>>>> provided as a fix, that would work as well. >>>>>>> >>>>>>> Dave >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> AlienVault Unified Security Management (USM) platform delivers >>>>>>> complete >>>>>>> security visibility with the essential security capabilities. Easily >>>>>>> and >>>>>>> efficiently configure, manage, and operate all of your security >>>>>>> controls >>>>>>> from a single console and one unified framework. Download a free >>>>>>> trial. >>>>>>> http://p.sf.net/sfu/alienvault_d2d >>>>>>> __[ g a l l e r y - d e v e l ]_________________________ >>>>>>> >>>>>>> [ list info/archive --> http://gallery.sf.net/lists.php ] >>>>>>> [ gallery info/FAQ/download --> http://gallery.sf.net ] >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> AlienVault Unified Security Management (USM) platform delivers >>>>>> complete >>>>>> security visibility with the essential security capabilities. Easily >>>>>> and >>>>>> efficiently configure, manage, and operate all of your security >>>>>> controls >>>>>> from a single console and one unified framework. Download a free >>>>>> trial. >>>>>> http://p.sf.net/sfu/alienvault_d2d >>>>>> __[ g a l l e r y - d e v e l ]_________________________ >>>>>> >>>>>> [ list info/archive --> http://gallery.sf.net/lists.php ] >>>>>> [ gallery info/FAQ/download --> http://gallery.sf.net ] >>>>>> >>>>> >>>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> AlienVault Unified Security Management (USM) platform delivers complete >>> security visibility with the essential security capabilities. Easily and >>> efficiently configure, manage, and operate all of your security controls >>> from a single console and one unified framework. Download a free trial. >>> http://p.sf.net/sfu/alienvault_d2d >>> >>> __[ g a l l e r y - d e v e l ]_________________________ >>> >>> [ list info/archive --> http://gallery.sf.net/lists.php ] >>> [ gallery info/FAQ/download --> http://gallery.sf.net ] >>> >>> >> > --001a11c2901c9d138904dd12595d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">(cc devel)<div><br></div><div>Hmm... =C2=A0I think I see w= hat you mean. =C2=A0The idea is that it'd be useful to use the tag &quo= t;blue" in two different contexts, right?</div><div><br></div><div sty= le>Actually, it seems like either of our approaches would enable this. =C2= =A0If the tags were=C2=A0hierarchical, then "flowers/blue" and &q= uot;birds/blue" would be different. =C2=A0If they were "anded&quo= t; together, then "flowers/blue" (or "blue/flowers") wo= uld only fetch photos that are tagged with both "blue" and "= flowers".</div> <div style><br></div><div style>Thoughts?</div><div style><br></div><div st= yle>Take care,</div><div style>Shad</div><div style><br></div></div><div cl= ass=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On 18 May 2013 19:40= , Chad Kieffer <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" targ= et=3D"_blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-word"><div>Som= e might find it desirable to be able to categorize photos in hierarchies wh= ere they might reuse a tag.=C2=A0</div> <div><br></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 birds = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 flowe= rs</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 / =C2=A0 =C2= =A0 =C2=A0 \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 / =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\</div><div>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 blue =C2=A0 =C2=A0 =C2=A0red =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0b= lue =C2=A0 =C2=A0 =C2=A0 =C2=A0red</div><div><br></div><div><br> </div><div>This is a probably a moot point in the context of routing for a = flat tag system.</div><div><br></div><br><div><div>On May 17, 2013, at 12:5= 6 PM, Shad Laws wrote:</div><br><blockquote type=3D"cite"><p>I'm not su= re I follow the question...</p> <p>What I meant by my idea was that, rather than use extra URL fragments to= denote hierarchy, it'd denote an "and".=C2=A0 So, "gall= ery3/tag/foo/bar" would show things that have both foo and bar tags.= =C2=A0 Thoughts?</p> <p>Sent from my Swiss Army Phone</p> <div class=3D"gmail_quote">On May 17, 2013 8:03 PM, "Chad Kieffer"= ; <<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a= >> wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" styl= e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir=3D"auto"><div>Should routes reflect hierarchy?</div><div><br>On Ma= y 17, 2013, at 10:39 AM, Shad Laws <<a href=3D"mailto:shad-xpYdmXCiSuZWk0Htik3J/[email protected]"= target=3D"_blank">shad-xpYdmXCiSuZWk0Htik3J/[email protected]</a>> wrote:<br><br></div><blockquot= e type=3D"cite"> <div><div dir=3D"ltr">Hmm... good question.<div><br></div><div>My first inc= lination isn't to make a hierarchy, but rather an extra cross-reference= . =C2=A0For example, "gallery/tag/me/you" would find photos tagge= d with both me and you. =C2=A0Thoughts?<div> <br></div><div>Take care,</div><div>Shad</div></div></div><div class=3D"gma= il_extra"><br><br><div class=3D"gmail_quote">On 17 May 2013 17:56, Chad Kie= ffer <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"auto"><div>Although tags are str= ictly flat now, how might hierarchical structures be routed in the future? = I think even if support for taxonomies isn't part of G3 now, it might b= e worth considering as part of this discussion.</div> <div><br></div><div>- Chad</div><div><br>On May 17, 2013, at 9:15 AM, Shad = Laws <<a href=3D"mailto:shad-xpYdmXCiSuZWk0Htik3J/[email protected]" target=3D"_blank">shad@shadla= ws.com</a>> wrote:<br><br></div><blockquote type=3D"cite"><div><div dir= =3D"ltr"> Hmm... I'm not sure I agree. =C2=A0For example, this would make folks w= ith photos about 90210, 356, and 1776 really annoyed at the new system. =C2= =A0The simplest rule is the one we don't need :-)<div><br></div> <div>My preference is this:</div><div>- make the new system simple, flexibl= e, and exactly what we want.</div><div>- provide enough redirects for old U= RLs to keep most old sites happy during the conversion.</div> <div><br></div><div>Thinking again, there's actually a better rule we c= an use to deal with old redirects:</div><div><div style=3D"font-family:aria= l,sans-serif;font-size:13px">gallery30x/tag/123/321 --> tag id 123 (whic= h coincidentally has name 321, but this isn't checked) - old canonical = URL</div> <div style=3D"font-size:13px;font-family:arial,sans-serif">gallery31x/tag/1= 23/321 --> tag id 123, name 321 (sees slash and tries this), then 301 re= direct.</div><div style=3D"font-family:arial,sans-serif;font-size:13px">gal= lery31x/tag/123 --> tag name 123, or if none exists, look for a tag id 1= 23 and 301 redirect.</div> <div style=3D"font-family:arial,sans-serif;font-size:13px">gallery31x/tag/3= 21 --> tag name 321 (which coincidentally has id 123, but this isn't= checked) - new canonical URL</div><div style=3D"font-family:arial,sans-ser= if;font-size:13px"> <br></div><div style=3D"font-family:arial,sans-serif;font-size:13px">The on= ly oddball case here is old URLs that were truncated *and* coincide with ne= w URLs, for which I don't think we should break our new system to suppo= rt...</div> <div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px">Take care,</div><div s= tyle=3D"font-family:arial,sans-serif;font-size:13px">Shad</div><div style= =3D"font-family:arial,sans-serif;font-size:13px"> <br></div></div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmai= l_quote">On 17 May 2013 17:06, Bharat Mediratta <span dir=3D"ltr"><<a hr= ef=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g= t;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div>I'd prefer to = have a simpler rule of "no numeric tag slugs" because that way we= 'll have consistent behavior in all cases. =C2=A0I like simple rules :-= )</div> </div><div class=3D"gmail_extra"> <br><br><div class=3D"gmail_quote">On Fri, May 17, 2013 at 7:55 AM, Shad La= ws <span dir=3D"ltr"><<a href=3D"mailto:shad-xpYdmXCiSuZWk0Htik3J/[email protected]" target=3D"_bl= ank">shad-xpYdmXCiSuZWk0Htik3J/[email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_= quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1= ex"> <div dir=3D"ltr">Yah, that's easy enough to keep. =C2=A0Just as you sai= d, the only slight wrinkle is numeric tag names, but even then we don't= need to *enforce* that slugs are non-numeric. =C2=A0Rather, we just can= 9;t forward old URLs that coincide with new URLs of numeric tags.<div> <br></div><div>For example:</div><div>gallery30x/tag/123 --> tag id 123.= </div><div>gallery31x/tag/123 --> tag name 123, or if none exists, look = for a tag id 123 and 301 redirect.</div><div><br></div> <div>Take care,</div><div>Shad</div></div><div><div><div class=3D"gmail_ext= ra"><br><br><div class=3D"gmail_quote">On 17 May 2013 16:42, Bharat Medirat= ta <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_b= lank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div>Keeping around sup= port for tag/<id> shouldn't be too hard, right? =C2=A0It just mea= ns that the user-defined slug can't be purely numeric to avoid conflict= s.</div> </div><div class=3D"gmail_extra"> <br><br><div class=3D"gmail_quote">On Fri, May 17, 2013 at 6:34 AM, Dave Mo= ore <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"= _blank">[email protected]</a>></span> wrote:<br><blockquote class=3D"g= mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l= eft:1ex"> <div>On 2013-05-15 8:29 PM, Bharat wrote:<br> > =C2=A0The tag/<id>/<name> approach was essentially a fix b= ecause originally<br> > we did tag/<name> but that was causing problems when we tried to= map a<br> > slugified tag name in the url back into a tag in the database.<br> </div>That has been some concern for me and for others as well. =C2=A0I wou= ld be<br> nice if we could get to: /tag/<name> without the <id> in the ur= l. =C2=A0If<br> that could be sorted out then that would make some/lots users/me happy.<br> I don't know about backwards compatibility with tag/<id>/<name= > is<br> required or not. I guess it depends on the amount of work required. =C2=A0I= <br> guess it would be good or if some workaround in the .htaccess could be<br> provided as a fix, that would work as well.<br> <span><font color=3D"#888888"><br> Dave<br> </font></span><div><div><br> ---------------------------------------------------------------------------= ---<br> AlienVault Unified Security Management (USM) platform delivers complete<br> security visibility with the essential security capabilities. Easily and<br= > efficiently configure, manage, and operate all of your security controls<br= > from a single console and one unified framework. Download a free trial.<br> <a href=3D"http://p.sf.net/sfu/alienvault_d2d" target=3D"_blank">http://p.s= f.net/sfu/alienvault_d2d</a><br> __[ g a l l e r y - d e v e l ]_________________________<br> <br> [ list info/archive --> <a href=3D"http://gallery.sf.net/lists.php" targ= et=3D"_blank">http://gallery.sf.net/lists.php</a> ]<br> [ gallery info/FAQ/download --> <a href=3D"http://gallery.sf.net/" targe= t=3D"_blank">http://gallery.sf.net</a> ]<br> <br> </div></div></blockquote></div><br></div> <br>-----------------------------------------------------------------------= -------<br> AlienVault Unified Security Management (USM) platform delivers complete<br> security visibility with the essential security capabilities. Easily and<br= > efficiently configure, manage, and operate all of your security controls<br= > from a single console and one unified framework. Download a free trial.<br> <a href=3D"http://p.sf.net/sfu/alienvault_d2d" target=3D"_blank">http://p.s= f.net/sfu/alienvault_d2d</a><br>__[ g a l l e r y - d e v e l ]____________= _____________<br> <br> [ list info/archive --> <a href=3D"http://gallery.sf.net/lists.php" targ= et=3D"_blank">http://gallery.sf.net/lists.php</a> ]<br> [ gallery info/FAQ/download --> <a href=3D"http://gallery.sf.net/" targe= t=3D"_blank">http://gallery.sf.net</a> ]<br></blockquote></div><br></div> </div></div></blockquote></div><br></div> </blockquote></div><br></div> </div></blockquote><blockquote type=3D"cite"><div><span>-------------------= -----------------------------------------------------------</span><br><span= >AlienVault Unified Security Management (USM) platform delivers complete</s= pan><br> <span>security visibility with the essential security capabilities. Easily = and</span><br><span>efficiently configure, manage, and operate all of your = security controls</span><br><span>from a single console and one unified fra= mework. Download a free trial.</span><br> <span><a href=3D"http://p.sf.net/sfu/alienvault_d2d" target=3D"_blank">http= ://p.sf.net/sfu/alienvault_d2d</a></span></div></blockquote><blockquote typ= e=3D"cite"><div><span>__[ g a l l e r y - d e v e l ]______________________= ___</span><br> <span></span><br><span>[ list info/archive --> <a href=3D"http://gallery= .sf.net/lists.php" target=3D"_blank">http://gallery.sf.net/lists.php</a> ]<= /span><br><span>[ gallery info/FAQ/download --> <a href=3D"http://galler= y.sf.net/" target=3D"_blank">http://gallery.sf.net</a> ]</span></div> </blockquote></div></blockquote></div><br></div> </div></blockquote></div></blockquote></div> </blockquote></div><br></div></blockquote></div><br></div> --001a11c2901c9d138904dd12595d-- --===============1277598447327617144== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d --===============1277598447327617144== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] --===============1277598447327617144==--