Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I or should I not use frames

 
Bruce Sparo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm building a page using STRUTS and was wondering whether or not I should use FRAMES or go with something else... say TILES.

The thing is, the page is fairly complex. Up to 5 different .jsp's will be used on the main page and although the main page will always be the same (the same .jsp files will always be displayed) the information being displayed will be built dynamically and will be dependent upon what is entered/clicked on in any of the .jsp on the main page. (Does that make sense? I hope so.)

The thing that worries me is that I'm using a scroll bar and I'm worried that if I do go with tiles, that will be a problem.

As you can tell, I'm "very" new to struts so your suggestion/advice will be greatly appreciated because, as of right now, I'm using html:frames.
[ June 24, 2004: Message edited by: Bruce Sparo ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO, few things work well with frames.

Javadoc is a good example for frames - no input & all output and there are not many mutual dependencies between frames.

Basically, you'll probably be better off with tiles.
 
Jason Ruel
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never used Tiles (and know little about it), but whether or not to use frames in a Web application is dependent upon a few things.

When to use frames:
- If your pages contain common elements (such as navigation menus) that are used (or can be used) on ALL pages, then moving to a frame can be a good idea (though you should generally just include it).
- If you application has data that should be displayed at intervals to the user, whether or not they are changing pages, then frames are good. (Examples would be advertisement banners that you want to change at intervals, which, even then, may open iframes as the better choice.)

When NOT to use frames:
- If you use them to simply combine JSP/HTML files for the purpose of constructing a single page, then do not use them. Use includes instead.
- If the data that would appear in each frame does not change or is not dependent on the content of other frames, then do not use them.
- If the content displayed is is generated to the point that bookmarking the page can be useful, then do not use frames.

One of my favorite uses of frames has to be what IBM has done for the WebSphere Application Server v5.0. They constructed the admin console using Struts and with frames. The top frame has the logo/header file (static) and the bottom frame has three more frames. On the left is the navigation (which never changes) and the right frame is made up of two other frames. In these frames they place the content (ie. click menu item, app content is displayed here) and the bottom frame contains interval-type data.

The interval-type data frame makes this a pretty interesting choice because it switches between a few screens, such as a quick-view of the number of configuration errors found and a few others (which skip my mind right now).

Frames aren't dead yet, though they are slowly dying as modern design moves away from their downfalls.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic