This is a migrated thread and some comments may be shown as answers.

Widgets vs Templates

1 Answer 16 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Jonas
Top achievements
Rank 1
Jonas asked on 05 Mar 2013, 06:47 PM
I'd like a discussion about when to use widgets and when to use templates.

I use custom widgets quite a lot in my current (first) KendoUI Web project. And I think it's going well. The widgets do require a bit of boilerplate code, but I think they are straight forward to use and it is nice to have everything, html, bindings and behaviour nicely packaged.

Now I need a detailstemplate in a grid and my first thought was I like to use a widget there aswell. Then I was a bit hesitatious, am I overdoing things? Should I be using templates instead of widgets?

Thanks

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 07 Mar 2013, 04:58 PM
Hi Jonas,

The answer of this question depends on the requirements of your project. Generally speaking, the widgets incorporate templates as well as several other features such as selection, editing, paging and etc. If you need those extra features, probably it would be better to use a widget.
Templates on the other hand are simpler, easily configurable and in some cases easier for initialization. My suggestion is to test both approaches and decide which one fits better in your specific case.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MVVM
Asked by
Jonas
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or