Sunday, May 6, 2007
Repesentational State Transfer and SOAP
The term REST was coined by Roy Fielding in his Ph.D. thesis submitted in UNIVERSITY OF CALIFORNIA, IRVINE.
" Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use. " - Dr. Roy Fielding, Architectural Styles and the Design of Network-based Software Architectures
As Roy says REST is not a new technology like AJAX. It can not be implemented in new language or new application server. Also its not a standard which W3C owns are sets specifications for it.
Rather, REST is specific pattern of how a web application will be designed such that it could be scaled as well as well organized and still user friendly.
I read on the Internet people are talking of REST replacing SOAP in coming days since its better than SOAP in both perceptions first, its simpler to implement and second, it has more features than SOAP.
I see one of the important advantage of REST over SOAP is of infrastructure, to use SOAP you have to buy a server from IBM or purchase complete .NET framework to use web services with SOAP. Whereas to implement REST methodology nothing from all these is required.
Another thing is the communication overhead, communication over SOAP needs extra efforts to follow SOAP specifications and related process whereas REST does not impose any standards or specifications.
Amazon has already started using REST for providing current price status could be good example of how REST is going to be buzzword for coming years in the world of the web and related services.
Tuesday, April 17, 2007
When IE does not update images changed using javascript....
I was working on one my projects and I faced the problem that made me write this article so that it will help who is facing the similar problem.
I developed a page which dynamically changes images using javascript on the click of anchor tag. Say sample HTML was as:
<a href="#" onclick="updateImage()"> <img id="dynaImg" src="img1.jpg" /></a>and I have added some code to update the image dynamically as:
function updateImage() {This works fine with Firefox (and all Gecko based browsers) as well as IE7 but IE6 does not update the image and it keeps it blank!
document.getElementById("dynaImg").src = "img2.jpg";
}
After digging into the problem I came to know that IE6 was abruptly suspending the thread that fetches the image from server and continue executing OnClick event thread.
So to solve this problem better not add the dynamically image updating code on OnClick event but add it to href attribute itself! and hence the above code would become something like:
<a href="javascript:updateImage()"> <img id="dynaImg" src="img1.jpg" /></a>And now it works in all browsers!
Friday, April 13, 2007
Whats next after AJAX?
- Look n Feel like Desktop Application to the Web Application
- Enhanced User Experience
- Streamlined User Process to interact with the web application
- Made web applications expand their capabilites by lending some computing part of the application to the client
But what to look for more is further step in interactivity of web application with the user. Now a days user not only interested in knowing what he has done with the web application but also what others are doing with the same web application! In this scenario AJAX is not the right answer to support such features.
There should be something which could change the contents of the web application simutaneously for all its current users based on any number of user actions connect at that point of instance. This would make web users feel they are really connected to all the other users and feel great about Internet that how it is able to do such things!!!!
I will find some more information on how this feature could be added to web till then keep watching this place.......





