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

Posts Tagged ‘project’

Foster Sign Off

Posted by JP on July 11, 2012

I hope all of my great friends are doing good.. I would like to declare the Sign Off of Foster!

The further activities allowed are support & bug fixes 馃檪

image

image

What is the next project?

I have more requirements pending from the community to create a project for Leave Approval System, Document Management etc.聽 I believe now there is only requirement of articles in this case.聽 The project Foster should be enough to gain a grip over the SDLC activities involved in a SharePoint project plus conceptualizing & implementing.

Thank You All for supporting & encouraging me for Foster!

Advertisements

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

SharePoint 2010 Project – Foster (Consolidated Article)

Posted by JP on July 11, 2012

In this article I would like to consolidate the information about project named Foster.

What is Foster?

Foster represents Food Stamps Terminal, a department in imaginary company which provides Food Stamps for applicants. The applicant has to undergo a process of approval to get the Food Stamps. 聽Our aim is to build a SharePoint solution for it.

image

What are the Files involved?

This project was build using the SDLC principles.

You can find the consolidated Article with Documents & Source code at c-sharpcorner.com (my article base):

FOSTER @ C-SHARPCORNER.COM

You can also purchase the book from Kindle at Amazon.

FOSTER

I would advise the reader to go through the above order of documents. I request you to understand the requirements and conceptualize the solution yourself. You can use forums / web resources to come with the best solution.

Thinking in the SharePoint Way

I know that you are well versed in providing solutions in the ASP.NET way. But the same solution can be done in SharePoint with more than 50% reduced time. To achieve this you have to practice on the SharePoint skills. To focus more on SharePoint skills development I have discarded the complex business portions from the project.

Purpose of the Project

The purpose of the project is to give the reader a real time scenario for applying SharePoint 2010 knowledge. There is a good amount of SharePoint 2010 skills involving:

路 Architecting

路 Development

路 Administration

Who can benefit from this?

I target the developers who recently adapted SharePoint skills. This project definitely gives them an opportunity to think in the SharePoint way in solving problems. Plus doing the project yourself will make you build enormous amount of troubleshooting and debugging skills.

What are the skills gained after doing the Project?

Following are the skills gained through this project: (I prefer you learn my聽eBook聽first before attempting the project)

1. Web Application

2. Site Collection & Sub Sites

3. Users & Permissions

4. List Definitions, Instances, Views

5. Custom Content Type & List Definition

6. Navigation Links & Quick Launch

7. WebParts

8. SPQuery, CAML & Builder Tool

9. Visual Studio Workflow

10. Server Object Model

11. Client Object Model

12. Search using CAML Query

13. Custom Timer Job & Monitoring

14. Packaging & Deployment

Plus the developer will gain the following experience as well:

  • Windows 2008 Installation
  • Active Directory Configuration
  • SharePoint 2010 Server Installation
  • DNS Configuration
  • SDLC Approach to Projects

Acknowledgements

I would like to thank the community and my friends who supported in creating this project and the associated documents.

Feedback

As always there is opportunity to improve, I would like to get your feedback or queries in the design and solution. Together we can improve ourselves and make better products for tomorrow.

Any Helps.. Please contact me through Comments / Email (About screen have Email Address)

I believe helping others keeps us聽improvised聽& satisfying!

image

Posted in C#, SharePoint | Tagged: , , , | 23 Comments »

SharePoint 2010 Project – Foster – Part 4

Posted by JP on July 11, 2012

Dear Friends,

Please find the fourth part of the project named Foster.

In the previous part you have find how to do the Infrastructure setup for the project Foster. In this part we can explore the actual SharePoint implementation of the project.

image

Note:聽The attachments contain the SharePoint solutions for the project. You can download the attachment聽here.

Reference Links

Following are the skills you need to master in order to proceed with the implementation. Some of them tend to be easy but some of them required dedicated effort to get through.

1. Creating Host Name for Web Application

2. Create Site Column

3. Navigations, Logo, Theme & Customizations

4. Starting Programming

5. WebParts Programming

6. LINQ & SPMetal

7. Creating a User in Active Directory & Adding to SharePoint

8. Client Object Model, Date & CAML

I would like to advise you to go through the above links to get a total understanding of the aspects.

Activities

Following are the activities involved in the implementation:

1. Creating Web Application

2. Creating Site Collection

3. Creating Sub Sites

4. Create Site Columns

5. Creating Lists

6. Creating Approval Workflow

7. Creating Search WebPart

8. Creating Timer Job

9. Setting Permissions

10. Creating Client Application


Creating the Web Application

For performing this step open the Central Administration and create a new Web Application with:

路 Name as Foster

路 Port as 80

路 Host Header as foster.inzeon.net

clip_image002

Then add the following entry to the hosts file.

127.0.0.1 foster.inzeon.net

Modify the registry to disable loopback check.

clip_image004

Creating the Site Collection

After creating the Web Application you will be prompted with the following dialog:

clip_image005

Click on the Create site Collection link above to create the new site collection for Foster.

In the appearing dialog set the following options:

路 Name as Foster

路 Description as Foster SharePoint 2010 Application

路 Template as Blank

路 Primary User Name as Administrator

Leave the other options as default and click the OK button. Wait for a while and you will be prompted with the following dialog:

clip_image006

Click on the above link to access the main site collection. On a successful state you should get:

clip_image007

Now we need to Activate the SharePoint Server Publishing Infrastructure for the above site collection. You can do it from Site Actions > Site Settings > Site collection features link.


Creating the Sub Sites

Now we need to create the sub sites:

路 Applications

路 Approval

路 Search

Choose the Blank Site template for the above as we need to customize them later. For each of the site created modify the Site Actions > Site Settings > Navigation settings as below:

clip_image008

After creating all the sub sites the Home Page view is as following:

clip_image009


Creating the Site Columns

We need to create the Application Status column which is going to be shared across multiple lists in the site. This is the right scenario to use Custom Site Columns.

Create a new Site Column with the following attributes:

路 Name as Application Status

路 Type as Choice

路 Values as Started, Approved, Rejected

路 Default Value as Started

After creating the site column you will be able to see it in the Site Columns list.

clip_image011


Creating the Lists

Now we can proceed with creating the Lists. I believe you are aware that there are total of 3 lists of type Applications.

1. New Applications

2. Approved Applications

3. Rejected Applications

This would be the right scenario to use a Custom List Template. We can proceed by creating one list, create a template from it and create the other lists using the template.

For starting with go to the Applications site and chose the Lists > Create option. Enter the list name as New Applications. After creating the list perform the following.

1. Go to List > List Settings > Rename the Title column to First Name

2. Use the Create Column link to create the other columns as per Detailed Design

3. Use the Add from existing columns to add the Application Status site column

clip_image012

Now the list structure should look like:clip_image014

Please remember to mark the required columns as above.

Now we need to create a list template from the above list. Go to List Settings and choose the Save list as template option. Enter the name as Foster Applications for the template.

We are ready to create the other two lists. Go to the Approval site and choose Lists > Create option. From the dialog box select the list template which we created just now. Enter the list name as Approved Applications.

clip_image015

Again repeat the step for Rejected Applications list.

Now we need to create the Employment Status list inside the Approval Site as below:

clip_image017


Creating the Approval Workflow

Open Visual Studio 2010 and create a new project named Foster.Workflows from the template SharePoint 2010 > Workflow. Name the workflow as ApprovalWorkflow.

Choose the site as: http://foster.inzeon.net/Approval/

On the Activated event of the workflow enter the code to perform the following:

路 Fetch the New Applications list

路 Check each item for Maximum Amount

路 Check each item with the Employment Status list

路 Change the status to Approved or Rejected

路 Copy the item to appropriate list

路 Delete the item from New Applications list

Note: You should implement this code by yourself and you may use the attachment which contains the workflow source as reference.

clip_image018

Once the workflow is ready choose the Deploy option to get it deployed. After deployment you should be able to see it from the Main Site > Approval Site > Lists > Site Workflows link.


Creating the Search WebPart

The WebPart is needed to provide a user interface for the user to Search applications based on the SSN number.

Open Visual Studio 2010 and create a new project from SharePoint > 2010 > Visual Web Part. Name the project as Foster.WebParts. Choose the solution as Sandboxed and enter our site url.

Design the user interface of the webpart as shown below:

