A XAML based View Engine for ASP.NET MVC
As ASP.NET MVC has a pluggable view engine architecture, and XAML is an object descriptive mark-up that, given the right processor/ parser, 开发者_JAVA技巧can generate an appropriate UI...are there plans/ efforts to create a view engine that can turn XAML into HTML?
Personally, I think this would help to re-enforce the efforts the WPF/ Silverlight people have gone to in providing a means of seperating the view from the model/ business logic between designers and developers (via Visual Studio and Expression Blend)...
Seems like a logical step to me, but not knowing XAML as well as I should, I'm wondering if feasable, or even relevant.
SIMILAR QUESTION: ASP.NET MVC & Expression XAML - How do I integrate?
The MVC pattern is in no way limited to HTML representations and although the ASP.NET MVC implementation of that pattern is designed for HTML view engines there's nothing to stop you turning that interfacing into JSON or similar and using a WPF, Silverlight or even WinForms client to access it. Once you get to that point it's more like a rich client accessing a web service but without WCF (although I'm sure that also could be used).
As for actually having a view engine that outputs XAML and then converts to HTML, that is, I believe, virtually impossible. XAML describes capabilities that HTML simply does not have and although I'm sure you could replicate much of that through the use of JQuery and similar libraries I'd have to ask why? Much easier to think in HTML and JQuery then generate a UI that makes the best use of that appropriate technology rather than trying to shoehorn a rich client technology into HTML.
精彩评论