I'm in the early stages in the design of a system that will essentially be split into two parts. One part is a service and the other is an interface with the service providing data through something like OData or XML. The application will be based on the MVC architectural pattern. For the views, we are considering using either XSLT or Razor under ASP.NET.
XSLT or Razor would help to provide a separation of concerns where the original XML or response represents your model, the XSLT or 'Razor view' represents your view. I'll leave the controller out for this example. The initial design proposal recommends XSLT, however I suggested the use of Razor instead as a more friendly view engine.
These are the reasons I suggested for Razor (C#):
- Easier to work with and build more complicated pages.
- Can easily produce non-*ML output, eg csv, txt, fdf
- Less verbose templates
- The view model is strongly typed, where XSLT would need to rely on convention, eg boolean or date values
- Markup is more approachable, eg nbsp, newline normalization, attibute value normalization, whitespace rules
- Built in HTML helper can generate JS validation code based on DTO attributes
- Built in HTML helper can generate links to actions
And the arguments for XSLT over razor were:
- XSLT is a standard and will still exist many years into the future.
- It is hard to accidentally move logic into the view
- Easer for non programmers (which I don't agree with).
- It's been successful in some of our past projects.
- Data values are HTML-encoded by default
- Always well formed
So I'm looking for aguments on either side, recommendations or any experience making a similar choice?