Sunday, August 19, 2007

SQL Server Reporting Service woes

I just installed SQL Server 2005 on my home PC. When I opened http://localhost/reports to check out if my Reporting Service is working properly, I got the following error:

The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError)

  • Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.


I found this post by Teo Lachev that shed some light on the problem. I figured that the rsreportserver.config file must be accessible by the MACHINE\ASPNET user. From Lachev's post, I figured I could right click on the file and simply add another user to the ACL (I remember doing that sometime). But when I click on the file, I dont find any security tab anywhere. I went up to the folder "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer" and right clicked on it:

So I was fretting that I cannot edit the ACL for the file or the folder. I dont know if this is just my machine, or if this is generic. I somehow remember right clicking on a file/folder and adding another user to the ACL of that particular file/folder. But I have done that on my work machine which is part of a domain. Is it not possible to edit ACLs on a stand alone machine which is not part of a domain? Somebody please tell me that.

Meanwhile I was desperate to get my SSRS running, so I wrote this small code snippet in C# to add the ASPNET user to the ReportServer folder:
DirectoryInfo directoryInfo = new DirectoryInfo(@"C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer");

DirectorySecurity dirSecurity = directoryInfo.GetAccessControl();

try

{
DirectorySecurity directorySecurity = directoryInfo.GetAccessControl();
FileSystemAccessRule newAccessRule = new FileSystemAccessRule(new System.Security.Principal.NTAccount("MYCOMP", "ASPNET"), FileSystemRights.FullControl, AccessControlType.Allow);

directorySecurity.AddAccessRule(newAccessRule);
Directory.SetAccessControl(directoryInfo.FullName, directorySecurity);
}
catch (System.Runtime.InteropServices.SEHException sehException)
{
Console.WriteLine(sehException.Message);
}

catch (Exception e)

{
Console.WriteLine(e.Message);
}

After that when I viewed the ACL for this folder, I saw that ASPNET user was successfully added. But this still did not solve my problem. So I wrote a similar piece of code to allow full permissions to the ASPNET user for every file inside the ReportServer folder.

try
{
foreach (FileInfo fileInfo in directoryInfo.GetFiles())
{
FileSystemAccessRule newAccessRule = new FileSystemAccessRule(new System.Security.Principal.NTAccount("MYCOMP", "ASPNET"), FileSystemRights.FullControl, AccessControlType.Allow);
fileSecurity = fileInfo.GetAccessControl();
fileSecurity.AddAccessRule(newAccessRule);
File.SetAccessControl(fileInfo.FullName, fileSecurity);
}
}

catch (System.Runtime.InteropServices.SEHException sehException)
{
Console.WriteLine(sehException.Message);
}

catch (Exception e)
{
Console.WriteLine(e.Message);
}

After this when I tried to access the ReportServer website, it worked!! Anyway, this was just a one time fix. If I reinstall SQL Server again, then I might have run this code again. Is there some way to edit ACLs for a particular file/folder? Maybe I have not done enough searching.

Update: Found this link for the security tab: http://www.mydigitallife.info/2006/07/19/missing-or-no-security-tab-found-in-windows-xp-professional/

SQL Server Reporting Service woes

I just installed SQL Server 2005 on my home PC. When I opened http://localhost/reports to check out if my Reporting Service is working properly, I got the following error:

The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError)
  • Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.
I found this post by Teo Lachev that shed some light on the problem. I figured that the rsreportserver.config file must be accessible by the MACHINE\ASPNET user. From Lachev's post, I figured I could right click on the file and simply add another user to the ACL (I remember doing that sometime). But when I click on the file, I dont find any security tab anywhere. I went up to the folder "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer" and right clicked on it:

So I was fretting that I cannot edit the ACL for the file or the folder. I dont know if this is just my machine, or if this is generic. I somehow remember right clicking on a file/folder and adding another user to the ACL of that particular file/folder. But I have done that on my work machine which is part of a domain. Is it not possible to edit ACLs on a stand alone machine which is not part of a domain? Somebody please tell me that.

Meanwhile I was desperate to get my SSRS running, so I wrote this small code snippet in C# to add the ASPNET user to the ReportServer folder:

DirectoryInfo directoryInfo = new DirectoryInfo(@"C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer");
DirectorySecurity dirSecurity = directoryInfo.GetAccessControl();
try
{
DirectorySecurity directorySecurity = directoryInfo.GetAccessControl();
FileSystemAccessRule newAccessRule = new FileSystemAccessRule(new System.Security.Principal.NTAccount("MYCOMP", "ASPNET"), FileSystemRights.FullControl, AccessControlType.Allow);

directorySecurity.AddAccessRule(newAccessRule);
Directory.SetAccessControl(directoryInfo.FullName, directorySecurity);
}

catch (System.Runtime.InteropServices.SEHException sehException)
{
Console.WriteLine(sehException.Message);
}

catch (Exception e)
{
Console.WriteLine(e.Message);
}


After that when I viewed the ACL for this folder, I saw that ASPNET user was successfully added. But this still did not solve my problem. So I wrote a similar piece of code to allow full permissions to the ASPNET user for every file inside the ReportServer folder.

try
{
foreach (FileInfo fileInfo in directoryInfo.GetFiles())
{
FileSystemAccessRule newAccessRule = new FileSystemAccessRule(new System.Security.Principal.NTAccount("MYCOMP", "ASPNET"), FileSystemRights.FullControl, AccessControlType.Allow);
fileSecurity = fileInfo.GetAccessControl();

fileSecurity.AddAccessRule(newAccessRule);
File.SetAccessControl(fileInfo.FullName, fileSecurity);
}
}

catch (System.Runtime.InteropServices.SEHException sehException)
{
Console.WriteLine(sehException.Message);
}

catch (Exception e)
{
Console.WriteLine(e.Message);
}


After this when I tried to access the ReportServer website, it worked!! Anyway, this was just a one time fix. If I reinstall SQL Server again, then I might have run this code again. Is there some way to edit ACLs for a particular file/folder? Maybe I have not done enough searching.

Update: Found this link for the security tab: http://www.mydigitallife.info/2006/07/19/missing-or-no-security-tab-found-in-windows-xp-professional/

Wednesday, August 01, 2007

Why my friends dont do business with ICICI

Many of my friends got ICICI accounts; mostly because it is the into which our monthly salary is credited. All of my friends then move their money into their respective primary accounts with other banks. One of them uses UTI, another uses SBI, while a third one uses HSBC. I always wondered why. I always kept my money in the same account cos I thought that its easier having centralized control over your money.....having a S/B account, a credit card account, and a demat account integrated....having access to your money from so many ATMs, 24 hour telephone access and so many branches.

