Chaz Meyers (cpm) wrote,
Chaz Meyers
cpm

URL prettiness to excess.

Lately I've been using CodeIgniter. CI is a lightweight PHP framework

I know that Pretty URLs are fashionable. CI takes it to a new extreme by unsetting $_GET by default.

Why? Because you should be POSTing or using longer URLs instead. Check out their $this->uri->assoc_to_uri() example on how to "properly" handle hashy query data.

Does anyone seriously think that http://www.example.com/shoes/gender/male/size/18/color/brown is a significantly better URL than http://www.example.com/shoes?gender=male&size=18&color=brown?

Have we thrown out the idea that only one URL should point to a given resource? (I'm betting if you swap around gender and size in the above example it would have the same result and give a 200 response instead of redirecting to a permalink.)

Are GET forms no longer are acceptable for things like searches that don't have side effects? (I'm pretty sure this change completely breaks non-POST forms.)

Don't get me wrong. Pretty URLs are great, and I wouldn't blink an eye if Opinionated Software like RubyOnRails removed GET parameters by default. But in a lightweight framework like CodeIgniter? It seems a bit odd.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments