Inserting Sharepoint List Item using SPMetal Classes

Microsoft has introduced a very useful tool, in the form of SPMetal, for performing CRUD (Create Read Update Delete) operations on sharepoint lists. This article shows how to insert a new item into a list. The below screen shot has an example with its explanation as given below.

Insert item using SPMetal

Sample source code

If you have not yet generated the Data Context and entity classes, follow the below link and generate your entity model -

Using SPMetal With Paramenters

  1. Instantiate an object of the data Context class by passing the site Url as a parameter.
    • DemoDataContext demoDataContext = new DemoDataContext(spWeb.Url);
  2. Create a generic object of EntityList having the List Entity as its source.
    • EntityList<CitiesObject> cities = demoDataContext.GetList<CitiesObject>(“Cities”);
    • The EntityList class can be found in  Microsoft.Sharepoint.Linq namespace.
    • In this example I have taken a list named Cities which has three custom columns namely CityName, State and Country apart from the out-of-the-box columns.
    • The entity corresponding to Cities is CitiesObject, which is passed to the generic method.
    • The GetList method of the DataContext object returns a reference to the List to which we are adding an Item.
  3. Create and instantiate an object of List type which is passed as source to the EntityList class above.
    • CitiesObject city = new CitiesObject() { Title=”New City”, CityName=”Pune”,Country=”India”,State=”Maharashtra”};
    • In my case I have created an object of type CitiesObject and have assigned value to its properties.
  4. Add the list item to list.
    • cities.InsertOnSubmit(city);
    • The above method InsertOnSubmit adds the list item to list. But these changes remain in memory.
    • If we have a collection of List Items, we can add the whole collection at on go, using a Method called InsertAllOnSubmit(IEnumerable<T>)
  5. Persist the changes
    • demoDataContext.SubmitChanges();
    • The SubmitChanges method is where the changes made above are actually persisted in the content Database.

Using SPMetal with parameters

SPMetal is a very useful tool in Sharepoint 2010, introduced by Microsoft for creating  Entity Data Model of the underlying Sharepoint lists. Though it is still at a very nascent stage, it can still be very productive as far as sharepoint customization in .Net is concerned.

Well you might get many articles telling you how to generate the entity classes  using SPMetal .

Hence I would concentrate more on the configuration part of SPMetal. The default command for generating entities is as follows:

SPMetal /web:http://<ServerName>/<SiteName> /code:<EntityClassName>.cs 

In the above command, we have passed two arguments. The first one tells us the site for which we are generating the entities, the second one specifies the filename in which the entity classes are to be generated. The file thus generated will have entity classes for all the lists in the site. In fact it will have classes for all the content types too. i.e by default it will have classes inheriting from “item” and “Folder” content type. The entity classes in turn would have all the fields in the lists.

There would hardly be a case where you need all the entities and fields. Hence SPMetal gives you a functionality where in which you can limit the number of entities generated, the content types for which entity is generated and the fields that are to be included.

This can be achieved by passing a third argument to the above command. This argument refers an XML file which hosts configuration for the lists and fields which are required.

SPMetal /web:http://<ServerName>/<SiteName> /code:<EntityClassName>.cs /parameters: ParamElements.xml 

The above command has an argument named parameters meaning the parameters based on which the entities would be generated. The content of the xml file could be configured as given below:

SPMetal

Parameters XML to be passed as an argument to the SPMetal command

As can be seen in the above xml, it starts with an element named Web. Apart from the reference to the SPMetal command we have an attribute named class. This is an optional value where you can assign a value to the Data context class which is generated through this attribute. Along with class you can also specify the AccessModifier for the Data Context class.

Inside the web element is the List element. The Name attribute specifies the List of which an entity has to be created. Below the List element, is the ExcludeOtherLists element. By using this element we are telling SPMetal that it only needs to consider lists which are mentioned in the List element.

Within the List element is the element for ContentType where we have mentioned the name as Item. Below the ContentType Tag is the ExcludeContentType element which has name attribute set to Folder. This element tells the SPMetal command to exclude the Folder Content Type.

Similarly, inside the ContentType element, we have explicitly mentioned the columns which are required in the form of class properties of the list entity. We have explicitly asked SPMetal to ignore all the columns which are not mentioned in the columns element. The Name attribute in the column element refers the name of the field as it is used in CAML query. The Member attribute specifies the name we want to keep for this column in the entity class. We can have similar  names for the entity classes generated by having a Member attribute at the list level.

The post is based on my understanding of SPMetal until now. Will update it as and when new things arise.

Creating Event Receiver in sharepoint 2010

Sharepoint 2010 allows us to have EventReceiver on a specific list as against all the lists in the site. To achieve this all we have to do is configure the elements.xml file with details specific to the list on which we intend to trigger an event.

Steps for creating a sample event receiver in Sharepoint 2010

1. Create a new project of type Event Receiver in the sharepoint templates.

2. Select Farm based solutions and pass on an appropriate site URL.

3. Choose Event receiver settings

  • In the Type of event receiver select “List Item Events”.
  • Select the list on which you intend to have the event receiver. In my case I am doing it on my custom list named “source”.
  • Select the events on which you intend to have receivers. I have selected one synchronous event “An item is being added”  and an asynchronous event “An item was added”.
  • Click Finish.
choosing event receiver settings

choosing event receiver settings

4. In the solution explorer, open the Elements.xml file which has got created. You will find a “Receivers” tag inside Elements. Note that by default “ListTemplateId” attribute is set to 100 which is used for generic lists.

5. Replace this attribute with ListUrl with value of the url set to the list on which we intent to have receiver.

6. Note that there would be two “Receiver” sections inside the “Receivers” section corresponding to the two events which we had selected earlier. Refer the Elements.xml file as below

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”&gt;
<Receivers ListUrl=”http://<<servername>>/sites/Home/Lists/Source”&gt;
<Receiver>
<Name>EventReceiver1ItemAdding</Name>
<Type>ItemAdding</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>EventHandlerDemo.EventReceiver1.EventReceiver1</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
<Receiver>
<Name>EventReceiver1ItemAdded</Name>
<Type>ItemAdded</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>EventHandlerDemo.EventReceiver1.EventReceiver1</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
</Receivers>
</Elements>

7. Open the EventReceiver.cs file from the solution explorer. You shall have events corresponding to the events which we found in the Elements.xml file.

8. You can have your custom code in these events as per your requirements.

9. For any additional event you can override the event in the code behind (.cs) file and make its respective entry as a new receiver in the Elements.xml file.

10. Thats to it. Your Event receiver is ready to be deployed.

11. Test it by creating an item in your designated list and one item in non designated list.

Joins in CAML Query

Finally in SharePoint 2010, you can have Joins on List using CAML.

Here is an example:

For Test purpose I have created four lists having relation between them. i.e. Cities, Customers, Product and Orders.
The Customers list contains a lookup field pointing to the Cities list to specify in which city a customer lives. The Orders list contains a lookup field to the Customers and Product list to specify who’s the customer of a given order and what product he has ordered. Please make sure you have these relations in place as lookup fields are the basis on which we apply joins in CAML.

1. Declaring List Object: We have created an object of the Customers list from which records are to be fetched.

SPList CustomerList = SPContext.Current.Web.Lists["Customers"];

2. Setting Join Property: One thing you woul notice below is that SPQuery object has been enhanced with a property named Joins.  This is the property which you need to set.
SPQuery CustomerCityQuery = new SPQuery();
CustomerCityQuery.Joins =

“<Join Type=’INNER’ ListAlias=’Cities‘>” +
“<Eq>” +
“<FieldRef Name=’City‘ RefType=’Id‘ />” +
“<FieldRef List=’Cities‘ Name=’ID‘ />” +
“</Eq>” +
“</Join>”;

The “Join” tag has an attribute named “Type”. It specifies the type of join we intend to have. In my case I have set it to “INNER”, the “ListAlias” property points to the list with which we are having this join i.e. Cities.

In my case, I have a lookup column in my Customers list named City which points to the Id in the list Cities. Hence the first “FieldRef” tag has its “Name” set to City  and “RefType” is set to Id.

The second “FieldRef” tag has attribute “List” set to Cities and “RefType” is set to ID signifying the column of the list on which Join has to be implemented.

3. Setting Projected fields: These are fields in joined lists that can be included in the view when one or more other lists have been joined in a query. In my case I have included CityName, State and Country columns from Cities list while creating lookup from Customers. In the below code I am adding CityName & State to the projected fields property of SPQuery.

StringBuilder ProjectedFields = new StringBuilder();

ProjectedFields.Append(“<Field Name=’CityName‘ Type=’Lookup’ List=’Cities’ ShowField=’CityName‘ />”);
ProjectedFields.Append(“<Field Name=’State’ Type=’Lookup’ List=’Cities‘ ShowField=’State‘ />“);
CustomerCityQuery.ProjectedFields = ProjectedFields.ToString();

4. The code ahead is similar to what we have in normal SPQuery operations without joins.
SPListItemCollection Results = CustomerList.GetItems(CustomerCityQuery);
foreach (SPListItem Result in Results)
{
SPFieldLookupValue CityTitle = new SPFieldLookupValue(Result["CityName"].ToString());
SPFieldLookupValue CityCountry = new SPFieldLookupValue(Result["State"].ToString());
Response.Write(string.Format(“Customer {0} lives in {1} – {2}”,
Result.Title,
CityTitle.LookupValue,
CityCountry.LookupValue));
}

This was my first attempt to have joins using CAML for Sharepoint 2010. Will refine this post as and when possible.

Sharepoint – Error in SPWorkflowTask.AlterTask Method

Recently I was working on a Sharepoint workflow.
We had to raise an event from our application form, which would trigger the eventHandler. We had used “OnTaskChange” event for that respective task in the workflow.
There were four different conditions on the “OnTaskChange” event which were segregated based on the If-Else condition.
It such happened that I was able to execute the first three conditions. The control was going to the workflow from the Application page, and I was able to debug the flow and the If-Else conditions as well.
But when I raised the fourth condition, It was not getting executed. After debugging I found that It is not reaching the workflow either.
It was giving “Object reference not set to an instance of an object” error on the

“SPWorkflowTask.AlterTask”

Method. The method basically accepts three parameters,
1. The Task Item
2. HashTable
3. Synchronisation Flag

Interestingly none of the three parameters were Null. Even after searching on the internet, I couldn’t get a break through. I checked the correlation token being set for the task on creation and the one passed “OnTaskChanged”.
After spending a lot of time, one of my colleague told me to check for the values being passed in the HashTable. That was it. Before executing the AlterTask method, the Workflow runtime checks the items in the workflow. If it finds any of the Item from the Hashtable missing, it does not allow the AlterTask method to execute.
In my case too, I was passing a null value for one of my flag, which  was getting checked in the workflow. After setting the flag, the workflow started working as expected.

CAML Queries

CAML is a markup language like html that allows developers to do queries against SharePoint lists, it’s syntax is very easy to understand and it allows to add logical conditions like Where, Contains, And, Or, etc, just like a SQL Query.

For one of our projects we have the need to do a filter on SharePoint views, the problem here is that the view it’s a list containing a CAML Query with the filters the view may have, so in order to filter the view that’s already been filtered before, we need to append our filters to the existing CAML Query.

CAML can be used to do the following:

  • Provide schema definition to the Web site provisioning system about how the site looks and acts.
  • Define views and forms for data and page rendering or execution.
  • Act as a rendering language that performs functions in the DLL like pulling a value from a particular field.
  • Provide batch functionality for posting multiple commands to the server using protocol.

CAML can be used in various ways to customize a SharePoint site, including the following:

  • In script or code that implements members of the SharePoint Foundation object model, where CAML strings are passed through method parameters, assigned to properties, or returned by methods and properties
  • In SOAP messaging that passes CAML strings to a SharePoint Foundation Web service to interact remotely with a deployment
  • In front-end site definitions used to instantiate SharePoint sites
  • In SharePoint Foundation Features to add specific functionality within a particular scope

Query Syntax:

1.       Logical Joins:

a.        And: Elements can be nested inside other And elements. Eg. <And><expression1><expression2></And>

b.      OR: Elements can be nested inside other Or elements. Eg.

<OR><expression1><expression2></OR>

2. Comparison Operator

a.       BeginsWith:  Searches for a string at the start of a column that holds Text of the given value.

<BeginsWith><FieldRef Name = “ColumnName”/><Value Type = “Value”/><XML /></BeginsWith>

b.      Contains: Searches for a string anywhere within a column that holds Text of field type values.

<Contains><FieldRef Name = “ColumnName”/><Value Type = “Value”/><XML /></Contains>

c.       Neq: Arithmetic operator that means “not equal to” and is used in queries.

<Neq>  <FieldRef Name = “Field_Name”/>  <Value Type = “Field_Type”/>  <XML /> </Neq>

d.      Eq: Arithmetic operator that means “equal to” and is used within a query.

<Eq> <FieldRef Name = “Field_Name”/>  <Value Type = “Field_Type”/>  <XML /></Eq>

e.      In: Specifies whether the value of a list item for the field specified by the FieldRef element is equal to one of the values specified by the Values element.

<In><FieldRef Name = “Field_Name”/><Values><Value Type = “Field_Type”/></Values><XML /></In>

f.        Gt: Arithmetic operator that means “greater than.” This element is used similarly to the Eq elements.

<Gt><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></Gt>

g.       IsNotNull: Used within a query to return items that are not empty (Null).

<IsNotNull><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></IsNotNull>

h.      IsNull: Used within a query to return items that are empty (Null).

<IsNull><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></IsNull>

i.         Includes: If the specified field is a Lookup field that allows multiple values, specifies that the Value element is included in the list item for the field that is specified by the FieldRef element.

<Includes><FieldRef    Name = “Field_Name”/><Value    Type = “Field_Type”/><XML /></Includes>

j.        Lt : Arithmetic operator that means “less than” and is used in queries in views. This element is used similarly to the Eq and Gt elements.

<Lt><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></Lt>

k.       NotIncludes: If the specified field is a Lookup field that allows multiple values, specifies that the Value element is excluded from the list item for the field that is specified by the FieldRef element.

<NotIncludes><FieldRef    Name = “Field_Name”/><Value    Type = “Field_Type”/><XML /></NotIncludes>

 

3. Group Operators

a.       GroupBy: Contains a Group By section for grouping the data returned through a query in a list view.

<GroupBy  Collapse = “TRUE” | “FALSE”><FieldRef Name = “Field_Name”/></GroupBy>

b. OrderBy: Determines the sort order for a query. The OrderBy element contains a group of FieldRef elements.

<OrderBy  Override = “TRUE” | “FALSE”  UseIndexForOrderBy = “TRUE” | “FALSE”>

<FieldRef     Ascending = “TRUE” | “FALSE”    Name = “Text” />

</OrderBy>

4. Value Elements

a. Month: Used in the DateRangesOverlap element to retrieve from a calendar all instances of a recurring event that occur within a month.

<DateRangesOverlap>  <FieldRef Name= “EventDate” />  <FieldRef Name= “EndDate” />  <FieldRef Name= “RecurrenceID” />  <Value Type=\”DateTime\”>    <Month />  </Value></DateRangesOverlap>

b. Now: Returns the current date and time.

<Now></Now>

c. Today: Renders the current date in the format that is relative to the server’s local time zone. For servers in the United States, the format is MM/DD/YYYY (for example, 1/21/2001).

<Today  Offset = “Integer”></Today>

d. UserId: Contains the unique ID number of the currently authenticated user of a site, as defined in the UserInfo table of the content database.

