Having URLs that are hackable are a good thing I definitely agree.   I
believe just because a user hacks a URL then that URL has to exist per
se.  A redirect to the plural version may be a sufficient fix.

/users/popular -> The popular users
/users   -> A listing of all users
/user/1 -> User 1
/user -> 301 redirect to /users.

The only time someone would go to /user if they manually entered it
in.  In this case the user ends up being happy because they get to
where they want to go.

Having the singular/plural distinction makes URLs more readable too.

/users/do_some_action
/user/adam/do_some_action

Its very clear whether its a member or collection action.






On Aug 2, 8:59 am, Dan Kubb <[EMAIL PROTECTED]> wrote:
> > Am I horribly misguided in wanting to use plural and singular prefixes
> > to distinguish between collections and individual entities?:
>
> > Collections:
>
> > /posts/tagged/ruby
> > /posts/from/2007/12
> > /posts/written-by/tomafro
> > /users
>
> > Individual items:
>
> > /user/tomafro
> > /post/1
>
> At one time I would've agreed with you on this, but I've come to admire
> the way rails URL's are "hackable" by default.  That is, you can hack
> off
> the end of the URL, and more often than not you're able to move to a
> higher level of the hierarchy.  I believe good websites and web apps
> should have short, easy to read, hackable URLs.
>
> Here's an article from Jakob Neilsen about how URLs are a strong part
> of the user interface, and why it makes sense to pay attention to them:
>    URL as UI:http://www.useit.com/alertbox/990321.html
>
> I've heard all the standard REST arguments about URLs needing to be
> opaque,
> but I do believe that some users (myself included) rely on them to be
> "hackable".  In fact I tend to directly manipulate the URL more than
> clicking on links in breadcrumbs or other navigation on web pages.
>
> --
>
> Thanks,
>
> Dan
> __________________________________________________________________
>
> Dan Kubb
> Autopilot Marketing Inc.
>
> Email: [EMAIL PROTECTED]
> Phone: 1 (604) 820-0212
> Web:  http://autopilotmarketing.com/
> __________________________________________________________________


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to