For the web developers

Discussion in 'OT Technology' started by Astro, Dec 12, 2003.

?

You use templates with your web site(s)?

  1. Heck yeah! Gotta have templates!

    9 vote(s)
    60.0%
  2. Nope.

    4 vote(s)
    26.7%
  3. No. But I would like to learn more about it.

    2 vote(s)
    13.3%
  1. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    Do you put your site(s) together using templates or a template system (either off the shelf or something you built)?

    When I refer to templates, let's leave PostNuke/PHPNuke out since they're more of a content management system. Let's say you have a site to build. Do you build it with templates or just toss the HTML together?
     
  2. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    I'm not a hardcore developer, I've only worked on small projects, but I just draw an idea on paper, at work or whenever, then try to create something along those lines...idea for layout and go from there
     
  3. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    i typically work with a graphic designer (since i SUCK at it) and from the html he/she generates, i'll make a template out of it when i'm using classic ASP. I also like to store the html content in the database, so a bunch of REPLACE()'s on it. .NET and java are a different animal though.
     
  4. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    SLED, I'd define that as using templates. You're seperating the HTML from the code which I consider is templating.
     
  5. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    yes, it makes your life much easier as a developer. if you have to change 1 thing to the website, change the template, not every page on the site.
     
  6. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    hmm I use SSI and that's been working fine for me, but I'm'a look into what y'all use

    like for example
    www.thesimpsons-club.com which I got, the Table of contents is with a SSi sheet and shit like that...change one htey all change
     
  7. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    Back in my ASP days, SSI just didn't feel right. It was the only thing ASP could do to include code. But let's take this as an example (its been a year or so since I last wrote ASP so I'm a bit rusty but you get the idea):

    Code:
    if(true)
    {
    %>
    <!--#include file="one.asp" -->
    <%
    }  // end if(true)
    else
    {
    %>
    <!--#include file="two.asp" -->
    <%
    }  // end else
    
    What makes this retarded is the nature of SSI. SSI runs BEFORE any server scripting (such as ASP or PHP or whatever) has run. So both files, "one" and "two", get included regardless even though you just need one of them. Its not a big deal when your files are small, but as they start to hit 500+ lines, it makes you wish there was a more optimized way. Now if you're just including one file all the time such as a header or footer, than thats cool and you're using SSI as it was intended to be used.
     
  8. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I certainly use templates for my web work. It just makes life a lot easier. For example, on a site I maintain (www.isy.vcu.edu) there are only a few actual html pages that have your typical html, head, body, etc tags. I just include different pages from sections based on where you are in the site. It works out great for maintainence. Here is a url example: http://www.isy.vcu.edu:8080/home.jsp?s=programs&p=bsis . Home.jsp has a certain look and feel with the navigation and main content html pages being included based on the url.
     
  9. Divine Vengeance

    Divine Vengeance New Member

    Joined:
    May 21, 2003
    Messages:
    20,453
    Likes Received:
    0
    I just use a simple template system. I make a layout, throw it together, then put in php switch and include statements wherever neccessary.
     
  10. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    The last three sites I've done are all PHP templated. Not a fancy system, just has one PHP file with the layout (plus a CSS file of course) and a dynamic include() to an HTML file with the content in it.

    I'm thinking for one of the sites I might actually do a content management system, store the content in a database as plaintext and then read it into the PHP template and format it. That way, someone who knows no HTML at all can edit the content on the pages.
     
  11. templates, yep. my entire site is driven by templates. most of the site is served off of a unix box, but my content management systems are mostly ASP and ColdFusion (legacy, don't blame me). we render static HTML pages via script feeding off a SQL Server database, and push the static HTML out to our newspaper website. no other way we could handle 6-7 million hits a month if it was live off the DB.
     

Share This Page