development session
DESCRIPTION
SharePoint 2007 DevelopmentTRANSCRIPT
![Page 1: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/1.jpg)
Development sessionSharePoint, NHibernate and Castle Windsor
container
![Page 2: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/2.jpg)
Moutasem Al-awa Senior Software Engineer at Technology
World Company (TWC) Twitter: @moutasema Email: [email protected]
Presenter
![Page 3: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/3.jpg)
Current Problems
SharePoint
![Page 4: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/4.jpg)
![Page 5: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/6.jpg)
Proposed Solutions
SharePoint
![Page 7: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/7.jpg)
![Page 8: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/8.jpg)
Better Code StructureSharePoint
![Page 9: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/10.jpg)
How to deploy User controls ?
How to GAC other assemblies ?
SharePoint code structure
![Page 11: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/12.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/13.jpg)
Use Utility ClassesSharePoint
![Page 14: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/15.jpg)
Always .. Yes Always Dispose SPWeb, and SPSite (Using statement)
SharePoint
![Page 16: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/16.jpg)
Always .. Yes Always Dispose SPWeb, and SPSite (Using statement)
SharePoint
![Page 17: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/17.jpg)
WSPBuilder .. Base for our deployment tool
SharePoint
![Page 18: Development Session](https://reader033.vdocuments.mx/reader033/viewer/2022061201/546ac080af79592f798b52af/html5/thumbnails/18.jpg)
Thank You