When I studied elementary distributed systems, I read that it is not a good idea to have a single point of failure. Unfortunately for me, and also for ICICI, we both learned it the hard way. All this while, when I kept a large part of all my money with a single bank, I did not pay much attention to the theory I studied in college earlier.

Today I ordered for a Demand Draft from ICICI (over phone banking) which was for a pretty big amount. I need it urgently as my brother needs to pay his university fees tomorrow. I was told by the phone banking officer that the DD will be ready in 1 hour and that I may collect it from any branch I wish. I decide that I will pick it up from the Mulund (W) branch.

When I reach the branch, I am told that ICICI bank systems are down and that they cannot access any information and hence cannot process my DD. Apparently none of the people at ICICI's operations and computer systems department knew anything about distributed systems and fault tolerance. They thought that having their back end servers at one location would be fine, and that their customers will be fine if a fire breaks out and if all their servers go down. The customer relationship officers at the bank are noncommittal: I wait for over two hours; but no avail. Oh and since even I have a single point of failure i.e. all my money in a single bank, I cannot withdraw money so that I could get the DD done from another bank.

But luckily for me, I dont claim to have thousands of satisfied customers, and that I can correct my situation of a single point of failure by moving bulk of my transactions to other banks. The service and policies of ICICI also motivate me to do that. A bank loses its credibility the moment it does not allow its customers to access their own money. That happened today. It was certainly because of a technical problem, but they should have done their homework better. It is going to cost them a lot more, maybe even a few customers like me.

My travails dont end here. I finally am able to withdraw the maximum amount of money allowed by their ATMs (some of them are working incidentally), but this amount is far lesser than the total amount of the DD. I still need to withdraw the rest of the money tomorrow. All this in the hope that I can give the money to my brother and that he can get the DD done from some other bank tomorrow. I was told at the bank that I will be able to cancel the DD using phone banking as that is the medium I used to place the order. Wonder of wonders.....when I call up, the phone banking officer tells me that the transaction is now in the scope of the branch now, and that I cannot cancel over telephone. I will actually have to walk into the same branch again and beg them to cancel the DD now as it is of no use to me any more, and plead with them to not charge me any cancellation fee. Sometimes just getting a particular service is not everything; it is important that you get it on time.

Well, all this made me recall my the fault tolerance chapter from distributed systems. I am certainly going to apply it in real life by moving my transactions to some other banks that really work when you need them to.

Why my friends dont do business with ICICI

Many of my friends got ICICI accounts; mostly because it is the into which our monthly salary is credited. All of my friends then move their money into their respective primary accounts with other banks. One of them uses UTI, another uses SBI, while a third one uses HSBC. I always wondered why. I always kept my money in the same account cos I thought that its easier having centralized control over your money.....having a S/B account, a credit card account, and a demat account integrated....having access to your money from so many ATMs, 24 hour telephone access and so many branches.

When I studied elementary distributed systems, I read that it is not a good idea to have a single point of failure. Unfortunately for me, and also for ICICI, we both learned it the hard way. All this while, when I kept a large part of all my money with a single bank, I did not pay much attention to the theory I studied in college earlier.

Today I ordered for a Demand Draft from ICICI (over phone banking) which was for a pretty big amount. I need it urgently as my brother needs to pay his university fees tomorrow. I was told by the phone banking officer that the DD will be ready in 1 hour and that I may collect it from any branch I wish. I decide that I will pick it up from the Mulund (W) branch.

When I reach the branch, I am told that ICICI bank systems are down and that they cannot access any information and hence cannot process my DD. Apparently none of the people at ICICI's operations and computer systems department knew anything about distributed systems and fault tolerance. They thought that having their back end servers at one location would be fine, and that their customers will be fine if a fire breaks out and if all their servers go down. The customer relationship officers at the bank are noncommittal: I wait for over two hours; but no avail. Oh and since even I have a single point of failure i.e. all my money in a single bank, I cannot withdraw money so that I could get the DD done from another bank.

But luckily for me, I dont claim to have thousands of satisfied customers, and that I can correct my situation of a single point of failure by moving bulk of my transactions to other banks. The service and policies of ICICI also motivate me to do that. A bank loses its credibility the moment it does not allow its customers to access their own money. That happened today. It was certainly because of a technical problem, but they should have done their homework better. It is going to cost them a lot more, maybe even a few customers like me.

My travails dont end here. I finally am able to withdraw the maximum amount of money allowed by their ATMs (some of them are working incidentally), but this amount is far lesser than the total amount of the DD. I still need to withdraw the rest of the money tomorrow. All this in the hope that I can give the money to my brother and that he can get the DD done from some other bank tomorrow. I was told at the bank that I will be able to cancel the DD using phone banking as that is the medium I used to place the order. Wonder of wonders.....when I call up, the phone banking officer tells me that the transaction is now in the scope of the branch now, and that I cannot cancel over telephone. I will actually have to walk into the same branch again and beg them to cancel the DD now as it is of no use to me any more, and plead with them to not charge me any cancellation fee. Sometimes just getting a particular service is not everything; it is important that you get it on time.

Well, all this made me recall my the fault tolerance chapter from distributed systems. I am certainly going to apply it in real life by moving my transactions to some other banks that really work when you need them to.

Monday, June 11, 2007

Safari for windows?


So, Apple has launched its Safari browser for windows. Somebody told me that Safari claimed that it was the fastest browser running on windows: 1.6x faster than Firefox and 2x faster than IE7. I dont know; the difference isnt that obvious on first use. The pages load just fine.
The user interface of the browser is exactly the same as that found on the Mac. It looks fine.

The first question that was raised in my mind is that who will actually use the Safari browser on windows when you have IE7 and FF2? Unless there is some real compelling reason, I dont think a firefox loyalist like me will move on to use Safari. There are a couple of things about Safari that irritate me you see. First of all, it doesn't support the hotkeys that have been support on IE and Firefox for quite a while.
Type "google" and hit ctrl+ enter on Safari: nothing happens, and you are left with an irritating surprise. There is another kind of URL completion feature on the Safari though. You type a URL, and the browser somehow guesses the .com or .org part of the URL.

The only use I see now is that testing web applications will be easier. Applications that are also targetting the Safari browser can be tested on a windows machine instead of setting up a dedicated Mac machine like we have been doing till now.



By the way, read this post on slashdot which talks about a couple of bugs found on the first day in the windows version of Safari. Oh and one more thing to note: when I checked the plugins installed in the browser by default, look what I found.

Thats the Windows Genuine Advantage plugin bundled right into Safari!

Safari for windows?