clip_image020

On entering the SSN and clicking the Search button the 2 DataGrid controls should be populated.

Note: You should implement this code by yourself and you may use the attachment which contains the webpart source as reference.


Creating the Timer Job

The Timer Job is needed to populate the Employment Status list from an external database. Create a new SharePoint project and name it as Foster.TimerJobs.

Add a new Entity Data Model for the external database table as shown below:

clip_image021

Create a new class and inherit from SPJobDefinition. Name the class as EmploymentStatusJob. Add a feature to install / uninstall the timer job. On the Execute() method of the timer job copy the entities from external database and update the Foster Employment Status list.

Keep the timer job interval as 5 minutes and deploy to the site collection. You can debug it inside Visual Studio. You might need to restart the OWSTIMER.EXE (SharePoint Timer Service) occasionally.

Note: You should implement this code by yourself and you may use the attachment which contains the timer job source as reference.


Setting the Permissions

Now we are ready to set the permissions. Go to each site and choose Site Actions > Site Permissions. Set the appropriate users for each site.

路 Home site is accessible by users Clerk and Manager

路 Applications site is accessible by user Clerk

路 Approval site is accessible by user Manager

路 Search site is accessible by users Clerk and Manager

After doing the above you can test it by clearing the browser cookies and accessing the base url. Try logging in using user as Clerk / Manager.

Creating the Client Application

We need to create a Windows Forms Application to accommodate the Accounting SDK machine access to SharePoint.

Create a new Windows Application and add reference to the following assemblies:

路 Microsoft.SharePoint.Client

路 Microsoft.SharePoint.Runtime

Modify the front page of the main form as following:

clip_image022

On clicking the Connect button the Client Context has to be created based on the url specified in application configuration file.

The second button should perform getting the total of Amount allocated for current month. You can use CAML to achieve this.

The third button should act as a dummy posting to the Accounting SDK which falls in the outer boundaries of our application.

Note: You should implement this code by yourself and you may use the attachment which contains the client source as reference.


Attachments

Following are the project contained inside the attachment:

1. Foster.WebParts

2. Foster.Workflows

3. Foster.TimerJobs

4. Foster.ClientApplication

You can download the attachment here.

Summary

This concludes the implementation part of Foster. I hope you enjoyed it and were able to complete the implementation. The attachments contain the solutions we have discussed. For any further clarifications you can contact me.

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

SharePoint 2010 Project – Foster – Part 3

Posted by JP on July 10, 2012

Dear Friends,

Please find the third part of the project Foster.

image

In this article we can go through the various Infrastructure setup activities. Please note that these entire activities should take around 2-3 hours of work plus the software downloading time.

Following are the activities we are performing:

1. Windows Server 2008 Installation

2. Domain Controller Configuration

3. Active Directory Configuration

4. SharePoint 2010 Installation

The hardware and software requirements are covered in the Detailed Design document.

image

Note: You can skip the infrastructure setup activities if you wish to implement the project using SharePoint 2010 on your client operating system. 聽Continuing with Windows Server 2008 installation should give you a closer experience of real world SharePoint 2010 Installation, Configuration and Implementation.

Activity 1: Windows Server 2008 Installation

You can opt for a Dual Boot Installation which will not hamper your existing operating system and applications. You can download Windows Server 2008 R2 Enterprise from the following URL:

http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx

image

Use the highlighted button, register using your email and download the setup file. This task should take around 2-3 hours depending on your connection speed.

Installation

The installation should take around 1 hour. Install the Windows with the following options:

路 Choose a new drive

路 Choose New Installation

Dual Boot Menu

After the installation you should be getting a menu of operating systems on system boot.

image

Choose the Windows Server 2008 R2 option and continue.

Drivers Installation

You need to install the appropriate driver for your machine. You can note down your Network, Display and Sound configuration from your old operating system.

For downloading the drivers you can go to the respective manufacturer site.

If you have trouble finding the driver try to use the forums associated with manufacturer.

Activation

You need to activate the copy of Windows with the key provided. Use My Computer > Properties > Activate command to perform the activation.

After the activation you will be able to use the operating system for 180 days.

Activity 2: Domain Controller Configuration

Once we are inside the server, we need to configure the domain as inzeon.net.