<UserID></UserID>

e. XML: Serves as an outer wrapper to denote an XML data island. This element does not render anything by itself.

<XML></XML>

Simple Example:

<Where>

<And>

<Neq>

<FieldRef Name=’Status’ />

<Value Type=’Text’>Accepted</Value>

</Neq>

<Eq>

<FieldRef Name=”AssignedTo”/>

<Value Type=”Integer”><UserID/></Value>

</Eq>

</And>

</Where>

<OrderBy>

<FieldRef Name=’Created’ Ascending=’True’ />

</OrderBy>

*note:- I have tried to collate as much relevant information which I thought would be useful. The information has been sourced from different site on the internet and my own know how of CAML.

File type Integration process

Until now I had worked only Query type or Time based integration processes. Users who have never worked on Scribe might have never heard of these terms. So, just to give readers a brief idea, scribe supports four types of Integration Processes viz.

1. File Type: The event is triggered when there is a new file activity in the event folder.

2. Query Type: The event is triggered when the source query returns some data.

3. Time based: The event is triggered after fixed intervals set by the Console admin.

4. Queue based: This event is triggered when a new data object is placed in the Scribe input queue.

In one of our latest requirements there was a scenario where there were several production machinery which generates different log files from time to time. These logs have information like start time, chemicals used, amount of chemicals etc. These log files would be placed at some predefined folder on the network.

The Scribe packages were supposed to read from these logs and dump the data into staging tables from where other packages would take them for further processing.

Accordingly, we planned to use the ‘File’ type integration process provided by Scribe. Following are some critical aspects which need to be kept in mind.

1. Remote folder location:  The integration process requires the user to input the folder location and the type of file which needs to be read. Typically this is the location which would raise the event and initiate the integration process.

2. DTS reading Location: The DTS which has the file with a specific schema as source, need not read from the same location as the remote folder location used in the integration process. The DTS can be configured to read from a location which is independent of the remote location. This feature comes in handy when the incoming files come with a different file name every time. The integration process will raise event every time a file is placed in the folder. But the DTS will read only from the filename which was entered at the time of development.

This can be handled by copying and renaming the file to the DTS location. This can be achieved using a simple Batch file or a .Net exe. The script/exe can be run as a pre-run process in the integration process.

3. Trigger on regular intervals: It may so happen that more than one file is placed on the remote location at a time. But the DTS is capable to read only a single file at a time. To handle such issues, Scribe integration process has the facility to trigger by itself after a given interval of time. Using this feature and some custom queuing logic the problem of multiple files can be resolved.

MS CRM 2011

The unveiling of Microsoft CRM 2011 was launched at the Microsoft Conference in America last month.  Formerly code named MS CRM 5, Microsoft CRM 2011 will be available as a beta testing release in September 2010.MS CRM 2011

There are a series of excellent enhancements available in Microsoft CRM 2011 including a great focus of integration with Microsoft Outlook.  The new CRM 2011 release will treat CRM data in the same manner it treats Outlook data – Outlook and CRM 2011 will be a much more deeper experience, with functionality including previews and conditional formatting.  This will result in less clicks, user customizations, grouping of records within CRM 2011 and user ability.  MS CRM 2011 certainly will help users to become more focused on CRM and its high achieving results.

There is a new “ribbon” (tool bars and buttons) for Outlook and web browser user that offers great Microsoft Office navigation.

Real time dashboards that can be role tailored, fully contextual and individually tailored – which will offer great management intelligence for sales pipelines, customer service and service and case management. A great success.

Role tailored client has been incorporated to CRM 2011.  Basically it tailors the client (so the users interface and experiences) to the job they do – so that the users get fast access to the information that they need and then are also prevented from seeing data they do not necessarily need to see.

Now in CRM 2011 it will be possible to have developed code as a hosted option – or in the Cloud as many refer to this.

Impressed so far with Microsoft CRM 2011 – well thats not all.

