Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

mvc architecture -- using framesets in a view

Posted on 2003-10-29
7
Medium Priority
?
1,059 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 500 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

618 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