Saturday, December 12, 2009

MS SQL Server Managerment Objects (MS-SMO) - Using SMO

The SMO namespace is implemented as a .NET assembly using which you can include all SMO functionality in your .NET application. The SMO namespace is Microsoft.SqlServer.SMO and is located by default in “C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies” directory. It is installed with the client tools of SQL Server 2005 and requires Common Language Runtime (CLR) to be installed as well. The assemblies required to work with SMO in managed environment are:
  • Microsoft.SqlServer.ConnectionInfo
  • Microsoft.SqlServer.Smo
  • Microsoft.SqlServer.SmoEnum
  • Microsoft.SqlServer.SqlEnum
Other assemblies present in SMO can be used as and when required.

SMO can be used even in an unmanaged environment, as there exist the COM wrappers around the SMO classes. The SQLSMO.dll and SQLSMO.tlb files enable the SMO to be used with unmanaged code.

SMO Classes

The SMO Object Model Contains two types of classes: Instance Classes and Utility Classes. Each of them is discussed below in details.

Instance Classes

SMO Instance Classes contains the SMO Objects in a hierarchy that matches the hierarchy of a database server. At the top of the hierarchy is the Server Instance class that represents a SQL Server instance, and under it there are other classes in hierarchy representing the other objects of the database such as databases, tables, columns, indexes, stored procedures, etc.

A sample hierarchy of Instance Classes is depicted in the figure below:


Utility Classes

SMO Utility Classes are meant for performing some specific task, being independent of the SQL Server Instance. Lists of tasks, which can be performed using these utility classes, are:

  • Generate Database Scripts
  • Backup / Restore Databases
  • Transfer Database Schema between database instances
  • Administering the Database Mail subsystem
  • Administering the SQL server Agent
  • Administering the Service Broker
  • Administering the Notification Services

Friday, December 4, 2009

Thank you iPhone & Android Access Bollywood users!!


It’s been nearly a week since we launched the Bollywood gossip app “Access Bollywood” on iPhone and Google Android. Darshana and I are pretty impressed with the adoption of the app in the market place. Thanks for downloading the app!!

During such short time we also received quite a number of feedback on the app with request for new features/ enchantments. Thank you iPhone and Android users for such an awesome feedback. Please keep giving us feedback to make the app to better meet your needs. We are working hard to get the requested features out; hopefully the app is approved quickly ;)

Special Thanks to AndoridHD who made a really cool video of Access Bollywood.



Thanks for your support guys!

Stay tuned with us on Twitter

@A
ppKettle
@vishalchordia

Monday, November 30, 2009

Access Bollywood for all Bollywood Lovers

Last Thursday on Thanksgiving, we launched our Bollywood Gossip App “Access Bollywood” on iPhone, Android and Facebook platforms.

Access Bollywood is an app for all those Bollywood fans who love to know about the latest gossips going around the Indian Film Industry. The app enables users to peek into their favorite Bollywood Actors and Actresses stories. Apart from News it also gives updated information on the Box Office and New & Upcoming Releases of Bollywood.

With Access Bollywood, we tried to provide users with an elegant interface to browse through the latest stories, movies and Pictures of their favorite celebrities. In brief, main features of the app include:


  • Access latest Bollywood Gossip and easily share with your friends over social networks
  • Know the latest movie releases, upcoming movies and box office list
  • Browse thousands of Bollywood celebrities pictures and download your favorite pictures right on to your phone
  • Read the latest Bollywood News in quick to read news format



If you are a Bollywood fan and want to be updated with all Bollywood happenings it's the right app for you to download.

For all iPhone lovers you can download the App at AppStore or by searching “Access Bollywood” on AppStore.


For all Android lovers you can download the App at Android Market by searching “Access Bollywood”.



For all Social Media freaks, download the Facebook app “Access Bollywood”.

I hope you enjoy the app!!

Thursday, October 29, 2009

MS SQL Server Managerment Objects (MS-SMO) Introduction

Microsoft has introduced Server Management Objects (SMO) with SQL Server 2005 that enhances the capability of Distributed Management Objects (DMO) of the earlier version of SQL Server. In SQL Server 2005, DMO is abandoned in favour of SMO. It allows managing the database server programmatically, and is compatible with the earlier versions of SQL Server (2000 and 7.0). However, SMO cannot be used to manage databases with compatibility level 60 and 65. The only functionality that SMO doesn’t offer as compared to DMO is that, replication objects are not included in SMO. Instead, there is separate Replication Management Objects (RMO) that exists for replication in SQL Server 2005.

