PDA

View Full Version : To frame or not to frame


rdhamm
12-23-2003, 12:37 AM
I'm a neophyte and I don't know CSS, but I do know a few HTML tags and some javascript.

Why should I not use frames? I find them useful to seperate a banner, footer and table of contents.

I was told in another forum to not use frames. However, I have no idea ho to dynamically change the content of a page if I don't.

So - why should I not use frames and what alternatives do I have to dynamically change page content based off of menu selections while still supporting older browsers.

Thanks

Skyzyx
12-23-2003, 03:17 AM
Well, if you look at my site (http://www.skyzyx.com), you'll see that I have a banner, a footer, a table of contents (which I call a menu), and my main content.

The problem I have with frames is that they're often times more difficult for a user to navigate, and secondly, they're not very accessible.

Accessibility may or may not mean very much to you right now, but as you grow as a web designer and develop your skills, things like accessibility, standards, and semantics will (read: should) mean more to you as you get better and better. If you ever want to go anywhere in this field, you need to learn how to do things the right way, and it's always better to begin with the right way, rather than learn the wrong way and then have to switch your mindset as you get better. This is what many of us have had to do, since most of us began designing in the old "tag soup" days, and have had to forget many things we learned in order to learn a better way: web standards.

Coding your websites according to the W3C's web standards will ensure better search engine rankings, less code, easier maintenance, and anyone from anywhere using any internet device can get information from your site. Not every device is capable of making it all look exactly the same, but that's dues mostly to the poor engineering of web browsers. Newer ones are much better! :thumbsup:

Now, my suggestion is to read a couple of articles before you get too much further.

Design Rant (http://www.thenoodleincident.com/tutorials/design_rant/index.html)
99.9% of Websites Are Obsolete (http://www.digital-web.com/features/feature_2002-09.shtml)
Why tables for layout is stupid: problems defined, solutions offered (http://www.hotdesign.com/seybold/)
Designing for the Future (http://www.mezzoblue.com/archives/2003/08/27/standards_de/)
To Hell with Bad Browsers! (http://www.alistapart.com/articles/tohell/)
Why Pixel-Perfect Design is Not Possible on the Web (http://www.message.uk.com/articles/display.php)
SimpleQuiz Archives (http://www.simplebits.com/tips/simplequiz/)

Now, back to your question. Looking at my site, I've got the same fundamental elements that you have. What I do is use some very simple PHP.

All I've done is create the layout exactly as I wanted it, then I created a PHP file, and wrote functions where all they do is write the code to the page. On the actual pages, I have whatever content I want, then I just call the PHP functions wherever they're supposed to be called, and my page is generated and fed to the browser. All I have to do is edit a single page, and the changes are automatically reflected site-wide. The same goes for CSS once you learn how to use it for layouts instead of tables. (The CSS way is infinitely better, I promise!)

If you don't have PHP support, that's okay. I'd suggest shelling out the $99 bucks for Macromedia Homesite, and you can do global search and replace inside every single file (or only specific files) in a directory, or group of directories.

This way, your webpages are confined into a single page (which is better for search engines, accessibility, and users of devices like WebTV, Palm, and PocketPC devices). If you make it a point to learn this stuff, you'll be well on your way to being a terrific web designer straight outta the gate!

:thumbsup: :p :D :cool: :o

Hope this helps!

me'
12-23-2003, 12:08 PM
Using frames means that you can't drill down to a specific page and bookmark it easily. That's my main complaint, but then other people say that they're hard to print, hard to scroll, and obviously you can't keep your document in a single file anymore (which you think is an advantage for easy updates, but seriously, it gets annoying).

Elements you won't change much (navigation, header, footer), I'd suggest keeping in a seperate file and using PHP includes to put them back in before the page gets to the client computer (the computer of the person viewing the page). This means you don't have to use frames, but you can easily make one change to your documents and the whole site is changed. Also, use CSS as much as possible (ie, use background-image: instead of <img />), if you don't know that then go learn! (http://www.w3schools.com/css/default.asp)

Also, set yourself up with a good PHP Content Management System (CMS). If you're going to be posting often, I'd suggest Movable Type (www.movabletype.org).

The result (after folowing as much of my advice as you can, and then code for web standards as Skyzyx said), is a page that will be accessibly, will look good, is future-proof, works in all the browsers that it should (you can hack down to make it work in the less-worthy browsers) and as many devices as is humanly possible (this'll require a bit more code, but it's possible).

link92
01-03-2004, 06:20 PM
On smaller screens, like on the iMac I use for the web, frames can become a nightmare because sometimes people make it so there are no scroll bars so you can't see all the links, you wouldn't go to that site again or the scroll bars get in the way so there isn't space for you to see the graphics/text which are the links, you might not go to that site again, you only would if the rest of the site was very good. I think you should use tables instead as you have no problem on smaller screens.

me'
01-03-2004, 06:24 PM
Originally posted by link92
I think you should use tables instead as you have no problem on smaller screens. By 'tables' I assume you mean '100% CSS layout, no superfluous anti-semantic unneccessary obselete markup in sight' ;)

Skyzyx
01-03-2004, 06:35 PM
Of course he meant that. :D