So, Apple has launched its Safari browser for windows. Somebody told me that Safari claimed that it was the fastest browser running on windows: 1.6x faster than Firefox and 2x faster than IE7. I dont know; the difference isnt that obvious on first use. The pages load just fine.
The user interface of the browser is exactly the same as that found on the Mac. It looks fine.

The first question that was raised in my mind is that who will actually use the Safari browser on windows when you have IE7 and FF2? Unless there is some real compelling reason, I dont think a firefox loyalist like me will move on to use Safari. There are a couple of things about Safari that irritate me you see. First of all, it doesn't support the hotkeys that have been support on IE and Firefox for quite a while.
Type "google" and hit ctrl+ enter on Safari: nothing happens, and you are left with an irritating surprise. There is another kind of URL completion feature on the Safari though. You type a URL, and the browser somehow guesses the .com or .org part of the URL.

The only use I see now is that testing web applications will be easier. Applications that are also targetting the Safari browser can be tested on a windows machine instead of setting up a dedicated Mac machine like we have been doing till now.

By the way, read this post on slashdot which talks about a couple of bugs found on the first day in the windows version of Safari. Oh and one more thing to note: when I checked the plugins installed in the browser by default, look what I found.

Sunday, May 27, 2007

Cooking for pleasure

I love food, and I love cooking for pleasure. I am always on the lookout for easy to do recipes that I can try on weekends. Nowadays, if I don't try cooking something new on a weekend, I feel a little disappointed; especially after I got a new microwave oven.
Microwave ovens are real cool things. They make cooking nice and fun, and owning one opens you to a completely new vista of dishes that you normally cannot do without one. Only last week I tried baking a couple of pizzas, and it came out pretty good for a first time. I could never try out things like pizzas and muffins without an oven. Besides being able to bake, you can really speed up your cooking when you microwave.
Now today is a typical sunday. I wake up and find that there is nothing for breakfast. Typical opportunity to notch up something nice. So, I decided to make a grilled sandwich variation today for breakfast.
Now there are some things that you must always have at home if you want to avoid the irritation of actually going down to the grocery shop when you want to cook something: potatoes, tomatoes, and onions are an absolute must. Even if you are not trying to do something fancy, these things are required almost everyday at home. Since I wanted to make sandwiches, I wanted bread, butter, cheese and capsicums. Thankfully my brother got these things for me while I did my initial chopping and frying. This is when I realized that one should always have butter and cheese at home (atleast I should).

I wanted sprouted moong dal, but there was no time for that. I checked my fridge and I luckily found boiled potatoes. Good. You always need some good binding agent when making sandwich. So, I peeled the potatoes, mashed them and put them in a wok. Added a dash of salt, red chilly powder, and a little oil. Then I fried this mixture for a while cos I don't like the raw smell of boiled potatoes.
I chopped the tomatoes, onions, and capsicum into small equal sized pieces. Added a dash of salt and pepper and microwaved them for 1 minute at 100% power. (Boy I really like the smell of those crisp capsicums when they are very slightly cooked.)
Next I applied some butter on a bread slice and spread some of my boiled potato mixture on it. Topped this with some of my tomato, capsicum, and onion mixture and sprinkled some grated cheese on it. Note that this is an open sandwich, in the sense that it is only a single slice of bread without one on the top of my stuffing (?) mixture.
Now this was ready to be grilled for about 10 minutes (or till the cheese melts). Boy, when the 10 minutes were over, and when I opened the door to the oven, I was greeted by an inviting smell of crispy capsicums and melted cheese. It turned out pretty good....crispy bread with a nice topping of veggies bound by the layer of mashed potatoes, topped by melted cheese.
Served with some ketchup and accompanied by some coke....a perfect start to a nice Sunday.

Cooking for pleasure

I love food, and I love cooking for pleasure. I am always on the lookout for easy to do recipes that I can try on weekends. Nowadays, if I don't try cooking something new on a weekend, I feel a little disappointed; especially after I got a new microwave oven.
Microwave ovens are real cool things. They make cooking nice and fun, and owning one opens you to a completely new vista of dishes that you normally cannot do without one. Only last week I tried baking a couple of pizzas, and it came out pretty good for a first time. I could never try out things like pizzas and muffins without an oven. Besides being able to bake, you can really speed up your cooking when you microwave.
Now today is a typical sunday. I wake up and find that there is nothing for breakfast. Typical opportunity to notch up something nice. So, I decided to make a grilled sandwich variation today for breakfast.
Now there are some things that you must always have at home if you want to avoid the irritation of actually going down to the grocery shop when you want to cook something: potatoes, tomatoes, and onions are an absolute must. Even if you are not trying to do something fancy, these things are required almost everyday at home. Since I wanted to make sandwiches, I wanted bread, butter, cheese and capsicums. Thankfully my brother got these things for me while I did my initial chopping and frying. This is when I realized that one should always have butter and cheese at home (atleast I should).

I wanted sprouted moong dal, but there was no time for that. I checked my fridge and I luckily found boiled potatoes. Good. You always need some good binding agent when making sandwich. So, I peeled the potatoes, mashed them and put them in a wok. Added a dash of salt, red chilly powder, and a little oil. Then I fried this mixture for a while cos I don't like the raw smell of boiled potatoes.
I chopped the tomatoes, onions, and capsicum into small equal sized pieces. Added a dash of salt and pepper and microwaved them for 1 minute at 100% power. (Boy I really like the smell of those crisp capsicums when they are very slightly cooked.)
Next I applied some butter on a bread slice and spread some of my boiled potato mixture on it. Topped this with some of my tomato, capsicum, and onion mixture and sprinkled some grated cheese on it. Note that this is an open sandwich, in the sense that it is only a single slice of bread without one on the top of my stuffing (?) mixture.
Now this was ready to be grilled for about 10 minutes (or till the cheese melts). Boy, when the 10 minutes were over, and when I opened the door to the oven, I was greeted by an inviting smell of crispy capsicums and melted cheese. It turned out pretty good....crispy bread with a nice topping of veggies bound by the layer of mashed potatoes, topped by melted cheese.
Served with some ketchup and accompanied by some coke....a perfect start to a nice Sunday.

Tuesday, May 22, 2007

New venue for WGA notifier


My brother: "Hey, my friend is getting a weird popup; it says that his copy of windows is not genuine. What to do?."

Me: "Ask your friend to turn off windows updates."

Bro: "What will happen if windows updates is turned off?"

Me: "Nothing!"

Yup, if you want nothing to happen, then turn off your windows updates. I am no supporter of piracy, but I feel that the cost of a genuine copy of Windows XP is a little too high in India.

