Solved

mvc architecture -- using framesets in a view

Posted on 2003-10-29
7
1,042 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

717 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