Wednesday, September 03, 2008
Google Chrome – Web Browser for the Next Generation of Web Apps
It’s a brand new web browser by Google for those who love GMail, Google Docs and other JavaScript centric web applications; applications which have truly proved the very essence of Web as a Platform.
Google Chrome is yet another examplification of the simplicity and elegancy of Google’s User Interfaces. It’s fast, it’s speedy and it’s yet another innovation on part of Google in terms of its memory management and JavaScript execution. It considers every tab and every website as a separate process. Google has definitely created a benchmark in Web Browsers.
It has got features that are very useful for Web2.0 Engineers. It has got built in DOM Inspector, JavaScript Debugger, Network Traffic Analyzer, Memory / CPU / Network Profiler so that you can precisely know which web app or web page is taking more memory, CPU or bandwidth.
Google has not just engineered this whole thing but have presented the whole concept behind it in an equally superb way. Read the full story of Google Chrome at http://www.google.com/googlebooks/chrome/# to explore what it actually is.
Sunday, August 17, 2008
How To: Setup JavaScript IntelliSense for ExtJS in Visual Studio 2008 (SP1)
Now you can add references to your 3rd party libraries in you JavaScript files and JavaScript blocks, and Visual Studio 2008 (on installation of Service Pack 1) will start recognizing the classes and functions defined in those libraries.
In order to setup ExtJS JavaScript IntelliSense you just need to add the following lines (/// reference tags) in your JavaScript files or script blocks to make it work. (Adjust the relative paths to the two JavaScript files as per your website hierarchy)
And here is the outcome; ExtJS based classes are now available in IntelliSense
Moreover a variable that’s initialized as with ExtJS based Store is now showing the respective methods of Ext.data.Store class in IntelliSense
I have updated the ASP.NET AJAX with ExtJS sample to incorporate this JavaScript IntelliSense feature. You can download the updated code sample from here.
What I can say about this feature is; it is simply a superb addition in Visual Studio feature set and will definitely increase the popularity and penetration of JavaScript based frameworks and libraries.
Thursday, July 03, 2008
TRG Tech Talk Series: “AJAX – Inside Out”
My presentation covered everything related with AJAX including
- Web 2.0
- XMLHTTPRequest
- Hidden Frames
- ASP.NET AJAX
- JSON
- Programming Model of ASP.NET AJAX
- Server Centric Programming Model
- Client Centric Programming Model
- Trade Offs of the two Programming Models
- Supporting tools for Web 2.0 developers for analyzing the network traffic created by your web app, manipulating DOM, styles and other aspects of your web app and browser.
The supporting tools for the debugging and analysis included the following
- Internet Explorer Developer Toolbar
- Nikhil Kothari's Web Development Helper for Internet Explorer
- Firebug for Firefox
- YSlow for Firebug
I also gave three demos/code walkthroughs during the course of this presentation one on each of the XMLHttpRequest, UpdatePanel and PageMethods.
The feedback and response was overwhelming and the hall remained jam packed till the end :)
You can download my presentation from here so as to have a deeper look at it and get better insight of AJAX really from inside out.
Monday, June 30, 2008
Emprise JavaScript Charts with ASP.NET AJAX
I am a big fan of ExtJS for engineering rich interactive user interfaces for all the data centric web2.0 based applications, but one of the components that’s missing in ExtJS is the charting component. I consider ExtJS as a comprehensive java script based UI Framework but still they haven’t focused on providing Java Script based charting controls so far.
Most of the charting controls I came across are server centric and require the chart image to be transmitted to the web browser; others require some plug-in (Flash Player etc) to be installed on every client machine or some other limitation.
I came across EJS Charts (Emprise Java Script Charts) some time back and found it really useful in fulfilling the gap in the graphical data presentation needs over the web by presenting these charts in an equally responsive fashion like the data.
The good things about them are
- They are purely Java Script based charting controls, doesn’t require any plug-in to be installed on client machines
- They are pretty much interactive; provide features like zooming, mouse hints etc.
- Just provide them with the data in java script (arrays, xml, csv) and they will render the specified chart at the client end.
- Series can be added to / removed from an already rendered chart so as to get the affect of a continually updating chart.
- Minimizes the overall network traffic generated by the web app, they require transfer of just the data between the server and web browser and not the complete chart in image format.
- Programming model is fairly simple.
- Works with all the modern browsers i.e. Internet Explorer 6 and above, FireFox 1.5 and above etc.
The bad things about them are
- They don’t provide extensive range of chart types as provided by other server side charting controls, but I hope that they will mature over the period of time.
- They are not widely spread so far; people are really un-aware that this thing can happen at the client end too.
Here is the simple sequence of steps you need to follow in order to utilize these web2.0 Java Script based charts in ASP.NET AJAX.
- Call the server method to get the data (e.g. List<keyvaluepair<string,int>>) from the ASP.NET PageMethod (if required, otherwise use the data got from the last call to the server method) and hook the callback for it.
- In the callback function, check if the EJS based 'Chart' object is already defined, if not then define one. The constructor of that EJS Chart takes a div id where it needs to render the generated chart. You can optionally specify other properties in the constructor for the chart in order to customize title, captions, hints, legend, gridlines and other visual and behaviour related properties of the chart. If a series is already added in the previosuly generated chart, remove it so that the new series as per the user selection can be added to the same chart instance.
- Transform the data returned from the Server (e.g. List<keyvaluepair<string,int>>) to an ordinary 'Java Script Array'
- Define the EJS based 'Chart Series' (LineSeries, BarSeries or AreaSeries etc) as per the user selection and supply the array you have just created as the datasource for the chart.
- Add this 'Chart Series' instance to the 'Chart' instance
Here are the images of the charts generated from the sample code I have uploaded for you to have a look at and experiment.
You can download the sample code that uses EJS with ASP.NET AJAX (that present different graphical representations of data based on user selected chart type) from here. Please note that the sample code uses ASP.NET 3.5 (December Extensions Preview) and EJS Personal Edition (EJS personal edition has got a few limitations too, read more about those from here).
Tuesday, April 22, 2008
FxCop – Automated Code Review for .NET Assemblies
I would recommend it to all those, who want to cross check their .NET Assemblies conformance, with the Microsoft’s Best Practices and Design Guidelines. What it actually does is that, it has a rule base of more than 200 rules organized in different categories, against which it inspects your .NET Assembly. You can selectively check your assembly for performance and security issues or you can specify whether you want to skip the Naming Rules conformance for a particular code analysis run or not.
Once installed and opened, you only need to do is ‘Add Target’ to your new project; target is the .NET Assembly (dll / exe) you want to inspect. Once you have added the Target(s), press ‘Analyze’ button in FxCop toolbar. Once the analysis is done, it will provide you with a granular report, drilled down to function level for the possible issues in your code. The good thing is that, it won’t only report the issue but will also report the reason and possibly the recommended fix for it!
Once you will start using it, you will eventually learn from it and will definitely avoid making those mistakes in future development. You can download latest release of FxCop from here.
Saturday, February 09, 2008
How To: “Getting Started with C# 3.0”
So here go the steps on how to get started with C#3.0.
C#3.0 Language Specifications
Go through the C# 3.0 Language Specifications. It’s just a 26 page document, containing each of the new feature definition as well as the code samples. If you have been working in C# 2.0, you can go through it in a matter of 3 hours.
I don’t want to reproduce what ever is in the above document, but just to give you an idea that there are only a few additions in C# 3.0 and those are the implicitly typed local variables, extension methods, lambda expressions, object initializes, anonymous types, implicitly typed arrays, query expressions and the expression trees. These additions serve as the foundation for LINQ (Language Integrated Query) and make the code concise.
You can download the C# 3.0 Language Specifications document from here.
C#3.0 Language Enhancements Hands On Lab
There is a comprehensive hands on lab exercise outlined by Microsoft, and that’s too isn’t that long, and would only take a few hours to go through and experiment, for a seasoned programmer.
You can grab the complete script of the Hands on Lab from here.
Friday, February 08, 2008
“Best Developer” Award by TRG; The Resource Group
It was a total surprise for me and unfortunately I missed the ceremony (was out of town) :( but still it’s always a good feeling, to be the one amongst the hundreds :)