To enlist few of the tasks that you can do with SMO are:
  • Connect to Database Server
  • Create Database
  • Drop Database
  • Backup Database
  • Attach / Detach Database
  • Copy Database Objects
  • Create / Edit / Drop Objects (Tables / Views / Indexes / Stored Procedures / etc.)
  • Create / Edit / Drop Relationship between tables
  • Generate Scripts
  • Handle HTTP and SOAP requests using EndPoints objects
The list still goes on. It’s almost everything that you can do in a Server; you can do it through SMO. In addition, the Capture Execution feature in SMO is an interesting new feature that allows capturing scripts for later execution. For example, suppose you have a section of your code that creates a database or table, adds an index, populates data, for example, in an installation routine. After testing, you can actually use SMO to capture this as a script for later execution, or on a separate server.

continued...

Monday, August 24, 2009

Naming Conventions for SQL Server 2005

Simple rules for naming Objects in SQL Server 2005:
  1. Do not use any spaces in object names: With SQL Server it is possible to have such names by enclosing these in square brackets [and], but are not recommend as you may miss them out and end up in failure quite often.
  2. Avoid using reserved words: Even if the word you use doesn't cause an error, it will still cause confusion when someone is editing code and Query Analyzer applies color highlighting to table or column names.
  3. Start object names with a letter: Several applications like Enterprise Manager, Query Analyzer, DTS, VBScript, Visual Studio may cause problems when accessing objects with name starting from numbers.
  4. Keep names short but meaningful: This is self-explanatory and fairly logical, as there may be table name either ridiculously long, making it cumbersome both to type and to commit to memory, or abbreviated to the point of utter confusion. "SlQ" is too short. "SalesFiguresForCompanyByFiscalQuarter" is just silly.
  5. Avoid Hungarian notation*: The name of the object should make it pretty obvious what type of data it contains, and if for some reason it does not, then there is always the metadata tables and/or the documentation you should have written when designing the system. Using datatype-style prefixes for columns like IContactID (integer) and VEmail (varchar) not only make the column names harder to read, they also make them less flexible.
  6. Use CamelCasing instead**: Using a standard convention like CameCase for naming all the objects can help in maintaining consistency in object names.
  7. Use the dbo. Prefix: When you are logged in as a non-dbo user, and you create a table without giving it an owner prefix, other users won't see it, because it is stored in the system as you.objectName instead of dbo.objectName. If you consistently use the dbo. prefix, you will eliminate the possibility of creating the same object name twice, with different owner names.

*Hungarian notation:
Hungarian notation is a naming convention in computer programming, in which the name of a variable indicates its type or intended use. In Hungarian notation, a variable name starts with one or more lower-case letters which are mnemonics for the type or purpose of that variable, followed by whatever the name the programmer has chosen

**CamelCasing:

CamelCase is a writing convention in which words are combined by taking out the spacing in between and capitalizing the first letter of each word, such as CamelCase. The name is derived from the idea of the capital letters being reminiscent of humps on a camel's back. The CamelCase convention is used in computer systems in which naming require words to be contiguous. With CamelCase, words are readily distinguished and names more easily read.

Naming Conventions for SQL 2005:


*Do not use prefix sp_ for stored procedures. SQL Server searches for system stored procedures first when it encounters the sp_ prefix. Another reason- if Microsoft decides to rename all system stored procedures using the prefix to identify the system stored procedures, yours too would get renamed (since it has the same prefix) causing your application to fail.

Saturday, August 22, 2009

Setting-up T-Mobile Data Service on iPhone

Today i was trying to get my t-mobile data service on iPhone. Well let me tell you it is small processes. I called up t-mobile and told them that i need to get data service on iPhone. The representative transferred me to special technical support.

The special technical support rep Jacie Ross, told me that data service will cost $24.99 on iPhone. Once i accepted the fees, she went through the below steps and there my data service was switched on right away. Also with this data service i can now access any T-mobile hot-spots on my phone and laptop for free. isnt that awesome. its definitely has value.

  1. From the Main Menu, tap Settings.
  2. Verify that Wi-Fi is set to Off or Disabled -- this will ensure that no wi-fi signals are interfering with your Internet access. To take advantage of local wi-fi at a later time, feel free to go back and turn this setting On; just make sure to turn it Off again when you are done using the wi-fi network.
  3. Tap General Settings, then tap Network.
  4. Turn Data Roaming On -- this will allow your iPhone to locate T-Mobile’s data network.
  5. If you see a setting for 3G, turn it Off -- the iPhone cannot currently connect to T-Mobile’s 3G network, and this setting will interfere with its attempt to connect to our EDGE network for service.
  6. Tap Cellular Data Network (this setting may be labeled EDGE instead).
  7. In the APN field, enter internet2.voicestream.com -- this tells T-Mobile which version of our Internet network you want to connect to.
  8. Leave the Username and Password fields blank -- T-Mobile will assign this information based on your SIM card information.
  9. Return to the Main Menu and open Safari to browse the Internet.

Note: if you are taking you sim card from a blackberry (with data service) and insert into the iPhone, the data service will not work. You need to get the $24.99 plan, and t-mobile will close your blackberry/other data service plan. Your log-in info for t-mobile hot-spot: your ten digit number and password: last 4 of your social.

Thanks to T-mobile Support representative Jaice Ross, she was very kind, very helpful and made me valuable for being a t-mobile customer. I like t-mobile customer support!

Tuesday, August 18, 2009

Connecting to .NET web service from Android

If you are having trouble using .NET Web Services with the Android Platform, you have probably reached to the solution here.

I am here demonstrating the steps using which you can consume data from the .NET web service in your android app. In order to use .Net web Service from your android application you need to first download the ksoap2 android API. Follow the link to download ksoap2 API for android.

After downloading the API, extract the zip file to the file system. Open your Android Project and navigate to the Project Properties. In the project properties go to Java Build Path and say Add External JARs.

Add the reference to the extracted ksoap2-j2se-full-2.1.2.jar file from the downloaded API. You are now ready to use ksoap2 to connect to the .NET web service via Android.

Let’s assume a .NET web service with two methods “Hello World” that returns a string and “Add” that accepts two numbers and returns their sum. Following is the WSDL file of the web service.

From the above WSDL file we get the following Information about the web service:
  • NameSpace: http://localhost/TestWebService/
  • Web Service URl: http://TestServer/Test/Service.asmx
  • Method “Hello World” SoapAction URL: http://localhost/TestWebService/HelloWorld
  • Method “Hello World” Output Type: String
  • Method “Add” SoapAction URL: http://localhost/TestWebService/Add
  • Method Hello World Input Type: Int, Int
  • Method Hello World Output Type: Int
In order to use this Web Service with our android app:
  1. Open the java file from where you would like to access the Web Service

  2. Include the class library for ksoap2

    import org.ksoap2.*;
    import org.ksoap2.serialization.*;
    import org.ksoap2.transport.*;
    import org.w3c.dom.Text;


  3. Define Web Service Properties in the class

    private static final String NAMESPACE = "http://localhost/TestWebService/" ;
    private static final String URL = " http://TestServer/Test/service.asmx";
    private static final String HelloWorld_SOAP_ACTION = "http://localhost/TestWebService/HelloWorld";
    private static final String METHOD_NAME1 = "HelloWorld";
    private static final String Add_SOAP_ACTION = "http://localhost/TestWebService/Add";
    private static final String METHOD_NAME2 = "Add";


  4. Add methods to call the web service methods and retrieve the results

    public void GetHelloWorld() {

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME1);
    SoapSerializationEnvelope envelope =
    new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

    try
    {
    androidHttpTransport.call(HelloWorld_SOAP_ACTION, envelope);
    java.lang.String receivedString = (String)envelope.getResponse();

    }
    catch(Exception e)
    {
    }

    }
    public void GetAdd() {

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME2);

    PropertyInfo num1 = new PropertyInfo();
    num1.setName("a");
    num1.setValue(5);
    request.addProperty(num1);

    PropertyInfo num2 = new PropertyInfo();
    num2.setName("b");
    num2.setValue(9);
    request.addProperty(num2);

    SoapSerializationEnvelope envelope =
    new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

    try
    {
    androidHttpTransport.call(Add_SOAP_ACTION, envelope);
    java.lang.Integer receivedInt = (Integer)envelope.getResponse();

    }
    catch(Exception e)
    {
    }

    }


  5. If you app require access to an array, you can use the following code:

    ArrayList<String> a = new ArrayList<String>();
    try
    {
    androidHttpTransport.call(SOAP_ACTION, envelope);
    java.util.Vector<Object> receivedStrings = (java.util.Vector<Object>)envelope.getResponse();
    if(receivedStrings != null)
    {
    for(Object curStrings : receivedStrings)
    {
    a.add(curStrings.toString());
    }
    }
    }
    catch(Exception e)
    {
    }

I hope the above steps helps you if this is what you are looking for.

Monday, June 1, 2009

Facebook Application Measurement and Analytics

FYI- I had written this post for Omniture last week. Re-posting it here:

Facebook has drastically changed how people interact on web and how they consume information. Currently Facebook has over 200 million users and more than 70% of their users engage with one or more of the 52,000+ Facebook Apps. Marketers are now building interactive Facebook applications to reach out to and engage new customers. With that comes challenge of measuring and tracking the effectiveness of Facebook Applications.

