2

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?

| improve this question | | | | |
4

Short answer: yes.

While we'd all like to tinker around and build neat things there will always be the need of shipping the darn thing before going out of business.

Long answer: it depends.

Requirements and the skill level of the team can influence the decision of choosing one over the other, having both or having none.

With a tight deadline comes focus on productivity and little time to tinker. If the requirements restrict the use of third party controls (mostly because of the overhead on generated markup and resources) then the team is responsible of coming up with the needed components. If the requirements don't restrict the use of third party controls, then the logical decision would be to use some existing controls, as it will take longer to build new ones than customize what's already there.

Loose deadlines give some time to experiment and the decision can be made to build the controls instead of using existing ones. Experience can be gained from this and is beneficial to the team in the long run. Even so, third parties are chosen in most cases because there are so many things to consider when building custom controls and they might take longer to build than the entire application that is using them.

Note that third party controls are built with generality in mind and don't fit all the possible scenarios. Hence the multitude of configuration options available and the inherent (and apparent) complexity. And while they allow some degree of control over the generated markup it's not possible to get 100% due to the fact that some of that markup is vital to how they work.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.