Hey everyone,
I'm migrating from KO.js where knockout is able to parse the DOM when you add the view model to the element. However, I love how Kendo MVVM uses templates using script tags, almost in a backbone fashion. I was watching the tech chat from July 24, 2013 on YouTube and they mentioned using the !text plugin from Require.js to load the script tags to the DOM. My question is, is this a good practice and what are the performance gains of adding the templates after the DOM loads compared to downloading them on the initial request? I realize that this may be more of a Require question, but I'm hoping that you can help in identifying the best practices. The application I'm working on now has about 200 templates. I'm showing a landing page while kendo and my other libs download, and some initial ajax calls are processed using nested require calls. My concern is that by loading the templates after the DOM loads adds an additional layer of complexity and could potentially cause the app to fail to load. Is the extra added error handling worth any possible performance gains? Maybe this is an old school concern, but as a trained network engineer, I would rather make the least amount of calls as possible.
Any help is greatly appreciated.
--Matt B
I'm migrating from KO.js where knockout is able to parse the DOM when you add the view model to the element. However, I love how Kendo MVVM uses templates using script tags, almost in a backbone fashion. I was watching the tech chat from July 24, 2013 on YouTube and they mentioned using the !text plugin from Require.js to load the script tags to the DOM. My question is, is this a good practice and what are the performance gains of adding the templates after the DOM loads compared to downloading them on the initial request? I realize that this may be more of a Require question, but I'm hoping that you can help in identifying the best practices. The application I'm working on now has about 200 templates. I'm showing a landing page while kendo and my other libs download, and some initial ajax calls are processed using nested require calls. My concern is that by loading the templates after the DOM loads adds an additional layer of complexity and could potentially cause the app to fail to load. Is the extra added error handling worth any possible performance gains? Maybe this is an old school concern, but as a trained network engineer, I would rather make the least amount of calls as possible.
Any help is greatly appreciated.
--Matt B