Logo
  Wednesday, September 08, 2010
Sign-In  |  Sign-Up  |  Contact Us  |  Bookmark |  RSS Feed

Access database to SQL Server via Upsizing Wizard
MS Access has several limitations that may prevent you from using it in the enterprise environment. It is hard to scale, it has limitation in DB size and tool sets. As a result, you may need to convert existing Access DB into SQL Server DB. There are many reasons why this is a good idea. On the reasons is that Microsoft makes it easy for us to convert DB from Access to SQL Server via Upsizing Wizard.

The Upsizing Wizard preserves database schema as well as data. It transfers indexes, default settings of the database such as FK/PK, attribute defaults.

The Upsizing Wizard can be downloaded from the Microsoft MSDN site at the following link: Download Upsizing Wizard

You can also look at this resource Access to SQL Server Migration

Posted On: 07/27/2010
Label: Editorial

Database Naming Convention
Database Modeling is not an easy task. It requires good analytical skills and a lot of hours spent on defining entities and attributes and creating relationships. However, database modelers spent little time on following standards for defining database schema elements.

There are many databases that are created without following solid naming convention making it hard to developers to use database and for DBAs administer. Database naming convention became even more critical in last decade with the proliferation of reporting. End Users now access database via reporting tools and good schema definition is now more critical due this and other facts.

There are few known examples of Database Naming Convention which may be useful. Microsoft has one for its Consulting Services
1. Database Naming Convention by Microsoft Consulting Services
2. DevCampus Database Naming Conventions
3. DB Object Naming Convention

Short list of Database Naming Convention Rules are:
Prefix -> Object
vw -> View
usp -> User-defined stored procedure
fn -> User-defined FUNCTION
trg -> Trigger

Steven Bates Naming Convention is another good approach to naming your Database Objects

Posted On: 07/19/2010
Label: Editorial

Silverlight Programming
Silverlight is going mainstream with new version being released every year and each version bring new features that are useful if you are developing in Silverlight.

We compiled a list of Silverlight programming resources that will let you start developing in Silverlight as well as enhance your knowledge.

First thing first, you need to download and install Silverlight on your computer first.

After you succeeded in installation of Silverlight, which should not take too much time, it is time to view insightful videos of Silverlight

I personally spent few hours watching all the videos and then moved in into doing Silverlight hands of labs readily available on one of the Microsoft sites.

Posted On: 07/13/2010
Label: Editorial

Select Distinct or Unique values from SharePoint List
I was looking around for the simple way of getting unique values from SharePoint list without affecting performance too much. I have seen several ways of doing it. For example, people say that you can get all the items and then check if item exists in the array or some other collection. Another example, you can load your data into DataTable and then select unique values using DataTable method but I disciovered one very simple method for selecting Distinct Values in SharePoint called GetDistinctFieldValues. Please see snippet of code below on how to use it

SPWeb web = new SPSite("http://site").OpenWeb();
SPList objList = web.Lists["List Name"];
SPField field = objList.Fields.GetField("Field Name"); 

object[,] values;
uint numberValues = objList.GetDistinctFieldValues(field, out values); 
       

for (int i = 0; i < numberValues; i++)
    comboBox1.Items.Add(values.GetValue(0, i).ToString()); 
Posted On: 05/27/2009
Label: Editorial

SharePoint Site Provisioning with Workflow
There are many ways to provision your SharePoint site. First, you can write totaly custom made script and provision it with SharePoint admin commands. Second, you can use third party tools to provision sites. Finally, you can provision with the SharePoint workflows. This is the site provisioning method that I would prefer and I would also recommend for other who is tasked with the site provisioning.

Here is starting point that I used: Site Provisioning Workflow with Custom SharePoint Designer Activity

Posted On: 05/06/2009
Label: Editorial

How to test SharePoint with unit test?
There is no easy way to unit test SharePoint code. Every time you try to do it on your development computer, you will run into problem of missing SharePoint DLLs. The reason is that in order to make calls to API you really need to have server installed on your computer. There are several ways you can deal with this unique challenge.

1. You can use Server as your development environment, it can be an Image or real server.

2. You can utilize Mocking mechanism that will allow you to make calls to SharePoint object model but these call will be re-routed to dummy objects that replicate same functionality as original API calls

Posted On: 04/30/2009
Label: Editorial

Implementing WCF for SharePoint
Windows Communication Foundation (WCF) is the new way of implementing SOA and I was thinking about using it for the SharePoint. As we all know, SharePoint has its own set of Web Services which are based on the original approach to SOA and with the help of WCF we can take SharePoint to the next level.

Recently, I was tasked with updating SharePoint libraries with the external documents. However, there is no web service now that can do it. As a result, I decided to use WCF and in the process wanted to convert all of the existing WebService to WCF.