On May 28, 2009, Omniture announced
App Measurement for Facebook, enabling marketers to track and measure their Facebook apps within the SiteCatalyst reporting interface.

Implementation

Once you have downloaded the App Measurement for Facebook tag, you will find that the tag is similar to SiteCatalyst JS tag.


A common request of online marketers is to better understand and target social users with the right message. Many would be interested in reporting on app users’ information like “Network,” “Gender,” “City,”, “# of Friends,” “Interests,” etc. This information can be easily reported with the help of Facebook APIs and
populating the API call value into SiteCatalyst variable tags.

Once you have figured out the metrics you want to measure, now simply just populate those in SiteCatalyst variables (eVars and sProps) and paste the code into app pages. Yes, it is that simple.

Key Answers every Facebook App De
veloper is looking for:


SiteCatalyst helps online marketers uncover key questions like: How is the app performing, what is the adoption rate of the app, how viral is the app, which user segments are adopting the most, what kind of social activity app users are performing, how many app invites users have sent to their friends, what kind of content app users interact most with, and how is the app impacting web events like conversions.


Adoption Rate and Social Activity: Online marketers can segment users by number of friends they have and categorize these segments by the social activity performed to better understand adoption rate.


App virality: Measure the number of users who have invited their friends to add an app enables marketers to understand how viral the app is amongst users.


App Content being engaged: Understand the features that Facebook app users are spending the most time with and identify potential improvements for these sections of the app.


Conversion/Web events: Understand how Facebook app users are converting, enabling online marketers to improve conversions.


Full documentation on the App Measurement for Facebook code is available within SiteCatalyst by going to Help > Help Home, then selecting Supporting Docs > Manuals from the left navigation menu.

Omniture SiteCatalyst is leading the way in innovation with social media measurement and you may be surprised with the marketing channels you can now measure with SiteCatalyst. Find out more by talking to your Omniture account manager or Client Care agent.

Find me on twitter: @vishalchordia

Thursday, May 28, 2009

Retrieving information from RSS in .NET

In my earlier post I discussed on the overview of the RSS (Really Simple Syndication) Feeds and how it can be used by any user as a source of information. Today am going to talk about how as a developer you can utilize these RSS for fetching certain information for your application. Yes you can retrieve and use the information provided by these RSS feeds, depending upon what information is provide in the RSS.

Before starting to use RSS to retrieve information, let’s have a high level look on the RSS format. RSS is defined as a XML based Data structure, as shown in a sample below:

<rss version="2.0">
<channel>
<title>Composed Crap</title>
<link>http://composedcrap.blogspot.com</link>
<description></description>
<item>
<RSS for .NET Developers</title>
<link> http://composedcrap.blogspot.com/2009/05/rss-for-.Net-developers.html </link>
<description>... content of the RSS feed... </description>
</item>
</channel>
</rss>


For more details on the RSS structure, just google for it and I am sure you will find more detailed description.

So you know this information provided by the RSS since is in XML format, can be parsed easily to fetch the required details. Well, you don’t have to take the pain of parsing. Just download the ASP.NET RSS Toolkit from http://www.codeplex.com/ASPNETRSSToolkit and you are ready to go.

Once you download the Toolkit, add reference to the RSSToolkit API you just downloaded in you .NET Project where you want to retrieve the information from the feed.

Here is the code for retrieving the feed items from a particular feed site, I am using ComposeCrap RSS here as an example:

//Retrieve the RSS from the site and load it into the RssDocument
RssToolkit.Rss.RssDocument rss = RssToolkit.Rss.RssDocument.Load(new System.Uri("http://composedcrap.blogspot.com/feeds/posts/default"));
//For each Item in the RSS retrieve the description and wite it on the console
foreach (RssItem item in rss.Channel.Items)
{
Console.WriteLine(item.Description);
}


Now there are many RSS providers that do not provide the complete description of the feeds. In that case if you want to retrieve the complete description of an item, check for the tag
<content:encoded> in the XML source of the feed. You can see the XML source of the feed through page source of the feed web page. This is because some sites do not provide the complete information in the description of the feed but however they want to publish the complete information through the feed that can be used by others (not reader).

Note: If a site does not provide the complete description of the feed items, it is not necessary that the content will be available <content:encoded> through tag. If the RSS site does not provide the complete information by either way you cannot retrieve the complete details using just the RSS toolkit.

To retrieve the information from the <content:encoded> tag, you first need to add the Encode information to the RSS Toolkit.

  1. Open the RssToolkit solution from the Source folder of the downloaded toolkit.
  2. Open the RssItem.cs file and add the following property:
    private string _encode;
    [XmlElement("encoded",Namespace = "http://purl.org/rss/1.0/modules/content/")]
    public string Encode
    {
    get
    {
    return _encode;
    }
    set
    {
    _encode = value;
    }
    }
  3. Build the RssToolkit project and update the reference in you .NET project which is referencing the RssToolkit API.
  4. After updating the reference, in the RssItem object, you will be able to access the property Encode, which provides the complete description of the item.
    RssToolkit.Rss.RssDocument rss = RssToolkit.Rss.RssDocument.Load(new System.Uri("http://www.bollywoodz.net/feed/"));
    foreach (RssItem item in rss.Channel.Items)
    {
    Console.WriteLine(item.Encode);
    }
If you are looking to use information from any RSS in your .NET application, go ahead and start using RSSToolkit for .NET following the details above.

Sunday, May 17, 2009

RSS (Really Simple Syndication) Overview

Everyone here wants to be updated; updated with the information, updated with what’s going on, updated in their subject of interest, updated with where the world is heading towards; as it’s the key thing for your decision on your future actions. But the question is from where do you bring in all these data to be always updated? Quick answer on your mind “INTERNET”, an invaluable source of Information with anything and everything you want. Agreed! But here is the challenge with digging information in the Ocean of Internet.

As a traditional user of Internet, Lets say I log into 10 sites, and of which may be 3 sites give me the information that I was really seeking for. Thus, the time I spent visiting the other sites and searching for the content was just in vain. We as Users,

  • Can’t Always spend hours searching
  • Don’t have time to visit number of sites to read the good info
  • Email is Overwhelming
  • Can’t remember to visit all sites religiously daily.
Here comes the role of RSS, the information that arrives to you, rather than you going to seek for them.

With RSS you can subscribe to the contents of various websites at a single place, the “Reader”. The content you subscribe to is called a “Feed”. Any updates occurring to any of your feeds will be updated to your Reader as soon as the changes occur.

To subscribe to any site you need to first go and sign up with any of the Reader Sites like, www.google.com/reader, www.bloglines.com, www.newsgator.com, http://my.yahoo.com/, and there are many more in the list.

After you signup, to subscribe to any of the site that you want to get updates from, click on Add Subscription or Add Content link as shown below:

A sample of my Google Reader looks like:

where on the left hand side is my list of subscriptions while the right hand side shows the updates from the selected subscription sites.

Every time after you read a particular item from the feed, the item is marked as Read by the Reader, as it happens on your e-mail. Isn’t it so convenient when you know the items that you have already read and not search more into it?

Not only can you subscribe to a particular news site, or blog. You can subscribe even to a particular topic about which the information is scattered at multiple places on the internet. To do that Yahoo Pipes can be the most useful tool for you. Follow the following steps to get a subscription for a particular topic:
  • Open the Social Media Firehose pipe on yahoo pipes http://pipes.yahoo.com/pipes/pipe.info?_id=f1ae63990f6d5b9e48ce807a77bb9995
  • In Search for comma separated terms type in the topic you want to search for with “Quotes”
  • You can filter the result on the basis of location and can even block any particular URL if you want to
  • After you provide the valid parameters, click on Run Pipe and it will bring you the result for the topic from all the possible locations on the internet
  • Once you have the result from the Social Media Firehose, click on Get as RSS on top of the result. It will take some time to generate the RSS, say a couple of minutes, so be patient. You don’t have to do that always :)
  • The above step will launch a page with the URL of the following format: http://pipes.yahoo.com/pipes/pipe.run?_id=f1ae63990f6d5b9e48ce807a77bb9995&_render=rss&terms=%22RSS+Feeds%22
  • Copy the URL and Subscribe to it on your Reader. The subscription to the specified URL will bring you any updates on the topic you searched for on your Reader.
So subscribe to your favorite Sites and Topics and Enjoy reading.

Thursday, May 7, 2009

should I charge for my iPhone app or Run Ads?


Research Brief just released a report giving some insights on Mobile App market (especially iPhone):

• 24% of Smartphone users have spent anywhere from $10-$50 for a single application,
• 28% have spent between $5-10 on a single app.
• 86% of iPhone owners have paid at most $.99 - $9.99 on a single app
• 83% of these iPhone owners have downloaded at least six

The question for most app developers and marketers is always run into is to make the App free or charge for it? Bottom line developers are seeking higher ROI.

Let’s look how consumers think. Most of the consumers love stuff for free or for cheap. They don’t give a crap about developers, effort and money. However, a recent claim from PitchEngine claims that $5 is not too much for a smart App download. Note the word *not too much*- i.e. only 28% of Smart phone users.

Now let’s explore other option. Have the app for free and earn from advertisement? Basically you are hoping that users will love your content and interact often with app. But most of iPhone users get bored or stop using as frequently in a short while, so now developers are struggling to get pageviews for their app.

At the end it comes down if your app usage going to be high? Does your app has a social and viral effect? Does your apps sends out alerts to users with information which is personal customized to their taste? If yes then I would choose to make the app free or really cheap So that you can keep earning on ad impressions and clicks.

Well if the app is cool and interesting I would choose to charge for the App between $0.99 to $3.99. Assuming that the app has great UI, a good information user is looking access and fun for bit so that users don’t think they got ripped off. I would strongly recommend having Analytics on your app, to better understand your user behavior to make your app stickier.


I am not sure if this holds the same for AppWorld, OviStore and WebOS. Since other mobile platform is just does not make me to browse through the virtual store to shop for Applications (hope OviStore and WebOS would be better than AppWorld when they are out). Well iPhone atleast just makes me to check the virtual Store to check what’s new and cool. Android G1 once while makes me to go check out some apps, not as much as iphone.

Note: This blog post is target to individual developers who has full time or in school and building apps on side. Not for professionals or cooperates.
FYI – I use a BlackBerry, G1, Nokia and the iPhone.

Find me on Twitter @VishalChordia

Monday, May 4, 2009

Wish of list of a web2.0 marketer?

Recently Forrester Research just estimated that social media marketing spend is expected to grow from $455M in 2008 to $3.1B in 2014. There are over 450 million users when you combine the users of major social networking sites -Facebook, MySpace, Twitter, Orkut and Hi5. With such extraordinary growth opportunity in social media there are some new unique challenges for marketers with content promotion and measurement.

In today’s web2.0 world the goal of every marketer is their content to have it own legs and spread as far as possible across social media channels. With that come the challenges of measuring the impact and effectiveness of their campaigns.

Marketers are wondering what if I could segment my social media viewer/users by age, gender, network, school, number of friends they have, and the city they live to understand how they interact with my content and what kind of action is triggered in each of the segments. What if I could get some insights to the path or events which led viewers/users to conversion or acquisition? Wouldn’t it be great if I could correlate my social media metrics with my conversion and acquisition events with other online channel such as Web, Mobile, Video, etc. to get a complete 360 view? Wouldn’t it be great if I could measure all my social media channels asily without any additional complexity?

Well stay tuned to my blog post in coming weeks to know learn about the solution which will help you answer all above questions.

-Vishal

Wednesday, April 29, 2009

Traditional Marketing Tactics are Dying, (But the Future is Bright…)

Until few years ago, corporations could largely control their public corporate message. With the emergence and rapid high growth of social media, that control has been decentralized from corporations. Now most of us think that we are in an apocalypse with social media trying to take over just about everything in the world, from politics to corporations, media to shopping, and friends to personal life and we are losing control in just about in everything.

Here are a few examples of various corporate points-of-view about the downside of social media.
Marketers are watching customers shout out new product messages, advantages, disadvantages, capabilities and limitation over Twitter, messages boards, Facebook, Linkedin and other social sites without their consent or control.

Product Managers feel they are losing control and privacy of their product road maps. Customers are openly discussing potential enhancements, current limitations, new features sets, etc. Product managers are afraid customers are revealing their secret product road map to the benefit of their competitors.

Support Agents and Consultants fear customers not getting accurate information from the online community.

Analysts fear diminished credit as customers are now publicly writing competent reviews, for free!
Welcome to the age of Social Media & Web2.0 where those you can’t control have as much, or more, say about your organization and its offerings. Not unlike the way the print media was once considered the 4thbranch of the government, the public online masses are now, for better or worse, the new team in your marketing department.

Open-Source Marketing
Open your marketing department and welcome your customers to your open community. Customer’s comments, messages and promotion are more authentic and believable than those that come from within an organization. They’re based on their intimate knowledge of the product, not crafted in the often “too slick,” and sterile corporate fashion. They are not concerned with meeting corporate message structure or including the new messaging of the marketing team.

Open-Source Product Management
Most businesses spend a ton of time and money understanding how their customers are using the product, and what the right enhancements are to be made. With social media, your customers are openly discussing your product, giving you their ”wish list” for free . Indirectly, they are your product managers guiding you directly to what they like and what are the willing to pay for.

Open-Source Customer Support
The aim of consultants and customer support is to provide excellent service to their customers—to solve their problem and help them better understand how to take better advantage of the products. Today, customers are helping each other online, enabling customer support to focus on much larger problems and equip their community of product supporters with even better information to help other customers.

Apple is one of the few organizations who have gotten the social marketing strategy right. They have a massive network of customers standing by at all hours, ready like an Army of soldiers to jump into an argument or issues they consider to be unfair to Apple. Organizations crave to have fans like Apple’s, but they’re afraid to open the doors to welcome this new generation of customers out of fear of losing control.

Many Internet experts anticipate a day when social networking sites take over the search engines and become the preferred form of online advertisement, that day is not that far.

With this, the new challenge for organizations is to measure the effectiveness of social media efforts, brand monitoring, real time in-sight into customer communications, sentiments and actionable data for next steps. That will be the topic for my upcoming series of blog posts. To be continued…


Tuesday, April 7, 2009

MS SQL Server - Index Internals III

Today’s discussion continues on the different types of Indexes available on MS SQL Server.

U
nlike from my previous example of index on the back of an Atlas, which normally has one index, a table may have multiple indexes. These indexes can be defined on one or more columns of the tables. The two major types of indexes in SQL Server are Clustered and Non-clustered Indexes.

Clustered Indexes: A clustered when defined on a column of a table, the data of the table in the data pages are sorted in order of the column on which index is defined. This
column is referred as an Index Key. Since the data is sorted physically on the disk, the leaf page of the index pages are the data pages of the table.

Inserting a new row in a table with clustered index defined, SQL Server ensures that the row is placed in the correct physical location in key
sequence order. Structure of the Clustered Index is as given below:Non-Clustered Indexes: A Non-clustered index contain only the index key (column on which non-clustered index is defined) and a reference to find the data. The items in the index are stored in the order of the index key values, but the information in the table is stored in a different order (which can be dictated by a clustered index). If no clustered index is created on the table, the rows are not guaranteed to be in any particular order.

Non-clustered index structure is depicted as: At any given level in the index, the pages are linked together as shown in Figure below, and this is true regardless of whether the index is a Clustered index or a Non-clustered index.
Both the clustered and non-clustered indexes can be defined on one or more columns of a table, to serve the frequent database queries. However there can be only one clustered index defined on a table while there can be 249 non-clustered indexes created on a table.

Thursday, April 2, 2009

MS SQL Server - Index Internals II

Following to my earlier post on how SQL Server stores and access data, lets now get into details of what Indexes and how are they processed by SQL Server for improving performance.

As per the definition “An Index is a pointer to data in a table”. Here when we say pointer it’s not much different from the pointers that we access in programming language like C/C++. If you have worked with pointers, you know that “A pointer is used to store the location of a variable or we say a Data Member”. Similarly in SQL Server an Index stores the locations of the data rows of a table and occupies a discrete memory in SQL Server.

Index is stored separately from the table for which the index is created. When an Index is defined, the Index pages are created by SQL Server to store the address of the data rows, based on the Indexed column. These Indexes are linked to each other in a B-tree structure. Let’s consider a table products with the following structure and data inserted in following order in data pages:


Now Suppose an Index is defined on the UnitPrice field of the table. The Index Pages will be defined for the table as shown below:


SQL Server uses these indexes to find data quickly when a query is processed. Indexes can be created or dropped with no effect on the data, as it is stored as separate entity from the table. Indexes operate 'behind the scenes' in support of the database engine to improve the performance of data retrieval.

Consider the following query on the products table above. This query retrieves products in a specific price range.
SELECT ProductID, ProductName, UnitPrice FROM Products WHERE (UnitPrice > 4.5) AND (UnitPrice <10)
If there was no index defined on the table, a table scan will be performed to find the products with price ranging between 7.5 and 10. There will be 24 iterations (navigating through each row) to find the required result.

With an index defined on the UnitPrice field, navigating through the Main Index Page, the query can be served in 4 iterations. Hence you can distinguish the remarkable difference an Index can make in the performance of a query.

Later in the tread I will be talking about the different types of Indexes in SQL Server.

Wednesday, April 1, 2009

MS SQL Server - Index Internals I

I dedicate this post of mine to my most interesting subject of MS SQL Server – Index Internals, for everyone interested in getting a depth of how Indexing in SQL Server works.

While running a query in SQL Server, many of them wonder at times “why particular query performs so terrible while the other is just fine”. One of the key factors that can affect a query performance is the Indexing available on the related tables.

Best possible way to recognize how index can benefit queries and what would make things worse; is to understand how SQL Server processes these indexes internally.

Let us dive into the details of how SQL Server stores and access data in database.

SQL Server can store data in two ways:

  1. In Heap: The Order in which the data is inserted is stored in the same order in the data pages of the table.

  2. Order of the Clustered Indexed Column Key: The data is added to the data pages of a table sorted in the order of the column having clustered index. Index Pages are added for the table to store the indexes.
