Solved

mvc architecture -- using framesets in a view

Posted on 2003-10-29
7
1,039 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WordPress/WooCommerce security best practices? 2 117
how to extract window origin in spring 2 82
print map entry 34 79
web application structure 18 126
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 …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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:
The viewer will learn how to count occurrences of each item in an array.

740 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