Other successes to this new release include

  • Advanced user personalization creating views and commonly used records by user
  • Inline data visualizations which facilitates the ability to create and share inline charts
  • Flexible goal management where businesses can define key performance and business health indicators providing a great track and measurement tool against key strategies
  • Integration out of the box with SharePoint so they can work together far more easily

These are the initial updates from Microsoft and I m sure that there will be more features to follow  – as soon as we know we will let you know.

*note:- The content of this blog is based on the articles which I read on the net. The images too are copied from the internet.

Records in IFrame from N:N relationships

We had a custom entity “store” which had an N:N relation with contact entity. We had another custom entity named “visit” which had a lookup for “store” and an IFrame named contacts. We were required to display all the contacts which are related to the “store” record which was selected in the lookup field. We had written some javascript code in the OnLoad event of the form. We were able to get records when the “store” had 1:N relation with contact. But it was not working for N:N relation.

Below is the code snip in

if( crmForm.all.new_doorid.DataValue != null )

{

var DoorID = crmForm.all.new_doorid.DataValue[0].id.toString().replace(“{“, “”).replace(“}”, “”);

LinkGrid(“IFRAME_MattressSlots”, 10010, ‘new_new_door_new_mattressslot’, DoorID);

LinkGrid(“IFRAME_Contacts”, 10010, ‘new_new_door_contact’, DoorID);

LinkGrid(“IFRAME_PILLOWS”, 10010, ‘new_new_door_new_pillowsonsite’, DoorID);

}

At first we thought it was an issue with the parameters passed.  The parameters passed are very similar to one to many relationships, except the parameter called “RoleOrd”.

Let’s think the relationship between “Contact” and “Stores”. One contact can purchase products from multiple stores also one store may serve multiple contacts. The “RoleOrd” parameter must be set to “2” in case of an N:N relation. We did set this field but it did not work. We also changed the ObjectTypeId but it didn’t help either.

Finally we got our answer from one of the forums. The solution is that whenever we have an N:N relation, we are required to add a keyword “area” before the relation name, Which is passed as a parameter. So after this change the code looked like:

if( crmForm.all.new_doorid.DataValue != null )

{

var DoorID = crmForm.all.new_doorid.DataValue[0].id.toString().replace(“{“, “”).replace(“}”, “”);

LinkGrid(“IFRAME_MattressSlots”, 10010, ‘new_new_door_new_mattressslot’, DoorID);

LinkGrid(“IFRAME_Contacts”, 10010, ‘areanew_contact_new_door’, DoorID);

LinkGrid(“IFRAME_PILLOWS”, 10010, ‘new_new_door_new_pillowsonsite’, DoorID);

}

This time it worked.

Leveraging IT for inclusive growth

Everybody is talking about India being the second fastest growing economy in the world. We would probably be the third largest economy in the world in a few decades. We are part of the elite group of emerging nations (BRIC- Brazil, Russia, India & China) whose influence in global politics is increasing rapidly.

But is India growing uniformly? Are the fruits of liberalization and high growth reaching every Indian? Is the per capita income increasing at the same pace throughout? In fact are all Indians even aware of this growth? The answer to the above is unfortunately a – No.

Since independence we had a couple of revolutions viz. Green Revolution and White Revolution. They were huge successes in their respective domains.  The green revolution brought with it high yielding variants of paddy, cereals etc. States like Punjab, Haryana & UP benefited from it.green revolution White revolution on its part propelled India to the largest producer of milk in the world. Successful though but these had impact on a section of our population. The others were kept starved from a fair share of this growth.

India now needs more such revolutions to pull its huge population out of poverty. To sustain the high growth which India has been experiencing for last few years, she should be able to turn her huge population to its own advantage. Demographic dividend is what we should be able to reap.

Fortunately in the 21st century we have the tools and the wherewithal which can help us achieve our ultimate dream.

