PDA

View Full Version : Navigation


Joakim Gran
01-21-2005, 09:44 PM
Anyone aware of a "user interface process" navigation framework that can be used together with spring.web that doesn't have the shortcommings of UIP2.0?

UIP2.0. only supports view controllers on the page level. I need support for view controllers on the "user control" level as well.

Currently I'm using code like this, for simple navigation:

HttpContext.Current.Response.Redirect( HttpContext.Current.Request.ApplicationPath + "/" + pageName + ".aspx", true );

BTW. Thanx for nice work on spring.web Alex! :D

Anonymous
01-22-2005, 12:41 AM
Hi Joakim,

Thanks for trying Spring.Web out, I'm glad you like it.

Could you explain in more detail what you are looking for? What we can do with user controls is limited due to the way they are instantiated (within private methods of the compiled .aspx page), but if you can explain what you are looking for maybe we can do something about it.

We are always looking for ways to improve support for ASP.Net applications within Spring.Net, so any comments or suggestions are appreciated.

Thanks,

Aleks

mr_luc
01-27-2005, 06:46 AM
I sympathize a lot with your predicament.

In the past, I used UserControls extensively (still do) and I grew incredibly frustrated at how difficult to use they could become. Like you, I was very irritated that Microsoft had such a page-centric view of web application user interfaces and navigation.

I ended up writing my own UI abstraction library that loads an xml file containing several things -- first, a basic tree structure of controls to indicate containment that gave each control a node name, and second, any number of 'navigable' connections that spanned the tree regardless of connection (I used as basis the graph/subgraph metaphor for containment, and the node->node metaphor for the actual 'navigable' link elements). Each of the nodes could have additional information attached that could then be coded against (I used this to implement a basic nested-roles-based "no, you can't try to access this interface" logic).

I then hooked the whole thing up to a set of graph interfaces which I implemented using the graph library by J. Halleux.

It's worked well so far for an abstraction of the UI (I am going to write implementations of the UINode and UIControllerNode concepts for windows forms as well), mostly for a bunch of grunt-work-style stuff. I haven't yet actually had any use whatsoever for the ability to treat the UI as a graph; really the tree structure turned out to be all that I could actually use for general navigation. Certainly, you can use the excellent included algorithms that come with the library, but even using a traversal to display a tree of all of the places the user can access is less useful than displaying the visual tree, since it is guaranteed to display it with more/better context.

But it's very ironic/silly -- the only reason that I started the whole thing in the first place was that we really needed to be able to load these various components of the interface, which we had encapsulated in user controls, and some of them were smart user controls that could selectively load other usercontrols -- and we wanted a clean way of doing that (and of providing a generalized method of navigation, as you mention).

The architecture I like quite a bit; I was just learning all of these great abstractions in code by going through the Spring and Hibernate source code, so I've got a clean manager/provider break that would let me plug in a provider for winforms, and all of the user information that you'd include in the xml file could be consumed by any number of providers; I was able to use that info accessed through the provider to add header/subtitle/contextual information to the top of usercontrols, modify them in other ways, etc.

I am really looking forward to some of the things that Spring will bring to the table here -- I'm still in my psychotic learnathon phase of programming (I'm 21), and I'm still naive enough to think that I can get as much done as any 20 (or more) average coders if I code smart/clean enough . . .