I was browsing several sites on the internet and found several implementations of WCF for the SharePoint but mostly on the site level and not on the server level. In my case, I need to have WCF implemented for the admin operations with the SharePoint for the entire collection of sites, not just one site at a time.

Microsoft is coming up with the new SharePoint 2010 and I am hoping that they will utalize WCF instead of WebServices which will make it more up to day.

Posted On: 04/30/2009
Label: Editorial

Creating and deploying SharePoint Feature
SharePoint Feature allow for different types of elements to be incorporated into SharePoint site. You can define several element types: menu command, template, page instance, event handler, workflow, list definition, list instance and link command.

It is most likely that you already have features defined in your SharePoint server. In order to see what you have in it you need to navigate to the following folder: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES

Each feature would normally have two files associated with it: “feature.xml” and “elements.xml”. Sometimes you will also find aspx pages inside this feature folder.

In order to create feature you need to start up a new class library dll project using your Visual Studio 2005. The first step that we need to take is to re-create same folder structure as WSS 3.0 in our case we need to create TEMPLATE/FEATURES/OurFeatureName folder under the root of the project. Once we have this feature folder created, we need to create new XML file called feature.xml. Inside this file we need to define attributes of this feature. We need to make this feature hidden for instance, then we need to set attribute Hidden=”TRUE” and etc…

<Feature  
Id=“can be unique id something like GUID”  
Title=“My Feature“ 
Description=“My Feature Description.“  
Scope=“Web“  
Hidden=“TRUE“ 
ImageUrl=“menuprofile.gif“  
xmlns=“http://schemas.microsoft.com/sharepoint/“>    
    <ElementManifests>    
         <ElementManifest Location=“elements.xml“ />  
    <ElementManifests>
</Feature>  
Attributes of the feature and their meanings are summarized below:

Id: unique identifier or GUID. In order to get one you need to navigate inside your Visual Studio 2005 to menu toolbar and select Tools ? Create GUID. You will see a new window in which you need to select “4 Registry Format…” then click button called Copy and Exit. You have now new GUID that you can paste into id attribute of your feature.

  • Title: Feature Title.
  • Description: Feature Description.
  • Scope: Scoping is important is you want to activate and deactivate feature in different SharePoint contexts (Web, WebApplication, Farm, Site).
  • Hidden: It can make feature visible or invisible. It can be set via command window as well.
  • ImageUrl: Sets image to be displayed along with feautre.
There are also other element that are part of the feature. Theye are ElementManifests and ElementManifest. Both are playing an important role in referencing to other XML files. Most often, there is a file called “element.xml” which defines other elements needed to the feature. Element.xml file is also created within same folder as feature.xml and has several elements in it.

<Elements xmlns=“http://schemas.microsoft.com/sharepoint/“ >  <CustomAction    Id=“SiteActionsToolbar“    
GroupId=“SiteActions“    
Location=“Microsoft.SharePoint.StandardMenu“   
Sequence=“100“    
Title=“Hello World“    
Description=“A custom menu item added using a feature“    ImageUrl=“_layouts/images/menuprofile.gif“ > 
    <UrlAction Url=“http://www.google.com/>      
</CustomAction>
</Elements > 
Attributes are:

  • Id: it has name of the menu or other page elements where we want this feature to appear.
  • Title: Title of the item to be shown on the site element
  • Description: Description of the feature
We also have several elements as a part of this file. UrlAction is one such element.

UrlAction: is used to redirect users if they click on the link

Once we have everything in place in terms of project files, we need to install this feature inside SharePoint Features Library. You can do it two ways, running installation process manually or creating Batch File. Batch file will look like this:

@SET DIR=”C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE”
@SET STSADM=”C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm” 
Echo Copying filesxcopy /e /y TEMPLATE\* %DIR% 
Echo Installing feature%STSADM% -o InstallFeature -filename YourFeatureName\feature.xml -force 
Echo Reatart IIS Worker Process
IISRESET  
Make sure you restart IIS in order for this feature to be activated.

We use STSADM.EXE utility to install this feature within our SharePoint server. In case you run into problem with installing this feature you can check to see if this feature files are inside your FEATURES folder by going to “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES” . Also, you can test your “feature.xml” and “element.xml” files for well formed XML.

SharePoint Feature

Posted On: 03/11/2009
Label: Editorial

Health Monitoring in ASP.NET
It is important to create error free and bug free code while developing website and with the help of .NET Framework it is easier now than before. Moreover, EntLib provides so much plumbing code that the only thing .NET Developer needs to do is to build business application without worring too much about caching, error logging, forms validations and other aspects of the .NET Development.

