SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Enthusiast nicbos's Avatar
    Join Date
    Sep 1999
    Location
    Biella, Italy
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Designing complex projects

    Hello FORUM,

    I am in the process of restyling a website of mine, and i'd like to re-build code to add some important features i see on websites like SP.

    I'd like to know how to start rebuilding a website structure, starting form the "black html page" ..... i know it is a too vague indication, but i'd like to have some guideline to start thinking in another way than <html><head> and so on.

    My website is becoming very complex, we have hundreds of articles, stored on mySQL, we have banners and buttons to rotate and impressions to count, shopping pages daily-updated, also daily-updated news, and i'd like to obtain a website more automated as possible.

    I am going to pay some programmers/coders to help me doing all that work, but before wasting my hard-earned money, i'd like to pick the right way.

    Could we continue discussion here?

    Thanks,
    Nicola
    Free Mp3 Download and bonuses:
    http://www.nicolaboschetti.com/

  2. #2
    SitePoint Addict
    Join Date
    May 2002
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if there is a "right" way ... but here's my way.

    I set up my root directory with a main index.html and maybe a few other "minor index" type pages if necessary, a site-wide common images folder, a site-wide common pages folder, then sub-directories for each section of the site ... then for each sub-directory, I just do a similar architecture but for that folder only ... eg sub-directory 1 common images, sub-directory 1 common pages, an "index" or group of pages that may or may not lead to further sub-directories, etc.

    I hope that makes sense ... and again, that's just my way of doing it that makes sense to me ... I'm sure others have differing ideas.

  3. #3
    SitePoint Enthusiast nicbos's Avatar
    Join Date
    Sep 1999
    Location
    Biella, Italy
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok ... let's talk about "templating" ?
    Free Mp3 Download and bonuses:
    http://www.nicolaboschetti.com/

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tdevs structure is more complex than it needs to be.

    If you start with your webroot then here is the directory structure I would recommend.

    / <--- your root
    /images <--- all sitewide images go here
    /data <-- possibly where you might store your database.
    /fragments <-- I keep my CSS file and any included files here

    All basic pages (HTML, CFM, PHP etc) go in root. If you've got product images say for a store then you might consider placing a folder called prod_images (or whatever) like so:

    /images/prod_images

    Sub-directories inside sub-directories is not a good idea as it can get complicated extremeley fast. Plus there's a tendecy to duplicate files and information when you've got directories spread out like that.

    A template is a means of using one hard-coded page to deliver multiple pages of content. It typically requires the use of a programming language such as ColdFusion, PHP or ASP and the use of a database
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Enthusiast nicbos's Avatar
    Join Date
    Sep 1999
    Location
    Biella, Italy
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >
    A template is a means of using one hard-coded page to deliver multiple pages of content. It typically requires the use of a programming language such as ColdFusion, PHP or ASP and the use of a database
    >


    That's cool!

    Let's talk about it :-)
    Free Mp3 Download and bonuses:
    http://www.nicolaboschetti.com/

  6. #6
    Fully Qualified Fool :) luke-innovative's Avatar
    Join Date
    Jun 2002
    Location
    Kent, UK
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A template is a means of using one hard-coded page to deliver multiple pages of content. It typically requires the use of a programming language such as ColdFusion, PHP or ASP and the use of a database
    Thats not necessarily true. It doesn't really matter what language ya use (ASP, PHP or HTML) the idea of the template still remains the same. Theres no need to get complicated, a HTML template will do the same.
    Luke
    Luke-Martin.com (work in progress) :: Independent Web Designer's Portal
    Freelance Forums :: Sign Up Here
    "What happens if you get scared half to death twice?"

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not true Luke. HTML cannot by it's very nature be a template, simply because it has no logic. The point of a template is to remove duplication to a seperate file. Thus an article page (like Nicbos example) which would be identical but for a few components (title, body, date for example) becomes "article.cfm". To reference an individual article you would call article.cfm?articleid=10.

    HTML cannot accomplish this. You would just end up having an HTML page for each article. That's not a template in the web development sense of the word.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    (****** or Deleted)
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could always use SSI and have a text file database? With one "main" page?

    But I deffinately think using a server side language *cough* php *cough* and database for this sort of thing wins hands down...

    Edit: Ok, I have read this properly now, damn I am slack sometimes...

    Nicbos, if the articles are already stored in a database, it should be fairly simple to have a single page that can disaply any that is called for...

    Such as:

    Main page has a list of headlines, each one a clickable link to the full article...

    This is easy to do, and can all be done in one page (eg. news.php).

    You could set yourself up an admin section where articles can be added through a template, and the program automatically orders them from newest to oldest, even building in an archiving function for you, and all without any real hassle...
    Last edited by Wizardx8; Sep 17, 2002 at 16:07.

  9. #9
    SitePoint Enthusiast nicbos's Avatar
    Join Date
    Sep 1999
    Location
    Biella, Italy
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi guys,

    thanks for your interest. Let's go in detail.

    I have a template page, for example "news.php" like this:

    <?php

    include("header.php");
    include("pages/news.php");
    include("footer.php");

    ?>


    Then i define "header.php" like this:

    <html>
    <head>
    <title>title</title>
    </head>

    <body>
    <table> (headers, button, banners)
    .......
    <table .... pages start here>


    and "footer.php":

    </table .... pages end here>
    </body>
    </html>


    Then i work only to "pages" to change content ...

    BUT, this has a lot of limitations:

    1) if i want to change templates, i need to create a lot of "headers.php" and "footer.php" pages;
    2) if i need to insert javascript in headers, everytime i need to change them i need to change a lot of header.php pages;
    ...and so on ....


    Any comments ?
    Free Mp3 Download and bonuses:
    http://www.nicolaboschetti.com/

  10. #10
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, that's a template all right but it's nto a very efficient one. The way you've got it set up, you'll still need to have a distinct page for each article. You will save yourself some time and energy by seperating out major chunks like that though. If you need to change the contents of "header" then you'll simply have to change it once.

    The way you've got it set up now, you need 4 files to display one page.

    -= the page containing all 3 includes
    -= header.php
    -= footer.php
    -= news.php

    Instead of doing it that way, make the page containing the includes become news.php. So instead of this:

    <?php

    include("header.php");
    include("pages/news.php");
    include("footer.php");

    ?>


    you would have this:

    <?php

    include("header.php");

    my content goes here. This would be the content that was formerly in news.php

    include("footer.php");

    ?>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  11. #11
    SitePoint Enthusiast nicbos's Avatar
    Join Date
    Sep 1999
    Location
    Biella, Italy
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, that's ok !

    i am using an included "news.pgp" page to have the content ONLY in a separate folder ...

    but, let's go forward!

    i'd like to have separate folders for every macro-category of the website ... let's suppose the website sells web services, i'd like to have:

    http://www.website.com/hosting/index.php
    http://www.website.com/domains/index.php
    http://www.website.com/software/index.php

    and so on ....

    It seems to be more efficient for SE ranking, expecially for Directories, because i can set separate META Description on every index page, and have a separate listing for every macro-category.

    do you agree?
    Free Mp3 Download and bonuses:
    http://www.nicolaboschetti.com/

  12. #12
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NEVER put index.php or index.html on any internal links. Always always always leave it off.

    What I usually do for a site is something like creole, except that since I use an actual database server I don't actually "store" my database in any folder. The only time you'd do that is if you used access or something.

    I have a folder for includes, a folder for images, and a folder for the backend. Of course a cgi-bin too if necessary.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  13. #13
    SitePoint Enthusiast nicbos's Avatar
    Join Date
    Sep 1999
    Location
    Biella, Italy
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > NEVER put index.php or index.html on any internal
    > links. Always always always leave it off.

    why ??
    Free Mp3 Download and bonuses:
    http://www.nicolaboschetti.com/

  14. #14
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cause if half of the links pointing to your site are in the form of

    http://www.domain.com/index.html

    and half are in the form of

    http://www.domain.com/

    Then you will only have half the link popularity that you could have.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums


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
  •