Did you know there’s a shiny new <template> tag making it to a browser near you? It’s true! For years, web developers have been coming up with awkward and clever hacks to do client-side templating. With the new Web Component specs, the templates piece is now included natively!
Today on Sitefinity version 7, there still isn’t a way of adding scripts and styles to MVC widgets, so I have come up with a workaround to do this… better late than never. I consider it a hack because this only works in hybrid mode and assumes the page is a Web Form. I created this as an HTML helper for MVC and can now do this on your views.
Kendo UI has an excellent drag and drop framework. Although it has a nice API and is very capable, I found it a bit difficult to understand due to the disconnected implementation between the drag and the drop. There are two separate widgets to create a single drag and drop action: one is the kendoDraggable widget and the other is the kendoDropTarget.
When using MVVM in Kendo UI Mobile, there are times where you will need the context of the view so you can make changes to it or read values from it. You can get the current view from the application’s “view()” method, but sometimes your app is not in the global namespace if you architected it this way. Unfortunately, this does not come as a parameter for your observable functions. So here’s the trick to finding the current view.
When working with Kendo’s SPA implementation, you will soon realize that you can only create views out of existing elements on the page or feeding it raw HTML. What about remote views? Unfortunately, only Kendo UI Mobile gets to have remote views. In this post, I will show you how to extend Kendo UI Web’s kendo.View to give it remote view capabilities just like mobile!
Web developers love inheritance, don’t you? Who would have thought you can inherit something so basic as an HTML element and extend it! Now you can do this using the new Web Components specifications.