Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand

Archive for February, 2012

Code to extract Email addresses from text

Posted by JP on February 27, 2012

public List<string> GetEmailsFromText(string text)
{
            Regex regex = new Regex(@”[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}”, RegexOptions.IgnoreCase);
            Match match = null;

            List<string> results = new List<string>();
            for (match = regex.Match(text); match.Success; match = match.NextMatch())
                if (!(results.Contains(match.Value)))
                    results.Add(match.Value);

            return results;
}

// Try using GetEmailsFromText(“email@yahoo.com, email2@gmail.com, email3@hotmail.com”);

Advertisements

Posted in C# | Tagged: , , | Leave a Comment »

SharePoint 2010 – Installation on Windows 7

Posted by JP on February 22, 2012

In this article we can proceed with the installation of SharePoint 2010. Depending on your operating system and edition of SharePoint the installation files varies.

Editions

Following editions are available for SharePoint 2010:

· Foundation

· Standard

· Enterprise

Software Pre-Requisites

Following are the software pre-requisites

· 64 bit Operating System (Windows 7 / Windows Vista SP2 / Windows Server 2008)

· .Net Runtime 3.5 SP1 (http://www.microsoft.com/download/en/details.aspx?id=22)

·  MS Chart  (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14422)

· SQL Server 2008 R2 (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=22973)

· PowerShell 2 (http://www.microsoft.com/download/en/details.aspx?id=2560)

· Visual Studio 2010 (http://www.microsoft.com/visualstudio/en-us/try)

· Windows Identity Foundation (64 bit, 32 bit)

Note:64 bit Windows 7 can be installed on a 32 bit computer. For production server the operating system should be Windows Server 2008 and SharePoint Standard/Enterprise.

Download

There are multiple ways for installing SharePoint 2010. Here three of them are listed.

1. You can download a standard trial version from the following link:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=9344

2. Use the Easy Script to setup development machine with SharePoint 2010

http://www.microsoft.com/download/en/details.aspx?id=23415

This option takes several hours depending on your internet connection speed.

3. Use the Virtual Hard Drive (VHD) option to have a preconfigured environment for learning

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27417

Installation

Download the file specified in option 1. After the download execute the file SharePointServer.exe

clip_image002

You will get the following screen:

clip_image003

Use the Install software prerequisites menu item from the Install category. As the installer check for Windows Server 2008 operating system you will get the following error.

clip_image005

We need to proceed with an alternative way for installation.

Proceeding with Installation

Open the command prompt and execute the following command:

SharePointServer.exe /extract:d:\SharePointFiles

(Ensure that you are specifying the folder in which enough space is there)

clip_image007

You will see the following message box after a while:

clip_image009

So now we are ready with the files in the specified folder.

Modify the config.xml

Locate the config.xml file from the folder SharePointFiles\Files\Setup

Add the following tag inside the configuration section:

<Setting Id=”AllowWindowsClientInstall” Value=”True”/>

[Make sure the Double Quotes are Corrected after copy paste]

Run the Setup.cmd file

Now open the SharePointFiles folder and locate the Setup.cmd file.

clip_image011

Execute the command file and the installation will show the previous screen. First use the Install Pre-requisites option to install the required components. Next use the Install SharePoint Server option to continue. Now the following new screen is prompted.

clip_image013

Enter the following key for trial edition: VK7BD-VBKWR-6FHD9-Q3HM9-6PKMX. On pasting the key automatic validations happens and the Continuebutton gets enabled. Click the button to continue.

clip_image015

Accept the terms and again click Continue button.

clip_image017

In the above screen use the Standalone option to install all the SharePoint components in your machine. Now the installation starts..

clip_image019

Waiting for around 10 minutes, the installation will get completed click the Close button.

Configuration

If you checked the Configureoption from the previous screen you will get the following Configuration wizard. Click the Next button to continue..

clip_image021

The wizard will perform activities like configuration of database, registering services, sample data creation etc. It will take almost 10-15 minutes for completion. On completion you can see the following dialog box.

clip_image023

Click on the Finish button to close the dialog.

Post Installation

After the installation you will be able to see the following start menu item:

clip_image025

Open the SharePoint 2010 Central Administration item and you will get the following prompt:

clip_image027

Enter the machine user name and password and proceed by clicking Ok button.

clip_image029

If you can see the above screen then you are ready with a successful installation.

References

http://msdn.microsoft.com/en-us/library/ee554869.aspx

Summary

In this article we have seen the trial installation of SharePoint 2010. The above installation is useful for evaluating SharePoint features and setting up a developer machine.

If you face trouble logging into the site (eg: http://machine-name) you can try this link:

Posted in SharePoint | Tagged: , , , | 20 Comments »

SharePoint 2010 – Introduction

Posted by JP on February 22, 2012

SharePoint is a web application platform created by Microsoft. It is considered to be one of the most productive frameworks created by Microsoft in the last decade. SharePoint provides us the following feature support.

clip_image002

It provides us the following features:

· Sites

· Mobile Support

· Collaboration

· Document Management

· Content Management

· Enterprise Search

· Excel Services

· Extensibility

· Business Intelligence

· Visio Service

History

The SharePoint versions will be similar to that of office like SharePoint 2007, SharePoint 2010 etc. SharePoint started as a document sharing framework for Microsoft Office so that people can share their Word, Excel, PowerPoint documents. Later more features and extensibility was provided and SharePoint evolved as a highly productive component in the Microsoft Products Arena.

Versions

The latest version available is SharePoint 2010.

Advantages of SharePoint

So anybody could raise the question of Why SharePoint instead of ASP.NET or other frameworks?

For IT Professionals, SharePoint allows us to create websites rapidly. It provides faster site creation with lots of inbuilt features like Content Management, Collaboration etc. These all possible at the cost of learning the skill: Administration of SharePoint.

For Developers, SharePoint provides extensibility through programming. The SharePoint Object Model, WebParts etc. provides excellent start to developers in extending the features of SharePoint. Developers can take advantage of the inbuilt features extension like Document Management, Search etc. The skill for attaining these would be: Programming SharePoint.

SharePoint is one of the technologies where Administration and Programming (IT Professionals and Developers) are of core importance.

If you are an Administrator then you can survive without Programming skills. But if you are a developer you need both the Administration and Programming skills.

As an example for creating a CRUD list in ASP.NET takes 8 hours of programming at least. In SharePoint we can achieve the same in just 5 minutes with high flexibility in extensibility.

Architecture

One of the major architectural changes in SharePoint 2010 is that Shared Services Provider no longer exists. Now the services configuration is more flexible and we can add our own services to the platform called as Service Applications. We can share the same service application across the farm and SharePoint provides instance management.

Services can be remotely managed and Central Administration provides this facility. There is a Default Group for services and all services are thus accessible to the entire farm as shown in the figure below.

clip_image004

Tools

Following are the important tools that could be used along with SharePoint to increase the productivity.

· Visual Studio

· SharePoint Designer

· Windows PowerShell

clip_image006 clip_image008 clip_image010

Visual Studio provides developer productivity through web part creation, custom content type addition, workflow creation, event listeners, deployment etc.

SharePoint Designer helps in page layout, creating workflows, file management, workflow management etc.

Windows PowerShell helps with automating tasks like site deployment, site backup and restore through scripts.

Editions

Following are the editions of SharePoint 2010 available.

Edition

Description

SharePoint Foundation

Basic Free Edition having document management and collaboration features.

SharePoint Server Standard

Built on top of SharePoint Foundation and includes business level functionalities.

SharePoint Server Enterprise

Built on top of Standard edition and targets large enterprises.

IIS Integration

It is worth to know how SharePoint integrates with IIS (Internet Information Services). There are two modes of working for SharePoint:

· Classic Mode supported by ISAPI (older IIS Versions)

· Integrated Mode supported by Http Modules (ISS 7)

In the Integrated mode a particular Http Module will be configured for each SharePoint web application and it handles the HTTP requests to provide SharePoint rendering.

Hosting

Following are some of the hosting providers in SharePoint. Depending on the usage, the prices vary from $ 100 per year.

· http://www.webhostforasp.net/sharepoint-hosting/moss-plans.aspx

· http://www.ibeehosting.com/sharepoint-hosting.php

Additionally, Office 365 (new cloud member) supports SharePoint deployment as cloud enabled. Here higher productivity is possible by concentrating just on the application logic instead of configuring servers, setting up farm etc. SharePoint 2010 is supported and the billing will be on usage basis.

· http://www.microsoft.com/en-in/office365/sharepoint-online.aspx

References

http://sharepoint.microsoft.com/en-us/buy/pages/editions-comparison.aspx

Summary

In this article we have seen a quick introduction to SharePoint, history, editions, versions, features. In the next article we will proceed with Installation.

Posted in SharePoint | Tagged: , , , | Leave a Comment »

Introducing NLayers

Posted by JP on February 17, 2012

I am happy to announce the creation of NLayers template for Visual Studio 2010.

Logo

Purpose

To provide an easier way of creating layered application inside Visual Studio using ASP.NET and Entity Framework.

The features include: Multi Project Creation with all references tied up, Item Templates for Business Logic / Data Access Class and Interface, Instance Manager for object reuse, CRUD wrappers for Entity Framework etc.

Note

The project was created as part of my consulting work and needed to evolve through various suggestions and code generations from the readers like you.  Please have a look on it.

.Net Reflection as the Super Player!

I had queries from my old friends whether this framework also contains .Net Reflection.  I would like to answer Yes & Yes!

NLayers is built with my experience of reflection and it is a reflection of my experience.  Five years back i had a challenging work of creating an ORM.  The framework was build using .Net Reflection.  NLayers too contains reflection to read some core properties.    I would recommend you to learn .Net Reflection which is one of the core .Net capability that made the gate open for lots of frameworks.  Mastering Reflection could make you create tools according to your needs that could reduce much development time in creation and maintenance otherwise.

Downloads

You can download nlayers from:

http://nlayers.codeplex.com/

The documentation can be downloaded from:

http://nlayers.codeplex.com/documentation

image

After Installation

After the installation you can create projects using the NLayers project template as shown below.

image

NLayers also have Item Templates for Business Logic and Data Access items as shown below.

image

Posted in C# | Tagged: | 4 Comments »