File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Tiles vs Frames Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles vs Frames" Watch "Tiles vs Frames" New topic

Tiles vs Frames

Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
Hi all,
What are the benefits of using struts tiles over HTML frames ? as per my understanding goes, tiles eventually boils down to table having different columns loading different pages at runtime. This means that when the page is reloaded, all parts are refreshed. ie. suppose u have a menu on left side and header on the top that need not change every time page is refreshed. however, with tiles, the static part is always reloaded unnecessarily.
Where as with frames, ur static part can remain same and u can specify which frame to refresh. So the main frame having dynamic part can be refreshed.
So what are the benefits of tiles over frames. I tried searching web. I didn't get any specific article.
Please, clear my concepts about struts tiles, if the above description is wrong.
Thanks and regards,
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Frames Are Evil

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Michal Bienek

Joined: Jun 17, 2002
Posts: 29
There are many problems with frames, but the mains ones are as follows:
1) Browsers of different types and versions handle frames differently. From rendering to look and feel, frames behave inconsistently between browsers.
Then there are also differences in the way that each browser's JavaScript interprets frames. It would be difficult to truly have a cross-browser application with frames without have browser-specific code attached.
2) There is the issue of sharing data between requests and the session. You cannot expect the jsp hiding in the frame to be able to get at the data in the session/request at any particular time. There are many race conditions associated between putting data in the request or session, and then attempting to populate or reload framed pages.
While the use of Tiles does mean that the pages in the entirety have to be reloaded, a good modular design will make the frames obsolete. The one thing I miss with frames is the ability to navigate one frame seperately from others, however there are many ways around that, and a good design wouldn't force the use of frames.
I agree. Here's the link:
subject: Tiles vs Frames
It's not a secret anymore!