Jump to content

News Site design help (x-posted to the PHP board)


3VM
 Share

Recommended Posts

Hi all! So I'm just starting to design a news site that I hope will expand greatly in the next few years. Being that news sites can be quite a difficult task since they have so many pages to work with, I want to start the design and coding of the site off on the right foot so I can save myself the time and pain of having to completely redo the site in the future.Here are some sample news sites (some you definitely know, others you might not).www.cnn.comwww.wiretapmag.orgwww.ipsnews.netBasically I want to know what makes these sites operate the way they do. My biggest concern has to do with writing unnecessary, redundant code that will become a problem to update later. For example, I want to know that if I change the basic page layout or the company logo, I won't need to update hundreds (or even thousands) of pages in the future to make sure they all have uniform design. What do you all suggest is the best way to develop a site of this magnitude from the beginning?Just so you all know, I am using a web hosting company that offers PHP 4.4 & 5.2, MySQL 5.0, Apache 2, and Ruby on Rails 1.2.From my research, it seems I need to make use of a web template system. If I'm right about this, which ones do you suggest? I read that Smarty is good for PHP and PageTemplate is good for Ruby.Should I make use of a content management system (CMS)? If so, would I use it along with the web template system or in replacement of it? I've read that WordPress, Joomla, and Mambo are pretty good.And how does MySQL play into all of this? I know it's a good way to store news articles but when is it needed and when is it not?And what about a web application framework like Ruby on Rails? The web hosting company I use offers it, so should I use it? I've done some reading on it but I don't really understand it well. Would I being using Ruby instead of PHP and MySQL or alongside them? Would I still need to use a web template system? If so, would I have to use one that supports Ruby (like PageTemplate) or would I be free to use Smarty for PHP? What about the need for a CMS?As you can see, I'm just beginning to develop the site and don't really know which direction to take it. I'd like to separate design from content and make the site easy to be updated and maintained through templates, databases, etc.Any and all help is appreciated. Thank you all so much.(x-posted to the PHP board)

Link to comment
Share on other sites

Basically I want to know what makes these sites operate the way they do.
Firstly, what is the source of your news going to be?
What do you all suggest is the best way to develop a site of this magnitude from the beginning?
include(), include(), include() :) make all your "static" elements that may change into files that are then included into the dynamic files.Also, comment all your code, and keep it consistent.
Just so you all know, I am using a web hosting company that offers PHP 4.4 & 5.2, MySQL 5.0, Apache 2, and Ruby on Rails 1.2.
You will have to choose a language. Do you have any prior programming experience? If you've coded in a C-based language, then PHP would be a good choice, but Ruby is a very intuitive language.
From my research, it seems I need to make use of a web template system. If I'm right about this, which ones do you suggest? I read that Smarty is good for PHP and PageTemplate is good for Ruby.
You don't necessarily need to start with a pre-written template, you can easily create one by yourself.
Should I make use of a content management system (CMS)? If so, would I use it along with the web template system or in replacement of it? I've read that WordPress, Joomla, and Mambo are pretty good.
You could use a CMS, but it is very hard to integrate custom-made code into CMSs.
And how does MySQL play into all of this? I know it's a good way to store news articles but when is it needed and when is it not?
Basically any type of structured data that is added to / updated on a regular basis can be put in a MySQL database. News data, member data, etc. You could even store your pages in the database, but that isn't necessary.
And what about a web application framework like Ruby on Rails?
Well, it makes coding easier. Using RoR would mean that you will be coding in Ruby, but you can still connect to MySQL databases.
Would I still need to use a web template system? If so, would I have to use one that supports Ruby (like PageTemplate) or would I be free to use Smarty for PHP? What about the need for a CMS?
Well, you can still use a template system, but you will need to use one written in the language of your framework. You can use a CMS, but the CMS won't take advantage of the framework.
Link to comment
Share on other sites

At the beginning, the source of my news with be other MSM outlets. After some expansion, my staff will take over writing the articles.I've gone through W3 School guides and learned about the include() function but I'm not the best at using it. I understand its basic use but have yet to unlock its full potential when combining it with loops, if/then statements, etc., so I don't really understand how to implement it to the benefit of my news site.As far as a language, I'm battling between PHP and Ruby. Both have their perks. I'm more familiar with PHP (as I've taken courses in C++) but I like what I see with RoR.My idea behind looking into web template systems was not so much for using a pre-written template but more for the powerful capabilities of combining my own designed template with my database entries to mass produce pages. That way I would have one easy-to-update template (which would include the page layout, company logo, header, footer, etc) that queries a database of news articles to produce unique pages. Are you saying I can do this on my own using PHP and the include() function without the need of a web template system like Smarty (for PHP) or PageTemplate (for Ruby)? I know many people use Microsoft Front Page or Dreamweaver but I don't like the fact that those apps are both client-side which requires manual replacement of files on my web host's server. I thought the advantage of a server-side app is that it's all done automatically at the server level.As far as CMS's, I'm not such a fan of the idea. I'd like more personal control and customizability over my work. I was just seeing what others thought. I highly doubt larger news sites use them.I have my SQL database set up with some sample news stories added to it. I just don't know how to call the information in context of a web template. You suggested the include() function earlier but I haven't figured out how to implement it yet.I can't mix Ruby and PHP elements?By what you are saying, it sounds like my options are coding in PHP while possibly using Smarty if I need to OR coding in Ruby while using RoR to make it easier and using PageTemplate if I need to. Both options would include using MySQL to call news articles, member login info, etc. Am I right?Thank you so much for getting me started in the right direction. Since I know no one wants to basically write a tutorial on how I can make this news site work with dynamic files including templates and static elements, does anyone know any good online tutorials I can read? I just like the idea of being able to update a single file for page layout and design instead of having to code it into every single page of content (news articles, in this case). Once I figure that out, I'm good to start producing a ton of content to fill my site. I like how sites like CNN.com and wiretapmag.org keep the same layout, logos, headers, and footers throughout the whole site (sometimes with slight color scheme variation, etc). The only thing that seems to change with each click is the content in the middle of the page (it either changes to a new subsection of the site or displays a news article).Thanks again for the help!

Link to comment
Share on other sites

My idea behind looking into web template systems was not so much for using a pre-written template but more for the powerful capabilities of combining my own designed template with my database entries to mass produce pages. That way I would have one easy-to-update template (which would include the page layout, company logo, header, footer, etc) that queries a database of news articles to produce unique pages.
Sounds good
Are you saying I can do this on my own using PHP and the include() function without the need of a web template system like Smarty (for PHP) or PageTemplate (for Ruby)?
Yes, you can. Basically make your own "shell" page which then includes all required "template" files - the hearder, footer, menu, etc. Then, (this is how IPB does it) you have a parameter, say a $_GET one, which indicates the current page. That is then included. On the main page that is included goes all your dynamic code.
I know many people use Microsoft Front Page or Dreamweaver but I don't like the fact that those apps are both client-side which requires manual replacement of files on my web host's server. I thought the advantage of a server-side app is that it's all done automatically at the server level.
Non-WYSIWYG is always better.
I can't mix Ruby and PHP elements?
You can, but it would be EXTREMELY difficult. People only do that sort of thing for proof-of-concept.
As far as CMS's, I'm not such a fan of the idea. I'd like more personal control and customizability over my work. I was just seeing what others thought. I highly doubt larger news sites use them.
Larger news sites would have had their development teams create custom CMSs for them. Remember, over at CNN, it isn't the programmers that write the news :)
By what you are saying, it sounds like my options are coding in PHP while possibly using Smarty if I need to OR coding in Ruby while using RoR to make it easier and using PageTemplate if I need to. Both options would include using MySQL to call news articles, member login info, etc. Am I right?
Well, PHP have some nice and well-coded frameworks such as the Zend framework, too. But yes, both languages can use MySQL.
does anyone know any good online tutorials I can read?
W3Schools, of course :) (if you go with PHP)http://www.w3schools.com/php/Ruby has a good site with documentation and tutorials: http://www.ruby-lang.org/en/But then so does PHP: http://www.php.net/
I like how sites like CNN.com and wiretapmag.org keep the same layout, logos, headers, and footers throughout the whole site (sometimes with slight color scheme variation, etc). The only thing that seems to change with each click is the content in the middle of the page (it either changes to a new subsection of the site or displays a news article).
That is because static elements are include()d into every page, and only the dynamic content changes.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...