Friday, January 29, 2010

Comparison between web application and web service

http://wiki.answers.com gives a nice and precise description of difference between these twos.

So, here I will mainly focus on similarity that seems to be important to me. The main similarity between these two is apparent when web service allows request through Http GET & POST method along with SOAP protocol. Protocol configuration of .asmx web service is discussed in my previous post.

When, a method of a web service invoked through GET/POST, a URI will be addressed. This URI must point to a method located at server. Then a SOAP packet will be returned in response. Similarly when a page of a web application is requested through GET/POST, page load script is executed and HTML of the page will be returned in response. In case of POST request, an action handler will be executed and this action handler will process the POST data.

Sunday, January 17, 2010

Include a shell file into another one

It is a easy task indeed. Suppose, we have two shell script file in same directory. These are firstShell.sh and secondShell.sh. To include the first script in the second, we just need to write the following statement in the second shell script -

source firstShell.sh

If the fistShell.sh is not in same directory then we need to refer the script with full path -

source /path/firstShell.sh

One more thing is if the included shell script requires some arguments to execute, you can pass the arguments where you refer the script. So if the first shell requires some arguments, you have to write -

source /path/firstShell.sh arg1 arg2 ...