SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,922
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Are Static Webpages Evil?

    Is it "evil" to build webpages that are STATIC?

    While I am adding content to v2.0 of my website, I am realizing that merging Layout with Content is much more difficult than I thought?!

    As such, I am thinking that for a lot of my webpages, it would be easier to just hard-code them using HTML since they are unlikely to change anytime soon.

    Yes, I could take another 6 months to add additional tables and queries to my database, and then build templates and write all of the PHP to have a totally Database-Driven Website, but maybe that is overkill...

    For instance, here are some pages that might good candidates to hard-code for now...
    - Small-Business Glossary
    - Handy Contact Info for Small-Businesses
    - Listing of Small-Business Resources by State
    - Famous Entrepreneurs


    BTW, when I say "hard-code", I just mean the main content, and not necessarily the entire page. I always use PHP and "includes" for things like my page layout, header, footer, and so on.

    But since each of the pages above could have vastly different page layouts, and the content is very different, I just think trying to make it database-driven is too big of an undertaking for me at this point - especially when I should have went "live" a few months ago...

    Sincerely,


    Debbie

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    That's all I build. If you update it all the time is it still static? That's was more of a "if a tree falls in the forest" question.

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,922
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by EricWatson View Post
    That's all I build. If you update it all the time is it still static? That's was more of a "if a tree falls in the forest" question.
    What????

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    What????
    That's your stock answer to most of my answers.

  5. #5
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,922
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by EricWatson View Post
    That's your stock answer to most of my answers.
    Because *when* you respond, you often say things that are way out in left field...


    If you update it all the time is it still static?
    What does that have to do with anything I asked? (Other than a poor attempt at sarcasm...)

    I did not ask, "If you update a page, is it static?"

    So what's the purpose of your comments?


    Debbie

  6. #6
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,311
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    If your question is, "Is it OK for some content to not come from the database?" then the answer is a very easy Yes, that's perfectly OK.
    "First make it work. Then make it better."

  7. #7
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,922
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    If your question is, "Is it OK for some content to not come from the database?" then the answer is a very easy Yes, that's perfectly OK.
    Yep, that was my question.


    And so when does a person have to put Content into a database?

    To me, the reason you go with database-driven webpages is when you have webpages that repeat the same web design, and have similar content.

    But in the webpages I was eluding to above, they are pretty disparate.


    Debbie

  8. #8
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,311
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    And so when does a person have to put Content into a database?
    Usually only when we have a client who wants to edit their site without touching code. In that scenario, all the content would need to be in a database so that the client could manage it through a web WYSIWYG.

    If you're comfortable managing your content through code, then feel free to hard-code your static content.

    To me, the reason you go with database-driven webpages is when you have webpages that repeat the same web design, and have similar content.
    Templates should be able to take care of that sort of thing.
    "First make it work. Then make it better."

  9. #9
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,816
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    Personally I found Eric's attempt at paraphrasing a zen quote... amusing. I read from it that the user (and the USER should be your focus.. ALWAYS) doesn't really know if a site is static or not ( oher than perhaps deducing it from the URL.. but one can even fake that).

    so let me rephrase, I you use a CMS to build a site that is never updated , is it a static site?


    It's important to differentiate 'CONTENT TYPE' vs 'CONTENT'. If you correct a typo on a paragraph in your page, you have changed the CONTENT, but not the content type.

    My personal site is static. Simply because it was tailored specifically to a content type. I make quick edits , or add pages "at the end" of a portfolio so the amount of effort ( at least to someone who knows HTML) is about the same or less than dealing with a CMS. About the only time I regret the page being static is on the odd chance I add a portfolio piece that I don't feel is strong enough to go on a 'bookend' of of the portfolio.. in which case i need to adjust more than 4 links in the updated section ( but this has the added discipline benefit to remind me not to ad anything BUT strong pieces!)

    I f you have your content, but don't know your content type, or the same content will be reused as different content type all over your site.. yeah who ever is coding the HTML will curse you and call you evil, especially if the site is updated often.

  10. #10
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,922
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dresden_phoenix View Post
    Personally I found Eric's attempt at paraphrasing a zen quote... amusing. I read from it that the user (and the USER should be your focus.. ALWAYS) doesn't really know if a site is static or not ( oher than perhaps deducing it from the URL.. but one can even fake that).

    so let me rephrase, I you use a CMS to build a site that is never updated , is it a static site?
    This entire thread is screaming "Lack of an attention to details"...


    I you use



    Back to your question...

    I use a CMS to build a site that is never updated , is it a static site?

    Well, it doesn't matter, because I am not talking about "Static Websites"...

    In my Original Post I said...

    Is it "evil" to build web-PAGES that are STATIC?

    As such, I am thinking that for a lot of my web-PAGES, it would be easier to just hard-code them using HTML since they are unlikely to change anytime soon.

    It's important to differentiate 'CONTENT TYPE' vs 'CONTENT'. If you correct a typo on a paragraph in your page, you have changed the CONTENT, but not the content type.
    You're splitting hairs... (You know what I was not talking about type-o's.)


    I f you have your content, but don't know your content type, or the same content will be reused as different content type all over your site.. yeah who ever is coding the HTML will curse you and call you evil, especially if the site is updated often.
    I don't know what you mean by "Content-Type". (I Googled it and got some MSDNCMS Meta-Data jazz that means nothing to me for this conversation.)


    Debbie

  11. #11
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,816
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    Ok.. I admit ignorance, echo erics comment or perhaps wax philosophically about the few vs the many...

    I presume then you mean to say that you have the occasional HTML PAGE ( am not including your include of includes..lol) scattered among your dynamic SITE? is that what you were hinting to? In which case my argument still stands.


    You're splitting hairs... (You know what I was not talking about type-o's.)
    you are taking me too literally. I was tryingto make an example between the oft mistaken talk of "content" ( the EXACT info) and "content type" ( the General Gist of the info's CLASSIFICATION ) .


    Anyhow:
    If you have a page whose content type is so well defined it doesn't need to be generated from a DB... I MAY suggest, as long as you remember how you coded the HTML, that you could even use the PHP to bring in CSS updates (that way the look and feel of your SITE.. ultimately we are talking sites.. remains the same even if you make a site wide change ).

    The evil is if you find yourself coding a BUNCH of static HTML pages, because it probably means you are repeating yourself or missing a pattern that could be automated. Which is all that I was trying to say.

    PS
    I am coining the phase content-type ( tho I think i may need a new phrase)...

    the reason being many client FREAK when asked to provide content before I start work.. not understanding that I dont actually need a proofed manuscript of their site's text .. just a guide to their specific intent. something like:

    <logo>
    <mission statement, multiple Ps>
    <single p intro>
    <rand# *products : name, price, multiple or single p description, availability, link to catalog>
    <3 * articles : title ,singe or multiple p>

  12. #12
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,922
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dresden_phoenix View Post
    Ok.. I admit ignorance, echo erics comment or perhaps wax philosophically about the few vs the many...

    I presume then you mean to say that you have the occasional HTML PAGE ( am not including your include of includes..lol) scattered among your dynamic SITE? is that what you were hinting to?
    Correct.


    And what is up with...
    am not including your include of includes..lol
    I said in my OP...
    I always use PHP and "includes" for things like my page layout, header, footer, and so on.
    Why is that so funny?


    you are taking me too literally. I was tryingto make an example between the oft mistaken talk of "content" ( the EXACT info) and "content type" ( the General Gist of the info's CLASSIFICATION ) .
    You've lost me.

    By definition, a "hard-coded" and "static" HTML would not have any associations with XML, database or "Content-Type" classifications.

    Regardless, the answer is, "No, I am not including type-o's, nor am I changing any "classifications" because there wouldn't be any.

    (If I could easily "classify" things, then I would stick them in my database and use my existing templates, and I wouldn't have created this thread. That is the point ---> How to best handle these "odd" pages?!)


    Anyhow:
    If you have a page whose content type is so well defined it doesn't need to be generated from a DB... I MAY suggest, as long as you remember how you coded the HTML, that you could even use the PHP to bring in CSS updates (that way the look and feel of your SITE.. ultimately we are talking sites.. remains the same even if you make a site wide change ).
    So I was implying this, but could have been clearer...

    Everything in my website is a .php file. And for these odd-ball pages I am talking about, they technically are not "hard-coded HTML", but rather a PHP file with - here is that funny term you like - a PHP Include to bring in the Header, Footer, and possibly other things. That way all pages on my site look like they came from some fancy CMS system, but with less overhead. The main "body" could also be an Include, or it could be in the main PHP file itself.

    Regardless or Includes or not, the WEB-PAGE is "static" - in this context - because it is not being "dynamically" generated from code or query. (That is how I have *always* heard people use the terms "static" versus "dynamic" web-pages...)


    The evil is if you find yourself coding a BUNCH of static HTML pages, because it probably means you are repeating yourself or missing a pattern that could be automated. Which is all that I was trying to say.
    My PHP Includes would prevent that from happening.


    I just feel out-of-sorts working with standalone webpages. And, based on another couple of threads I have going, others make it sound like it is equally "evil" to create directories to represent "Sections". (see Question about Directories & Indexes.)


    Off Topic:

    While all of my Member Profile features (e.g. Create an Account, Log-In, Send PM, Add a Friend) work awesome, I can see that I neglected really thinking about how to handle all of the Content that I now have...

    My website is all done, and now that I look more deeply at all of my Content - including a lot of new and disparate Content - I feel like I'm in a haze when it comes to finding a home for everything?!

    Do I suck it up, and stick everything in my database?

    Do I call everything an "Article", and maybe add more fields to the table to distinguish between traditional articles like "Postage Metes Can Save You Money" and something that could be considered a pseudo-article like "How to Request S-Corp Status" or "Important Contact Info for Small-Businesses"?

    Do I risk having code-redundancy by keeping "Articles" as "Articles" and "Other Content" as "Other Content"?

    Do I hard-code certain pages that are simple and won't likely change, like "Top 20 Venture Capitalists Firms"?

    Do I create a new directory called "other_content" to hold all of these standalone, hard-coded pages we are discussing?

    And many more questions...





    PS
    I am coining the phase content-type ( tho I think i may need a new phrase)...
    That is a new one to me...


    the reason being many client FREAK when asked to provide content before I start work.. not understanding that I dont actually need a proofed manuscript of their site's text .. just a guide to their specific intent. something like:

    <logo>
    <mission statement, multiple Ps>
    <single p intro>
    <rand# *products : name, price, multiple or single p description, availability, link to catalog>
    <3 * articles : title ,singe or multiple p>
    Okay.


    Debbie

  13. #13
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I know it means more. But to me dynamic just means the site changes often and is easily editable. I php included every little piece of my entire site. No more search and replace for me. Make one change and it changes everywhere. It's glorious.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •