Solved

mvc architecture -- using framesets in a view

Posted on 2003-10-29
7
1,009 Views
Last Modified: 2013-11-19
I know often that the mvc architecture is used in java web programming so that's why I'm submitting my question here. Specifically specifically my question regards using a frameset in a view. I've written my own mvc framework and am quite satisfied with how it functions. I did this for the challenge and to gain some experience. However I've run into a bump with using framesets in a view.

Basically for every http request, the controller is instantiated and the request is processed. This determines the view I will end up with. If I have dynamic data that a view requires, the http request contains info that the controller needs to instanitate the appropriate action object and get the data.

The problem is, within a view that has framesets, there are several sets of url's -- serveral calls to the controller. As is obvious, the process of sending an http request to the controller is started by clicking a link, submitting a form, or entering a url into the url box of the browser. So the question(s) is/are:

How do I get the appropriate url's to the various src attributes of frame tags? It seems I either have to hard code part or all of the url in the src attribute.

Can I avoid littering my outer url with loads of parameters to dynamically generate the src attributes?

Should this be put somewhere else like in the application mapping?

Has anyone done anything in this aspect with struts or anything similar and can shed light on me? I've been googling and not finding anything.

Thanks
0
Comment
Question by:dave_mwi
  • 3
7 Comments
 
LVL 14

Expert Comment

by:kennethxu
ID: 9643921
look into tiles which come with struts 1.1 release. it is used to replace the frameset in mvc environment.

http://jakarta.apache.org/struts/userGuide/dev_tiles.html
0
 

Author Comment

by:dave_mwi
ID: 9644411
Did the tiles really replace frames? Or can you have a framesets which contain their own tiling layouts? I realize you could use tiles and get the same layout as a frameset, but I guess I'm not really looking for tiles as a solution. If it indeed was a replacement for frames, was it because frames were difficult to manage...or was it just a decision to move in that direction to increase modularity and reusablility....?
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 125 total points
ID: 9644927
>> Did the tiles really replace frames?
NO, its a different approach of doing similar thing.

>> it because frames were difficult to manage...or was it just a decision to move in that direction to increase modularity and reusablility....?
I think both.

There is nothing wrong of framesets, and you can still use it when you are using struts just like any other existing web technology. but as you have noticed, there is nothing been built in struts for framesets. so it could be cumbersome when you need to change the frame content from one to the other and you'll have handle framesets out of MVC framework. frame could also introduce other problems, for example, when session timeout, the login page will appear in one of he frame instead of the full window.

This is what I would do:
let's say we have 2 section, A and B

I would still use frameset when B is mostly driven by A, that means content in A frame is fairly static. content B is the main frame that used to disply changing content including the changes trigger from A frame.

I would use tile if A and B are interdependent, that means user action in section A could lead content change in section B and vice versa.
0
 
LVL 15

Assisted Solution

by:dualsoul
dualsoul earned 125 total points
ID: 9649496
>Can I avoid littering my outer url with loads of parameters to dynamically generate the src attributes?

hm...why no to use custom tag for it?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9650728
yes, if you can elaborate the detail reqirement, we might find you a solution to your problem out of struts. for example, JSTL
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now