Atlas Declarative markup
Take a look at the code fragment below which simply has a button, which will invoke a 'GetCustomer' web service asynchronously, and display the results:
<!-- Repath the following src attributes, using regular client relative paths as necessary -->
<add src="ScriptLibrary/AtlasUI.js" />
<add src="ScriptLibrary/AtlasControls.js" />
<invokeMethod target="serviceBinding" method="evaluateIn" />
<binding id="serviceBinding" property="text"
<invokeMethod target="custService" method="invoke" />
This represents an Atlas declarative markup section. Atlas interprets this markup, and emits the necessary code to 'hookup' the relevent onclick event of the 'btnGet' button, call the webservice (specifically the 'GetCustomer' webmethod) defined in the <serviceMethod> and display those results in the <textbox>. The HTML code would simply look like:
<input id="btnGet" type="button" value="Get a Customer" /><br />
<label id="lbl1">Results:</label><br />
<input id="txtResults" type="text" /><br />
Notice that the 'txtResults' input box is linked to the <textbox> Atlas declarative markup via its ID attribute, and similarly with the 'btnGet' input button and associated Atlas markup.
The declarative model has a plethora of options and things to play with, which I will attempt to address in future posts and at this early stage of Atlas, also comes with a few issues, one of which I may detail in my next post. Stay tuned....