GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 13-May-2003, 15:47
madcat madcat is offline
New Member
 
Join Date: May 2003
Posts: 1
madcat is an unknown quantity at this point

Building a dynamic website help...


Hi-

I'm here to ask for some advice on how to approach a few new projects I'm about to embark on. Much of this will be new to me, and I want to start correctly from the beginning. I'll try and explain what I'm doing the best I can.

I figure if I learn how to write a site that will be constantly updated, database integrated and modularized like a news/entertainment site, I will have more than enough knowledge to start coding all of the sites I do with PHP/MySQL.

---------------------------------------------------------------------------------

My Project.

I have a site that needs to be updated every other day with stories, news, events and movie listings etc...

Basically, there are four or five main sections to the site. I plan on turning the sections into four or five templates that rotate information in and out of a central database.

The sections are:

1. Home Page - With boxes containing links to the other areas of the site.
2. Music Page - Article, pic and other links.
3. News Page - Article, pic and other links.
4. Entertainment Page - Article, pic and other links.
5. Music Page[2] - Links to various types of music and articles.

To me it would be easiest to create templates out of these and rotate (for example) the newest links and articles dynamically from a database - the authors should have an interface to upload their stories.

- Am I looking at this correctly?
- Where can I learn how to rotate the information when submitted to the database. For example, say article A on the home page has been there for a week and needs to be replaced by article B...but article A needs to be pushed down into the second position and article B now takes the top spot in the list of links.

When clicking the link to go to article A, article A's story pops up in the template, if instead B was clicked- B would pop up in the same template.

Basically just looking to see if I have the right direction, where I can go to get a better understanding of what I'm trying to do...

Does this make sense...
  #2  
Old 14-May-2003, 14:53
Garth Farley Garth Farley is offline
Invalid Email Address
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
It does yes, the sort of thing you're looking for is pretty common on the net, it's roughly what Slashdot does.

You are looking at this in a correct way, but for your second question, the answer is simple. For each article, record the time it's submitted, so then you can ask the database to give sort the articles for you, with the newest at the top.

What languages do you know? If you're planning to attack this using PHP and mySql, you've chosen the best tools for www.sitepoint.com. This has an example pretty similar to what you want.

Hope this is of help! If you'd like more detail, please say so!
Garth Farley
  #3  
Old 14-May-2003, 18:33
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello madcat,

People have written entire books on the subject so it is impossible for anyone here to give you detailed advice, except that a task like this will NEVER be easy to 'start correctly from the beginning'. A database driven site will constantly evolve, anyone who claims otherwise is probably lying.

The fastest way to get something like this done and of this magnitude is perhaps to get a script that does something similar to what you have in mind above and start to 'reverse engineer' / understand the whole thing. Also recommended is getting a PHP/MySQL book for yourself - though I wouldn't waste my time with that book off Sitepoint. Go with PHP and MySQL Web Development by Luke Welling and Laura Thompson - it's a classic! If you can get your hands on the latest edition, consider it a better investment...

Expect to spend a considerable amount of time designing the database structure - I would. So download the three most important documentation files i.e. www.mysql.com, www.php.net and www.w3.org (for your CSS/HTML stuff) because you're gonna be needing it all the time

The problem with programming database-driven websites is that there are so many ways to do the same thing, so there is no definitive guide or website to point you to. Some will tell you that you could serve everything off just one page; index.php?action=music and yet some others will recommend something totally different.

I have tried templates, there are some really nice ones and then there are some that will quickly turn into their own 'language' - requiring a LOT of reading / understanding just to use their template class in your scripts! I would recommend patTemplate even though it'll also require some 'learning' time.

I have no idea what your PHP/MySQL expertise levels are but once you've designed your first database driven website that actually works, there'll be no stopping you...

Finally, when you get into 'specific' issues with designing your database, I'd be interested to discuss them, perhaps I will learn a thing or two along the way too...
  #4  
Old 15-May-2003, 08:07
Garth Farley Garth Farley is offline
Invalid Email Address
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
Quote:
Originally posted by JdS
I wouldn't waste my time with that book off Sitepoint. Go with PHP and MySQL Web Development by Luke Welling and Laura Thompson - it's a classic! If you can get your hands on the latest edition, consider it a better investment...

Well I found Kevin Yanks tutorial a good introduction to the theory & concepts of databases, and how best to set up tables. For a beginner, it touched on all the important bits, but I wouldn't rely solely on it. (I wouldn't spend money on his book though) I'm of the stingy mentality not to bother spending money on learning materials, when there's plenty of decent material on the net for free.

But certainly books are handier than printouts on the loo....

GF
  #5  
Old 16-May-2003, 15:21
Div's Avatar
Div Div is offline
Moderator
 
Join Date: May 2002
Posts: 996
Div has a spectacular aura aboutDiv has a spectacular aura about
Madcat,

In my opinion if you are just starting out on a dynamic website, I would suggest playing around with a few existing content management systems. It will give you a good idea of what's already out there, and you might be able to find or write a few mods and customize an existing package to meet your needs. That's what I did for one of my sites and have been quite happy with the results.

With my next site, I am looking to either modify the CMS package even more or try out a different template based system.
__________________
Web Hosting Tips | Career Advice
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why doesnt my website open to the homepage? rhino1616 Web Design Forum 6 12-Aug-2003 06:55
Can you reach this website? JdS Open Discussion Forum 8 25-May-2003 08:09
website submission/indexing question? rhino1616 Web Hosting Forum 2 05-May-2003 22:08
How I sorted my website compression problem jrobbio MySQL / PHP Forum 0 05-Mar-2003 20:41
Quite possibly the most random website I have ever found jrobbio Open Discussion Forum 13 12-Feb-2003 18:44

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:23.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.