views:

61

answers:

1

In a windows/.net environment I currently use castle monorails with jquery to provide an administrative interface to an e-commerce application.

This application works nicely, but has no real concept of ui composition. Up to now this has not been a problem, because the ui was targeted to a single user base, and a single domain object. This will change, as we want the application to work for domains deriving from a defined base domain (and extending it).

So if I have an entity with a name and a description string property, most probably I'll have a form with a name and a description input and a hidden id field. Posts go via jquery/ajax.

Now a different customer comes and gets his default application setup. He requires a date and a size field on that entity. I need to think about keeping this easily deployable, so I cannot just hack into the existing solution and extend it that way. What I need to do, is drop in a dll into the bin folder of the client's base installation and be done with it.

Currently I read up a lot about silverlight, prism and caliburn, which seem to get me this functionality - at a price.
What is very easy now - accessing my domain data, services and messaging and making use of that data in the view, will become hidden behind some layer, probably a restful web service type of thing. Additionally, from what I can gather, normally Silverlight application seem to bind to visual-studio generated proxy classes of the entities exposed by these services - a situation not fitting very well in my current scenario.

So I am a bit in between two chairs and in doubt if a migration towards silverlight would not just move the problem area, instead of making it disappear.

Another option would be to generate my views in javascript using a library like YUI o dojo (cannot use ext due to their licensing) and generate all ui there (almost no html markup), define extension points and use some kind of javascript linker to allow me to extend that interface. Data would arrive with subsequent calls to restful services. While this does not seem all that different than going the sl way, due to the dynamic nature of javascript, this could be much easier then bending the strongly typed .net to my will.

Anyone could give me some opinion here to help me make that decision?

+1  A: 

I can't speak to all the points you have outlined, but here's the ones I can:

UI Composition:

With Silverlight and the frameworks that are available (prism, caliburn, etc), you can produce incredibly flexible and scalable UIs, so that gets a big thumbs up from me. I find that productivity is very high with these frameworks and the separation of concerns in high, therefore mantaining the project becomes a lot easier. When choosing a web platform for a new project, I now approach it from a stand-point of "Is there a reason not to use Silverlight?". That should work as a disclaimer that I am bias on this topic

New Problems being introduced:

You mention that what is easy to you now will become hidden behind another layer. This is hard to speak to as I don't know your current architecture, in general terms I would say that this is potentially a good thing. With a good pattern (MVVM being the most powerful and common in Silverlight/WPF), these layers should be able to interact well and should provide a good architecture for your project.

Proxy Classes:

Yes, I can see that this could be perceived as a potential problem area, but again with the right architecture and framework (RIA Services would be something to look at) you should be able to avoid moving your current pain point from the UI layer to the Service layer.

In summary I would be a big proponent of using Silverlight.

Alternatives:

I can't speak to the option of generating your views in JavaScript, as I've never attempted this, hopefully someone else will comment on their experience with this.

Have you considered ASP.NET MVC? Again this platform has a nice approach to composite UI and you would be generating your views in a way that you will have much more control than you currently do.

I hope that helps.

Chris Nicol
Thanks Chris, for the exhaustive and detailed info :)I have merely played with asp.net mvc, but so far have no real experience with it. In what way does it offer UI composition (that monorails doesn't)? Or, to be more concrete, as more or less everything has the potential to be used in a composite way - how does it actively support composite patterns?
Jan Limpens
There's the Composite Web Application Block, for ASP.NET MVC here's a link that can explain it better than I .. http://tinyurl.com/yblx99x. Does it offer more than monorails ... that I can't answer, but it is another option ... how good an option it is, isn't for me to say.
Chris Nicol