These data in SQL Server can be accessed in two ways:

  1. Table Scan: The data in the heap is accessed by scanning through each row in the data pages of the table to serve a query request.

  2. Using Indexes: With the help of Indexes, SQL Server scan through the Index Pages using B-Tree traversing algorithm to arrives to the resultset in the data pages. Index scan helps SQL Server to search data in the table in a similar way as we scan through the Index page of an Atlas to find a location on the book.
Below is an illustration to help you understand the data storage and access in the SQL Server database:
  • Let us have two tables, TableA and TableB that collect names of the students, with the field Name.
    • TableA stores the data in the Heap
    • TableB has a index defined on the field Name

  • The data in both the tables are entered in following order: John, Sam, Anna, Denial, Rudd, Andrew, Samantha and Brown.



Later in this topic I will be discussing in detail what the indexes are, how they are stored in SQL Server and how it help in improving the performance.


continued...

Monday, March 30, 2009

Holi 2009 - Salt Lake City, UT

Last Saturday I have been to a Holi festival in Salt Lake City at Sri Krishna Temple. In India, Holi announces the arrival of spring and the passing of winter that people celebrate with colors. When we reached the temple, the ambiance of the whole place did make me feel at home in India. There were about 15,000 people gathered for the celebration, all painted with the colors, enjoying with friends and family. I didn’t expect the event to be so huge and it really surprised me to see the fondness of the Indian culture among the westerners.

There was a band playing Hare Krishna in the middle of the ground with people chanting and dancing along on the rhythm. Everyone seemed to be enchanted with the colors of the festival, throwing colored powder at anyone and everyone around them.
A glance from the event:



The only thing that let me down in the event was the food. I was expecting a delicious Indian meal at the festival, but it turned out to be appalling. It didn’t taste to be Indian at all.

Apart from the food, I enjoyed every bit of the event and expect to see more of the events as this coming up in the future.

Friday, March 27, 2009

Set up environment for building Orkut app on Eclipse

If you planning to start developing app for Orkut and have no clue on from where to start. Here is where you can go ahead with. I was setting up the environment today to develop Orkut app using Eclipse and sharing here my experience with all the steps gathered at one place.

First of all, if you have read my intro blog, I am not at all a JAVA person. So you might be wondering why Eclipse? That’s because, I cannot use .NET to develop Orkut apps. But I know C# and in my school have learned core java, so I hoping that it would be bit easier to work with Eclipse.


To start with the first thing that I need to have was Eclipse set up on my PC. I had Eclipse already installed on my PC so can proceed. If you don’t have it already installed you can download it here.

Once you have Eclipse set up, follow the following steps to set up an environment for Orkut app development:

  1. Open Eclipse IDE
  2. Open Software Updates dialog from Help -> Software Updates
  3. Go to the Available Software tabs and click on Add Site button on right.
  4. Specify the Location as http://m2eclipse.sonatype.org/update-dev/ and click OK.
  5. After you add the site, you will see the plug-in Maven Integration for Eclipse Dev Update Site item added to the Available Software list.
  6. Select Maven Integration from the list and click Install
  7. Follow the steps for installation and restart Eclipse after the installation.
  8. After you restart Go to the Software Updates dialog again and add site http://opensocial-development-environment.googlecode.com/svn/update-site/site.xml.
  9. Follow the same steps as done for Maven Integration for Eclipse to install the Open Social plug-in.
  10. Restart Eclipse after the installation.
Following the above steps will make your Eclipse IDE ready to develop Orkut Applications.


To try out a sample Orkut App project, check out http://code.google.com/p/opensocial-development-environment/wiki/QuickStart

The developers guide for creating Orkut Applications is available here.

Add to Technorati Favorites

Tuesday, March 24, 2009

Darshana Bafna - First Post - "Should I?"

Hey there- As this is my first blog I hope you guys are supportive. It just came to me that I should share my knowledge and experiences, professional or personal here.

Here is little about me, so that you can determine if are interested in my blog:


Professional:
I am a Software Engineer, build Social Media application for Facebook, Orkut, iPhone, Android and Nokia for living. I am expert in managing and implementing MS SQL databases, C#.NET and designing solution architecture.


Personal:
I am friendly and pragmatic in nature. My Interests include bowling, cooking, reading (technical shit), chatting, learning new stuffs, exploring, and creating social media & mobile applications to reach out millions of users.


Recently I launched my first Facebook application called “Should I?”. It’s a polling app that you can use to post question, get answers from your friends, Facebook users, and answer to them. The idea behind the app is to get a way between the questions of “Should I do something?” or “Should I not?”




I think it should be good to start with this. I will soon return with my second blog that should be more informative.


My intent is to talk to world about what’s going on in my mind and my opinion on things I do day to day.


Add to Technorati Favorites