Telecom & Broadband: With telecom penetration in our country reaching to more than 50% level in just fifteen years, it is time we start using this stupendous growth for the advantage of our masses. The thousands of kilometres of Fibre optic can be used to take broadband to the remote areas of the country. The price of hardware too has come down to a reasonable level. Cost of low end laptops have been bought to Rs.1500. Even smart phones & palmtops are now available at reasonable cost. With the advent of 3G and WiMax intelligent applications can be made available on phones and computers at a very low cost.

Inclusive growth

e-Choupal” has made wonders for the thousands of farmers in rural India. Traditionally the middleman use to make most of the profits. ITC Limited has now provided computers and Internet access in rural areas across several agricultural regions of the country, where the farmers can directly negotiate the sale of their produce with ITC Limited. This online access enables farmers to obtain information on mandi prices, and good farming practices, and to place orders for agricultural inputs like seeds and fertilizers. This helps farmers improve the quality of their products, and helps in obtaining a better price.

Similar initiatives can be taken to bring distance education to hundreds of thousands of boys and girls in remote places. Making available various courses so as to make them better equipped for employment. This way we can shift a huge workforce from farming to other allied services.

Broadband and mobile banking can be used to take financial services to the nooks and corners of the country. These initiatives could save financial institutions crores of rupees which otherwise they would have to invest in having physical infrastructure like branches and trained staff. Thus serving people residing in far flung areas would be a more viable preposition. The obvious outcome of these would be financial inclusion.

With the UID becoming a reality in some time, it would be easy to collect information pertaining to citizens. Individuals on their part could get access to services like e-governance and other related services. In our democratic setup, individuals can raise their concerns without going through the bureaucratic red tape.

In simple words, broadband can be a great enabler.

Cloud Computing: The excitement is similar to what it was in the last decade when the Internet was assuming the shape we see it in today. Just as we cannot imagine a world sans the World Wide Web now, the cloud could rapidly change the way we view and use information technology.
A cloud can basically be defined as ‘a standardised IT capability, such as software, app platform or infrastructure, delivered via Internet technologies in a pay-per-use and self-service way’. People have been using the cloud for years. Hotmail, Yahoo, Gmail have been on the cloud for a while now. The difference between then and now lies is just who is using it, and the volume and the type of data that is involved.


Today’s notion of cloud computing is about taking online services to enterprise networks, not just to solitary consumers. This also means that the volume of data that is being processed and stored online is of a gigantic magnitude.
In fact, if we were to break down the services that the cloud today provides, they can be classified into:

  1. Software-as-a-service (SaaS): It comprises end-user applications delivered as a service rather than traditional on-premise software.
  2. Platform-as-a-service (PaaS): It provides an independent platform as a service on which developers can build and deploy customer applications.
  3. Infrastructure-as-a-service (IaaS): It primarily comprises the hardware and technology for computing power, storage, operating systems or other infrastructure delivered as an on-demand service rather than a dedicated onsite resource.

Cloud computing can fundamentally transform government services, scientific exploration and discovery, and economic and social development. For example, the cloud can expand and support an e-government services platform and a research and development platform for eco-friendly services wherever applicable. Companies like Microsoft are completely committed to the cloud, their services and solutions come with the reliability, security and global reach that customers deserve and demand (Windows azure being an example).

Longer term, cloud computing is turning out to bring a transformative change in the business landscape. It is aiding the making of a new generation of products and services, creating a new awareness of the greater Internet, and Web 2.0 in particular, and supporting a more self-service IT architecture. Developers can write basic cloud applications that work in all of the major cloud platforms so as to achieve interoperability.

This is just the beginning. New and additional standards will emerge as new and inventive scenarios develop from evolving platforms, standards and technologies. But this will work well and in our favour only if we make technology both personal and democratic.

In the Indian context, cloud computing holds greater potential because of an obvious reason: we have no legacy systems that need to evolve or move into the cloud. For instance, both our state and central governments are in the process going digital, and the time is just right to implement the cloud right off. While keeping costs low, the cloud will not just put an efficient document management system in place, but will also ensure efficiency in service delivery.     So, yes, cloud computing is an Idea whose time has come.