Help with approach...

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

    Help with approach...

    I could use a shove in the right direction...

    I'm using the Dreamweaver MX suite to build a website for my business. At
    first I threw
    something together quickly just to get going. I now need to replace that
    with something more refined. It seems that using PHP would be a part of
    that.

    I quickly learned that frames are problematic. I'm also reading that using
    tables (for layout) isn't the best idea either. And, then, PHP and DHTML
    came to the foreground as technologies I might need to utilize/understand.

    The proposed site is relatively simple. Nav bar on top. Menu on the left.
    Content front and center. Pretty standard stuff. The question is about
    "best practices" for creating such an animal and making it so it is
    reasonably easy to maintain.

    I've seen PHP include() examples for inserting common elements (nav bar,
    menu?) on every page without having to laboriously hand code them. I'm also
    told that I might consider using DHTML instead, or in combination with, a
    PHP approach. Of course, there's also CSS for the actual formatting.

    I find myself going in circles without finding a clear path to follow. Can
    someone offer a birds-eye view of what a sensible approach might be and
    where
    I would use each technology? I've setup a local Apache server with PHP and
    mySQL ready to go.

    For a look of where I want to go with the site you can go to
    http://martin.ecinemasys.com/ where I've placed my latest experiment --in
    embryonic stages.

    Thanks,


    --
    ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~
    Martin Euredjian

    To send private email:
    0_0_0_0_@pacbel l.net
    where
    "0_0_0_0_" = "martineu"



  • Richard Grove

    #2
    Re: Help with approach...

    "Martin Euredjian" <0_0_0_0_@pacbe ll.net> wrote in message
    news:bh6tb.1019 9$bQ4.3662@news svr29.news.prod igy.com...[color=blue]
    > I could use a shove in the right direction...
    >
    > I'm using the Dreamweaver MX suite to build a website for my business. At
    > first I threw
    > something together quickly just to get going. I now need to replace that
    > with something more refined. It seems that using PHP would be a part of
    > that.
    >
    > I quickly learned that frames are problematic. I'm also reading that[/color]
    using[color=blue]
    > tables (for layout) isn't the best idea either. And, then, PHP and DHTML
    > came to the foreground as technologies I might need to utilize/understand.
    >
    > The proposed site is relatively simple. Nav bar on top. Menu on the[/color]
    left.[color=blue]
    > Content front and center. Pretty standard stuff. The question is about
    > "best practices" for creating such an animal and making it so it is
    > reasonably easy to maintain.
    >
    > I've seen PHP include() examples for inserting common elements (nav bar,
    > menu?) on every page without having to laboriously hand code them. I'm[/color]
    also[color=blue]
    > told that I might consider using DHTML instead, or in combination with, a
    > PHP approach. Of course, there's also CSS for the actual formatting.
    >
    > I find myself going in circles without finding a clear path to follow.[/color]
    Can[color=blue]
    > someone offer a birds-eye view of what a sensible approach might be and
    > where
    > I would use each technology? I've setup a local Apache server with PHP[/color]
    and[color=blue]
    > mySQL ready to go.
    >
    > For a look of where I want to go with the site you can go to
    > http://martin.ecinemasys.com/ where I've placed my latest experiment --in
    > embryonic stages.
    >
    > Thanks,
    >[/color]




    What's wrong with using tables?
    You do also realise that you are opening a big can of worms getting into
    database driven sites. Not that they aree hard to implement, but it will
    take a fair amount of time to get efficient at PHP coding.
    I would suggest that if you are going to learn PHP, get rid of MX, or at
    least use it in code view. You will find de-bugging alot easier if you
    actually know what the code looks like.

    Are you learning for a job in the industry or just for a single site?
    If the latter, it may be worth evaluating how much your time is worth, and
    get a pro to do the job.
    Much easier, less headache and better sleep :)

    Regards
    Richard Grove
    01892 546979


    http://shopbuilder.org - ecommerce systems
    Become a Shop Builder re-seller:
    Affiliate marketing is a simple way to earn money online, using our affiliate platform. Join a global community of publishers and advertisers.

    Affiliate marketing is a simple way to earn money online, using our affiliate platform. Join a global community of publishers and advertisers.






    Comment

    • Martin Euredjian

      #3
      Re: Help with approach...

      "Richard Grove" wrote:
      [color=blue]
      > What's wrong with using tables?[/color]

      Not entirely sure. I've seen all sorts of sites and posts that say that
      using tables for layout should be avoided in favor of CSS.
      [color=blue]
      > You do also realise that you are opening a big can of worms getting into
      > database driven sites.[/color]

      Yup. I won't be the one doing the db-based site. I just want an
      incremental step up at the moment. From what you say it sounds like I
      should just use tables, do it up and move on.

      Have you seen typo3 (www.typo3.org)? Any thoughts?
      [color=blue]
      > Are you learning for a job in the industry or just for a single site?[/color]

      Single site at the moment. Any other site would be a personal hobby. This,
      in the long run, will be better off in the hands of pro's, of course.



      --
      ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~
      Martin Euredjian

      To send private email:
      0_0_0_0_@pacbel l.net
      where
      "0_0_0_0_" = "martineu"


      Comment

      • jn

        #4
        Re: Help with approach...

        "Martin Euredjian" <0_0_0_0_@pacbe ll.net> wrote in message
        news:xI7tb.1025 1$Qc5.3018@news svr29.news.prod igy.com...[color=blue]
        > "Richard Grove" wrote:
        >[color=green]
        > > What's wrong with using tables?[/color]
        >
        > Not entirely sure. I've seen all sorts of sites and posts that say that
        > using tables for layout should be avoided in favor of CSS.
        >[color=green]
        > > You do also realise that you are opening a big can of worms getting into
        > > database driven sites.[/color]
        >
        > Yup. I won't be the one doing the db-based site. I just want an
        > incremental step up at the moment. From what you say it sounds like I
        > should just use tables, do it up and move on.
        >
        > Have you seen typo3 (www.typo3.org)? Any thoughts?
        >[color=green]
        > > Are you learning for a job in the industry or just for a single site?[/color]
        >
        > Single site at the moment. Any other site would be a personal hobby.[/color]
        This,[color=blue]
        > in the long run, will be better off in the hands of pro's, of course.
        >
        >
        >
        > --
        > ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~
        > Martin Euredjian
        >
        > To send private email:
        > 0_0_0_0_@pacbel l.net
        > where
        > "0_0_0_0_" = "martineu"
        >[/color]

        Until all browsers support CSS 100%, I'm going to keep using tables and only
        use CSS for styling.

        My .02.....


        Comment

        • Geoff Berrow

          #5
          Re: Help with approach...

          I noticed that Message-ID:
          <D28tb.176708$R P2.118827@twist er.tampabay.rr. com> from jn contained the
          following:
          [color=blue]
          >
          >Until all browsers support CSS 100%, I'm going to keep using tables and only
          >use CSS for styling.[/color]

          According to W3 you should only use tables for tabular data and not for
          layout. Failing that, all tables should linearise, ie make sense when
          read line by line such as in a text reader. It's an accessibility
          thing. The CSS evangelists get quite passionate about it.

          The process they recommend is that you first write the content and then
          mark up the html (headings, subheadings, paragraphs etc) and use CSS to
          apply the style and formatting.

          Please note, I'm not saying /I/ do this all the time.

          See http://www.csszengarden.com/

          --
          Geoff Berrow (put thecat out to email)
          It's only Usenet, no one dies.
          My opinions, not the committee's, mine.
          Simple RFDs http://www.ckdog.co.uk/rfdmaker/

          Comment

          • Warren Oates

            #6
            Re: Help with approach...

            In article <223crvgnckvi4d bvi04p05pijbscf 6r128@4ax.com>,
            Geoff Berrow <blthecat@ckdog .co.uk> wrote:

            :According to W3 you should only use tables for tabular data and not for
            :layout. Failing that, all tables should linearise, ie make sense when
            :read line by line such as in a text reader. It's an accessibility
            :thing. The CSS evangelists get quite passionate about it.

            This gets a bit OT here, I know, but:

            I recently had to lay out a chapter from the Bible. I tried it first
            using divs and CSS, didn't like the look. I tried an ordered list and
            CSS, which you'd think would be perfect for numbered verses from the
            Bible, right? Nah. I couldn't get the look I wanted. So I put it in a
            table (and CSS), each verse is a row, the number and text are separate
            cells in the row. It does exactly what I want, I can style the content
            any old way it pleases me.

            So, what is tabular data, I guess is my question?

            Anyway, last I heard from the CSS/HTML purists was you shouldn't use
            multi-syllable words in your content because stupid people won't
            understand and you don't want to alienate 88% of your possible viewers
            do you, User-Agent 99?
            --
            Looks like more of Texas to me.
            .... Arizona, where the nights are warm and the roads are straight.

            Comment

            • Geoff Berrow

              #7
              Re: Help with approach...

              I noticed that Message-ID:
              <Warren-D0D1E9.08163415 112003@nr-tor01.bellnexxi a.net> from Warren Oates
              contained the following:
              [color=blue]
              >This gets a bit OT here, I know, but:
              >
              >I recently had to lay out a chapter from the Bible. I tried it first
              >using divs and CSS, didn't like the look. I tried an ordered list and
              >CSS, which you'd think would be perfect for numbered verses from the
              >Bible, right? Nah. I couldn't get the look I wanted. So I put it in a
              >table (and CSS), each verse is a row, the number and text are separate
              >cells in the row. It does exactly what I want, I can style the content
              >any old way it pleases me.[/color]

              I'm not a purist, but it sounds like your table would linearise just
              fine anyway.[color=blue]
              >
              >So, what is tabular data, I guess is my question?[/color]
              I think it's data that could have column headers and row headers. Since
              you have column headers of 'verse number', and 'text' and a row header
              of 'verse' then I'd say you were working with tabular data.[color=blue]
              >
              >Anyway, last I heard from the CSS/HTML purists was you shouldn't use
              >multi-syllable words in your content because stupid people won't
              >understand and you don't want to alienate 88% of your possible viewers
              >do you, User-Agent 99?[/color]

              They are people who like rules. HTML 4.01Strict is a real turn on. It's
              that word 'strict' you know.
              --
              Geoff Berrow (put thecat out to email)
              It's only Usenet, no one dies.
              My opinions, not the committee's, mine.
              Simple RFDs http://www.ckdog.co.uk/rfdmaker/

              Comment

              • Martin Euredjian

                #8
                Re: Help with approach...

                A follow-up question/s (please excuse my ignorance of the subject):

                Where/when are the following technologies used in a site:

                PHP
                DHTML
                CSS
                TABLES

                CSS vs. TABLES has already had some discussion. I guess it's one of those
                things where we know what the ideal goal might be but, for now, you have to
                use what works. Is that a fair statement?

                PHP vs. DHTML might be where I show my ignorance. As I understand it, I can
                use PHP to, among other things, intelligently alter what content is shown on
                a page based on a state variable or something like that. Where I got
                confused was when speaking to a web guys he threw out a single statement
                "You might want to think about DHTML".

                Can someone point me to a discussion on where the different technologies fit
                in today's web design world? In other words, when you set out to build a
                non-trivial website, what technologies are chosen for the various aspects of
                that site, why and how are they used?

                Thanks,


                --
                ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~
                Martin Euredjian

                To send private email:
                0_0_0_0_@pacbel l.net
                where
                "0_0_0_0_" = "martineu"


                Comment

                • Warren Oates

                  #9
                  Re: Help with approach...

                  In article <sHwtb.10449$Sl 4.4457@newssvr2 9.news.prodigy. com>,
                  "Martin Euredjian" <0_0_0_0_@pacbe ll.net> wrote:

                  :In other words, when you set out to build a
                  :non-trivial website, what technologies are chosen for the various aspects of
                  :that site, why and how are they used?

                  I've found that using xhtml strict makes things easier, the rules are
                  easy to understand, everyone (supposedly) knows what they are and the
                  browser will (hopefully) render the page quicker. If you do this, you
                  will by default be using CSS and HTML 4.

                  You'll be told to avoid JavaScript, which is silly, it's part of the
                  browser package, and shouldn't be disabled by anyone. Not all of your
                  sites will be on servers with anything as nice as PHP to play with.

                  You'll be told to avoid frames, which I agree with, but not because
                  there's anything wrong with them, I just find them ugly and difficult to
                  manage visually.

                  You'll be told to avoid Flash, and that's absolutely right, it's silly
                  and serves no purpose if you're not an animator advertising your work.

                  You'll be told to design every site with blind people in mind, and this
                  is okay if you're designing a site for blind people; if you're designing
                  a site that sells auto parts, you can safely ignore the blind, because
                  blind people don't drive cars except in Connecticut.

                  Essentially, use whatever technology makes the site work and your job
                  easy. Try to do as much on the server side as you can. Validate validate
                  validate. Spell chequing is good too.
                  --
                  Looks like more of Texas to me.
                  .... Arizona, where the nights are warm and the roads are straight.

                  Comment

                  • Matthias Esken

                    #10
                    Re: Help with approach...

                    "Martin Euredjian" <0_0_0_0_@pacbe ll.net> schrieb:
                    [color=blue]
                    > PHP
                    > DHTML
                    > CSS
                    > TABLES
                    >
                    > Can someone point me to a discussion on where the different technologies fit
                    > in today's web design world? In other words, when you set out to build a
                    > non-trivial website, what technologies are chosen for the various aspects of
                    > that site, why and how are they used?[/color]

                    PHP - server side scripting
                    DHTML - done with JavaScript for client side scripting
                    CSS - definition of the optical layout (kind of presentational markup)
                    TABLES - for tables in a (X)HTML page

                    PHP will work always, because I control the webservers. Tables should
                    work always, since they are standard since over 10 years. I use
                    JavaScript and CSS, but all my pages will still work if those
                    technologies are not present on a users browser.

                    Regards,
                    Matthias

                    Comment

                    • FLEB

                      #11
                      Re: Help with approach...

                      On Sat, 15 Nov 2003 21:15:04 GMT, Martin Euredjian wrote:
                      [color=blue]
                      > A follow-up question/s (please excuse my ignorance of the subject):
                      >
                      > Where/when are the following technologies used in a site:
                      >
                      > PHP[/color]

                      PHP is, like the name represents, a Preprocessor. It processes your source
                      code (a plain text file) ON THE SERVER, before it ever gets to the viewer's
                      browser. This is useful, since you can spew out simple HTML that anyone's
                      computer can view as a result of much more complex scripting (which their
                      browser never knows about).
                      [color=blue]
                      > DHTML[/color]

                      Basically, DHTML = CSS + JavaScript
                      DHTML lets you work with and manuipulate your CSS and HTML elements on the
                      viewer's browser.
                      [color=blue]
                      > CSS[/color]

                      CSS allows you to present visual and styling elements which are seperate
                      from the content of a page. For example, in HTML, you would think like:

                      Profits this month were [Make this blue]One Hundred Billion Dollars![Stop
                      making this blue]

                      With the CSS way of thinking, this would be like:

                      (Style section)
                      [Make normal text black]
                      [Make "Monthly Profits" blue]
                      (etc...)

                      (Content Section)

                      Profits this month were ["Monthly Profits"]One Hundred Billion Dollars![End
                      "Monthly Profits"]

                      (This isn't actual CSS code, this is just the way of thinking.) This might
                      seem trivial at first, but suppose you had 120 listings on 10 pages of a
                      whole year's worth of stats. If you wanted to change "Monthly Profits" from
                      blue to green, you could just change one color in the Style file, not 120
                      entries in each Content file.
                      [color=blue]
                      > TABLES[/color]

                      Tables are for tables. They say we shouldn't use them for layout, and I
                      usually don't. But sometimes there's no better solution, so I have to.
                      [color=blue]
                      >
                      > CSS vs. TABLES has already had some discussion. I guess it's one of those
                      > things where we know what the ideal goal might be but, for now, you have to
                      > use what works. Is that a fair statement?
                      >[/color]

                      That's where I am now... In my mind, neither CSS (in its current
                      incarnation) nor Tables (ever) were meant as a layout device. I try to use
                      CSS as much as possible, but sometimes the CSS "hacks" you need to get
                      certain layouts are more convoluted than the "hackiness" of just using
                      tables. Just make sure you know, if you're going to want a
                      tightly-regulated layout, where the flakiness lies on certain browsers'
                      implementations of both Tables and CSS. Something done up for IE might look
                      like a car crash in NS4, NS6+, or a W3C browser, or vice versa.
                      [color=blue]
                      > PHP vs. DHTML might be where I show my ignorance. As I understand it, I can
                      > use PHP to, among other things, intelligently alter what content is shown on
                      > a page based on a state variable or something like that. Where I got
                      > confused was when speaking to a web guys he threw out a single statement
                      > "You might want to think about DHTML".
                      >[/color]

                      Well, that's a pretty right-on definiton of PHP you've got there... it
                      basically works after you write the text file on the server, but before
                      anything gets sent to the viewer. You can use scripting methods to change
                      what actual *code* gets sent to the viewer's browser.

                      DHTML is a completely different animal, not even "versus" PHP, really. It's
                      basically the JavaScript "interactiv e" end of CSS. It allows you to move,
                      manipulate, and work with the CSS objects you have. All DHTML, along with
                      JavaScript, Java, CSS, and HTML get sent to the viewer as a plain-text
                      file, and the viewer's web-browser does all the computing and rendering.
                      This brings the problems of browser versions back into play, as well as the
                      "What if they have JavaScript disabled" problem.

                      An interesting thing is, since JavaScript and DHTML are straight-text, you
                      can use PHP to dynamically *write* JavaScript code, although that's a
                      heavy-duty headache-and-a-half in a lot of cases.
                      [color=blue]
                      > Can someone point me to a discussion on where the different technologies fit
                      > in today's web design world? In other words, when you set out to build a
                      > non-trivial website, what technologies are chosen for the various aspects of
                      > that site, why and how are they used?
                      >
                      > Thanks,[/color]


                      -- Rudy Fleminger
                      -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
                      -- (personal replies should at least be mirrored to email)
                      -- (include "Hey!" in the Subject line for priority processing)

                      Comment

                      • Martin Euredjian

                        #12
                        Re: Help with approach...

                        "FLEB" wrote:
                        [color=blue][color=green]
                        > > A follow-up question/s (please excuse my ignorance of the subject):
                        > >
                        > > Where/when are the following technologies used in a site:
                        > >
                        > > PHP[/color]
                        >
                        > PHP is, like the name represents, a Preprocessor. It processes your source[/color]
                        ....

                        Thanks for a great rundown. Exactly what I was looking for. It sounds like
                        I could have a good time with PHP.

                        Questions:

                        Say I'm using PHP to handle navigation and want to (obviously) store at
                        least a state variable somewhere in order to keep track of what's going on.

                        How are these variables persisted?
                        Do they cross html page boundaries?

                        I use state machines extensively in my normal line of work (embedded,
                        hardware, firmware, software design). Is this technique in use to drive
                        websites? If so, where is the state machine code contained so that it can
                        control the whole site? On the surface it sounds like PHP could be used
                        this way.

                        Maybe a set of variables are declared/used in the index.htm for the site and
                        they retain visibility for all other pages...

                        Thanks,


                        ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~
                        Martin Euredjian

                        To send private email:
                        0_0_0_0_@pacbel l.net
                        where
                        "0_0_0_0_" = "martineu"


                        Comment

                        • Geoff Berrow

                          #13
                          Re: Help with approach...

                          I noticed that Message-ID:
                          <e%0ub.10667$bg .3912@newssvr29 .news.prodigy.c om> from Martin Euredjian
                          contained the following:
                          [color=blue]
                          >Say I'm using PHP to handle navigation and want to (obviously) store at
                          >least a state variable somewhere in order to keep track of what's going on.
                          >
                          >How are these variables persisted?
                          >Do they cross html page boundaries?[/color]

                          Yep, you need to use sessions. See my session demo:



                          --
                          Geoff Berrow (put thecat out to email)
                          It's only Usenet, no one dies.
                          My opinions, not the committee's, mine.
                          Simple RFDs http://www.ckdog.co.uk/rfdmaker/

                          Comment

                          • FLEB

                            #14
                            Re: Help with approach...

                            On Mon, 17 Nov 2003 10:00:42 GMT, Martin Euredjian wrote:

                            (-- snip --)
                            [color=blue]
                            > Questions:
                            >
                            > Say I'm using PHP to handle navigation and want to (obviously) store at
                            > least a state variable somewhere in order to keep track of what's going on.
                            >
                            > How are these variables persisted?
                            > Do they cross html page boundaries?
                            >
                            > I use state machines extensively in my normal line of work (embedded,
                            > hardware, firmware, software design). Is this technique in use to drive
                            > websites? If so, where is the state machine code contained so that it can
                            > control the whole site? On the surface it sounds like PHP could be used
                            > this way.
                            >
                            > Maybe a set of variables are declared/used in the index.htm for the site and
                            > they retain visibility for all other pages...
                            >
                            > Thanks,
                            >
                            >
                            > ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~
                            > Martin Euredjian
                            >
                            > To send private email:
                            > 0_0_0_0_@pacbel l.net
                            > where
                            > "0_0_0_0_" = "martineu"[/color]

                            You'll want to look at "PHP Sessions" (English docs at
                            http://www.php.net/manual/en/ref.session.php ). I don't know much about it
                            myself, but, as far as I know, PHP sessions are basically an automated
                            method of using cookies and special modified links to keep an "identity" of
                            a session, then keep all the variable values for that session.

                            This can also be done the manual way, by simply making sure you pass on any
                            relevant information from page to page using HIDDEN form entries, the GET
                            portion of links (pagename.php?s ession=1929247 type URLs), or Cookies.

                            Like any stateless language (where no single script implicitly remembers
                            what came before it), you just have to make strategies for keeping the
                            important info safe and available.

                            --
                            -- Rudy Fleminger
                            -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
                            (put "Hey!" in the Subject line for priority processing!)
                            -- http://www.pixelsaredead.com

                            Comment

                            • Disco Plumber

                              #15
                              Re: Help with approach...

                              Geoff Berrow, doing a poor impression of Alexander Hamilton, said:[color=blue]
                              >
                              > Yep, you need to use sessions. See my session demo:
                              > www.ckdog.co.uk/php/color.php[/color]

                              Do you have the source available?

                              /joe
                              --
                              A server from Gary Yngve is disappointing in the Curran Deck -OR- the
                              monitor from Di will go to Jordan McKible in Havoc's "say". In the
                              Masquerade, a monitor is disturbed.

                              Comment

                              Working...