The problem with most Indian users is that they don't know whether their copy of windows is genuine or not. Most of them have their windows updates ON by default. This went fine till the time Microsoft decided to push the WGA (Windows Genuine Advantage) notifier through the windows updates service. This is when the notifier got installed on user PCs and it started pestering people saying that their copy of windows is not genuine. Well, the ideal thing to do when you find out that your copy is not genuine is to click on the Get Genuine button and get a licensed version. But that doesnt seem to be a viable option for poor people who cannot afford one . Well, the good thing is that Microsoft doesn't do much more than just inform the user of the status of his/her operating system, i.e. genuine, non-genuine etc. This doesnt cause you much more trouble than the occassional irritation of looking at the notifier popup (which can also be avoided using some hacks). Thankfully Microsoft isn't taking legal action against the erring users (as yet). So the situation is fine for now.

Consider this: The windows xp service pack 3 is underway. It will be available in a couple of months. Now imagine what happens if the WGA notifier is integrated inside the service pack 3? All users who install SP3, get the pesky notifier on every boot up (unless you work around it). This move will not be unanticipated since Microsoft already has GenuineCheck.dll integrated with most of its downloads.

So basically the users need to be aware that they are using pirated operating systems, and that windows updates and the service packs are not meant for them.

Where did I get this idea of WGA notifier integrated with SP3? Dont ask me.

New venue for WGA notifier


My brother: "Hey, my friend is getting a weird popup; it says that his copy of windows is not genuine. What to do?."

Me: "Ask your friend to turn off windows updates."

Bro: "What will happen if windows updates is turned off?"

Me: "Nothing!"

Yup, if you want nothing to happen, then turn off your windows updates. I am no supporter of piracy, but I feel that the cost of a genuine copy of Windows XP is a little too high in India.

The problem with most Indian users is that they don't know whether their copy of windows is genuine or not. Most of them have their windows updates ON by default. This went fine till the time Microsoft decided to push the WGA (Windows Genuine Advantage) notifier through the windows updates service. This is when the notifier got installed on user PCs and it started pestering people saying that their copy of windows is not genuine. Well, the ideal thing to do when you find out that your copy is not genuine is to click on the Get Genuine button and get a licensed version. But that doesnt seem to be a viable option for poor people who cannot afford one . Well, the good thing is that Microsoft doesn't do much more than just inform the user of the status of his/her operating system, i.e. genuine, non-genuine etc. This doesnt cause you much more trouble than the occassional irritation of looking at the notifier popup (which can also be avoided using some hacks). Thankfully Microsoft isn't taking legal action against the erring users (as yet). So the situation is fine for now.

Consider this: The windows xp service pack 3 is underway. It will be available in a couple of months. Now imagine what happens if the WGA notifier is integrated inside the service pack 3? All users who install SP3, get the pesky notifier on every boot up (unless you work around it). This move will not be unanticipated since Microsoft already has GenuineCheck.dll integrated with most of its downloads.

So basically the users need to be aware that they are using pirated operating systems, and that windows updates and the service packs are not meant for them.

Where did I get this idea of WGA notifier integrated with SP3? Dont ask me.

Monday, May 14, 2007

ब्लोगगींग इन hindi

I just discovered this feature in blogger where you could post in Hindi. The good thing is that it works on phoenetics, which makes it easier to transliterate words into Hindi from English. Just type words like they would sound in hindi, and the software attempts to convert it into the hindi word. Its not perfect yet, but a pretty good attempt I would say. And whats more? It remembers the corrections you make; so you dont need to do them again and again.

अब सोचने कि बात यह है के कितने लोग हिंदी में पोस्ट करना पसंद करते हैं

Yup, I see the spelling mistake above. Shows that its not perfect yet. Still some kinks to iron out, but it feels good to be able to post in my national language.

ब्लोगगींग इन hindi

I just discovered this feature in blogger where you could post in Hindi. The good thing is that it works on phoenetics, which makes it easier to transliterate words into Hindi from English. Just type words like they would sound in hindi, and the software attempts to convert it into the hindi word. Its not perfect yet, but a pretty good attempt I would say. And whats more? It remembers the corrections you make; so you dont need to do them again and again.

अब सोचने कि बात यह है के कितने लोग हिंदी में पोस्ट करना पसंद करते हैं

Yup, I see the spelling mistake above. Shows that its not perfect yet. Still some kinks to iron out, but it feels good to be able to post in my national language.

Thursday, April 12, 2007

WiX

I got to work on something cool today. Windows Installer XML toolset (WiX) is a set of tools and specifications that help you build Windows installation packages (.msi and .msm) from an XML document. WiX is released by Microsoft under the Common Public License.
WiX brings into setups, the traditional compile and build model to create executables from a source code file. It is written in C# and requires the .NET Framework to be installed on your machine.


A google search on WiX yields a couple of good resouces that tell you what exactly it is, so I am not going to delve much into that. I spent quite a bit of time today trying to get this thing to create an installer that would execute a TSQL during the installation when I found that WiX has a built in support for executing TSQL scripts directly without you having to invoke the sqlcmd utility. (In normal circumstances you would include a custom action in your setup project that would execute scripts using sqlcmd). Obviously, you can do a lot more in WiX than just that.


A good practical scenario of this requirement is when you have to create patches and bugfixes to an existing hosted build of your application. The advantage of creating a patch in the form of an msi file instead of an exe is that an msi is an installer database file which is tracked by your operating system. Later on, you can easily find out what patches you have applied simply by going to you add/remove programs menu.

Anyway, coming back to my purpose of writing this post; there are hardly any good resources online that give you a complete working example and/or tell you what exactly to do when you have to deal with SQL scripts while using WiX. Here is a sample working .wxs file that creates an msi. When the msi is installed, the TSQL script in two .sql files are executed.




<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="
http://schemas.microsoft.com/wix/2003/01/wi
">
<Product Id="24B6D4E2-2FC2-448F-B4E3-C7FBC8790C50" Name="MyProduct" Language="1033" Version="1.0.0.0


" Manufacturer="kvsoft">

<Package Id="3B54E578-A304-437E-91A8-4299246848DE"
Description="Description of your product" Comments="This will appear in
the file summary stream." InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
<User Id="SqlUser" Name="sa" Password="somepassword"></User>
<SqlDatabase Id="MySqlDatabase" Database="TryOuts" Server="krishnamurthyk" User="SqlUser" /><Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="MyAppDir" LongName="My Application Directory">

<Component Id="ProductComponent" Guid="AA0225A7-F189-47CC-9D22-D84A577BB431">
<SqlScript Id="CreateTableScript" BinaryKey="DatabaseScriptBin"
ExecuteOnInstall="yes" SqlDb="MySqlDatabase" />
<SqlScript Id="SecondScript" BinaryKey="SecondScript" ExecuteOnInstall="yes" SqlDb="MySqlDatabase"><
/SqlScript>
</Component>
</Directory>

</Directory>
</Directory>
<Binary Id="DatabaseScriptBin" src="Test.sql" mce_src="Test.sql" />
<Binary Id="SecondScript" src="SecondScript.sql" mce_src="SecondScript.sql"/><Feature Id="ProductFeature" Title="Feature Title" Level="1">
<ComponentRef Id="ProductComponent" />
</Feature>
</Product>
</Wix>


Today I was repeatedly getting an error:



Unresolved reference to symbol 'CustomAction:ConfigureSql' in
section 'Product:0780EA99-9329-47AD-8CF5-C2274939FC85'.


This error disappears when I comment the SqlDatabase tag. The problem, as it turned out was funny: a missing reference. In order to get this working, you need to include a reference to sca.wixlib if you are using the Visual Studio WiX project.


If you are working with the command line utilities, then this is what you do:


> candle.exe Product.wxs
At this step, you will have an intermediate file called
Product.wixobj.


> light.exe -o MySetup.msi Product.wixobj "E:/WiX/sca.wixlib"


Voila, you have the require msi file. I hope this helps all the developers out there.
Maybe when I learn more of this, I would do a more descriptive tutorial.

WiX

I got to work on something cool today. Windows Installer XML toolset (WiX) is a set of tools and specifications that help you build Windows installation packages (.msi and .msm) from an XML document. WiX is released by Microsoft under the Common Public License.
WiX brings into setups, the traditional compile and build model to create executables from a source code file. It is written in C# and requires the .NET Framework to be installed on your machine.

A google search on WiX yields a couple of good resouces that tell you what exactly it is, so I am not going to delve much into that. I spent quite a bit of time today trying to get this thing to create an installer that would execute a TSQL during the installation when I found that WiX has a built in support for executing TSQL scripts directly without you having to invoke the sqlcmd utility. (In normal circumstances you would include a custom action in your setup project that would execute scripts using sqlcmd). Obviously, you can do a lot more in WiX than just that.

A good practical scenario of this requirement is when you have to create patches and bugfixes to an existing hosted build of your application. The advantage of creating a patch in the form of an msi file instead of an exe is that an msi is an installer database file which is tracked by your operating system. Later on, you can easily find out what patches you have applied simply by going to you add/remove programs menu.

Anyway, coming back to my purpose of writing this post; there are hardly any good resources online that give you a complete working example and/or tell you what exactly to do when you have to deal with SQL scripts while using WiX. Here is a sample working .wxs file that creates an msi. When the msi is installed, the TSQL script in two .sql files are executed.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="
http://schemas.microsoft.com/wix/2003/01/wi
">
<Product Id="24B6D4E2-2FC2-448F-B4E3-C7FBC8790C50" Name="MyProduct" Language="1033" Version="1.0.0.0

" Manufacturer="kvsoft">

<Package Id="3B54E578-A304-437E-91A8-4299246848DE"
Description="Description of your product" Comments="This will appear in
the file summary stream." InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
<User Id="SqlUser" Name="sa" Password="somepassword"></User>
<SqlDatabase Id="MySqlDatabase" Database="TryOuts" Server="krishnamurthyk" User="SqlUser" />

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="MyAppDir" LongName="My Application Directory">

<Component Id="ProductComponent" Guid="AA0225A7-F189-47CC-9D22-D84A577BB431">


<SqlScript Id="CreateTableScript" BinaryKey="DatabaseScriptBin"
ExecuteOnInstall="yes" SqlDb="MySqlDatabase" />
<SqlScript Id="SecondScript" BinaryKey="SecondScript" ExecuteOnInstall="yes" SqlDb="MySqlDatabase"><
/SqlScript>
</Component>


</Directory>

</Directory>
</Directory>
<Binary Id="DatabaseScriptBin" src="Test.sql" />
<Binary Id="SecondScript" src="SecondScript.sql"/>

<Feature Id="ProductFeature" Title="Feature Title" Level="1">
<ComponentRef Id="ProductComponent" />
</Feature>
</Product>
</Wix>

Today I was repeatedly getting an error:

Unresolved reference to symbol 'CustomAction:ConfigureSql' in
section 'Product:0780EA99-9329-47AD-8CF5-C2274939FC85'.

This error disappears when I comment the SqlDatabase tag. The problem, as it turned out was funny: a missing reference. In order to get this working, you need to include a reference to sca.wixlib if you are using the Visual Studio WiX project.

If you are working with the command line utilities, then this is what you do:

> candle.exe Product.wxs
At this step, you will have an intermediate file called
Product.wixobj.

> light.exe -o MySetup.msi Product.wixobj "E:/WiX/sca.wixlib"

Voila, you have the require msi file. I hope this helps all the developers out there.
Maybe when I learn more of this, I would do a more descriptive tutorial.



Sunday, January 14, 2007

God is a computer engineer


“God is a computer engineer”. I have had this phrase as my yahoo status message for a very long time now. Its a funny thought, but somehow, it made some sense to me.

One of the greatest things that we computer engineers have been trying to achieve in all our hardware and software systems is intelligence. Defined formally, it is the ability of a system to act rationally: doing the “right thing”, given what it knows. The Turing test, proposed by Alan Turing, was designed to provide a satisfactory operational definition of intelligence. The system proposed by Turing, needed to possess the following capabilities to be termed as truly intelligent:


  • Natural Language Processing: to enable it to communicate successfully

  • Knowledge Representation: to store what it knows

  • Reasoning: to use the stored information to draw conclusions

  • Machine learning: to adapt to new circumstances, and learn new patterns


Only once we think about these disciplines from the perspective of AI, do we truly understand how difficult it is to achieve them in one of our computer systems. AI has been inspired by the way humans act and behave. The Turing test was designed to simulate a system which was largely human-like. This is hardly surprising, as humans have been the paragons when it comes to AI.

We humans dont think that these functionalities listed above are much of a big deal, because we are so used to them, because of the fact that these properties have been embedded in humans with such an amazing degree of perfection, that it seems completely natural. Only once you think from the perspective of a computer engineer trying to implement intelligence in a system, would you truly understand the complexity involved.

I cannot help but feel amazed at the complex systems that are humans. And I find it meaningful to think that it is not a mere co-incidence that humans are intelligent creatures. This is where my thought comes in where I say that “God is a computer engineer”.

I am not trying to propagate the “theory of intelligent design”. Neither am I trying to argue with atheists. It was just a thought that came to me once, that human beings are probably the perfect example of what we want to achieve with AI one day. After studying a little bit about intelligent systems, I realise how difficult it is to create even moderately intelligent systems; and whatever little success we have had, none of that was by mere co-incidence. None of these systms just sprang up magically out of the air. These systems were the result of years of study, experiment, trial and error, sweat, tears and blood.

