Tuesday, May 12, 2015

Ajax in dojo are deep

Really there is so many concepts and ideas in Ajax and I could just get a glimpse of what dojo seekers end up understanding. Awesome man. Just awesome. I have been using Ajax for a long time now and I can see that dojo has a handful of nice utilities which a developer using AJAX would need. This definitely will make life much easier and maaaannnnn…. m amazed

New bees to ajax will end up learning about the following concepts
responseText  get the response data as a string
responseXML   get the response data as XML data
onreadystatechange   Stores a function (or the name of a function) to be called automatically each time the readyState property changes
readyState    Holds the status of the XMLHttpRequest. Changes from 0 to 4:
readyState  0: request not initialized
readyState 1: server connection established
readyState 2: request received
readyState 3: processing request
readyState 4: request finished and response is ready
status 200: "OK"
       status 404: Page not found
And I thought I was better than the new bees as I knew something about success responses, timeouts, error responses, promises etc. Thank god, I am wrong. Going through the list of available topics in dojo alone says how much I had never used and never even thought of using.

<![if !supportLists]>·     <![endif]>dojo/request - The whole Dojo Request API
<![if !supportLists]>·     <![endif]>dojo/request/xhr - The default provider for a browser based platform
<![if !supportLists]>·     <![endif]>dojo/request/node - The default provider for the node.js platform
<![if !supportLists]>·     <![endif]>dojo/request/script - A provider that expects the response to be embedded in a <script> tag.
<![if !supportLists]>·     <![endif]>dojo/request/handlers - Handles the data from a response as designated in the handleAs request option. Also provides the ability to register additional types of handlers.
<![if !supportLists]>·     <![endif]>dojo/request/registry - Allows for registration of different providers against different URIs.
<![if !supportLists]>·     <![endif]>dojo/request/notify - Publishes the dojo/request topics for requests.
<![if !supportLists]>·     <![endif]>dojo/request/watch - Allows the watching of inflight requests.
<![if !supportLists]>·     <![endif]>dojo/request/iframe - A provider that uses IFrame for transport
<![if !supportLists]>·     <![endif]>dojo/Deferred - The base class for managing asynchronous processes.
<![if !supportLists]>·     <![endif]>dojo/promise - The package that provides the Dojo Promise API.


1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Node JS Online Training from India . or learn thru Javascript Online Training from India. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Online Training