Wednesday, May 16, 2007
Friday, August 17, 2007
Hello World using Apollo/Adobe AIR
Its been days that I was trying to write a simple app using AIR, the buzz word these days, so downloaded the following
Extract these above stuff after downloading. The documentation is quite good for a HTML /Javascript developer like me. Here I write a Hello World html file using AIR framework.
There are three things to be done
- Application XML file.
- HTML File.
- Executing the application.
Application XML File
- Create a XML file named <AppName>-app.xml, here appname can be HelloAIR.
- The structure of XML is

The text of rootContent element represents the name of the html file that is associated with the xml.
HTML File
The following the html code

The appLoad is invoked when the page is loaded. As shown above we are including the standard AIRAliases.js file in the HTML file, so AIR runtime will be initialized. If its initialized the Air.Trace statement is used to print on AIR console “Hello Air”. Then XMLHTTP request is made for getting request.txt file and dumping the content of that file onto the AIR console.
Executing the Application
When the AIR sdk is extracted there are two programs that come
- ADL: To execute the AIR application
- ADT: to package the AIR application
Use the adl command to execute the AIR application.
The ADL command
When you execute the command with XML as parameter then the following is displayed


As shown above the Hello.AIR is the Air.Trace output and the white console displays thee content of the request.txt file.
Calling Web Service using XMLHTTP Object
Follow the steps to invoke a webservice using a XMLHTTP object in javascript
Step 1: Create a soap envelope for the requested method.

var envelope = <The above string>;
Step 2: Create Instance of XMLHTTP Object
Now in the Javascript method create an instance of the XMLHTTP object

Step 3: Prepare the Webservice Request
As shown above the url points the target webservice which is Service.asmx file and named of the method is HelloWorld. The syntax to be used
http://<Host Name>/<Virtual Directory>/<Webservice>/Method Name
in the next line we are initiating a POST request for the webservice url.
Step 4: Handling the Callback

Here when the response from the web service returns it just display the return string in alert box.
Step 5: Sending the Request

As shown above, the send message is send with the envelope for the Web Method prepare in the Step 1.
Step 6: Executing the Web Service

Refer to this link for more http://support.microsoft.com/default.aspx/kb/893659
Wednesday, January 30, 2008
Understanding WCF
Windows Communication Foundation(WCF) that is part of .NET Framework 3.0 is in the line of Microsoft(MS) classic work of abstraction. MS have been innovator in providing abstraction over various technologies from many years. In the same tradition I do believe WCF is another achievement. Undoubtedly they understand the difficulties in any technologies being faced by technology implementors and then they use their experience to nake the technology simple by intoroducing the layer of abstraction.
Let me talk about WCf in particular now
-
It was always challenge from many years to talk to remote objects.
-
Many technologies have come and gone or become extinct as dinosors.
-
To name a few will be CORBA or DCOM.
-
But there was always problem with the technology itself and its implementation.
-
Web Service was the most pouplar of all the technology and it still one of the best for such communication.
-
The problem comes when we want to expose a remote object interface with multiple protocol interface such as HTTP, TCP etc.
-
The problem with existing technology is that we have create multiple interface for the remote object i.e. each specific to each protocol.
-
This really become a stumbling block while deciding on the protocol to be used as creating multiple interface results in maintainence overhead.
-
So if we want a complete interoperable solution we need a web service based interface but if its standalone system the same Web Service interface becomes a performance bottleneck.
-
WCF really becomes a great help for such scenario. It allows developer to create interface irrespective of the protocol to use.
-
Developer can then configure the so called end points to decide on which protoocl to used for communication.
-
The developer will create the interface and implement it. It will then expose the interface using multiple end points i.e. HTTP, TCP, Named Pipes.
-
The client using the interface then can use the appropriate end point based their need.
-
WCf as infrastructure takes care all overheads related to messaging etc.
Friday, February 1, 2008
WCF: Hosting Service with multiple end points
In continuation of previous post regarding WCF, here goes another. In this post I will do step step explanation for hosting service using config file (remember this is the beauty of WCF, we don’t need to recompile to add multiple endpoints).
The assumtion is readers have already implemented the service contract. I will use a dummy class named IService for my explanation
- Create a instance of ServiceHost.
- ServiceHost servicehost = new ServiceHost(typeof(Examples.ServiceImplementation));
- Use the Open to start listening.
- servicehost.Open();
- Now put the following in the App.Config file

Let me explain each of the element
-
The host element declares the base address for the endpoint. In this case its declaring two base address the http address and another one is the tcp address. The host address is used by the ServiceHost to listen on the respective port and address.

-
There are three endpoints
Each endpoint basically is collection of address, contract and binding. Here in the above case the address is not specified as we have already sepcified in the base address. The contract is Examples.IService and the binding is HTTP.
- The second endpoint

is the TCP endpoint for the same service. Smilar to the previous one this definess the endpoint as collection of Examples.IService as contract and binding as TCP and address is not mentioned and taken from the base address.
-
The last endpoint
is used by the client to generate the meta information about the Service. This is standard and ideally should be there for each service.I hope the above helps in understanding this beautiful technology.
Monday, September 14, 2009
Next Generation Test Case Management
One of the important aspect of entire software development cycle is Quality Assurance or QA. QA in itself is becoming so vast and huge it has multiple facets and need great tools to manage those aspects.
If you check out a decade back QA was more of the rudimentary test cycle performed without any science. As the entire world of software evolved it has become more and more science with all law of necessity.
One of the important aspects of QA is Test Planning which involves planning, designing,execution and analysis of test cases. This entire cycle requires automation and their are various Test Case Management tools available in the market. One of them Nuevosoft. I got this presentation and thought of sharing with all my readers just check to see if this really helps in providing an efficient software solution to the world.
Check about this Nuevosoft website.
Tuesday, August 25, 2009
VS 2010 & .NET Framework 4.0 Presentation
Slideshare PResentation about VS 2010 & .NET Framework 4.0
Wednesday, August 12, 2009
Thursday, August 6, 2009
Comparision of Browsers
A very good comparision of browser performance
http://www.howtocreate.co.uk/browserSpeed.html
Though its pretty old but still useful
Thursday, May 14, 2009
ASP.NET website scalability experience
Last six months have been great for me when I was exposed to the great world of scalability of my product. I will try to summarize some of my findings regarding scalability and then may take some of those stuff in detail in coming days/weeks/months.
- Before we start anything related to scalability for the website measure the performance of the pages with a single user on a idle bandwidth above 500 KB/s.
- To measure the response time of pages do the following
- Install tool like HTTPWatch on your machine. The basic version is free and available on http://www.httpwatch.com.
- Set the expiry content on the virtual directory to large number of days i.e. 3 or 5 or 10 (this can changed based on your particular need).
- Set the Application Pool(IIS 6.0) property such shutdown worker process if idle for 20 minutes and restart after 1740 minutes. (Switch off this setting).
- Now traverse through the selected interactions that you would like to measure once. This will warm up the browser cache.
- Now measure the response time using the HTTPWatch.
- If the response time of the page are below 3 seconds then it is right case for scalability otherwise first tune the pages to bring the response time below 3 seconds.
- One of the first thing that you should target to improve the scalability is to start with the database layer.
- Check how many queries are getting fired per interaction.
- Is there any redundant data being fetched.
- If yes then can we cache the data to lesser down database resource usage.
- Can we differentiate between Read and Write operations on database.
- If yes then can we have separate connection string for both of them.
- This is useful if you want to have separate database for Read and Write. (Synchronization can be an issue, will propose my proposal in later posts).
- Moving to the website having aspx pages,
- Are you using Session variables?
- If yes then use ASP.NET State Service for storing the session variables.
- Do you store the data in files?
- If yes then can they be stored on shared location.
- Do you generate content dynamic?
- If yes then can they move to shared location.
- Now use the VS 2005 Load Test tool to identify the bottleneck for number of users at which the website starts breaking or deteriorating.
- Use Windows 2003 Server Network Load Balancing (NLB) component to load balanced your website. Its simple to configure and leverage.
- Now again use the VS 2005 to load test tool to measure now at what point the website starts deteriorating.
One of the reason of slow response time is the way we have written the ASPX pages. In my coming post I will share my experience.
Friday, April 3, 2009
I WILL VOTE ON 23rd APRIL 2009
For Last Sixty Years, we who belong to Middle Class have been exploited by the political class. They never bothered about us. We’re ourselves to blame as we never bothered to take time and cast our VOTE,our power to change the CORRUPT SYSTEM.
This time irrespective of Sun,Rain, Winter or any other thing lets make sure we PUNEKARS take time on 23rd April 2009 and cast our VOTE. Lets show the political class that we the Middle class also count and they should start taking notice of us. The Middle class is not bothered about region, religion or caste or anything that divide an Indian from Indian. The Middle Class believe they are first INDIAN.
Lets all INDIANS pledge and say that
I WILL VOTE ON 23rd APRIL 2009
Tuesday, March 17, 2009
Height Of Innovation
One of the finest innovation in recent time. Please check this video and wish the day this innovation will be in common man hand.
Tuesday, January 13, 2009
Virtualization: The New Mantra
Last 3 months I have been closely associated with the world of virtualization. If I stop and give a thought to this entire concept of virtualization, the only thing that come into my mind is that its one of the great revolutionary idea that the world of IT has seen over a decade.
From my perspective the following are revolutionary ideas in the field of IT
- Virtualization
- Internet
- Microsoft
Virtualization top my list for the simple fact it has almost bring a complete change in the way a system administrator views the system.
Let me first take some explains what virtualization means from a layman perspective
- Half a century back, One computer was monolithic block spread across multiple room.
- Then came the revolution in the electronics world with capacitors, transistors and brought the desktop.
- Then I say there was stagnancy in this entire field where the goal was improving the efficiency of single desktop called it as a desktop or server class box.
- Then the birth of new word virtual, which created machine within machine. Thats the virtual machine and that mark the begining of virtualization.
- The birth of this new idea was from the fact that a box whether desktop/server never utilizes its resources 100%. Most of the time the resources are un-utilized.
- What virtualization does it divides a single physical box into multiple virtual machines. Each having its on operating system and its own application.
- All these virtual machine can co-exist together and can work in tandem without interfering each other.
- Each has its own IP address, its own users, its own installed application, its own registry etc-etc.
- Currently the following are the vendors who provide the virtualization products
- VMWare
- Citrix
- Microsoft
- Microsoft is the late entrant in this area but they are already moving fast and their aim is to make virtualization ubiquitous with the launch of their Windows Server 2010.
Wednesday, September 10, 2008
Errors with Chrome
Unfortunately I got the following page displayed in a bad manner on the google chrome.
Upper Part
Lower Part of the page
How do you access this page.
- Traverse to MSDN Subscription home page http://msdn.microsoft.com/hi-in/subscriptions/aa718656(en-us).aspx.
- Click on Buy or Renew
- Select a product and Continue (I selected VS 2008)
- The following page is displayed https://om2.one.microsoft.com/opa/Product.aspx?StoreID=0a64ab52-0aa0-414a-904b-69eb320c3602&LocaleCode=en-us
- Click on Full + International
- Provide your credential till you reach the error page.
I hope it may be some small issue and will get fixed sooner or later.
Thursday, September 4, 2008
Issues with Chrome
Though I have started using Chrome only for some time, I have found couple of things.
Two process
Whenever the Chrome is launched it creates 2 process (chrome.exe)
It could be intentional it seems but why??
Page Properties missing
I have been using IE since ages so used to certain feature like when you right click you find Page Properties option. I didn’t find this option in Chrome….




