moss kehitysympäristö – yksinkertaisesta laajoihin projekteihin aku heikkerö, vesa juvonen...

34

Upload: dinah-jacobs

Post on 30-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)
Page 2: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin

Aku Heikkerö, Vesa JuvonenMicrosoft Consulting Services (MCS)

Page 3: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

AgendaAgenda• Sovelluskehitysympäristö

– Team Foundation Server:n integroiminen osaksi kehitystä

• Visual Studio sovellusrakenteet ja suositukset

• Kikkoja ja ohjeita sovelluskehitykseeen

Page 4: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Who are we?Who are we?

• Aku Heikkerö– Senior Consultant, Team leader, BPIO Service Line, Enterprise Services,

Microsoft Finland– Member of a worldwide SharePoint Ranger team– In Microsoft since 2003. Companies before Microsoft – ICL, Fujitsu– Email: [email protected]

• Vesa Juvonen– Software Development Consultant, BPIO Service Line, Enterprise Services,

Microsoft Finland– In Microsoft since 2006, started IT studies 1996 (graduation took a while).

Companies before Microsoft – ICL, Fujitsu, BasWare working as Software Architect, Lead Software Development Engineer etc.

– Email: [email protected]– Blog: http://blogs.msdn.com/vesku

Page 5: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development environmentsDevelopment environments

Page 6: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development environmentDevelopment environment• Can be scaled from small to extra large depending

on the available resources

• Use always some source control system to ensure that code is not lost– Draft code should be also included in source control

• TFS recommended, since it provides much more than just source code

Page 7: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development environmentDevelopment environment• Windows SharePoint Services only runs on

Windows Server 2003 or later– Windows Server 2008 runs only with SP1

• You can develop without it, but…• You need a copy to deploy/debug• Options

– Make it your development OS– Run it in a Virtual PC / Virtual server– Have a standalone server at your disposal

Page 8: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Shared resources modelShared resources model• Each developer has

their own environments – Either in VPC or in

individual computers

• Advantages– Individual environments

don’t require that much hardware

• Disadvantages– You need to have access

to database server to be able to develop

Database server

Sourcecontrol

Page 9: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Centralized environmentsCentralized environments• Virtualized environments

are hosted from centralized server

• Advantages– Environments are managed

from one place – Copy / clone etc.

– Does not require much resources on individual computers

• Disadvantages– You need to have access to

server– Requires heavy hardware to

centralized server

CentralizeServer

Virtualized MOSS environments

Sourcecontrol

Page 10: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Decentralized Decentralized environmentsenvironments • Each developer has

their own environments – Either in VPC or in

individual computers

• Advantages– Supports offline

developement– Environments can be

reset / cloned / copy easily

• Disadvantages– Requires more hardware

from individual computers

Sourcecontrol

Page 11: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Continues IntegrationContinues Integration• Functionalities are

automatically deployed to integration server

• Advantages– Functionalities are

automatically tested– Progress can be followed by

other than developers– TFS provides much more than

just compiling the code

• Disadvantages– Requires time and effort to

setup – it’s however worth it!

Team FoundationServer

Development integrationserver

Page 12: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Ideal Devevelopment VPCIdeal Devevelopment VPC• Necessary Windows Components – IIS, SMTP, POP3 Service (AD)• .NET Frameworks: 2.0, 3.0, 3.5• Visual Studio 2005 Team System + Team Explorer (TFS Client)

– TFS Client is needed to connect to centralized source repository

• Office Clients including SharePoint Designer (SP1)• Software Development Kits (SDKs)

– Microsoft Office SharePoint Server 2007 SDK

• Microsoft Office SharePoint Server 2007 Enterprise• Service Pack 1 for the WSS3.0 and for MOSS 2007• SQL Server 2005 with latest service pack

• Additional tools to help development process:– Internet Explorer Developer Toolbar– .NET Reflector– Fiddler– U2U CAML Builder– Additional browsers – especially for Internet projects

Page 13: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

VPCVPC• Minimum of 2 GB memory (4 GB preferred)

– If 4 GB, then allocate 2 GB for the virtual machine

– If you have 1GB in your computer, don’t even think about hosting MOSS / WSS

• Fast hard disk– If developer uses laptop, then fast external hard

drive is recommended, because disk performance

– Also each virtual environment can take easily 10 GB of hard disk space

Page 14: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Different EnvironmentsDifferent Environments• There are multiple different

environments on which the developed functionalities have to be deployed– Continues testing important– Multiple deployments for the

functionalities

• Environments– Development integration server– Quality assurance– Production

• Possible seperate authoring environment

Development integrationenvironment as part of the development

Quality Assurance(testing) environment

Production environment

Page 15: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

BUILD AUTOMATION AND BUILD AUTOMATION AND MOSSMOSS

Page 16: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Customer PerspectiveCustomer Perspective

Customer just wants it to work!!!!

Page 17: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Build Automation is not …Build Automation is not …

F5

Page 18: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development environmentDevelopment environment

1) Developer with dedicated MOSS Run it in a Virtual PC

2) Another developer with separate module responsibilities

3) Other project members Observe project progress

4) Development Server Ideally automated

process to build daily versions based on labelled artefacts in the source control

Page 19: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Automating portal creationAutomating portal creation• Option 1

– Create custom ms build tasks to deploy the code to MOSS portal during the building of the project

• Option 2– Compile the code to drop location in the

integration server using TFS build engine– Schedule custom application to deploye the

solution package (wsp) to portal and recreate the hierarchies

Page 20: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Build Process in one large Build Process in one large projectproject• Complete build authoring servers

– DeleteSite– DeleteWebApp– CreateWebApp– AddZoneUrl– AddHostHeader– iisReset– CreateAppFormsVirtualDirectory– $(CreateKeyFiguresVDir)– Retractsolutions– DeleteSolutions– AddSolutions– DeploySolutions– CreateSite– CreateVariations– AddReusableContent– ConfigureNavigation– Install404ErrorPage– CopyConfigFiles– AddUsers– CopyWebServerExtensions– CopyFormsWebSite– $(DeployKeyFigures)– ModifyOrderableReports– RestartTimerJobs– CreateWeb– $(CreateTestDataTarget)– (Automatic testing)– BackupSite

• Complete build front end servers– CreateAppFormsVirtualDirectory– Retractsolutions– DeleteSolutions– AddSolutions– DeploySolutions– Install404ErrorPage– CopyConfigFiles– CopyWebServerExtensions– CopyFormsWebSite

Upgrade buildValidateParametersUpgradeSolutionsExecadmjobsDeactivateFeaturesiisResetCopyConfigFilesCopyWebServerExtensionsCopyFormsWebSite$(DeployKeyFigures)ModifyOrderableReports;BackupSite

Page 21: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Real Life MCS - .COM Real Life MCS - .COM casecase1. TFS builds the solution (wsp) package including also the necessary

assemblies2. Custom application is scheduled using windows timer to start after

solution package has been created• Removes the old portal• Retracts the old solution• Deploy new version• Creation of the portal using portal site definition• Set default anonymous / user access• Configure other settings as part of the process

• Same tool was also used by the developers during the project to recreate the development portal to VPC’s

Page 22: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Visual studio project model Visual studio project model and development processand development process

Page 23: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development ToolsDevelopment Tools• Microsoft SharePoint Designer does not really fall in the

category of development tools but provides a design experience for SharePoint that can be leveraged by developers

• Visual Studio 2005– Extended with WSS 3.0 Extensions for VS2005 v1.1– Extended with Windows Workflow Foundation Extensions– Extended with Workflow Starter Kit

• Visual Studio 2008– New Visual Studio Tools for Office version– Upcoming WSS 3.0 Extensions for Visual Studio v1.2 will support

VS2008 – Expect by June 2008

Page 24: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development processDevelopment process• User interface customizations cannot be

exported• Due nature of SharePoint, development

happen by creating bit’s and pieces– Features, Web Parts, Web Controls, Metadata

files, site definitions etc.

Page 25: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Example module planExample module plan

Page 26: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Development processDevelopment process• Tools and extensions for the SharePoint are

useful, but not recommended directly to production usage– Use them to verify the functionalities and

transfer the tested functinalities to official project

Page 27: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Visual Studio SolutionVisual Studio Solution• Create solution ready for the project and

define the initial settings as first step in the project

• Structure / template should have seperate places for different kind of functionalities– Web parts– Feature receivers– XML metadata– Aspx files– Etc.

Page 28: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Utilize Utilize featuresfeatures and solution and solution packagespackages• Encapsulate your customizations to features to automate

the deployment from one environment to another

Page 29: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Resources FilesResources Files• Imitate the 12 hive in the

resources project– Everybody in project can easily

track what goes where

12 hive - C:\program files\common files\microsoft shared\web server extensions\12

Page 30: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

Solution structure and usageSolution structure and usage

Page 31: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

SummarySummary• There are multiple different models for the

development environment– Usage depends on the project / company size

and overall recommendations

• Use predefined solution structures as part of the development models

• Encapsulate your customizations to features and solutions

Page 32: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)
Page 33: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)

More informationMore information• SharePoint community

– http://sharepoint.microsoft.com/sharepoint/

• SharePoint product team blog– http://blogs.msdn.com/sharepoint/

• Visual Studio structure used in demos and more guidelines (in future)– http://blogs.msdn.com/vesku

Page 34: MOSS kehitysympäristö – Yksinkertaisesta laajoihin projekteihin Aku Heikkerö, Vesa Juvonen Microsoft Consulting Services (MCS)