[Q] Opinions on this site design

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    [Q] Opinions on this site design

    This is just a thought in my head at the moment and I wanted to get some
    opinions on an idea on how to design my web site.

    First, it would be a 100% (or very close to it) PHP site.

    The best way to descibe this thought would be to give a specific
    example.

    The site would revolve around a single .php file...index.ph p.

    It is a two column site. The left column is a common navigation column
    and the right column is (obviously) the content column.

    The site also involve user registration and login for access.

    So, if a user is not logged, the left column would contain the common
    username and password fields. Just below these are two links 'Register'
    and 'Forgot Password'.

    Assume that a new user needs to register. They would then proceed to
    click on the 'Register' link.

    What I have found that most sites do would be to take the user to, for
    example, http://<address>/register.php

    Here is the meat of the alternative I was considering.

    The 'Register' link would be:

    http://<address>/index.php?func= register

    Now, my php code would then see that 'func' was assigned and would call
    a function that would put the appropriate content in the right column.
    In the 'Register' case, it would be the standard request items ask of
    users (e-mail, desired username, desired password).

    In the same manner, the 'Forgot Password' link would be:

    http://<address>/index.php?func= forgotpassword

    Now, func would essentially represent top level sections of my site.
    The top level sections will have sub-sections. I would handle this by
    essentially doing the following:

    http://<address>/index.php?func= <majorsection>& param1=someinfo rmation

    To keep index.php from growing just far to big, the major sections would
    be handled in their own .php files. index.php would basically be just a
    large if/elseif statement based on what func said (or did not say).

    If a user, who wasn't logged in, attempted to access part of the site by
    providing a 'func', access would be denied via the common session
    management provided by PHP.

    What do people think?





    --
    == Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
    "Therefore the considerations of the intelligent always include both
    benefit and harm." - Sun Tzu
    == Insults, like violence, are the last refuge of the incompetent... ===
  • SwissCheese

    #2
    Re: [Q] Opinions on this site design

    "Eric" <egDfAusenetE5f z@verizon.net> wrote in message
    news:1g3sw11.le 82pbmhdazrN%egD fAusenetE5fz@ve rizon.net...[color=blue]
    > This is just a thought in my head at the moment and I wanted to get some
    > opinions on an idea on how to design my web site.
    >
    > First, it would be a 100% (or very close to it) PHP site.
    >
    > The best way to descibe this thought would be to give a specific
    > example.
    >
    > The site would revolve around a single .php file...index.ph p.
    >
    > It is a two column site. The left column is a common navigation column
    > and the right column is (obviously) the content column.
    >
    > The site also involve user registration and login for access.
    >
    > So, if a user is not logged, the left column would contain the common
    > username and password fields. Just below these are two links 'Register'
    > and 'Forgot Password'.
    >
    > Assume that a new user needs to register. They would then proceed to
    > click on the 'Register' link.
    >
    > What I have found that most sites do would be to take the user to, for
    > example, http://<address>/register.php
    >
    > Here is the meat of the alternative I was considering.
    >
    > The 'Register' link would be:
    >
    > http://<address>/index.php?func= register
    >
    > Now, my php code would then see that 'func' was assigned and would call
    > a function that would put the appropriate content in the right column.
    > In the 'Register' case, it would be the standard request items ask of
    > users (e-mail, desired username, desired password).
    >
    > In the same manner, the 'Forgot Password' link would be:
    >
    > http://<address>/index.php?func= forgotpassword
    >
    > Now, func would essentially represent top level sections of my site.
    > The top level sections will have sub-sections. I would handle this by
    > essentially doing the following:
    >
    > http://<address>/index.php?func= <majorsection>& param1=someinfo rmation
    >
    > To keep index.php from growing just far to big, the major sections would
    > be handled in their own .php files. index.php would basically be just a
    > large if/elseif statement based on what func said (or did not say).
    >
    > If a user, who wasn't logged in, attempted to access part of the site by
    > providing a 'func', access would be denied via the common session
    > management provided by PHP.
    >
    > What do people think?
    >[/color]

    People think that this is done every day.



    Comment

    • Eric

      #3
      Re: [Q] Opinions on this site design

      SwissCheese <SwissCheese@cf l.rr.com> wrote:
      [color=blue]
      > People think that this is done every day.[/color]

      Interesting.

      I have yet to find a site that is based solely around this idea.
      Can you point to one?

      Now, considering that there is rarely a single solution that solves all
      problems, in what ways would the design break down?


      --
      == Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
      "Therefore the considerations of the intelligent always include both
      benefit and harm." - Sun Tzu
      == Insults, like violence, are the last refuge of the incompetent... ===

      Comment

      • Alan Little

        #4
        Re: [Q] Opinions on this site design

        Carved in mystic runes upon the very living rock, the last words of Eric
        of comp.lang.php make plain:
        [color=blue]
        > SwissCheese <SwissCheese@cf l.rr.com> wrote:
        >[color=green]
        >> People think that this is done every day.[/color]
        >
        > Interesting.
        >
        > I have yet to find a site that is based solely around this idea.
        > Can you point to one?[/color]

        I don't know that I'd say it's done every day. I don't have any
        statistics or anything, but it seems to me more common to have different
        functions in different files. That said, Phormation is done the way you
        describe, with all links pointing back to the index file, which pulls in
        code according to the functionality indicated.

        --
        Alan Little
        Phorm PHP Form Processor

        Comment

        • Alan Little

          #5
          Re: [Q] Opinions on this site design

          Carved in mystic runes upon the very living rock, the last words of Alan
          Little of comp.lang.php make plain:
          [color=blue]
          > Phormation is done the way you describe, with all links pointing back to
          > the index file, which pulls in code according to the functionality
          > indicated.[/color]

          Sorry, I should have been more specific -- I didn't realize there were so
          many Phormation's out there:



          --
          Alan Little
          Phorm PHP Form Processor

          Comment

          • Randell D.

            #6
            Re: [Q] Opinions on this site design


            "Eric" <egDfAusenetE5f z@verizon.net> wrote in message
            news:1g3sw11.le 82pbmhdazrN%egD fAusenetE5fz@ve rizon.net...[color=blue]
            > This is just a thought in my head at the moment and I wanted to get some
            > opinions on an idea on how to design my web site.
            >
            > First, it would be a 100% (or very close to it) PHP site.
            >
            > The best way to descibe this thought would be to give a specific
            > example.
            >
            > The site would revolve around a single .php file...index.ph p.
            >
            > It is a two column site. The left column is a common navigation column
            > and the right column is (obviously) the content column.
            >
            > The site also involve user registration and login for access.
            >
            > So, if a user is not logged, the left column would contain the common
            > username and password fields. Just below these are two links 'Register'
            > and 'Forgot Password'.
            >
            > Assume that a new user needs to register. They would then proceed to
            > click on the 'Register' link.
            >
            > What I have found that most sites do would be to take the user to, for
            > example, http://<address>/register.php
            >
            > Here is the meat of the alternative I was considering.
            >
            > The 'Register' link would be:
            >
            > http://<address>/index.php?func= register
            >
            > Now, my php code would then see that 'func' was assigned and would call
            > a function that would put the appropriate content in the right column.
            > In the 'Register' case, it would be the standard request items ask of
            > users (e-mail, desired username, desired password).
            >
            > In the same manner, the 'Forgot Password' link would be:
            >
            > http://<address>/index.php?func= forgotpassword
            >
            > Now, func would essentially represent top level sections of my site.
            > The top level sections will have sub-sections. I would handle this by
            > essentially doing the following:
            >
            > http://<address>/index.php?func= <majorsection>& param1=someinfo rmation
            >
            > To keep index.php from growing just far to big, the major sections would
            > be handled in their own .php files. index.php would basically be just a
            > large if/elseif statement based on what func said (or did not say).
            >
            > If a user, who wasn't logged in, attempted to access part of the site by
            > providing a 'func', access would be denied via the common session
            > management provided by PHP.
            >
            > What do people think?
            >
            >
            >
            >
            >
            > --
            > == Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
            > "Therefore the considerations of the intelligent always include both
            > benefit and harm." - Sun Tzu
            > == Insults, like violence, are the last refuge of the incompetent... ===[/color]

            The only comments I can throw forward on this is that some search engines
            might find difficulty in indexing any meta tags - but if its hidden behind a
            username/password then I gather you're not too bothered on search engines -
            Secondly, because you would have few (if any) static pages, you should
            ensure your server could handle the traffic. PHP IMHO is not hungry, but it
            will eat more resources than ordinary 'flat' or static html... Lastly... you
            could encounter debugging problems since I believe any faults you do find
            will only report the script name and not any arguements that might have been
            passed.

            I hope this gives you some food for thought...


            Comment

            • R. Rajesh Jeba Anbiah

              #7
              Re: [Q] Opinions on this site design

              egDfAusenetE5fz @verizon.net (Eric) wrote in message news:<1g3t2yz.1 a9e9lnp5sadbN%e gDfAusenetE5fz@ verizon.net>...[color=blue]
              > SwissCheese <SwissCheese@cf l.rr.com> wrote:
              >[color=green]
              > > People think that this is done every day.[/color]
              >
              > Interesting.
              >
              > I have yet to find a site that is based solely around this idea.
              > Can you point to one?[/color]

              cars.webquezt.c om They actually pass the commands by encoding.

              But, IMHO people usually prefer individual files for individual
              purpose (aka decentralized concept). It is easy to fix the problem, if
              the entire code for the job is in individual files say signup.php,
              login.php, etc.

              ---
              "He who created the god was a fool; he who spreads his name is a
              scoundrel and he who worships him is a barbarian."---Periyar, Famous
              Tamil Rationalist
              Email: rrjanbiah-at-Y!com

              Comment

              • Matthias Esken

                #8
                Re: [Q] Opinions on this site design

                egDfAusenetE5fz @verizon.net (Eric) schrieb:
                [color=blue]
                > What do people think?[/color]

                It doesn't look unusual.

                Regards,
                Matthias

                Comment

                • Stanimir Stamenkov

                  #9
                  Re: [Q] Opinions on this site design

                  Eric wrote:
                  [color=blue]
                  > What I have found that most sites do would be to take the user to, for
                  > example, http://<address>/register.php[/color]

                  Yes, this is generally the better from what you intent below.
                  [color=blue]
                  > Here is the meat of the alternative I was considering.
                  >
                  > The 'Register' link would be:
                  >
                  > http://<address>/index.php?func= register[/color]







                  --
                  Stanimir

                  Comment

                  • Stephen Poley

                    #10
                    Re: [Q] Opinions on this site design

                    On Sun, 02 Nov 2003 20:15:22 GMT, egDfAusenetE5fz @verizon.net (Eric)
                    wrote:
                    [color=blue]
                    >Here is the meat of the alternative I was considering.
                    >
                    >The 'Register' link would be:
                    >
                    > http://<address>/index.php?func= register
                    >
                    >Now, my php code would then see that 'func' was assigned and would call
                    >a function that would put the appropriate content in the right column.[/color]
                    ....
                    [color=blue]
                    >What do people think?[/color]

                    What do you wish to achieve with this approach? It seems slightly more
                    complex than the straightforward approach, and I can't immediately see
                    the advantage.

                    --
                    Stephen Poley


                    Comment

                    • Eric

                      #11
                      Re: [Q] Opinions on this site design

                      Randell D. <you.can.email. me.at.randelld@ yahoo.com> wrote:
                      [color=blue]
                      > The only comments I can throw forward on this is that some search engines
                      > might find difficulty in indexing any meta tags - but if its hidden behind a
                      > username/password then I gather you're not too bothered on search engines[/color]

                      Right...do not want the search engines to index beyond the default page
                      that would appear when no 'func' was defined.
                      [color=blue]
                      > Secondly, because you would have few (if any) static pages, you should
                      > ensure your server could handle the traffic.[/color]

                      Good point. My page will be a low traffic one.
                      [color=blue]
                      > Lastly... you could encounter debugging problems since I believe any
                      > faults you do find will only report the script name and not any
                      > arguments that might have been passed.[/color]

                      Another good point. I agree, it is unlikely that arguments passed would
                      be directly reported, but I believe the URL being used would be
                      available in the field and that should provide sufficient information as
                      I will be using the GET method.

                      If nothing else, if a problem is experienced, the path to that problem
                      should be known and would provide sufficient information to aid in
                      solving the problem.
                      [color=blue]
                      > I hope this gives you some food for thought...[/color]

                      It did. Thank you.

                      --
                      == Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
                      "Therefore the considerations of the intelligent always include both
                      benefit and harm." - Sun Tzu
                      == Insults, like violence, are the last refuge of the incompetent... ===

                      Comment

                      • Eric

                        #12
                        Re: [Q] Opinions on this site design

                        Stanimir Stamenkov <s7an10@netscap e.net> wrote:
                        [color=blue][color=green]
                        > > Here is the meat of the alternative I was considering.
                        > >
                        > > The 'Register' link would be:
                        > >
                        > > http://<address>/index.php?func= register[/color]
                        >
                        > http://www.w3.org/Provider/Style/URI
                        > http://www.w3.org/QA/Tips
                        > http://www.w3.org/QA/Tips/readable-uri
                        > http://www.w3.org/QA/Tips/uri-choose[/color]

                        That is some great information. Thank you.

                        I shall have to reconsider my approach.


                        --
                        == Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
                        "Therefore the considerations of the intelligent always include both
                        benefit and harm." - Sun Tzu
                        == Insults, like violence, are the last refuge of the incompetent... ===

                        Comment

                        • SwissCheese

                          #13
                          Re: [Q] Opinions on this site design

                          "Eric" <egDfAusenetE5f z@verizon.net> wrote in message
                          news:1g3t2yz.1a 9e9lnp5sadbN%eg DfAusenetE5fz@v erizon.net...[color=blue]
                          > SwissCheese <SwissCheese@cf l.rr.com> wrote:
                          >[color=green]
                          > > People think that this is done every day.[/color]
                          >
                          > Interesting.
                          >
                          > I have yet to find a site that is based solely around this idea.
                          > Can you point to one?
                          >
                          > Now, considering that there is rarely a single solution that solves all
                          > problems, in what ways would the design break down?
                          >[/color]

                          Eric,

                          It really depends on what you are trying to accomplish for yourself. Why
                          are you trying to keep everything together in one file - what is the
                          purpose? The only upside I can think of is that you would have only one file
                          for the server to cache so that may be a little faster. I have a site that
                          i'm planning and my first thought was to do it the same way - but the more
                          my plan comes together the more it seems rediculous to try to jam all the
                          functionality into one file. Just the overhead of all the error checking
                          every time you add new functions...


                          Comment

                          • R. Rajesh Jeba Anbiah

                            #14
                            Re: [Q] Opinions on this site design

                            Stephen Poley <sbpoley@xs4all .nl> wrote in message news:<4cacqv8nh lssogfhmsbv4emt 6ru7irbgqq@4ax. com>...[color=blue]
                            > On Sun, 02 Nov 2003 20:15:22 GMT, egDfAusenetE5fz @verizon.net (Eric)
                            > wrote:
                            >[color=green]
                            > >Here is the meat of the alternative I was considering.
                            > >
                            > >The 'Register' link would be:
                            > >
                            > > http://<address>/index.php?func= register
                            > >
                            > >Now, my php code would then see that 'func' was assigned and would call
                            > >a function that would put the appropriate content in the right column.[/color]
                            > ...
                            >[color=green]
                            > >What do people think?[/color]
                            >
                            > What do you wish to achieve with this approach? It seems slightly more
                            > complex than the straightforward approach, and I can't immediately see
                            > the advantage.[/color]

                            The idea is centralized approach.

                            For example,
                            if ($func=="regist er")
                            include("includ es/register.inc.ph p");
                            else if ($func=="login" )
                            include("includ es/login.inc.php") ;
                            ....

                            The problem with this approach is debugging (by 3rd programmer).

                            Also, you'll suffer search engine ranking problem if you don't
                            have mod rewrite facility as the URI is somewhat messy.

                            ---
                            "Success = 10% sweat + 90% tears"
                            Email: rrjanbiah-at-Y!com

                            Comment

                            • Mark Parnell

                              #15
                              Re: [Q] Opinions on this site design

                              Sometime around 3 Nov 2003 20:43:11 -0800, R. Rajesh Jeba Anbiah is
                              reported to have stated:
                              [color=blue]
                              > "Success = 10% sweat + 90% tears"[/color]

                              Success is very wet.

                              --
                              Mark Parnell

                              Comment

                              Working...