Having said that, its a little funny to believe that we, the perfectly intelligent human beings turned out to be intelligent by co-incidence.

I believed that human beings are the result of a similar effort, being created out of primitive creatures, eventually evolving into the current state of intelligence. Today human beings are intelligent enough, not only to exhibit features such as natural language processing, logical reasoning and decision making, learning, and much more; but also make intelligent systems of their own.

I believed that God created man (yes, I can hear the Darwinists scream, but again I say, I am not trying to propagate or debunk a theory here). Like a pioneering computer engineer, God created such intelligent creatures (read humans) that are able to create intelligent creatures of their own.

God is a computer engineer

“God is a computer engineer”. I have had this phrase as my yahoo status message for a very long time now. Its a funny thought, but somehow, it made some sense to me.

One of the greatest things that we computer engineers have been trying to achieve in all our hardware and software systems is intelligence. Defined formally, it is the ability of a system to act rationally: doing the “right thing”, given what it knows. The Turing test, proposed by Alan Turing, was designed to provide a satisfactory operational definition of intelligence. The system proposed by Turing, needed to possess the following capabilities to be termed as truly intelligent:

  • Natural Language Processing: to enable it to communicate successfully
  • Knowledge Representation: to store what it knows
  • Reasoning: to use the stored information to draw conclusions
  • Machine learning: to adapt to new circumstances, and learn new patterns

Only once we think about these disciplines from the perspective of AI, do we truly understand how difficult it is to achieve them in one of our computer systems. AI has been inspired by the way humans act and behave. The Turing test was designed to simulate a system which was largely human-like. This is hardly surprising, as humans have been the paragons when it comes to AI.

We humans dont think that these functionalities listed above are much of a big deal, because we are so used to them, because of the fact that these properties have been embedded in humans with such an amazing degree of perfection, that it seems completely natural. Only once you think from the perspective of a computer engineer trying to implement intelligence in a system, would you truly understand the complexity involved.

I cannot help but feel amazed at the complex systems that are humans. And I find it meaningful to think that it is not a mere co-incidence that humans are intelligent creatures. This is where my thought comes in where I say that “God is a computer engineer”.

I am not trying to propagate the “theory of intelligent design”. Neither am I trying to argue with atheists. It was just a thought that came to me once, that human beings are probably the perfect example of what we want to achieve with AI one day. After studying a little bit about intelligent systems, I realise how difficult it is to create even moderately intelligent systems; and whatever little success we have had, none of that was by mere co-incidence. None of these systms just sprang up magically out of the air. These systems were the result of years of study, experiment, trial and error, sweat, tears and blood.

Having said that, its a little funny to believe that we, the perfectly intelligent human beings turned out to be intelligent by co-incidence.

I believed that human beings are the result of a similar effort, being created out of primitive creatures, eventually evolving into the current state of intelligence. Today human beings are intelligent enough, not only to exhibit features such as natural language processing, logical reasoning and decision making, learning, and much more; but also make intelligent systems of their own.

I believed that God created man (yes, I can hear the Darwinists scream, but again I say, I am not trying to propagate or debunk a theory here). Like a pioneering computer engineer, God created such intelligent creatures (read humans) that are able to create intelligent creatures of their own.

Wednesday, December 27, 2006

Reporting Services and Business Intelligence


Reporting

Information is supposed to be the second most important resource of any business (the most important resource being "people"). Having relevant information at the right time makes all the difference while making important business decisions. When the size of the business organization is small, maintaining business data and extracting the required information is a fairly simple task. But consider an organization the size of a huge corporate, with businesses spread across the world, working in different domains, maintaining several huge databases containing millions of records.
So, there you go; you have all the data you need, but there is this small catch: the data is spread across multiple databases, flat files, excel sheets, CSV files. The databases don't have a uniform architecture, as they were designed to serve a very specific purpose: store some very relevant business data.
What I mean by this, is that it takes a whole lot of re-organization of the raw data so you can put it to use, and derive any sensible conclusions regarding your business statistics. Most business databases store data directly related to the business operations, and any report generation has to extract the data from these databases and convert them into a suitable format before the reports can be generated.
The reports are the end product of the entire report generation process, which gives the business enterprise all the facts and figures that enable them to take the appropriate business decisions.
One might ask, "why is that such a big deal? Isnt that why the databases are there? Just run an SQL query and you get all the data that you want"
Point well taken, and for a simple enterprise with small busines operations, this might work fine. But we are talking about a different situation here. What works for a small organization, in this case does not scale well when the case is extended to a huge business enterprise like the one described above. It may not be fasible to run a distributed query across multiple databases, data files, excel sheets, and CSV files. The kind of processing power and time required to complete such an operation would be simply not feasible. Moreover, any small change in any of the data sources will bring the entire process crashing down.
So, the point is that all the data needs to be consolidated into a central repository, into a suitable format, from where it can be queried, in order to improve the processing and time efficiency. Aha, we are talking about a data warehouse.
Another important consideration is that delivering reports is more than just processing data through queries and making it available. It is providing information when you need it, on any platform, in any format. A common solution is generating reports in HTML format and viewing it on an internet browser. This is fine if you have a machine that can connect to a server. But you may need reports when you are on a flight, when you are with the customer, when you are in your car. This includes platforms like your pager, your PDA, you fax machine, your laptop.
What if you need those reports in a suitable format like PDF, CSV, TIFF or XML for further analysis. You may even need the reports in some custom extension/format. It is not enough. Even now, a single format and a single delivery channel may not be enough. How would you know which ones you will need at a particular point of time?

Enter Reporting Services

To take care of all these issues, we have Reporting Services. Reporting Service provides you a layer of abstraction and hides all these details from you. With a reporting server, all the reports may be rendered in any of the above specified formats and may be delivered on any channel.
Reporting services provide a clear separation between the report design and the rendering of the reports in a desired format and the way in which it will be consumed.
Report Designing and Generation
Thus the entire process of report generation and delivery consists of two separate processes: Report designing, and report generation & delivery. Both these processes are independent of each other. Hence, a report designer need not worry about the format report will be rendered in, or the channel/platform where it will be delivered.
Similarly, the report generation process does not need to know how the reports are designed. All it needs to do is pass the relevant parameters that are required as inputs for the report generation process. This report generation process renders the report in the desired format and finally delivers it to the end user.

SQL Server Reporting Services

SQL Server Reporting Services, also known as SSRS comes as a part of the SQL Server 2005 suite free of cost. The SSRS includes all the development and management modules needed to create/define reports, publish them on to a reporting server, and render them in HTML, PDF, EXCEL and CSV formats. Whats more, you can even develop your own custom format and register it with the SSRS.