Note: You may choose to set your own domain, but remember to make the change in all further steps.

Use the Run window > dcpromo.exe to setup Domain Controller.

image

Choose the following options in the Wizard and click the Next button until Finish.

路 New Forest

路 New Domain in existing Forest

路 Domain Name: inzeon.net

路 NETBIOS name leave with default

路 Choose DNS Server option

路 Folder locations leave with defaults

路 Password: Enter a complex enough password

You can refer the link in References section for a step by step guide. Wait for the completion and this task should take around 10 minutes and you need to restart your machine after this.

After restarting your machine, change your machine name to corp . You can use My Computer > Properties > Manage to achieve this.

You should make sure that your machine domain is set to inzeon.net. After these changes your fully qualified machine name is: corp.inzeon.net.

Following is the screen shot of My Computer > Properties after performing the above steps.

image


Activity 3: Active Directory Configuration

You can configure the Active Directory as following.

After the configuration create the appropriate users for our Foster application. Open the Server Manager from the desktop and expand the Roles > Active Directory Domain Services as shown below.

image

Select the Users item from inzeon.net:

image

You can see the user Administrator in the right pane as shown above. Right click on the Users item from the left pane and use the New User men item to create the user manager.

image

In the appearing dialog enter the following details:

image

Click the Next button to continue. Enter a valid password according to the system password requirements.

image

Uncheck all the options and click the Next button to continue and click the Finish button in the final page. Your user named manager should be created now.

Repeat the above steps for creating the user clerk.

image

Activity 4: SharePoint 2010 Installation

In this activity we are installing the SharePoint 2010 in the server. I hope you have gone through the Windows 7 Installation of SharePoint 2010. You can use the same setup we used there.

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

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

image

Use the Install software prerequisites menu item from the Install category.

Next use the Install SharePoint Server option to continue. Now the following new screen is prompted.

image

Enter the following key for trial edition: VK7BD-VBKWR-6FHD9-Q3HM9-6PKMX. Click the button to continue with the installation.

After the installation you will be getting the Farm Configuration Wizard inside Central Administration (unlike the Windows 7 installation). Choose the appropriate options and click the Next button to continue.

The installation should take half hour and you will be ending up with a valid SharePoint Installation. Please note that there are no web applications (other than Central Administration).

We can proceed with the Web Application and Site Collection creation with our next part of Foster implementation.

References

Windows Server Installation

Domain Controller Installation

Summary

In this article we have gone through the Infrastructure Setup of Foster. I hope all the installations went well and you have a valid SharePoint installation done.

Posted in C#, SharePoint | Tagged: , , , | 4 Comments »

SharePoint 2010 Project – Foster – Part 2

Posted by JP on July 2, 2012

Dear Friends,

I am happy to see some of the responses and emails regarding the project.聽 I hope you have already gone through the previous part of Requirement Specification.

So please find the second part of the project named FOSTER.

Part 2: Detailed Design

image

Please download the above link and try to implement the solution.聽 Meantime I will come up with the Part 3: The Actual Solution.

Note: After downloading you might need to Unblock the file to start reading.

Posted in C# | Tagged: , , | 7 Comments »

SharePoint 2010 Project – Foster – Part 1

Posted by JP on June 24, 2012

As promised please find the Part 1 of the project named Foster.

Part 1: Requirement Specification

(In this document I have not included complex business rules/attributes to stay more focused on SharePoint skills)

image

Please download the above link and read it 2-3 times to get an overview of the project.

I will be coming up with the next part soon!

Note: After downloading you might need to Unblock the file to start reading.

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

Coming Soon: SharePoint 2010 Projects!!!

Posted by JP on June 21, 2012

Hello Friends, Thank You all for supporting me through the community posts and replies.

image

Now I would like to go ahead one level more by creating real world SharePoint Projects.聽 The motivation was given from my colleagues and friends who wanted to see SharePoint in Action in real world scenarios.

image

Above All it will be based on the SDLC format of:

  1. Requirement Specification
  2. Design Document
  3. Implementation
  4. Documentation

As always i am open for queries, helps and discussing your opinions on architectural decisions.

Hope You will enjoy it!

Posted in C# | Tagged: , , | 4 Comments »