Disclaimer: I am not against third-party controls because I believe it's for productivity
I have used Telerik asp.net controls, especially the RadGrid because it makes it easier to do CRUD. They have fantastic controls.
I thought I would do the same for asp.net mvc but looking at the code involved scares me.
I saw another site (syncfusion.com) today offering the same mvc controls and when you look at the UI, they are appealing and so arethe functions/features.
My issue with these nice/appealing controls are:
- I feel like it is taking the control I have over the HTML which is one of the benefits of asp.net mvc
- I cannot see the HTML until the page is run, and viewing the source code
- I feel there is a coupling between the data and the design. The web designer needs to learn Telerik/Syncfusion way of doing things. He won't be able to use the HTML he is familiar with
- Razor looks like a template mixing with HTML and can be replaced with hand-coded value for presentation and testing which can be replace later
I believe the following code has taken over my HTML and I have little control over them
@section SampleHeading{<span class="sampleName"> Grid/Data Binding/Remote Data</span>}
@section ControlsSection{
@(Html.EJ().Grid<OrdersView>("RemoteBinding")
.Datasource("http://mvc.syncfusion.com/Services/Northwnd.svc/Orders/")
.AllowPaging()
.PageSettings(page => { page.PageSize(9); })
.Columns(col =>
{
col.Field("CustomerID").HeaderText("Customer ID").Width(90).Add();
col.Field("EmployeeID").HeaderText("Employee ID").TextAlign(TextAlign.Right).Width(75).Add();
col.Field("Freight").HeaderText("Freight").TextAlign(TextAlign.Right).Width(75).Format("{0:C}").Add();
col.Field("ShipCity").HeaderText("Ship City").Width(100).Add();
col.Field("OrderDate").Format("{0:MM/dd/yyyy}").Width(100).TextAlign(TextAlign.Right).Add();
col.Field("ShipCountry").HeaderText("Ship Country").Width(100).Add();
})
)
}
Should one sacrifice simplicity/control over productivity? When and why?