Best Practices Configuring And Developing Share Point Solutions

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

3 Favorites

Best Practices Configuring And Developing Share Point Solutions - Presentation Transcript

  1. Alexander Meijers & Roel Hans Bethlehem
  2. Introduction
    • Alexander Meijers
    • Architect at Sparked
    • Subject matter Expert for SharePoint and Search
    • http://www.bloggix.com/blogs/microsoft
    • http://www.dutchsug.nl
    • Roel Hans Bethlehem
    • Architect at Sparked
    • Subject matter Expert for SharePoint
  3. Agenda
    • Project & tools
    • Keep to the Basics
    • Locations
    • Permissions
    • Development
    • Styling
    • Multilanguage
    • Deployment
  4. Setup a development project
    • Create single solution
    • Add for each namespace in your project a class library project
    • Create a namespace for deployment
    • Create a duplicate tree of the 12 Hives
    • Make use of tools like
      • Add in for WSP Builder ( http://www.codeplex.com )
      • SharePoint installer ( http://www.codeplex.com )
    • Use features
      • Installing components
      • Changes to config files
  5. Tools
    • WSPBuilder
      • Creates SharePoint Solutions files based on a folder structure
      • Deploy solutions
    • SharePoint Installer
      • Creating user friendly installation and deployments for SharePoint 2007 solutions
    • VSeWSS 1.2
      • Visual Studio 2008 extensions
    • STSDEV
      • Generate Visual Studio project files and solution files
    • STSADM
      • 184 operations through command line on the web server
      • Custom extensions possible
  6. Demo
    • Tools & Project setup
  7. Keep to the basics
    • Use standard functionality as much as possible
      • All SharePoint functionality out-of-the-box will still work like search, versioning and publishing
    • Use SharePoint as storage
    • Powerful API model
    • Do not change or replace existing files
  8. Master pages, layouts, CSS, images, scripts
    • Into a library inside your site collection
      • Can be referenced by ~site, ~sitecollection and ~masterpage
      • Only available within the site collection
      • Too many site collection makes it harder to update these files
      • Updatable through the web interface
    • Into the _LAYOUTS folder
      • Can be referenced by path to folder
      • Available for every Sharepoint website in farm
      • One place for easy updating these files
      • Only updatable directly on the server
      • All web applications on the server share this folder
  9. Code Access Security
    • “ Request for the permission of type Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c failed ”
  10. Code Access Security What is it?
    • Security model use by the SharePoint API
    • Ensure your code provides error handling in the event that required permissions are not available
    • Arrange Web applications to operate in a partially trusted environment
      • System.Security. AllowPartiallyTrustedCallersAttribute()
    • Level of trust
      • Full, High, Medium, Low, Minimal
      • Custom like WSS_Minimal, WSS_Medium
  11. Code Access Security What are the options?
    • Decorate your code with Request Permissions
      • Declarative Security like [SomePermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
    • Deployment and CAS
      • Trustlevel in your web.config
      • GAC
      • Custom policy file
    • Snippet:
    • <PermissionSet class=&quot;NamedPermissionSet&quot;
    • version=&quot;1&quot;
    • Name=&quot;SPRestricted&quot;>
    • <IPermission
    • class=&quot;AspNetHostingPermission&quot;
    • version=&quot;1&quot;
    • Level=“Medium&quot;
    • />
    • </PermissionSet>
    Custom policy example
  12. Permissions Who am I?
    • Your code runs with permissions of the logged on user
    • Set up proper testing
      • Especially for anonymous internet facing sites
      • I always use Firefox since it does not log me on
    • Coding & Elevation
      • Impersonation
      • SPSecurity.RunWithElevatedPrivileges
  13. Demo
    • Elevation
  14. Web Part development
    • Do not use any code in your Web Part
    • Always load an UserControl
      • Use the ControlTemplates folder
      • Put the logic into the control
      • Code and design should be separated
    • Put only properties in your Web Part
    • Two namespaces
      • System.Web.UI.WebControls.WebParts
      • Microsoft.SharePoint.WebParts
  15. Web Part development
    • Think of
      • Show only accessible / all content
      • Check if content is published or not
      • Recursive reading SPWeb objects
    • UX & Design
      • AJAX
      • Silverlight
      • SharePoint objects like EditorPart & EntityEditorWithPicker
  16. Demo
    • Web Part Development
  17. Dispose or not to dispose?
    • Two objects in the API model which needs to be disposed of
      • SPSite
      • SPWeb
    • Dispose only when created yourself by
      • SPSite site1 = site2;
      • Use method Dispose() with try, catch, finally
      • or using(…) {…}
    • Do not dispose contextual objects
      • SPContext.Current.Web.Dispose();
    • Tool SPDisposeCheck
  18. Demo
    • Dispose or not to dispose?
  19. Styling, what are the options?
    • CSS stylesheet reference (configurable)
    • Own site definitions, masterpages and templates
      • Separation of layout and content
      • Full control
      • ONET.XML editing
    • Themes
      • Different styles en color schemes for users (only reason to use it!)
      • Testing your theme is terrible
    • Schema files for lists
      • CAML knowledge required
      • Full control of list layout
  20. Styling, what are the options?
    • Use Firefox with the “Web developer” add on
      • Easy retrieval of styling
      • Enabling / Disabling certain elements
      • Visualizing your divs and tables
    • Accessibility
      • Out-of-the-box is not conform standards
      • Accessibility Kit for SharePoint http://aks.hisoftware.com/index.html
    • Resources
      • Heather Solomon http://www.heathersolomon.com/
      • SharePoint Branding Tool http://www.codeplex.com/BrandingTool
  21. Demo
    • Enabling a theme with a feature
  22. Multilanguage
    • Variations
      • Is really a copying mechanism
    • Resources files
      • Resource folders
      • Resx files
    • Custom code must support Multilanguage
      • Web Part output
      • Editor Parts
      • Custom forms
  23. Resource files
    • Application resources
      • Used within the normal execution of the SharePoint application. Think of Application Pages, Web Parts and Controls
      • For multilangual lists: 12CONFIGResources
      • For local webapplications: <Website URL>App_GlobalResources
        • Caveat: cannot deploy by WSP package
    • Provisioning resources
      • are used when provisioning elements. Think of features, site definitions and list definitions
      • 12TEMPLATEFEATURES<feature>ResourcesResources.<culture>.resx
      • 12TEMPLATEFEATURES<feature>Resources
      • 12Resources
    • Administrative application resources
      • Used within the normal execution of the SharePoint application. Think of Application Pages, Web Parts and Controls inside the administrative environment
      • 12CONFIGAdminResources
      • <Website URL><port>App_GlobalResources
  24. Resource files usage
    • C#
      • HttpContext.GetGlobalResourceObject(&quot;MyResource&quot;, &quot;MyName&quot;).ToString();
    • ASPX properties
      • <%$Resources:MyResource, MyName%>
    • XML
      • $Resources:MyResource, MyName
    • XML features, using the default resource file
      • $Resources:MyName
  25. Demo
    • Using a resources for
    • custom multi language Web Part
  26. Solution deployment
    • Deploy the Solution package to the farm
    • Retract the Solutions package
    • When a new web server is added, automatically deploy the solution to it
    • Deploy new versions of the Solution
    • Solution - A CAB file containing
      • Manifest.xml file
      • All the files for the Features, Web Parts, Site or list def changes, etc... that make up your solution
  27. Solution deployment
    • “ Featurize” your custom development
      • Any SharePoint element
      • Changes in your web.config
      • Copying files to specific web folders
    • Deploy features and other assets by WSP Solution package
  28. Development and testing
    • Your development machine does not go into production
    • Use a buildserver
    • Always test with different set of browsers (level 1 and level 2)
    • Watch out for rights
  29. CodePlex
    • The starting point of a lot of new SharePoint functionality
    • Community Kit For SharePoint http://www.codeplex.com/CKS
    • SharePoint learning kit http://www.codeplex.com/SLK
    • SharePoint Features http://www.codeplex.com/features
    • Podcasting kit for SharePoint http://www.codeplex.com/pks
    • Smartpart for SharePoint http://www.codeplex.com/smartpart
    • SharePoint AJAX toolkit http://www.codeplex.com/sharepointajax
  30. Resources
    • Best practices resource center for SharePoint 2007 http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx
    • Patterns and practices SharePoint guidance http://www.codeplex.com/spg
    • Best practices for SharePoint guidance http://msdn.microsoft.com/en-us/library/dd203468.aspx
    • SharePoint Deployment Planning Services https://iwsolve.partners.extranet.microsoft.com/SDPS/
    • Downloadable book: Design and build sites for Office SharePoint Server 2007 http://go.microsoft.com/fwlink/?LinkId=110087
    • Other resources such as http://www.codeplex.com / http://www.dutchsug.nl / www.microsoft.com/sharepoint
    • Gary Lapointe STSADM http://stsadm.blogspot.com/
    • Firebug https://addons.mozilla.org/nl/firefox/addon/1843
    • Yslow https://addons.mozilla.org/nl/firefox/addon/5369
    More resources
    • Questions?
    • Alexander Meijers
    • [email_address]
    • Roel Hans Bethlehem
    • [email_address]
    Contact us

+ Alexander MeijersAlexander Meijers, 10 months ago

custom

3699 views, 3 favs, 4 embeds more stats

This presentation contains best practices from myse more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 3699
    • 3655 on SlideShare
    • 44 from embeds
  • Comments 1
  • Favorites 3
  • Downloads 138
Most viewed embeds
  • 28 views on http://blog.sparked.nl
  • 13 views on http://vanhagen.eu
  • 2 views on http://static.slideshare.net
  • 1 views on http://192.168.10.100

more

All embeds
  • 28 views on http://blog.sparked.nl
  • 13 views on http://vanhagen.eu
  • 2 views on http://static.slideshare.net
  • 1 views on http://192.168.10.100

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories