Gayani's Blog

There's something out there in life that will delight and amaze you.
Get up, get moving, and go find out what it is. - (Ralph Marston)

Tuesday, August 07, 2012

NetSuite or SalesForce.com; what is out there?

NetSuite and SalesForce.com are both cloud based CRM solutions. NetSuite is not just a CRM but also an ERP. However, why does SalesForce.com out there in the market so much? I starting wondering about this ever since I started working with both products. In terms of the product features and capabilities I find NetSuite being in front than SalesForce.com but it was quite an amazing to note that so many companies moving in to SalesFore.com

Could it be the marketing? It kind of reminds me of the Novel vs Microsoft situation though Novel was a technical advanced product, Microsoft captured the market by brining in user friendly easy to use products rather then technical advanced, seeing SalesForce.com and NetSuite CRM reminds of a similar marketing atmosphere, but cannot exactly compare Novel-Microsoft scenario as the focus of the product (technology focused or customer focused ) were different at that time.

It is interesting to note that what are the focus areas of these two companies in terms of marketing their products. User Friendly, Ease of use, external API exposure, On call support all these matters and also a good complete product matters too.

Friday, October 14, 2011

Speech #3

Saturday, October 03, 2009

SDNUG October Meeting - 2009

Last Thursday the 1st of October I attended the Sydney Deep .NET User Group meeting. This was the first time I attended an Australian user group meeting after my arrival in Australia and it was a great experience for me.

The session was about ASP.NET V4 - New Features by Paul Glavich. It was a very informative session which he introduced the new features of ASP.NET V4 in terms of Core Services, AJAX, Web Forms, MVC, Dynamic Data, Design Improvements and Web App development in VS 2010.

Saturday, May 09, 2009

May .NET User Group Meeting - 2009

The next session was take by me. My presentation was on 'LINQ to SQL to build your Data Access Layer.' On this session I talked about how to build a DAL using LINQ to SQL for a disconnected environment and highlighted some points to gain better performance as well. The full explanation and the code downloads can be found here.

It was interesting to see questions coming up from the audience and their enthusiasm on the subject. Hope it was useful and do feel free to buzz me if you find any thing interesting on this or have any queries.

Friday, April 24, 2009

Microsoft ISV Training on Dynamic Data

Yesterday I did a training program for ISVs on ASP.NET Dynamic Data. Apart from the setting up and customization, I talked and demo a bit on the very latest concept of using a Domain Service with Dynamic Data. So in other words it opens up a way to take more control on your data, in DD.

It was pretty interesting to see various queries from different aspects. And I hope it was an informative and a useful session for all of you. By the way, some one asked me to post all the references in my blog. So here they are...

Friday, April 03, 2009

April .NET User Group Meeting - 2009

The session touched the key areas of Dynamic Data customization apart from setting up and configuration. I was so happy to see the audience coming up questions :) I enjoyed doing the session a lot and do feel free to buzz me if you come up with any problems or something interesting on Dynamic Data.

By the way, there are couple of snap shots..and will be posting them once I receive them.

Wednesday, March 04, 2009

Designing A Data Access Layer in LINQ to SQL

I wrote an article on Designing A Data Access Layer in LINQ to SQL It discusses how LINQ to SQL can be used to design a data access layer and lists some best practices that can help to improve the performance of the application. The complete source code is available for download with my article.

Thursday, November 27, 2008

Dynamic Data Templates in ASP.NET 3.5

This article gives an introduction to Dynamic Data Templates in ASP.NET 3.5 and explains how one can save a great deal of time and effort when building data-driven web sites by using them and highlights some of the ways of customizing DDT to suit the industry needs.

This was released in the Simple Talk Newsletter as a feature article on the 26th Nov 2008 Edition.

Tuesday, October 07, 2008

Some thing I really enjoyed...

Today I did a presentation on LINQ at my office for my technical colleagues. It basically focused on giving an insight to LINQ and brief intro to LINQ to SQL, LINQ to Entity & LINQ to XML. Of course I was bombarded with all kinds of questions but end of the day it turned out to be a productive session.I simply love it.

Saturday, August 30, 2008

Enhancements in C# Code Editor in VS 2008

Explicit compilation was often needed to Identify the semantic errors in C# code in Visual Studio 2005 and earlier versions. For instance if we declare and use an unknown data type in C# code, it required compilation for identification of the errors.

Now with the Visual Studio 2008 SP1 C# code editor instantly identifies and mark these errors with squiggles in red with out the need of explicit compilation.

This adds up value to the developer experience plus saves the building time.

Saturday, June 07, 2008

Dynamically Generating Images using ASP.NET Handlers

Introduction

Dynamic image generation in web applications are expensive tasks. More often we tend to access images from a location in a web server, or the regularly accessed images are often stored in cache objects. In some cases we need to draw images dynamically.

In any of these cases, more the resource are consumed the performance of the application reduces. There fore it is vital to use techniques that will improve the application performance. This article introduces the HttpHander and how it can be used to dynamically generate images providing a better performance to the application.

The HttpHander

It’s all to do with how the IIS handles a request. When the web application receives a request, it checks with its ISAPI filter. Internet Server Application Program Interface (ASPNET_ISAPI.DLL). This is responsible for getting the control on http requests. So when we have configured the application to handle the image types we require it will process them.

In this example jpeg is used. The configuration in the IIS will be explained later in this article.

Common Class to Handle Images

We need a class that will basically handle the images in our application. First we need to make this class, process the request that we get from the web page.

There fore, let us create a class that implements IhttpHandler. From the IhttpHandler implement the default members namely, the IsReusable and ProcessRequest. IsReusable method is responsible of indicating whether this particular instance can be used by another request or not, so here we will specify return false, as to indicate that it will be used by a single request. ProcessRequest is basically responsible of processing the http web request. So in this example I will transmit a particular person’s image based on the person’s name.

Utilizing the Common Class

Let us create a web page with a RadioButtonList control specifying the values (a,b,c) and text (person names) and a Panel control to load the images. Our objective is to display the person's image for selecting the name from the RadioButtonList control. And for this let us use the created class above.

Image control is created and the required ImageUrl is constructed and assigned to the ImageUrl property of the Image control before adding the control to the panel. Here, image URL is pointed to Test.jpg image, which actually does not exists in the solution.

So, how does this actually work? Let us dive deep to this and see what happens inside. When passing the selected value as the query string to the Test.jpg, the IIS identifies that it is an image to be processed of type jpeg and then the ImageHandler class will response with the relevant image.

Setting the Web.config

For our application to inform that .jpg file types are handled by the HttpHandlers, a tag is added to the <httpHandlers> section specifying the path as *.jpg and verb as * to handle any jpg request and by using the class ImageHandler which is specified in the type.

Configuring IIS

As we mentioned earlier, to make IIS identify the images, an application mapping for the .jpg (The file Type) that is handled by HttpHander needs to be configured in IIS. Follow are the steps for configuration.

· Open the IIS.

· Right Click on the Web Site.

· Properties -> Configuration -> Application Configuration-> Mapping

· Click Add

· Browse the aspnet_isapi .dll, type the extension as .jpg,

. Click on “Check that file exists” option.

Note (Only for Windows XP Professional Edition users) : In a Windows XP Professional Edition, OK button is disabled in this configuration. To overcome this, Once you select the dll, just bring your cursor to that field and make it focused. You must click on the Executable field and you must click on the Detention fields. And then OK will be enabled.

After configuring the application let us run at application. And here is how it appears.

Performance Evaluation

The following performance report depicts the most called functions and functions with more work.

Conclusion

Loading images dynamically using the handlers are much faster and less memory consuming compared to other techniques. Further, from a coding perspective it reduces the lines of code and keep things more clean and neat, from a performance perspective it improving the overall web application performance.

Monday, June 02, 2008

70-551

After attempting for 4 times, I finally passed the exam 70-551. So thought to share some significant areas of interests and where more questions were targeted.

As you know, this exam consists of 3 parts. The order, which part comes first is random and here is a glance on the content. There are questions from all the chapters but here are some highlights of which most questioned are asked.

For Web Application related :

Mobile applications

Web Parts & Personalization

Deploying Tools

Custom Controls such as Wizard control, Login Control.

For the Application Foundation related :

Compression Techniques

Application Security

Serialization

For Application Design related :

Deploying Applications

Testing Applications

WMI, WSAT

Design Evaluation

One thing I noticed was that the exam content updates so fast, and it always comprises of latest changes.

Sunday, May 18, 2008

Glimpse on LINQ TO SQL

What is Linq to SQL Server

So far all this time we have been using the ADO.NET to communicate with the Database, extracting and manipulating data. Linq to SQL opens a new window to do non other than the same thing. Linq to SQL provides ways of extracting and manipulating data on SQL Server Databases only.

How does it do it?

So, how does LINQ do it? The concept behind it is, it converts a Linq Expression to a SQL query at the backstage. But it’s not straight forward as such.

In Linq, first will look how it querys SQL data? Obviously, the DB structure should be mapped to some format understandable by linq. And that is done using the Linq to SQL class. I assume that application is already connected to some datasource.

Add a Linq to SQL Class to your solution; this class automatically creates necessary functionality to work with the table in the DB.

Open the server explores, connect to your DB and add some tables to this class; when tables are added a Linq to SQL Class which in this example the ContactDBDataContext is updated with the necessary functionality to deal with the DB.

ContactDBDataContext is the Linq to SQL Class I added. Course is the table I added to that class. It references the course table as Courses. I’ve written a linq expression to get all the course names and certification names from the course table.

When you add your table to that class, it makes that added table identified as a System.Data.Linq.Table<TypeOfTable> and this is accessible from the Linq expression. Ok, now linq is aware of what tables to work with. Now how does it fetch the data? When linq expression is run on a Table<T> it returns an object of type System.Data.Linq.DataQuery, which has all the details to fetch the data you want. Even the SQL statement preview could be viewed by called the ‘ToString()’ on the particular DataQuery object.

This object of type System.Data.Linq.DataQuery implements the IEnumerable interface allowing it to traverse through its items using a ‘for’ loop. This object contains all the data you need to access, in this sample.

Monday, May 12, 2008

LINQ in Brief

LINQ stands for Language INtegrated Query. Basically this presents a mechanism for retrieving, sorting, manipulating data which are in various sources. As LINQ is new to .NET so as the syntax.

List<int> Prices = new List<int> {456,789,235,723 };

var myPriceList = from p in Prices orderby p descendingselect p

In the above line of code, from the Prices List<int>, p is specified as a representation of an item in the collection, saying to get p which are in Prices List<int> based on the ordering clause and finally selecting the item.

Difference between LINQ & SQL, .NET 3.5

Seeing LINQ in .NET 3.5 suddenly made me guess whether it operates like SQL too? Linq uses similar syntax as in SQL but its functionality is totally different to SQL.

SQL basically operates on tables, while LINQ could be operated on collections, and other datasources such as databases or xml. Unlike dealing with rows in a table, these collections could be manipulated using LINQ, whether they have values in them or even objects. Let’s look at some interesting features in LINQ.

Some Interesting Features in LINQ

A collection could be modified retaining the initial values of the collection as it is. For an example, let’s say you retrieve prices and you want to add the currency symbol to the prices. In spite of LINQ, if we were to retrieve the values and add the currency symbol to it, may require traversing through the collection. But LINQ does it simply as this.

Not only that, calculations too could be performed on them. Let’s say in the above list you want to get the average price. Here is how to get it.

Console.WriteLine("The average is {0:F2}", Prices.Average());

The important point here is that, method Average() is not a method of the List. It’s available due to LINQ. Such methods are called extension methods. That is basically used to extend the functionality of List in this example. Saving the manipulated collection to an array, dictionary or a list is also possible by the extension methods such as ToArray(), ToDictionary(), ToList().

For a programmer using .net 2.0 for and the previous versions for some time LINQ might seem a bit odd and alien. But when you look deep in to it, it does cuts off lot of code and thinking which you would invest to do some complex work out. For example a simple selection from a list, will require you to traverse through a loop and then check for a condition and extract the data.Linq makes this task easy by giving a whole new look in to the Visual Studio 2008 environment, giving the new key words and a lot of functionality to what you want to achieve.

Starting my career as Technical Person opened up many avenues in my life pushing me forward to explore skills hidden inside me. They fascinated me and took me to heights I could not imagine. Publishing my first article in Simple Talk - Red Gate as one of the most memorable achievements and being called by Microsoft Sri Lanka for Technical Presentations was another.
Posts you will find in Blog are my view points and thoughts and do not reflect the views of my current or past employers.