Mavention. Laat SharePoint voor u werken.
SharePoint 2010Web Content Management
The Developer Story
Mavention. Laat SharePoint voor u werken. 2
Mavention. Laat SharePoint voor u werken. 3
Agenda• WCM Challenges in the past• WCM the 2010 way• Not-so-out-of-the-box stuff• Tips’N’Tricks
Mavention. Laat SharePoint voor u werken. 4
Anonymous E
nabled
5
Customers’ challenges• No support for
web standards• Confusing User
Experience• No support for
media• Expensive!
6
MOSS 2007 WCM developer challenges• No developer tools• Legacy HTML
implementation• No control over HTML• Markup: mine vs. theirs
7
“Where shouldI begin?”
Mavention. Laat SharePoint voor u werken. 8
“...and then SharePoint became the center of the universe...”
Mavention. Laat SharePoint voor u werken. 9
Good News• Everything you
learned applies!• SharePoint Server
2010 For Internet Sites Standard
10
If you are content editor• Great User Experience
– Rich authoring• Ribbon• Rich Text Editor• Fluent UI• Live preview• Web Parts in content
– Multilingual UI– Cross-browser!
• Support for Assets & Rich Media• Managed Metadata• Web Analytics
Mavention. Laat SharePoint voor u werken. 11
demoSharePoint Server 2010 Rich Editing Experience
Mavention. Laat SharePoint voor u werken. 12
If you are developer
• Cleaner markup• Highly extensible UI• Improved Content Query Web Part• Support for Silverlight• Support for AJAX• New theming engine
Mavention. Laat SharePoint voor u werken. 13
Content Query Web Part 2010• Slots• Content-to-content• Renders div’s by default• Still no paging– at least not out of the box ;-)
Mavention. Laat SharePoint voor u werken. 14
demoContent Query Web Part new capabilities
15
Thenot-so-out-of-the-boxstuff
Mavention. Laat SharePoint voor u werken. 16
CKS:DEV
• Set of SharePoint productivity tools for developers
• Fully integrated with Visual Studio 2010 SharePoint Developer Tools
• Free & Open source• Community driven
• What’s there for Publishing:– Import Content Type– Create Page Layout– Explore Publishing Pages– Explore Master Pages Gallery– Explore Style Library
• Coming soon:– Export Publishing Page– Cancel Adding SharePoint Items– Activate Selected Features– …and more
Get it now from http://blog.mastykarz.nl/go/diwug-1
Mavention. Laat SharePoint voor u werken. 17
demoCKS:DEV features for WCM solutions
Mavention. Laat SharePoint voor u werken. 18
SubclassedContent Query Web Part• New functionality
– Support for Paging• Custom XSLT parameters and functions
– EXSLT– Calling into SharePoint Object Model
• Easy access to hidden properties– Setting custom XSLT– Overriding Query– Toggling Cache
• More info:http://blog.mastykarz.nl/go/diwug-2
Mavention. Laat SharePoint voor u werken. 19
demoCQWP show off: Cool Pager with Mavention Content Query Web Part
Mavention. Laat SharePoint voor u werken. 20
10SharePoint WCMTips’N’Tricks
Mavention. Laat SharePoint voor u werken. 21
Tip #1: Be careful what you promise• Well-formed XHTML vs. Valid XHTML• CQWP vs. Managed Metadata• No more support for IE6!• Custom vs. out-of-the-box– Out of the box: solid foundation– Still lots of partner opportunity
Mavention. Laat SharePoint voor u werken. 22
Tip #2: UseSimpleRendering• SharePoint 2007 menu as tables• UseSimpleRendering– New property on the SharePoint 2010 menu
control– Renders menu as a nested unordered list
<SharePoint:AspMenu UseSimpleRendering="true" runat="server" />
Mavention. Laat SharePoint voor u werken. 23
Tip #3: Make branding available in RTE• RichHtmlField attributes
– StyleSheet – point to your CSS file– PrefixStyleSheet – create custom prefix to suppress standard
branding– Doesn’t work with CEWP!
<PublishingWebControls:RichHtmlFieldFieldName="PublishingPageContent“StyleSheet="<% $SPUrl:~sitecollection/Style Library/CSS/styles.css %>"PrefixStyleSheet="m-“HasInitialFocus="True“MinimumEditHeight="400px" DisableInputFieldLabel="true" runat="server"></PublishingWebControls:RichHtmlField>
Mavention. Laat SharePoint voor u werken. 24
Tip #4: Test anonymous ASAP• Same as in MOSS 2007 but now even more
important• Requires extra attention– SharePoint LINQ– Silverlight OM– Hierarchical titleshttp://blog.mastykarz.nl/go/diwug-4– Body ID’shttp://blog.mastykarz.nl/go/diwug-5
Mavention. Laat SharePoint voor u werken. 25
Tip #5: Unlock Client OM for anonymous$wa = Get-SPWebApplication -Identity "http://diwug"$wa.ClientCallableSettings.AnonymousRestrictedTypes.Remove([Microsoft.SharePoint.SPList], "GetItems")$wa.Update()
• Keep in mind: Decreases security!• More info:
http://blog.mastykarz.nl/go/diwug-3
Mavention. Laat SharePoint voor u werken. 26
Tip #6: Mind new inheritance model• In SharePoint 2007 <FieldRefs /> to
inherit all fields• In SharePoint 2010 Inherits=“TRUE”– FieldRefs not required anymore
Mavention. Laat SharePoint voor u werken. 27
Tip #7: Use conditional content• Leverage conditional controls to optimize page
output• Use conditional processing instead of
conditional rendering• More info:
http://blog.mastykarz.nl/go/diwug-6
Mavention. Laat SharePoint voor u werken. 28
Tip #8: Set the defaults• DefaultPageLayout: new in SharePoint Server 2010 Publishing Feature• Configures the default Page Layout used for one-click creating new Publishing
Pages
<WebFeatures> <Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416"> <Property Key="DefaultPageLayout" Value="~SiteCollection/_catalogs/masterpage/MyLayout.aspx"/> </Feature></WebFeatures>
• Tip: Want to create pages even faster?http://blog.mastykarz.nl/go/diwug-7
Mavention. Laat SharePoint voor u werken. 29
Tip #9: Control your CSS• Introduced in SharePoint 2007• Allows you to register CSS file• New in SharePoint 2010: After property– Allows you to load your CSS after some other CSS
<SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/myStyles.css %>" After="corev4.css" runat="server"/>
Mavention. Laat SharePoint voor u werken. 30
Tip #10: Disable SharePoint Designer• Not needed in production for Internet-facing
websites• Disabling finally supported!• Configurable per:– Web Application– Site Collection
Mavention. Laat SharePoint voor u werken. 31
Tip #11: Don’t use Pages in code• In MOSS 2007
– Title depends on locale (Pages/Pagina’s/Seiten)– Same URL (Pages)
• Except for German: Seiten
• In SharePoint Server 2010 “fixed”– Both title and URL depend on locale– Retrieve dynamically
• In code: PublishingWeb.DefaultPagesListName• In XML: $Resources:osrvcore,List_Pages_UrlName;
<Property Key="SearchCenterUrl" Value="~SiteCollection/nl/Search/$Resources:osrvcore,List_Pages_UrlName;" />
Mavention. Laat SharePoint voor u werken. 32
Tip #12: Disable Presence• Supported!– No more dodgy JS
• Per Web Application setting
Mavention. Laat SharePoint voor u werken. 33
Tip #13: Hide Ribbon from anonymous users• Conditional processing and Conditional rendering
don’t work• What you need to do– Hide in CSS
<Mavention:SecurityTrimmedControlRendering AuthenticationRestriction=“AnonymousUsersOnly” runat=“server”> <style type=“text/css”> .ribbonbackground { display: none; visibility: hidden; } </style></Mavention:SecurityTrimmedControlRendering>
Mavention. Laat SharePoint voor u werken. 34
Extra tip: Learn your tools• Great capabilities• Lots of new features• New way of thinking• It does pay back!
Mavention. Laat SharePoint voor u werken. 35
Key takeaways• Many improvements for content editors and
developers• New capabilities simplify building rich
websites• Visual Studio 2010 SharePoint Developer Tools
are your friend: take your time and learn them• Building Internet-facing sites is different: don’t
underestimate it
Mavention. Laat SharePoint voor u werken.
Mavention. Laat SharePoint voor u werken. 37
Resources• Waldek Mastykarz – Innovation Matters
http://blog.mastykarz.nl• Community Kit for SharePoint: Development Tools Edition
http://cksdev.codeplex.com
• SharePoint Developer Centerhttp://msdn.microsoft.com/sharepoint
• Microsoft SharePoint Team Bloghttp://blogs.msdn.com/sharepoint
• Microsoft Enterprise Content Management Team Bloghttp://blogs.msdn.com/ecm
• Microsoft SharePoint Designer Team Bloghttp://blogs.msdn.com/sharepointdesigner
Top Related