As you can see from the diagram, the SSRS installs a dedicated web service on your machine. This web service has an interface which can be accessed from http://reportServerName/Reports
The SSRS provides a full-featured set of APIs that you can use to integrate Reporting Services with custom business applications. This includes the full featured web service that provides access to the complete functionality of the reporting server. The SSRS can use any data source like an SQL Server database, or an OLE DB data source as the primary database from which the reports will be generated.
:To understand all this better, lets just consider the entire reporting life cycle:
Report Authoring: Developers can define reports to be published on to the Reporting Server using a report design tool. One popular report design tool is proided by the Business Intelligence Development Studio (BIDS) which is installed along with the full suite of SQL Server 2005. These report design tools use the Report Definition Language (RDL) which is an XML based industry standard. The term report in this case might sound a little ambiguous, as this is not really a business report; but simply an XML file which specifies the connection string to the datasource to be used, the query to be executed, and other metadata. There is a corresponding Report Data Source (RDS) file which has the connection string to the real data source. The RDS and RDL files are then deployed on the reporting server. To deploy these files, you can use the BIDS tool, or do it programmatically using the web methods provided by the report server web service.
Report Generation and Delivery: Once the RDL and RDS files are deployed, the reports can be generated on request or as a response to a particular event. Reports can be viewed using the web interface provided for the report server i.e. http://reportServerName/Reports . Reports can also be generated and rendered in the desired format using the web methods provided by the report server web service.
Report Management: Administrators can use the Management Studio to organize reports and data sources, schedule report execution and delivery, and track reporting history. Reports can be executed on demand or on a specified schedule.
In order to get reporting services up and running on your machine, do a default installation of SQL Services 2005 and let the installation configure the reporting service for you. Once the installation is completed, point your browser to: http://localhost/Reports, and you will be greeted by something like this:



Click on the project1 folder and you will see the reports deployed. Clicking on a report runs it and the report generated can been seen on the page. You can then export it in any of the supported formats.
An introduction to SSRS programming can be found at:
http://msdn2.microsoft.com/en-us/library/ms155076.aspx

Reporting Services and Business Intelligence


Reporting

Information is supposed to be the second most important resource of any business (the most important resource being "people"). Having relevant information at the right time makes all the difference while making important business decisions. When the size of the business organization is small, maintaining business data and extracting the required information is a fairly simple task. But consider an organization the size of a huge corporate, with businesses spread across the world, working in different domains, maintaining several huge databases containing millions of records.
So, there you go; you have all the data you need, but there is this small catch: the data is spread across multiple databases, flat files, excel sheets, CSV files. The databases don't have a uniform architecture, as they were designed to serve a very specific purpose: store some very relevant business data.
What I mean by this, is that it takes a whole lot of re-organization of the raw data so you can put it to use, and derive any sensible conclusions regarding your business statistics. Most business databases store data directly related to the business operations, and any report generation has to extract the data from these databases and convert them into a suitable format before the reports can be generated.
The reports are the end product of the entire report generation process, which gives the business enterprise all the facts and figures that enable them to take the appropriate business decisions.
One might ask, "why is that such a big deal? Isnt that why the databases are there? Just run an SQL query and you get all the data that you want"
Point well taken, and for a simple enterprise with small busines operations, this might work fine. But we are talking about a different situation here. What works for a small organization, in this case does not scale well when the case is extended to a huge business enterprise like the one described above. It may not be fasible to run a distributed query across multiple databases, data files, excel sheets, and CSV files. The kind of processing power and time required to complete such an operation would be simply not feasible. Moreover, any small change in any of the data sources will bring the entire process crashing down.
So, the point is that all the data needs to be consolidated into a central repository, into a suitable format, from where it can be queried, in order to improve the processing and time efficiency. Aha, we are talking about a data warehouse.
Another important consideration is that delivering reports is more than just processing data through queries and making it available. It is providing information when you need it, on any platform, in any format. A common solution is generating reports in HTML format and viewing it on an internet browser. This is fine if you have a machine that can connect to a server. But you may need reports when you are on a flight, when you are with the customer, when you are in your car. This includes platforms like your pager, your PDA, you fax machine, your laptop.
What if you need those reports in a suitable format like PDF, CSV, TIFF or XML for further analysis. You may even need the reports in some custom extension/format. It is not enough. Even now, a single format and a single delivery channel may not be enough. How would you know which ones you will need at a particular point of time?

Enter Reporting Services

To take care of all these issues, we have Reporting Services. Reporting Service provides you a layer of abstraction and hides all these details from you. With a reporting server, all the reports may be rendered in any of the above specified formats and may be delivered on any channel.
Reporting services provide a clear separation between the report design and the rendering of the reports in a desired format and the way in which it will be consumed.
Report Designing and Generation
Thus the entire process of report generation and delivery consists of two separate processes: Report designing, and report generation & delivery. Both these processes are independent of each other. Hence, a report designer need not worry about the format report will be rendered in, or the channel/platform where it will be delivered.
Similarly, the report generation process does not need to know how the reports are designed. All it needs to do is pass the relevant parameters that are required as inputs for the report generation process. This report generation process renders the report in the desired format and finally delivers it to the end user.

SQL Server Reporting Services

SQL Server Reporting Services, also known as SSRS comes as a part of the SQL Server 2005 suite free of cost. The SSRS includes all the development and management modules needed to create/define reports, publish them on to a reporting server, and render them in HTML, PDF, EXCEL and CSV formats. Whats more, you can even develop your own custom format and register it with the SSRS.



As you can see from the diagram, the SSRS installs a dedicated web service on your machine. This web service has an interface which can be accessed from http://reportServerName/Reports
The SSRS provides a full-featured set of APIs that you can use to integrate Reporting Services with custom business applications. This includes the full featured web service that provides access to the complete functionality of the reporting server. The SSRS can use any data source like an SQL Server database, or an OLE DB data source as the primary database from which the reports will be generated.
:To understand all this better, lets just consider the entire reporting life cycle:
Report Authoring: Developers can define reports to be published on to the Reporting Server using a report design tool. One popular report design tool is proided by the Business Intelligence Development Studio (BIDS) which is installed along with the full suite of SQL Server 2005. These report design tools use the Report Definition Language (RDL) which is an XML based industry standard. The term report in this case might sound a little ambiguous, as this is not really a business report; but simply an XML file which specifies the connection string to the datasource to be used, the query to be executed, and other metadata. There is a corresponding Report Data Source (RDS) file which has the connection string to the real data source. The RDS and RDL files are then deployed on the reporting server. To deploy these files, you can use the BIDS tool, or do it programmatically using the web methods provided by the report server web service.
Report Generation and Delivery: Once the RDL and RDS files are deployed, the reports can be generated on request or as a response to a particular event. Reports can be viewed using the web interface provided for the report server i.e. http://reportServerName/Reports . Reports can also be generated and rendered in the desired format using the web methods provided by the report server web service.
Report Management: Administrators can use the Management Studio to organize reports and data sources, schedule report execution and delivery, and track reporting history. Reports can be executed on demand or on a specified schedule.
In order to get reporting services up and running on your machine, do a default installation of SQL Services 2005 and let the installation configure the reporting service for you. Once the installation is completed, point your browser to: http://localhost/Reports, and you will be greeted by something like this:




Click on the project1 folder and you will see the reports deployed. Clicking on a report runs it and the report generated can been seen on the page. You can then export it in any of the supported formats.
An introduction to SSRS programming can be found at:
http://msdn2.microsoft.com/en-us/library/ms155076.aspx

Wednesday, September 28, 2005

Web Applications and AJAX






All these days I have been listening about AJAX. I knew that it had to do something with web based user interfaces. I also knew that it stood for "Asynchronous JavaScript and XML", and.....well, that is pretty much it. I knew that I have to get my hands wet and try this new thing out. But I have to wait for my 8th semester exams to get over before I can actually do that.

So I thought let me find out a little about it.

Before I can actually talk about AJAX, I will have to digress and give an overview of web based user interfaces, becase they are what I think AJAX is really about.


Web Based User Interface


Soon after I worked on my BE project "Network Management Tool", I totally fell in love with web based interfaces. The ubiquity of the common web browser, and the ability to update and maintain web applications without distributing and installing software on potentially thousands of client computers have really made web applications and web based UI's popular.

Add to that, the fact that arguably the best company in the computing business is showing a very keen interest in this, everybody is going ga-ga over web based UI's. And there are pretty good reasons for moving software on to the server and provide a neat user interface using your favourite web browser (apart from the reason I mentioned). It is not just about being able to access your application from any operating system or platform, it is about doing away with things like installing software on your machine to be able to use it. All the dirty stuff is left behind at the server, while the user need only think about the application.

Let me give you an example. Launch your favourite web browser, type www.gmail.com . Enter username password and login. Congratulations, you just installed google's email client on your machine. You see what just happened? This seemingly trivial thing lets us check our email from any machine on the planet that is connected to the Internet.


Web mail seems to be such a trivial thing to us today that we dont normally think about the real genius of an idea behind the whole application: perfect portability. Move around anywhere, use any computer, any operating system, and you can still use the web application. You dont even need to be using your PC for that matter. Anything that can access the web using an XHTML compatible browser is good enough.


Extend the concept a bit, and you got things like Google Calendar and Microsoft's Hotmail Live where you can manage your entire schedules online. The possibilities are limited by our own imagination.

Okay, at this point I can digress and talk about how this seems to be a threat to rich text clients and why Microsoft is not happy about that, because it threatens Microsoft's core strength: The Rich Client.

Let me do that some other time where we can talk about the business use and the market aspects of this application design paradigm.

Anyway, this does not signal the end of the rich client so soon. Desktop applications have a richness and responsiveness that web based applications have not been able to deliver. Web based applications are simply not fast enough.





Reason? In the classic web application model, the user enters some data. After performing error checks, that data is sent to the web server in an HTTP request. After the server performs the back end processing, like running some algorithms , fetching data from a database, generating outputs, the results are sent back to the client in an HTML page.

Quick question : while the server does all this, what does the client do? Yes, you got it right: the client waits. From what we have read in Roger Pressman's book on software engineering, this isnt quite the best way of developing a user interface. Something needs to be done about the delay, so that the user doesnt have to wait everytime the client needs to fetch something from the server.

Enter AJAX

So what does AJAX do to help the situation for our web based interfaces?

TO BE CONTINUED.....


Web Applications and AJAX

All these days I have been listening about AJAX. I knew that it had to do something with web based user interfaces. I also knew that it stood for "Asynchronous JavaScript and XML", and.....well, that is pretty much it. I knew that I have to get my hands wet and try this new thing out. But I have to wait for my 8th semester exams to get over before I can actually do that.

So I thought let me find out a little about it.

Before I can actually talk about AJAX, I will have to digress and give an overview of web based user interfaces, becase they are what I think AJAX is really about.

Web Based User Interface

Soon after I worked on my BE project "Network Management Tool", I totally fell in love with web based interfaces. The ubiquity of the common web browser, and the ability to update and maintain web applications without distributing and installing software on potentially thousands of client computers have really made web applications and web based UI's popular.

Add to that, the fact that arguably the best company in the computing business is showing a very keen interest in this, everybody is going ga-ga over web based UI's. And there are pretty good reasons for moving software on to the server and provide a neat user interface using your favourite web browser (apart from the reason I mentioned). It is not just about being able to access your application from any operating system or platform, it is about doing away with things like installing software on your machine to be able to use it. All the dirty stuff is left behind at the server, while the user need only think about the application.

Let me give you an example. Launch your favourite web browser, type www.gmail.com . Enter username password and login. Congratulations, you just installed google's email client on your machine. You see what just happened? This seemingly trivial thing lets us check our email from any machine on the planet that is connected to the Internet.

Web mail seems to be such a trivial thing to us today that we dont normally think about the real genius of an idea behind the whole application: perfect portability. Move around anywhere, use any computer, any operating system, and you can still use the web application. You dont even need to be using your PC for that matter. Anything that can access the web using an XHTML compatible browser is good enough.

Extend the concept a bit, and you got things like Google Calendar and Microsoft's Hotmail Live where you can manage your entire schedules online. The possibilities are limited by our own imagination.

Okay, at this point I can digress and talk about how this seems to be a threat to rich text clients and why Microsoft is not happy about that, because it threatens Microsoft's core strength: The Rich Client.

Let me do that some other time where we can talk about the business use and the market aspects of this application design paradigm.

Anyway, this does not signal the end of the rich client so soon. Desktop applications have a richness and responsiveness that web based applications have not been able to deliver. Web based applications are simply not fast enough.


Reason? In the classic web application model, the user enters some data. After performing error checks, that data is sent to the web server in an HTTP request. After the server performs the back end processing, like running some algorithms , fetching data from a database, generating outputs, the results are sent back to the client in an HTML page.

Quick question : while the server does all this, what does the client do? Yes, you got it right: the client waits. From what we have read in Roger Pressman's book on software engineering, this isnt quite the best way of developing a user interface. Something needs to be done about the delay, so that the user doesnt have to wait everytime the client needs to fetch something from the server.

Enter AJAX

So what does AJAX do to help the situation for our web based interfaces?

TO BE CONTINUED.....