Mixing User Controls with Knockout JS - How to make it work
Hi all,
Just want to let you know quite an awesome way of building your web form or application using by mixing server side and client side technologies. The trick of using knockout js wrapped in separate user controls is very simple: use native binding!
Then you will be able to use normal controls like this:
You can grab all the benefits of fast asynchronous client side script. All server side logic can be implemented using web services. Just keep in mind that it is always better to do validation on both ends (i.e. form validation and saved object validation)
Other tip:
Sometimes when object is too large IE will complain about slow running script. This occurs especially when you are using mapping plugin. Good workaround is to separate your bindings into chunks or just map your properties manually but sometimes using the setTimeout trick works.
Hope this helps,
Andreas
Just want to let you know quite an awesome way of building your web form or application using by mixing server side and client side technologies. The trick of using knockout js wrapped in separate user controls is very simple: use native binding!
Then you will be able to use normal controls like this:
You can grab all the benefits of fast asynchronous client side script. All server side logic can be implemented using web services. Just keep in mind that it is always better to do validation on both ends (i.e. form validation and saved object validation)
Other tip:
Sometimes when object is too large IE will complain about slow running script. This occurs especially when you are using mapping plugin. Good workaround is to separate your bindings into chunks or just map your properties manually but sometimes using the setTimeout trick works.
Hope this helps,
Andreas
Comments
Post a Comment