development session

18
Development session SharePoint, NHibernate and Castle Windsor container

Upload: moutasem-al-awa

Post on 18-Nov-2014

587 views

Category:

Technology


0 download

DESCRIPTION

SharePoint 2007 Development

TRANSCRIPT

Page 1: Development Session

Development sessionSharePoint, NHibernate and Castle Windsor

container

Page 2: Development Session

Moutasem Al-awa Senior Software Engineer at Technology

World Company (TWC) Twitter: @moutasema Email: [email protected]

Presenter

Page 3: Development Session

Current Problems

SharePoint

Page 4: Development Session
Page 5: Development Session

Too many Projects. No modularity. No standards, or common way for

structuring code. Duplicated files (such as ASCX). Code maintaining is a HELL . Dependency on Site Url to access lists and

items. Performance issues.

Current problems

Page 6: Development Session

Proposed Solutions

SharePoint

Page 7: Development Session
Page 8: Development Session

Better Code StructureSharePoint

Page 9: Development Session

SharePoint code structure

Twc.Client.SharePoint

Twc.Client.Web

Twc.Client.Business

Twc.Client.DataAccess

Twc.C

lient.U

tility

Twc.C

lient.E

ntit

y

Page 10: Development Session

How to deploy User controls ?

How to GAC other assemblies ?

SharePoint code structure

Page 11: Development Session

Visual studio Build events Disable UAC, or run Visual studio as

administrator Copy user controls : xcopy "$

(ProjectDir)UserControls\*.ascx" "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES\UserControls\" /s /y

SharePoint code structure

Page 12: Development Session

GAC Assembly : "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe" /i "$(TargetPath)" /f

NOTE: When adding reference to SharePoint solution change CopyLocal property to False.

SharePoint code structure

Page 13: Development Session

Use Utility ClassesSharePoint

Page 14: Development Session

Provide unified way to interact with SPWeb SPSite SPList

Provide helper methods such as: Is user in a particular group (Soni, Admins) => Give me the absolute Url (/Arabic/Sites/Admins/)

=> http://server/Arabic/Sites/Admins/ More work, means better code base.

SharePoint Utility Class

Page 15: Development Session

Always .. Yes Always Dispose SPWeb, and SPSite (Using statement)

SharePoint

Page 16: Development Session

Always .. Yes Always Dispose SPWeb, and SPSite (Using statement)

SharePoint

Page 17: Development Session

WSPBuilder .. Base for our deployment tool

SharePoint

Page 18: Development Session

Thank You