There is another system that Microsoft developed for .NET Developers that is not very known but important for overall approach to development of the .NET Applications. System is called The Health Monitoring. It is designed to help capture events raised by the application. Moreover it can store this events into Windows Application Log (EventLogWebEventProvider), SQL Database (SqlWebEventProvider), Email (SimpleMailWebEventProvider) it to your email account or map ASP.NET events to WMI event (WmiWebEventProvider)

In order to use Health Monitoring in you ASP.NET application you need to set a reference to the Enterprise Library in your code, enable Health Monitoring in your web.config file and choose a place to store all information that the Health Monitoring captures for you.

There is very detailed set of guidelines on how to do it developed by Microsoft.

Posted On: 01/08/2009
Label: Editorial

TFS Workspace
TFS Workspace is a one of the new concepts introduced with Team Foundation Server. TFS Workspace is a container that acts as a bridge between your local development machine and TFS Server with source files. TFS Workspace is local to you and only you aware of this workspace. Hence, the identity of the TFS Workspace is your computer name and your user account.
  • Note: TFS Workspace name can be no longer than 64 characters and has to be unique.
TFS Workspace acts as a bridge as it was mentioned before as a result it needs to have links between your computer and server. These links are represented with the mappings between your working folder and folder with the source files located on the TFS server. It is TFS job to remember what files you downloaded, checkin or checked out to your local workspace. This information tracking allows TFS selectively provide you files that are needed once you issue update command. TFS is aware what is the latest on your computer and downloads only those files that are needed for your development.

TFS Workspace is also smart about files that have names changed or files that have been deleted on the server. All these changes are propagated to your local workspace one you issue “Get Latest” command.

TFS Workspace needed when you do checkin/checkout and any other operations that edit existing file. When you try to edit file for example, TFS checks your local version of the file with the TFS Source Control and updates it with the latest version before letting you edit it. On the other hand, when you try to checkin pending changes; TFS looks at you local workspace and checks against its own version. If both versions have conflict, TFS prompts you with the conflict resolution screen that you use to resolve any pending conflicts. One everything is resolved. TFS takes your local copy of the file from your own TFS workspace, creates changeset and commits changes to its own version of the source file.

Posted On: 01/06/2009
Label: Editorial

Continuous Integration with TFS
Continuous Integration is a commonly accepted and aknowledged software development practice. During Continuous Integration members of a software development team build or integrate their work daily. Moreover, each Continuous Integration is validated with the help of the TFS Build Tool. Continuous Integration is important for several reasons: it helps to detect errors with your build early in the process and it is good testing strategy if your software development requires software integration process.

Continuous Integration is an integral part of the TFS Build Tool and it is not difficutl to configure it. All you have to do is to specify or check an option that requires TFS Build to perform project build every time there is a check-in by a member of the team into Source Control.

List of strategies for the continuous integration
The following list identifies various strategies used for continuous integration builds:

  • Build on each check-in.
  • Rolling build after a specific number of check-ins.
  • Rolling build after a specific time interval.
  • Rolling build after a specific number of check-ins or time interval.

MSDN Resources that I found to be very usefull

TFS 2005 Continuous Integration
Continuous Integration Using Team Foundation Build
Visual Studio Team System CI solution installer

TFS 2005 Continuous Integration
TFS 2008 has its own wizard like CI set up. You don't need to install anything on your server for Continuous Integration being part of TFS 2008.

Posted On: 12/04/2008
Label: Editorial

Head start with Vistual Studio 2008
I find it useful to take virtual labs that Microsoft provides and then download PVC Image to a local computer and play around with the Visual Studio 2008 that way untill you have a good understanding of its capabilities.

As a result, I want to share my first steps.

  • Online Lab
  • Virtual PC
  • Posted On: 11/19/2008
    Label: Editorial

    Number of Fields in TFS Work Items
    Number of fields in TFS Template is very important indeed, you should not have too many and too few will not be very useful. So, what is the number of field in the TFS Template is just right?

    Unfortunately, there is no a single answer that can explain to you what is the golden middle. Microsoft tries to answer this question here: http://msdn.microsoft.com/en-us/library/aa974183(VS.80).aspx

    In general, there are several areas of TFS where number of fields can have an impact. Datawarehouse is one such place. SSRS is using TFS Datawarehouse.

    Another thing you have to consider is maintainability of the Template. It is always harder to work with too many fields and setting up rules around those fields.

    I would strongly recommend starting up with few fields, building workflow rules around them and then expend as needed. There are several templates already available that you can use as your starting point.

    Posted On: 10/29/2008
    Label: Editorial

    AugSeptember 2010Oct
    MoTuWeThFrSaSu
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910