We are coding most of the things in our project in declarative way and the event handling is done in tag or loaded in .js file.
Declarative way in the code:
<input id="testid" data-dojo-type="dijit.form.FilteringSelect"
data-dojo-props="store:teststore, searchAttr:'display'"
style="width:100%" onchange="changeOtherCombo"></input>
<script>
function changeOtherCombo(newValue)
{
}
</script>
AMD usage in the code:
however we are still are able to use AMD way in our code in the files for example:
require(["dijit/Tooltip", "dojo/domReady!"], function(Tooltip){
new Tooltip({
connectId: ["testtooltoop"],
label: "tool tip to show"
});
});
<div id="testtooltoop" ></div>
I have few questions to proceed the way we are coding so that we shall be compatible with DOJO 2.0
- Is it good to code in declarative way?
- Will the declarative way of coding continue in feature releases in dojo?
- Is it good to move all the declarative code to AMD way of coding or keep the code as it is in declarative now start new once in AMD programmatic way?
- Will the performance affect in declarative way of coding?