in reply to URI Style

That's why I don't use .pl or any CGI like software.

I think that URLs must describe their content, not the program used to manage it, SO I use modperl directly, or HTML::Mason, with dhandlers, that allow me to have virtual URLs, that I then map to my database information.

The future (being finished) of my bliki system, Mabliki, uses a urification of the post titles on the URLs, that have the form /view/some-special-interest-item.html.

This is a virtual cached URL, that say nothing about the software used or the language I use, only about the action I 'm doing (viewing some-special-interest-item).

I think there are several reason to use this type of URLs, including compatibility and SEO. URLS like parent=23421;node_id=2342345 say nothing about the content, and even when a user is looking in history for some story he liked it don't work.

mod_rewrite is a good way to transform URLs if you can't have natively good URLs. ModPerl have several ways to map URLs, so I don't think that you need another way to map them.

You just need another way to think web devel in Perl.

CGI, I think, is not an option. Even in a Perl::Registry environment.

Replies are listed 'Best First'.
Re^2: URI Style
by Anonymous Monk on May 11, 2006 at 17:40 UTC
    post titles on the URLs, that have the form /view/some-special-interest-item.html.

    This is a virtual cached URL, that say nothing about the software used or the language I use

    That's good, but improvable.

    /view is redundant, as it exposes something system-specific, see the point about cruft above. I know you use mod_rewrite behind the scenes to map it to something, and this part of the URI is actually necessary, so may I suggest renaming it /articles instead?

    .html does talk about the language you use. In five years you want to serve the content perhaps in XHTML with embedded namespaces or who knows what wacky stuff comes along and the file ending is entirely unappropriate when someone saves the document locally. You're safe with leaving the ending off.

      /view is redundant, as it exposes something system-specific, see the point about cruft above. I know you use mod_rewrite behind the scenes to map it to something, and this part of the URI is actually necessary, so may I suggest renaming it /articles instead?
      Hi,

      You think that I use mod_rewrite, I don't. Ever. I usually use HTML::Mason or ModPerl, and my application maps URLs to Mason components or Perl functions directly.

      .html does talk about the language you use. In five years you want to serve the content perhaps in XHTML with embedded namespaces or who knows what wacky stuff comes along and the file ending is entirely unappropriate when someone saves the document locally. You're safe with leaving the ending off.
      You're right about this, but if in the future my application start generating XHTML, I can easly change also the link rotines or components to write urls like /view/some-special-interest-item.xhtml, and the only thing that is in my database unformated story is something like [[Some Special Interest Item]], and it's my engine that generates the url for that.

      The same way, except for special cases (Google Videos, You tube, etc), I don't have any HTML in my content database, only special formating chars, that can be translated to HTML, XHTML, LaTeX or anything else I need in the future.

      That's the way I like it.