Skip to main content

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.

XSLTXSLT or RazorRazor 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?

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?

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?

Post Closed as "Opinion-based" by gnat, Kilian Foth, BЈовић, Dan Pichelman, Jimmy Hoffa
added 2 characters in body
Source Link
Daniel Little
  • 1.4k
  • 12
  • 16

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 reason(s)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?

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 reason(s) I suggested 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?

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?

added 548 characters in body
Source Link
Daniel Little
  • 1.4k
  • 12
  • 16

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 reason(s) I suggested 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?

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 reason(s) I suggested Razor (C#):

  • Easier to work with and build more complicated pages.

And the arguments for XSLT over razor were:

  • XSLT is a standard and will still exist many years into the future.
  • Easer for non programmers (which I don't agree with).
  • It's been successful in some of our past projects.
  • Always well formed

So I'm looking for aguments on either side, recommendations or any experience making a similar choice?

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 reason(s) I suggested 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?

added 23 characters in body
Source Link
Daniel Little
  • 1.4k
  • 12
  • 16
Loading
"Raxor" should be "Razor"
Link
Wayne Molina
  • 15.7k
  • 11
  • 58
  • 88
Loading
deleted 40 characters in body; edited tags; edited title
Source Link
Thomas Owens
  • 85.9k
  • 18
  • 211
  • 311
Loading
added 42 characters in body
Source Link
Daniel Little
  • 1.4k
  • 12
  • 16
Loading
deleted 12 characters in body
Source Link
Daniel Little
  • 1.4k
  • 12
  • 16
Loading
Source Link
Daniel Little
  • 1.4k
  • 12
  • 16
Loading