Friday, November 03, 2006

SIM and R-UIM?

One of my colleagues has got really cool Nokia handset. It has tons of features and all of us call it as a TV. ;) Since he is a CDMA user, I thought there will not be any card in his new handset. But I was surprised to see the SIM Card like card in it. It is called as UIM or to be precise R-UIM.
I have been using GSM phone since long time now and somehow got fascinated by the Subscriber Identity Module (SIM) card. Everybody knows the functions of SIM card in a GSM phone. That triggers to one more question. What is the use of R-UIM card in CDMA phone?
If you look at this card then you will know that it looks exactly similar to the SIM card. To start with, the long form of R-UIM is: Removable User Identity Module. It seems that NAM1 and NAM2 settings are stored on this equivalent card. It is also standard method used for international CDMA roaming.
So, if you are CDMA user then should you be really bothered about UIM card? Answer is yes. For example, if you are using handset which supports UIM card. And you are using Reliance CDMA number. Now, if you want to switch to Tata Indicom CDMA, what will you do? Earlier you have to throw the Reliance handset and buy a new one from Indiacom. Now, with UIM card, you can just put Tata Indicom card in your handset and you are free to use new number with the same device. ;)

Cheers,
Amol

Using GSM phone then make sure you take backup of the Sim.

Those days of heated discussions for GSM versus CDMA are gone now. We are now used to both the technologies. I am going to concentrate only on GSM phones in this blog.

Recently, one of my friends got his GSM sim card blocked because of invalid PUK code. After consultation with the service provider, we decided to replace the sim card but with the same number. Unfortunately, he has stored all his important numbers in the sim card only and not in the handset memory. He lost all important numbers in one minute. That triggered my thought process to prevent this kind of failures. Basically, in India if you are using CDMA phone, then you can keep a copy of your phone book at the server provided by your service provider. For example RWorld.

But, what if you are a GSM user? Well, outside India there are few mobile service providers which offer above mentioned feature online. For example, in Australia Optus allows it. You can store the phonebook from your sim card to the Optus server. AFAIK, no such service is provided by any Indian mobile providers. So, until it happens, what should GSM users do?

Well, there are lots of sim reader devices or sim backup utilities are available in the market. USB Sim card readers can be also useful and one can store the phonebook information on the PC. So, make sure you have backed up your data at least once.

Cheers,
Amol

Thursday, November 02, 2006

Does platform really matter?

Most of the times, people ask this question: “Okay, you are in Software. Then which platform you are working on?” Most of the computer literates have some idea about various platforms like: Windows, Linux, Solaris etc. So, this question is very common and it will be then followed by technologies/tools and so on.

While I do wonder sometimes, does it really matter for us who are developing software driven by client’s requirements? Of course, we can try to convince our clients to use specific platform/technologies. But eventually it will be his call. Right? Even though you convince him about using .NET based applications and tools by giving him various advantages like less development time, good quality UI and so on. Eventually, what matters for us his customers go ahead. So, if not Windows then you better geared up with Linux skills because your client wants it. ;) That is why people say 'Please check your politics at the door—here, we care only about how tools can be used to solve problems'.

Cheers,
Amol.

Monday, October 16, 2006

Excel Services

After going through the sneak preview of Share Point Server 2007, now you are somewhat familiar with Excel Services. It is likely that you have accessed web-based spreadsheets available on google or MS live sites. But have you ever thought of writing your own applications integrated with Share Point and allowing users to use these cool web-based spreadsheets? I am sure that you have thought about this at some point of time. Anyways, let’s not get into that now. :)

Excel Services are built on top of ASP.NET and SharePoint 3.0. To understand it, let us consider that there are going to be two servers: front end web serves and backend application server. The components of Excel Services are placed on these two servers. And yes, you can install all these components on one box as well.
So, what are the components installed on the front-end web server?
Excel Web Access and Excel Web Services.
Excel Web Access:
This is a simple web part, which renders Windows live spreadsheets on the requesting client’s machine. Users of this application can interact with the workbooks using this component. This web part is customizable and one can customize it based on requirements.
Excel Web Services:
Basically, you can use server-side workbook logic in your application. The programmatic approach of it, allows you to consume the web service, and do various operations. It also allows you to maintain workbook values in the session.

The application server hosts two components as: Excel Calculation Services and User Defined Functions.
Excel Calculation Services:
Its primary job is to load workbooks, do various calculations involved and execute user defined functions defined earlier. It can also cache the workbooks, the external data query results.
User Defined Functions:
I think that only one sentence given below, is sufficient to know the importance of User Defined Functions.
User Defined Functions give you the ability to use formulas in cells to call custom functions written in managed code and deployed to Microsoft Office SharePoint Server 2007. You can basically use these function to extend and customize various built-in functions or features.

Cheers,
Amol.

Wednesday, October 11, 2006

Integrating Reports (using Reporting Services) with your application

By this time, I assume that you have tried your hands with reporting services in SQL Server 2005. Good to know that you are also aware of local mode and server mode. Now, next question is how do you integrate your application with these reporting services?

Integrating Windows application with Reports
All you have to do is to use ReportViewer control provided by Microsoft and you can also redistribute it. Just drag and drop the control on your Winform and start looking for the properties. Rest of the things you can easily figure out. And if the report is remotely hosted then you can also provide the report server URL.

Integrating Web Applications with Reports
Again, you can use the same ReportViwer control in your web application. You just have to drag-n-drop the control on your Web form.

Integrating with SharePoint
This is the most interesting part. If you have hosted the Sharepoint site for your organization and it is likely that you want to publish some reports on it. Integration of Reporting Services with Sharepoint allows you to do the same. For this kind of integration, you have web components like: ReportManager and ReportViewer. Additionaly, you also have access to Reporting SOAP Services API.

You have all the capabilities to do what you want with the Reporting Services. But hey do not forget to keep your design simple. ;)

Cheers,
Amol

Monday, October 09, 2006

SVG and VML

I think these are the two buzzwords, which did not click as expected. I do believe that there is lot of potential available with these two words. In this blog, I would like describe about these two words in brief.

What do you mean by SVG?
Well, as the name suggests it is the short form of Scalable Vector Graphics.
SVG is a language for describing two-dimensional graphics and graphical applications in XML. SVG allows for three types of graphic objects – Vector Graphic shapes, images and text. SVG mobile profiles- SVG Basic and SVG Tiny are targeted to resource limited devices. It enables us to create dynamically generated high quality graphics from the real-time data with structural and visual control. SVG is compatible with DOM.
Using .Net and SVG together, we can write awesome charting applications, image maps etc. There are various SVG viewers available in the market; some of them are also applicable for mobile browsers. Following is the list of some popularly used SVG viewers:
· Adobe SVG Viewer.
· Apache Squiggle SVG Viewer
· Corel SVG Viewer
· CSIRO SVG Viewer
· IBM SVG Viewer

So, how will the basic SVG file look like?
<?xml version="1.0" encoding="UTF-8" ?>
<svg width="100%" height="100%" xmlns=http://www.w3.org/2000/svg>
<text x="20" y="20"> Welcome to SVG </text>
<rect width='100' height='100' x='50' y='50' fill='green'/>
</svg>

What do you mean by VML?
Virtual Markup Language (VML) is nothing but the application of XML 1.0, which defines a format for encoding the vector information with markup to describe how that information may be displayed and edited. It is basically text-based interchange and delivery formats for vector graphics.

VML describes objects such as shapes and groups (collection of shapes). VML allows editing of these objects. It can be also used to create menus and navigational elements using XSL.It supports the DOM. IT uses CSS2 just like HTML for determining layout of Vector Graphics.
So, how will be the basic VML?
<v:shape style='width:1in;height:1in;' strokecolor="red"
strokeweight="2pt" coordsize="21600,21600" adj="17520"
path="m10800,0qx0,10800,10800,21600,21600,10800,10800,0xe
m7340,6445qx6215,7570,7340,8695,8465,7570,7340,6445xnfe
m14260,6445qx13135,7570,14260,8695,15385,7570,14260,6445xnfe
m4960@0c8853@3,12747@3,16640@0nfe">
<v:formulas>
<:f eqn="sum 33030 0 #0"/>
<:f eqn="prod #0 4 3"/>
<:f eqn="prod @0 1 3"/>
<:f eqn="sum @1 0 @2"/>
</v:formulas>
</v:shape>

It can be used with the ASP.NET applications. You can create your own web controls for the same. If you google up, then you would find some examples on the code project as well.

Well, having understood SVG and VML, next question is what are the differences between them?

VML is supported by most of the browsers or rather I would say at least IE 5.0 and above support it. To use SVG, you still need to use add-in viewer controls. SVG is really neat and clean language. It is really easy to understand as well. And above all, VML was designed before the release of SVG specification. I believe that latest versions of browsers will have built-in support for SVG as well. As a matter of fact, there seem to be little confusion on where our applications are heading with respect to these two buzzwords. But in any case, it is always a good idea to know what it is.....:)

Cheers,
Amol.

Thursday, October 05, 2006

Orcas..... VS2005 Successor

So, now you are comfortable with Visual Studio 2005, right? But hey don’t worry it is not the end of this world! If you are ready for the next jump, then you can try out ‘Orcas’. Yes, you guessed it right. This is the forthcoming version of Visual Studio. Microsoft has released its September CTP and it is available for download here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=82243606-d16d-445c-8949-9ee8c10cda2e&DisplayLang=en

This CTP is available only as a virtual PC image. So, go ahead and try it without crashing your current installation of VS2005. ;)

As expected, it is compatible with Vista and Office 2007. And it will probably get shipped in late 2007 or early 2008. So, don’t worry, you have lot of time to play around with it.

On a high level note, this CTP includes partial support for C# 3.0 and VB.NET 9.0 with improvements to .NET Framework. It seems to be tightly integrated with Team system and allows you to debug vista applications. You can expect to do lot of wonders with it because it is also compatible with Office 2007. I will try to play around more with it so that all of us will be ready to welcome its next CTP. :)

Cheers,
Amol

Tuesday, October 03, 2006

A sneak preview of SharePoint 2007 Server

Earlier, I tried my hands playing little bit with SharePoint 2001. Not really satisfied with it, I finally settled with SharePoint 2003 server. After creating lot of portals, customizing these portals with SharePoint SDK; I realized that there are some missing features in it. With these features in my mind, I tried to evaluate SharePoint 2007 server. And I was not at all surprised when I found that all these features are present in SharePoint 2007. In addition to this, it adds so many promising features in it which we have not dreamt still. Yeah, I mean it. :)
So, let’s look at some of the promising key features offered by SharePoint 2007.

It is called as Office SharePoint Portal 2007 Server. It is essentially a suite of server applications. It actually gives you a single integrated platform to manage intranet, extranet and internet applications of your organization.
1.Portals:
It includes lot of new project templates and drag-n-drop kind of tool to manage sites. It is called as Site Manager. It has introduced lot of new web parts like Social Networking for instance. It helps social networking within the organization and it can be also integrated with Active Directory. Some other web parts are: membership web parts, document roll-up web part, privacy control web part etc.
Liberal use of Smart Tags for real-time communication indicates which users are online and available with which communication modes. In addition to enhancements in user profiles and notification services, it also provides LDAP pluggable provider.
2.Mobile Device Support
By default, all the SharePoint portal sites can be also rendered on both International and North American mobile devices
3.Content Management:
With the new components for Document Management, you can now easily define and enforce document workflow. It can be easily integrated with Office 2007. This component provides various built-in templates for document management.
SP 2007 introduces new features and capabilities to maintain records in your organization. Audit and Policy features allows you to interact with record repository and do lot of other stuff which still needs to be explored. :(
4.Workflows:
It allows you to streamline form based business processes. It uses InfoPath 2006. The new server called as Office Forms Server 2007, allows you to design web-enabled forms in Office InfoPath and distribute it. There are lot of other features with respect to forms in it.
5.Search:
The search component available with SP2007 seems to be revamped completely in altogether a new form. You can now search for people or their expertise. It is possible to search data in LOP applications. And yes as always, you can also extend the search capabilities by adding your own cent to it. ;)
6.Business Intelligence:
Just like Reporting Services, you can access the Excel workbooks on the web. One can have these workbooks interactive with the usage of macros if you want. What is more interesting is that Excel services provide model based on web service. There are tones of new features added in to this section. Other features include: Report Center sites, Excel Service management, dashboards etc.

Charged up? Good. Now, if you want to install it on your machine then check out the OS. Bad luck for W2K users as it is not supported on W2K. But if you want you can try installing Virtual Servers if you want. It requires XP with SP2 or Windows.NET Server..oops I mean Widnows 2003 server.

So, with latest version of ASP.NET, liberal use of AJAX and support for cool features (some of them are mentioned above), be prepared to experiece the cold breeze of air in the hot summer. ;)

Cheers,
Amol.

Visual Studio Powertoys

As a project manager, would like to know how many times your team members have opened VS 2005 or how many times they have compiled the project source code or how many times they have debugged the application and so on…
I know…you would. :)

No, no..I am not talking about any spy applications here. I am talking about Powertoys. The usage scenarios which I mentioned earlier are my brilliant ideas. ;) But yes as a matter of fact, you can do that. So, what are the Powertoys?


Powertoys are series of add-ins to Visual Studio 2005 to do small small things for you with Visual Studio. You can bundle all these small things and come up with a major usage scenario if you want. Now you will ask me how I met with these Powertoys first of all. To answer this, I would say “It’s a long story. :);)”. To begin with, I installed VS2005 SDK on my machines. After some days, I found one strange system tray icon. It was labeled as ‘Event Toaster’. After double clicking it, nothing happened. I tried to find out the trace or starting point for that Event Toaster in vain. After little bit of playing around, I was able to trace it back to Visual Studio 2005.

Currently, we have two types of Powertoys available as Indexed find and Event Toaster. I played little bit more with these Powertoys to realize its power. As I was more interested the Event Toaster (for the obvious reasons :)), I was wondering what can be done with it. Following are some of the events/built-in toasts supported by Event Toaster Powertoy:
1.Build (Build Done and Code Analysis Done)
2.Debug ( Entering Break Mode and Execution Session Completed)

3.Document (Document Opened and Document Saved)

In synchronization with above-mentioned built-in toasts, you can do following tasks:
1.Play sound (You can start the MP3 for example: ))
2.Run Command

3.Run Macro (You can write your own macro and do whatever you want in the background)
4.Taskbar Notification.

Microsoft will launch more such Powertoys in coming days. And we can make most out of it.

So, next time you hear this word “Powertoys”, you better be prepared to know its built-in toasts. ;)

Cheers,
Amol

Microsoft Office Live Beta

Microsoft Office Live provides you lot of web based services. It gives you lot of services, most of which are desired by your small sized companies. So, if you own a small company and you want to manager your information and resources efficiently; then I would recommend you to take a look at this Office Live. Currently, it is in beta version and only offered in United States. But at the end of 2006, it will be available across the globe.

Well, don’t start thinking that this is altogether a new invention. Or it is another technology buzzword. It just offers you bundled services together (unleashing the power of web), which you always strive for.

Following is the list of some of the features:
Ø Free domain name, web site, email (up to 50) accounts.
Ø Web site traffic reports
Ø Business Management applications like customer or document management applications.
Ø Security-enhanced websites managed and maintained by Microsoft itself.
Ø Online workspace for sharing information with your employees, customers etc.
Ø In short it offers all the necessary services in order to run your company online.

These Services are divided in three different groups as given below:
Ø Microsoft Live Basics
Ø Microsoft Live Collaboration
Ø Microsoft Live Essentials

Currently, all these services are offered free in United States. In future collaboration and essential services will be paid services and Live basics is going to be free.
So, if you want to start and run your organization online then just get internet connectivity and go Office live. And believe me, creating a web site for your organization was never so easier before Office Live.

Cheers,
Amol.

Friday, September 29, 2006

Visual Studio 2005 SDK

All of us desire some sort of customization/extensibility in the existing off-the-shelf products/solutions. This is primarily because sometimes the product/solution cannot fulfill all your requirements. There could be various reasons for this. One reason is that product/solution may have been designed with generic features in mind, which would be suitable for most of the requirements/usage scenarios. But if you have very specific requirements then you end up wanting more from it. This is where, customization or more popular term add-ins come in to the picture. Fortunately, Microsoft products provide required space (in terms of API, documentation etc) for customization. And if you have used Excel-with VBA, Microsoft Business Solution products, BizTalk etc., then you will definitely realize the point I am trying to make here.
For Microsoft developers, Visual Studio IDE is a real beauty. It also provides starter kits, various different project templates, different project types etc. These items contain specific files in it. So, if you use ASP.NET web application template, then you will have few files ready for you including weform1.aspx in the solution explorer. All this is fine and cool things to have. But as I said earlier, if you want specific features then you need to do something. For example, if you want that your developers should use your organization specific project template or starter kit, and then you need to first create the project templates, starter kits etc. This is what I call as custom project template/custom starter kits/ custom themes.
Visual Studio 2005 SDK is provided for customization and extensibility of your own Visual Studio 2005 to suit your requirements. And also with the Visual Studio Object you can do all these things in your own language.

How can you get the maximum out of VS 2005 SDK?
Ø Automate Repetitive Actions using Macros
It is now possible to capture/record the repetitive actions in a macro and execute it whenever you want. For example, if your developers using series of keystrokes frequently, then one can record the macro out of it. Next time, developers just have to run the macro instead of performing same series of keystrokes again. I know QA people will say that this is not a big deal since they already do this using automation tools like Mercury, QTP etc. But developers will realize its importance for them. So, even if you are using CTRL+V most of the times, if you use macro you will have to click just once. J Sorry folks, I know that it was a bad example. J But the fact is that if you can use this feature effectively then you will end up saving lot of time with ease.
Ø Maintain Consistency Across the Projects
You can now create your own templates, starter kits or themes. For example, you can create custom template for the web application. In this template, I can put resource files for 3-4 languages. I can also web.config file and few XMLs in it. When developers will use this project template, they will find above mentioned things present in the solution explorer. This feature is really handy in large organizations. For the beginners, you can give the starter kits to start with.
Ø Integrate With External Products and Processes
It allows your IDE to integrate with third-party tools. So, if you do not want to spend time on doing these things on your own, then you can check the available product catalogue on the Microsoft site and but it.
Ø Use Automation Object Model to Create Add-Ins or Wizards
Now, the complete automation object model can be leveraged to create your own add-ins and wizards. Add-ins are compiled applications that manipulate the environment and automate tasks. Add-ins can be invoked in a variety of ways, including the Add-in Manager, toolbar commands or buttons, the devenv command line, and through events such as IDE startup
Ø Make a Product Out Of Your Customization And Sell It To Others
And finally, last but not least. You can bundle all your customizations in one product and sell it to the world. J You can join the MS partner program and make sure that your product appears in the product catalogue list. And believe me; this product development is really easy. :)

In case you are charged up by this blog, then do visit the MS URL below to download VS 2005 SDK V3 RTM.
http://msdn.microsoft.com/vstudio/extend/default.aspx

After you install it, you can see two main options in your program menu as: Help Studio Lite and Visual Studio 2005 Experimental Hive. As usual, you have hundreds of sample applications ready with the SDK. :) Wish you Happy VS2005 Extensibility!


Cheers,
Amol

Monday, September 25, 2006

Web Applications…..where are we heading?

At the early stage of my career, I was involved in a project using Microsoft Active Server Pages 1.0. It was the time, when there were no rich controls, no data grid kind of stuff. We used to write lots of scripts (client as well as server). It was purely processing the stuff on server and sending back the HTML to the requesting client.

Last seven years down the line, I can see tones of improvements in web applications. These changes are in terms of rich User Interface, faster processing speed on the server, faster response, from simple ISAPI filters, interpretations to compiled versions. I must say that ASP.NET has revolutionized the web applications completely. Look at the way, programmers are writing the code. The classic separation of presentation and business logic layer; also the incorporation of MVC pattern just amuses me sometimes.

The birth of ASP.NET 1.0 gave us lots of rich user controls. Look at the datagrid control. These controls have in-built capabilities like paging, sorting, customization etc. This saves lot of time for the developers and also makes rich end-user experience. And now, we have ASP.NET 2.0.

With the concepts like web parts, navigation controls and of course AJAX, these web apps are exceeding our expectations. And if we add DHTML, flash / flash remoting to this list then we get awesome results. With increased bandwidth and high-end servers, are we going to replace the desktop applications? I think that though it will not replace the desktop apps completely, it will reach close to it. Users can access the web apps from browsers, pdas, cell phones, smart phones, blackberry etc. The usage of thin client was always the plus point for web applications. And it will remain so. Over all, the future of web applications looks promising. There will be lot of new approaches in the way we use web applications. Some of the applications will eventually lead to somewhat FAT client.
Ability to go offline, do the stuff and again go online to upload the changes. I think Asynchronous programming (AJAX) is going to be the key technology in future for web applications. Rich graphics, web-based office solutions and web-based development/ IDEs is also a possibility.

Cheers,
Amol

Should you use Directory or RDBMS?

In most of the development project we use relational databases. But if you are working on a project which uses directory services (like Active Directory or Sun One etc.), then chances are high that you would end up in comparing directories versus relational databases. If you have been using RDBMS frequently then you are definitely going to apply same logic for directories as well. And this is not at all a good idea.

Alternatively, consider this scenario. You are in the middle of designing one application, when suddenly you come with this question. “Do I need to use Directory or Relational Database here?” Well, this is not really a difficult question to answer. But one needs to have thorough understanding of both the directories and relational databases to answer above mentioned question. If you go ahead with inadequate understanding of either of them, then it can bring your application down on the knees.

It is very important to understand the similarities and differences between these two. This blog is just an attempt to resolve few doubts with respect to directories and RDBMS. I hope that next time you face situations as mentioned above; you are better equipped to take the call.

First of all, let us try to understand what do you mean by a Directory.

Ø So, what do you mean by a Directory?
A directory is a specialized database specifically designed for searching and browsing of information. Typically, it stores typed and ordered information of objects. Directories are tuned for better read performance. So, it typically performs more read operations than write operations. That does not mean that you cannot perform write operations.

So, now the question is how is it related to LDAP? Well, LDAP (Lightweight Directory Access Protocol) is an open-standard protocol for accessing X.500 directory services. The protocol runs over Internet transport protocols, such as TCP. The LDAP Standard consists of schema definitions, LDIF file exchange formats and definitions for some object classes. If directory is LDAP-compliant, then it can interpret and respond to LDAP request from LDAP client applications. In a network, a directory tells you where in the network something is located. On TCP/IP networks (including the Internet), the domain name system (DNS) is the directory system used to relate the domain name to a specific network address (a unique location on the network). However, you may not know the domain name. LDAP allows you to search for an individual without knowing where they're located (although additional information will help with the search).

Most of us have used Microsoft Active Directory or Sun One Active Directory. Now, you can relate the definition of directory to above mentioned directories.
Okay, we know the definition of the directory. Now, what are the typical characteristics of directories?
1. Static Data:
The data stored in the directory is not really subjected to change or frequent modifications.
2. Hierarchical:
It is capable of storing objects in a hierarchical fashion for organization and relationship. An LDAP directory is organized in a simple tree hierarchy consisting of levels like: root directory ->countries ->Organizations within those countries-> Organization units- >Individuals.
3. Standard Schema:
It uses standard schema, which is available to all applications making use of it.
4. Object-oriented:
It represents entities and objects. Objects are derived from objectclass and are collection of attributes.
5. Multi-valued attribute:
The attributes can have multiple values.
6. Distributed:
It is distributed in nature. It can be distributed among many servers.
7. LDAP Protocol:
This lightweight protocol is used to access the directories.
8. Transactions are not supported.
It does not support transactions. But if you want you can create custom transaction management with your client application.


Ø What are the characteristics of RDBMS?
Most of us are aware of RDBMS concepts along with Codd’s 12 rules. SO, instead of giving details of it, let’s focus on characteristics of it as compared to Directory.
1. Dynamic/ frequently changing Data:
The data stored is frequently updated. There are more write/update operations. Alternatively, it can be also used to store vast amount of historical data. It can be later used for data mining or creating data cubes. This is really useful for business intelligence.
2. Relational:
Data is stored in the form of rows and columns or in the tabular format.
3. Custom Database Schema:
The database schema is specific to applications. It can be anything from the simple schema to star schema, snowflake schema etc.
4. Complete Data Models:
It typically uses complex data models with various tables, key constraints, join operations etc.
5. Transactions Supported:
It supports transactions and thus follows the ACID properties of a transaction.
6. Data Integrity:
It uses many complex models for data integrity right from transaction rollback, referential integrity etc.
7. SQL:
One can make use of SQL to fire various select/insert/update/delete queries against the data stores. It also allows us to make use of stored procedures, views and triggers etc.
Now, having seen the characteristics of both directories and RDBMS, one might think that is it possible to have marriage of these two? Answer to this question is YES. You can have LDAP directory as an application running on top of RDMBS. For example: Oracle and IBM provides this. Now, is this a good idea or not? Well, to answer this question, I will have to change the focus of this blog. And I do not want to change the focus. I will try to address this question in some other blog.

Ø Fine, so in which scenarios I should use Directories?
Based on the above information, now you are in a better position to judge when to use directory and when to use RDMBS. Still, what are the common scenarios where in it is recommended to use directories?
Security:
It allows security down to the attribute level. Many Directory-enabled applications are available to extend directory security mechanisms. You can also use security features to enable access to particular resources. Once this security rules are defined, then do not change frequently. That is the reason Identity Management applications use LDAP directory extensively.
Most of the RDBMS offer column-level security, but the advanced security solutions available with directories are far more flexible and granular.
Data:
It is really important to know what kind of data you are going to handle. Based on its characteristics, you can figure out the solution. For example, if data is going to be static most of the time with less write operations or it is going to contain multi-value attributes. You do not need transactions. Then you know that directory can be best suited here.
Business Requirement:
This is the most important factor on deciding the solution. Based on the requirements, cost saving options you can go for either of these solutions.

Cheers,
Amol.

Friday, September 22, 2006

Domestic (India) Software Market Challenges

We are working for overseas clients. We earn in dollars/ euros/pounds. We are helping people of developed countries to make their lives better. Recently, I have heard the story of one Indian Company who implemented traffic control and decongestion system in London. I am sure that each one of us has lots of stories like this to tell. Some of the terms like outsourcing, BPO, KPO etc. have become common words in our lives.
But there is a huge potential for IT Infrastructure and software requirements for the domestic market. I strongly believe that this market is not yet tapped completely. There are going to be lot of opportunities here as well. We have seen the mobile revolution here. The list of mobile companies, their subscribers is just increasing by leaps and bounds. Lots of foreign companies are investing their money. Lots of companies are starting their offices here. If you just look around, you can see the revolution or upward trend in every business areas. It can be anything from service providers to construction, infrastructure development, insurance and banking and so on. This is also applicable to hardware market. Lots of PCs, cells, laptops etc. are entering in the lives of common people. This scenario looks very promising. People (like me) who have experienced the recession in IT Industry would agree to this. But somehow this upward trend is not completely visible in domestic Software market. Of course it is definitely better than compared to previous 5-6 years.
There are lots of surveys/predictions available in the market. Everybody is just talking about the figures, which would be crossed by various domestic industries. Right from Automobile industry to health care and tourism industry, everything is going to grow tremendously. Some of the predicted figures are just unbelievable. Middle class person now has access to world class products in India only and that is also in affordable rates. People are willing to spend. But are the domestic companies willing to spend/invest in IT solutions? Do these companies have decided their IT roadmap for coming 10 years? Are these companies willing to consider India Software vendors? Are these companies clear about their IT requirements? Some of the companies have separate IT department. But do they enough talent/skills/bandwidth to understand their requirements and build custom solutions? …… I am sure that most of the answers to above mentioned questions would be negative…..So, what are the challenges to get positive answers for above questions.

Ø How much money we can save?
If you try to sell your product to any person, this is the first question he/she will probably ask. I am talking about the persons who are probably in their late fifties. These are the people who have struggled a lot and now reached to the topmost positions in the companies. These are the people who are actually running local companies. These are the key decision makers. When you have an opportunity to talk to them or to market one of your software product/solution, then be assured that you would have to answer this question. So, key point here is to understand their business. It is also necessary to understand their current IT investment. It is important to step into their shoes and see what would be their requirements. Once you have the enough data, then you need to apply some algorithms/formulae in order to come up with the total cost which would be saved. This figure is the starting point for any future dealings with that person. :)

Ø Okay, my company will save x amount if we buy your solution. But what are the other benefits?
To penetrate deeper into the India market, we need to convince them what are the benefits they would get. One needs to build lots of case studies/presentations in order to convince these decision makers. It is likely that these people are reluctant to mane any change in the patterns and practices followed in their organizations. They have solid reasoning as well for not to change. They will say that these patterns are being used since last 30-40 years, why should we change it now. Idea, here is to convince them that the world is changing. And with lots of advancement in communication and technology, these changes would help them in better decision making.

Ø Why should I buy from you?
Most of the domestic companies would buy products like SAP, oracle etc. These companies will spend lakhs of rupees in buying these products. But they will be little bit reluctant to but solutions from local software vendors. We need to convince them that we can deliver custom solutions what they want. We need to tell them that we know your business. We will give you local support 24 X 7.

Ø Requirements are not clear.
This is really tough tasks to get requirements from domestic customers. I had experienced this in the past. Some companies want to invest money in IT just because the funds have been allocated for the year. In this case, it will be highly difficult for Software people to get the requirements. Trick here it to stay calm and listen what they want. If they are not able to tell then we need to propose them their requirements. Of course this needs thorough understanding of their business. We need to propose them, which could be really used by these people.

Ø Traditional/ do not want to change Mindset
Some people are not at all willing to change or should I say adapt to the situation. If you face a person with this kind of mindset, then there is a problem. These people will say that why do we need computers? We are doing this since last so many years. We did not use laptops/ cell phones to do business! First of all, we need to make them comfortable to talk with us. Then you can say that “Listen, we were using bullock carts earlier. Everything was fine for us. Then we had trains and cars. We started traveling by cars/trains/planes. This is saving lot of time for us. And if we don’t use this now, then you will be far behind the race!”

Ø IT Road Maps
Most of the domestic companies will not have IT road map fixed for next years. These companies need to think on their road maps.

Ø Customized Products and Quality
Most of the off-the-shelf products are not directly suitable for these companies. We need to give customized solutions and better quality products. The quality is one of the important factors here. This is because these companies might have purchased software from local small vendors at some point of time. And chances are high that these companies were frustrated because of the poor quality work provided to them at cheap cost. We need to build trust relationship with them and ensuring them that they would get better quality solutions.

Cheers,
Amol Kulkarni.

Top 5 Web Service Mistakes…revisited

Last year, while reading few articles I came across one beautiful article written by Paul Ballard. That article was about top 5 web service mistakes. I had worked extensively on the web services using .NET and after reading the article I realized the importance of it. These mistakes are not syntax mistakes but they are logical mistakes. These are architectural mistakes and not technological. The key is to avoid them from beginning only and not at the time of deployment.
So many people are writing .NET based web services now days. It is very easy to write a web services using IDEs especially Visual Studio.NET. This IDE is a real beauty. All you have to do is click on create new project of type ASP.NET Web Service. The VS.NET then writes one default web method for you. All you have to do is rename it, uncomment the code and then put your business logic in it. Compile it and then you are ready for the deployment. Necessary WSDL will be created for you by VS.NET. When things are so simple, beginners find it very easy to write web services in their resumes. Such kind of easy things, if not planned and handled properly then could lead to disasters. This is the reason why you should consider following mistakes before writing web services.


Using .NET Specific Types
For a web service to be interoperable with any technology, its data contracts must be based on types defined by XML schema. If you use .NET Specific types as parameters or return values for a web service, the XML it produces may not be interoperable with Java or other technologies. For example: Passing a Dataset as a result in a web service.
In this case, the structure of the Dataset is not known until runtime. So there is no way for the WSDL to describe the internal structure. This is the web service equivalent of late binding. Since client developer has no idea about the structure of the object, they won’t be able to generate a very useful proxy. They will have to parse the XML returned to find the data they are looking for. You have probably seen demos in the past where the presenter returned a DataSet to a .NET Framework client and somehow it magically became a DataSet on the other end. This works because the Web Service infrastructure in the .NET Framework looks for a special flag in the runtime-provided XML Schema definition called IsDataSet.


Not Taking Advantages of ASP.NET
Most of the developers failed to understand the exact relationship between .NET web services and ASP.NET. The biggest drawback today in consuming Web Services is performance. Web Services developed in .NET are deployed in ASP.NET. They have access to all features of any ASP.NET Application. For performance, the two most important features are Caching and SessionState. Output Caching allows the result of a service method request to be stored in the server’s cache. Subsequent requests with the same parameters will get result from the cache.


Not Enough Bang for the Buck
The Web Service should be designed to maximize the amount of work performed with each request. It is always good idea to reduce the number of server trips. For better performance, consider combining smaller requests into a larger single request. For example: Let us assume that there is a Web Service which gives you current market price for the requested stock. Typically, developers would write a web method to accept one stock symbol and return one price at a time. So in the demo version of the Web Service, you would make ten trips to server. This can be avoided by combining multiple requests in one request.


Using Web Services for Data Access
Many Architects and Developers tend to see Web Services as means to share data. Web Services don’t just provide access to data, but they provide access to an organization’s proprietary business knowledge. The best example of the Web Service exposing functionality and not data is Google’s Web Service for searching web pages. Google has leveraged their extensive knowledge of how to search the web and that is where the value of their Web Services comes from, not their data. Remember that consumers of your Web Service want your business expertise and not just data


Trusting the Client Application
Apart from giving access to business knowledge, Web Services also have responsibility to protect business and integrity of the data. Typically, Web Services are developed at the same time as the User Interface to consume it. The Web Service acts as a backend to the application and so security is left to the UI only. The security of the UI and Web Services should be separated. Keep in mind that other applications (built by other organizations) will also use your backend. Don’t trust data that Web Services receive. The data being returned should also be protected. Tracking of Web Service usages is also important. You can also think about using SOAP Extensions for this.


There are some the mistakes which are bound to happen when you work on web services. So, next time when you want to write web service, you know what should be avoided. J
If you are core web services developer using .NET 1.1 then following are some enhancements in .NET 2.0. You would find them interesting.
1. Network Information API
2. Auto Proxy Discovery
3. HTTP Response Compression
4. Supports Decompression
5. Supports SOAP 1.1 as well as SOAP 1.2


Cheers,
Amol

Important tips for improving performance of .NET applications

When you are working on .NET based applications, it is very important to know key areas which would affect the performance of your application. MSDN has lots of information about this. I have tried to consolidate and list down some important tips for the performance tuning of .NET based applications. I hope that you will find this useful. Some of the tips are applicable to .NET 2.0 only. Happy Performance Tuning! :)

Use of Generics

  1. Language features collectively known as generics act as templates that allow classes, structures, interfaces, methods, and delegates to be declared and defined with unspecified, or generic type parameters instead of specific types
  2. It is recommended that all applications that target Version 2.0 use the new generic collection classes instead of the older non-generic counterparts such as ArrayList
  3. Version 2.0 of the .NET Framework class library provides a new namespace, System.Collections.Generic, which includes several ready-to-use generic collection classes and associated interfaces. Other namespaces such as System also provide new generic interfaces such as IComparable. These classes and interfaces are more efficient and type-safe than the non-generic collection classes provided in earlier releases of the .NET Framework. Before designing and implementing your own custom collection classes, consider whether you can use or derive a class from one of the classes provided in the base class library.
  4. Using generic collections is generally recommended, because you gain the immediate benefit of type safety without having to derive from a base collection type and implement type-specific members. In addition, generic collection types generally perform better than the corresponding nongeneric collection types when the collection elements are value types, because with generics there is no need to box the elements.
  5. The following generic types correspond to existing collection types:
  • List is the generic class corresponding to ArrayList.
  • Dictionary is the generic class corresponding to Hashtable.
  • Collection is the generic class corresponding to CollectionBase. Collection can be used as a base class, but unlike CollectionBase it is not abstract, making it much easier to use.
  • ReadOnlyCollection is the generic class corresponding to ReadOnlyCollectionBase. ReadOnlyCollection is not abstract, and has a constructor that makes it easy to expose an existing List as a read-only collection.
  • The Queue, Stack, and SortedList generic classes correspond to the respective nongeneric classes

Weak References

  1. Weak References are suitable for medium-to-large sized objects stored in a collection.
  2. Using Weak Reference is one way of implementing caching policy.
  3. By using weak references, cached objects can be resurrected easily if needed or they can be released by garbage collection when there is memory pressure.

Memory Management

  1. Check that your code calls Dispose or Close on all classes that support these methods.Common disposable resources include: database related classes, files related classes, stream related classes and network related classes.
  2. Check that your code does not call GC.Collect
  3. Finalization has impact on performance. Identify which classes need finalize. Typically, classes using unmanaged resources will need it. Check that any class that provides a finalizer also implements IDisposable. Avoid implementing a finalizer on classes that do not require it because it adds load to the finalizer thread as well as the garbage collector .
  4. Identify potentially long-running method calls. Check that you set any class-level member variables that you do not require after the call to null before making the call. This enables those objects to be garbage collected while the call is executing. There is no need to explicitly set local variables to null because the just-in-time (JIT) compiler can statically determine that the variable is no longer referenced.

Looping and Recursion

  1. Even the slightest coding inefficiency is magnified when that code is located inside a loop. Loops that access an object's properties are a common culprit of performance bottlenecks, particularly if the object is remote or the property getter performs significant work.
  2. Repeated accessing of object properties can be expensive. Properties can appear to be simple, but might in fact involve expensive processing operations. Avoid repetitive field or property access.
  3. If you do use recursion, check that your code establishes a maximum number of times it can recurse, and ensure there is always a way out of the recursion and that there is no danger of running out of stack space.
  4. Optimize or avoid expensive operations within loops.
  5. Copy frequently called code into the loop.
  6. Consider replacing recursion with looping.
  7. Use for instead of foreach in performance-critical code paths.

String Operations

  1. Avoid inefficient string concatenation.
  2. Use + when the number of appends is known
  3. Use StringBuilder when the number of appends is unknown.
  4. Treat StringBuilder as an accumulator.
  5. Use the overloaded Compare method for case insensitive string comparisons.

Arrays

  1. Prefer arrays to collections unless you need functionality. Arrays also avoid the boxing and unboxing overhead.
  2. Use strongly typed arrays.
  3. Use jagged arrays instead of multidimensional arrays.
  4. Arrays have a static size. The size of the array remains fixed after initial allocation. If you need to extend the size of the array, you must create a new array of the required size and then copy the elements from the old array.
  5. Arrays support indexed access. To access an item in an array, you can use its index.
  6. Arrays support enumerator access. You can access items in the array by enumerating through the contents using the foreach construct (C#) or For Each (Visual Basic .NET).
  7. Memory is contiguous. The CLR arranges arrays in contiguous memory space, which provides fast item access.

Collections

  1. Initialize the collection to an approximate final size. It is more efficient to initialize collections to a final approximate size even if the collection is capable of growing dynamically.
  2. Storing value types in a collection involves a boxing and unboxing overhead. The overhead can be significant when iterating through a large collection for inserting or retrieving the value types. Consider using arrays or developing a custom, strongly typed collection for this purpose.

Hash Table:

a. Do you store small amounts of data in a Hashtable? If you store small amounts of data (10 or fewer items), this is likely to be slower than using a ListDictionary. If you do not know the number of items to be stored, use a HybridDictionary.

b. Do you store strings? Prefer StringDictionary instead of Hashtable for storing strings, because this preserves the string type and avoids the cost of up-casting and down-casting during storing and retrieval.

c. Have you though of using generic class called as Dictionary? The Dictionary generic class provides a mapping from a set of keys to a set of values. Each addition to the dictionary consists of a value and its associated key. Retrieving a value by using its key is very fast, close to O(1), because the Dictionary class is implemented as a hash table.

d. Do You Use SortedList?You should use a SortedList to store key-and-value pairs that are sorted by the keys and accessed by key and by index. New items are inserted in sorted order, so the SortedList is well suited for retrieving stored ranges.You should use SortedList if you need frequent re-sorting of data after small inserts or updates. If you need to perform a number of additions or updates and then re-sort the whole collection, an ArrayList performs better than the SortedList.

ArrayList:

a. Do you store strongly typed data in ArrayLists? Use ArrayList to store custom object types, particularly when the data changes frequently and you perform frequent insert and delete operations.

b.Do you use Contains to search ArrayLists? Store presorted data and use ArrayList.BinarySearch for efficient searches. Sorting and linear searches using Contains are inefficient. This is of particular significance for large lists. If you only have a few items in the list, the overhead is insignificant. If you need several lookups, then consider Hashtable instead of ArrayList.

Reflection and Late Binding

  1. Prefer early binding and explicit types rather than reflection.
  2. Avoid late binding.
  3. Avoid using System.Object in performance critical code paths.
  4. Framework APIs such as Object.ToString use reflection. Although ToString is a virtual method, the base Object implementation of ToString uses reflection to return the type name of the class. Implement ToString on your custom types to avoid this.
  5. Avoid using System.Object to access custom objects because this incurs the performance overhead of reflection. Use this approach only in situations where you cannot determine the type of an object at design time.

Class Design Considerations

  1. Do not make classes thread safe by default.
  2. Consider using the sealed keyword.
  3. Consider the tradeoffs of virtual members.
  4. Consider using overloaded methods.
  5. Consider overriding the Equals method for value types.
  6. Know the cost of accessing a property.
  7. Consider private vs. public member variables.
  8. Limit the use of volatile fields.

Threading Considerations

  1. Minimize thread creation.
  2. Use the thread pool when you need threads.
  3. Use a Timer to schedule periodic tasks.
  4. Consider parallel vs. synchronous tasks.
  5. Do not use Thread.Abort to terminate other threads.
  6. Do not use Thread.Suspend and Thread.Resume to pause threads.

Asynchronous Call Considerations

  1. Consider client-side asynchronous calls for UI responsiveness.
  2. Use asynchronous methods on the server for I/O bound operations.
  3. Avoid asynchronous calls that do not add parallelism.
  4. For each call to BeginInvoke, make sure your code calls EndInvoke to avoid resource leaks.

Cheers,
Amol

Overview of Reporting Services for SQL Server

Generating reports out of SQL Server data cubes was never so easier before the birth of SQL Server Reporting Services. These services offer much more flexibility and features to generate reports in various formats and in very little time. Report subscription is one more new feature added to the list.
I would like to discuss brief overview of the Reporting services in this blog.
Reporting Services:
With tones of historical data available in the organization, it becomes very difficult to use it intelligently and wisely. This information can be used to identify various trends in the organization. It is definitely useful in improving the efficiency and effectiveness within the organization. This is why Business Intelligence (BI) is a buzz word today.
Reporting Services enable employees at all levels of an organization to realize the promise of BI to promote better decision making.
Delivered through:
· Traditional and interactive reports
· Scalable, manageable and embeddable server infrastructure
· Integration with SharePoint, Office applications, browser and other familiar tools
· Single platform and tools for all types of structured data
Some of the key points are:
· Server based reporting engine.
· Creates tabular, matrix, graphical and free form reports.
· Reports are viewed over the web.
· Easily integrate into existing applications.
· Report designer very similar to MS Access.
· Standardized Report Definition Language (RDL).

Following are some the mail report formats supported by Reporting Services:
· HTML3.2 & HTML4.0
· TIFF
· Acrobat (PDF)
· Web Archive File (MHTML)
· Microsoft Excel
· Comma Separated File (CSV)
· HTML With Office Web Components
· XML File with Report Data.




It is also important here to understand the Reporting Life Cycle. The life cycle is divided into 3 parts as Authoring, Management and Delivery.

Authoring
· It is basically the process of creating report definitions through the use of Report Authoring Tools.
· Authoring tools transform the report design into a report definition based on Report Definition Language (RDL).
· The Report Definition contains layout, connection and query information.
· Report Designer can be used within VS.NET.

Management
· Report Definitions, folders, and resources are published and managed as a Web Service.
· Managed Reports can be executed either on demand or a specified schedule.
· Reports can be cached for consistency and performance.
· Report Manager is web-based report access and management tool.

Delivery
· Basically two methods are available such as: on-demand access and Push Subscription.
· For on-demand delivery, user normally selects the report using Report Manager.
· Push subscriptions automatically generate the report as per schedule and store reports to a destination.
· Report Delivery can be automated by using mails, file system or custom delivery options.

Report Processions Flow:

The Intermediate format can be used in variety of ways like: caching, snapshot, history etc. When a report is accessed, the Report Server decides whether to generate the report from the scratch or used cached report. This blog is just to introduce reporting services. I am planning to write about each feature in detail.

Cheers,Amol

How should developers deal with the upcoming technologies?

Every day, we hear or read about new technologies, new models of the cell phones or PDAs, new tools, new versions of the existing tools and so on. This list is just going to get increase and with lot of information available at the tip of the button, it definitely hits us at some point of time. People say that ignorance is bliss. But fact is that one cannot ignore these things in this world. And if you do ignore then you are thrown out of the race. There can be lot of debates on this. In this blog, I would like to focus only on the developers and upcoming technology challenges they are facing.

For Microsoft Developers, the road map for last few years was something like this:
VB (Visual Studio)>OLE>COM/DCOM>COM+>ASP(Visual InterDev)>.BizTalk >NET Beta (C#,VB.NET etc)>ASP.NET>.NET 1.0(Visual Studio.NET 2003)> .NET 1.1>BizTalk Server 2002

And then we have .NET 2.0 and VS 2005 or VSTS. It also includes lot of changes to the framework classes, ASP.NET,C#, VB.NET and other languages. Very soon, MS will come out with .NET 3.0, Vista, WInFx etc.

If some one is working on .NET 1.1 for last 3-4 years, when he/she suddenly sees new version of .NET (2.0), first thing they see is the learning curve. Having been comfortable with the framework version 1.0, it is sometimes frustrating for them to use new version. There can be some syntax changes, new features, tuning of some classes etc. in the new version. But some developers will be reluctant to know it since they have become GURUs in old technology. Yes, based on the requirements project managers or project leaders can force their team members to undergo training and use it for the project. But still some people will think like they are using old version and implement the logic accordingly. This is really a dangerous sign. This can affect the performance of your application. This can lead to disasters literally. The key point here is not use new technology just for the sake of using it or just because it is new and your client wants it. Try to understand the potential, features and usage scenarios for the latest technology. If you are aware of its previous version, then try to compare the feature list and usages between the old version and new version. For example: .NET 2.0 recommends to use generic collection classes and not the collections like arraylist. One should really understand the reasoning behind this. I can use hash table and dictionary class as well. But using dictionary class, is going to give me some improvement in the performance. That is why it is newly added in the list of generic collection classes. Same thing is applicable to generics as well.

There are tones of changes between latest version of ASP.NET and old version i.e. ASP.NET 1.0/1.1. One has to understand the differences and importance of using new features. AJAX/ ASP.NET Atlas give us lot of power to do lot many things asynchronously and eventually making the end user happy and giving him rich user experience. To summarize this, every developers has to ask few questions to him/her as:
Okay, so you have new version of .NET. Tomorrow, you will have one more enhanced and new version of it. So, what do I do?:
Yes, true but if I don’t learn and understand the new versions/functionalities then I will be left much behind the others. There are lot of new developers who are starting their careers with the new versions of tools and technologies. They are going to be ahead all the time if I do not participate in this race. Sooner or later, I will have to learn it. Sooner is better.
Why should I use it just for the sake of using it?:
Yes, you should not use it just for the sake of using it. You must know the importance and its impact.
I am techie person and I want to keep on writing/designing/architecting applications:
Right, but if you are not in sync with the new things. Then, you might be missing something and it might cause flaws in the applications/designs.

This list can also go on increasing. Remember one thing, new technologies are here to help us make our lives better. More we understand it, lesser complexities we will have while writing applications.

Cheers,
Amol.