Showing posts with label Ribbon. Show all posts
Showing posts with label Ribbon. Show all posts

Saturday, May 21, 2011

Adding Anonymous Support to Master Page

Create Anonymous Site

One of the next things I wanted to do is play with having an anonymous site because I know there is a little extra work I need to do master page to handle this correctly. To quickly do this on my dev machine:

  • I extended my web application to have a new internet zone; making sure to allow anonymous access.
  • Then I went to the site via the new url for the zone I just created. I was prompted for a password even though I had anonymous set up. So I needed to do a few other things.
  • I then went to Site Actions >> Site Permissions >> in the ribbon I selected the Anonymous Access button >> and selected Entire Site for anonymous access.
  • I then closed the browser. Then I went Start >> Run As >> typed in the url for the new zone I created.
  • NOTE – make sure you check in your Master Page! Otherwise you will see an unbranded website. I did this by mistake because I was logged in as an Administrator on my development machine but going to the SharePoint site as an anonymous user. Anonymous users cannot see anything that has not been checked in and published.

Below is the result. It still looks the same other than the ribbon at the top has a lot less stuff. At this point the ribbon really does not do much good for an anonymous user and the first request is can this be hidden for anonymous users?

clip_image002

There have been several approaches written about this on the internet. The most simple and clean solution is to add some CSS to the master page to handle this. So I will add the asp:LoginView control into the master page. Any code that I added within the <AnonymousTemplate> will only appear when the user is logged in anonymously. So what I did was add the link to the login page within the <AnonymousTemplate> tags. This way a user will see a link to login when they are anonymous and then not see the link anymore after that.

Below I have added it into the master page with my top navigation. You can put it where ever you want to.

<!-- header -->
<div id="header" class="s4-notdlg">
<div id="menu">
<div id="menu_list">

<asp:LoginView id="LoginView" runat="server">
<AnonymousTemplate>
<a href="/_layouts/authenticate.aspx" title="User Login">Sign In</a>
<style type="text/css">
#s4-ribbonrow {display: none;}
</style>
</AnonymousTemplate>
</asp:LoginView>


<!-- top navigation area -->
<div class="s4-notdlg">
<!-- top navigation publishing data source -->
<PublishingNavigation:PortalSiteMapDataSource
ID="topSiteMap"
runat="server"
EnableViewState="false"
SiteMapProvider="GlobalNavigation"
StartFromCurrentNode="true"
StartingNodeOffset="0"
ShowStartingNode="false"
TrimNonCurrentTypes="Heading"/>

<!-- top navigation menu (set to use the new Simple Rendering) -->
<SharePoint:AspMenu
ID="TopNavigationMenuV4"
EncodeTitle="false"
Runat="server"
EnableViewState="false"
DataSourceID="topSiteMap"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="1"
MaximumDynamicDisplayLevels="1"
SkipLinkText=""
CssClass="s4-tn">
</SharePoint:AspMenu>
</div>
</div>
</div>
</div>



Then when I went back to the site, this is what I now see. I now see a link called Sign In.



clip_image002[6]



Then after I press the Sign In link and log in, the ribbon is displayed again and that Sign In link is hidden from view. Pretty cool.clip_image004[4]



Next



In the next article we are going to look at adding the master page template to search.

Refining the Branding on the Master Page


In the previous blog we created the master page. Now we need to refine it with the CSS.


5 – Refine CSS


What I found out as part of my learning process is that is pretty much impossible to get it perfect on the first try because you will need to get the CSS of the HTML Template working with the SharePoint CSS. It is a very iterative process. In this section I will document several of the sort of things I found out that will help you get the CSS working.



So if you followed along in the last section, you will know we have a screen like this. There are several things you will immediately see an issue – like:



  • Where is the scroll bar?

  • The right border is gone?

  • Etc.

clip_image002



Before we go off trying to fix things, I found the best way to investigate issues with CSS is to us Internet Explorer. Just go to Tools >> Developer Tools. What I do a lot is:



  • Press the “Select Element by Click” button. This freezes the screen and then allows me to mouse over areas of the screen. It will highlight CSS with a blue box around it.

  • I think click on an area of interest, and the DOM tree goes directly to the place.

  • I then even have the ability to tweak the CSS style on the right to see if making a change will give me the intended result.

For what I need to do, I find this to be the perfect tool.


clip_image004


It is going to be hard for me to document each and every little change I made to the CSS and Master Page to show you how I got it to work. As well, I mentioned this is not production ready so I bet there are other potential things that would have to be worked out. What I will cover is some major ones I had to do and will hopefully help you when you need to do this for your web site.


Here is the original CSS I have for my HTML template. We will be making several changes to it. I am providing this for comparison purposes.

body { margin:40px; font-size:0.9em; line-height:14px; font-family:Tahoma, Arial; font-size:11px; border:1px solid #000; background: url(images/bckg.jpg) repeat-x #0A8FDE; }
a { color:#10639a; text-decoration:none;}
a:hover { text-decoration:underline;}
p { padding: 0 10px 5px 10px; }
h1 { font-family: "Myriad Pro", "Trebuchet MS", Arial; margin:0; padding:10px 0 0 10px; text-transform:uppercase; font-size:18px; color:#10639a; }

#header { background:url(images/header_bckg.jpg) no-repeat top right #0EA5FE;}
#logo { padding:50px 60px 0 40px; height:130px; background:url(images/head_bckg.jpg) no-repeat #0EA5FE; }
#logo a{ font-family: "Myriad Pro", "Trebuchet MS", Arial; color:#fff; text-decoration:none; font-weight:bold; font-size:20px; text-transform:uppercase; letter-spacing:5px; }
#logo_text { float:right; width:200px; font-size:10px; color:#fff; line-height:12px; padding-top:5px; }
#menu { background: url(images/menu_bckg.gif) repeat-x #fff; height:40px; padding-top:10px;}
#menu_list {width:600px; margin:0 auto;}
#menu a { display:block; color:#000000; float:left; font-size:14px; text-transform:uppercase; font-weight:bold; text-decoration:none; margin:0 20px; padding-top:12px; font-family: "Myriad Pro", "Trebuchet MS", Arial;}
#menu a:hover{ color:#078DE2;}
.splitter { display:block; float:left;}
.item img { background-color:#FFFFFF; padding:6px; border:1px solid #d0d0d0;}
.item a { display:block; float:left; font-size:12px; color:#bd131d;}
.description { display:block; float:right; width:220px; padding: 10px 20px 30px 0; line-height:12px;}
p.additional { margin:0 10px; color:#9c9c9c; font-size:10px; line-height:12px; border-top:1px solid #bdbdbd; padding: 10px 0; font-weight:normal;}

#text { margin: 0 292px 0 0; background:url(images/content.gif); padding:10px;}
#text li {list-style:none; padding-left:20px; background:url(images/li.gif) no-repeat 0px 4px;line-height:18px;}
#sidebar { float:right; width:245px; padding: 20px 20px 0 30px; font-size:10px; }
#sidebar a{ font-weight:bold; }
#sidebar h1 { font-family: "Myriad Pro", "Trebuchet MS", Arial; margin:0; padding:0 0 20px 0; text-transform:uppercase; color:#000;}

#main { float:left; background:url(images/sidebar_bckg.gif) no-repeat top right #fff; }
#footer {font-family: "Myriad Pro", "Trebuchet MS", Arial; background:url(images/footer_bckg.gif) repeat-x #000; height:55px; clear:both; }
#left_footer { float:left; padding:20px 0 0 30px; color:#fff; font-size:12px;}
#left_footer a { color:#fff;}
#left_footer a:hover { text-decoration:none;}
#right_footer { float:right; padding:20px 30px 0 0; color:#fff; font-size:12px; text-align:right;}
#right_footer a { color:#fff;}

Now I will document my notes on what I had to do to get this template completely working.



  • Moved the CSS that was in the master page to my HTML template CSS file to consolidate things.

  • Removed <div id="main"> from the master page and from the CSS file. It was basically loading in an image that I did not need.

  • Removed the #text li from the CSS because it was interfering with application pages and is not needed for what I am doing.

  • In the HTML template CSS, I removed the margin 40px from the body attribute. Now I have back the scroll bar and now the page is taking up the screen. However I do not have the nice borders on the left and right. Still more work to be done.

clip_image002[6]



  • Next I created a new CSS style that controls the width of the page (masterPageWidth) and then placed the div tag in the master page so it covers all the content place holders. Now we have our nice left and right hand side borders.

clip_image004[5]



  • Next you may be wondering what the heck is that big blue area on the right all about in the screenshot above? Using the IE >> Tools >> Developers tools I quickly found out that the CSS for my HTML template had a #text tag with a margin setting that was causing that. I removed it and this starting to look a lot better – see below.

clip_image006



  • Next I need to make some modifications to show the search box and the tagging controls better. It is much easier now to place them given I have the CSS worked. I simply went back to the master page and added a HTML table to right justify it and make it appear on the same line.

  • I also added a breadcrumb control which is was part of the SP 2007 by added <asp:SiteMapPath runat="server"/> to the master page. I also added some CSS to make it present well.

clip_image008



  • Next issue I ran into was with the dialog boxes as you can see in the screenshot below. As you can see it is way too large. I had a good idea this had to do with the new CSS style I called (masterPageWidth). Well the SharePoint 2010 Branding Wrox book pointed me in right direction here. I added some CSS to override some of changes I was making. Specifically I added styles for ms-dialog which solved my problem pretty quickly.

clip_image010



  • Another interesting thing I ran into when clicking around I found the following issue in the below screenshot. When I went to manage the Approvers user group; look at this. Apparently the entire background is not being pushed down. The reason why is I added some CSS into the master page (way back in the beginning of this blog) that will show the left hand navigation when it is needed. It is needed for user administration. I was able to resolve the problem by again using the handy dandy IE Developer tool. First, I overrode s4-leftpanel and set the background to white. Second, I modified the masterPageWidth attribute that I added to have a white background as well.

clip_image012



  • Another thing you may have noticed is in the top I have created sub site. However if you were to click into them, none of them would have the branding. All you need to do in the sub site is go to Site Setting >> Manage Site Features >> activate SharePoint Server Publishing and the branding will be pulled through. Now you can see that the sub site branding is coming through nice and clean.

clip_image014



  • Then I decided to click around some more in my basic site with almost no content. Most everything was working.

  • Then I decided to add a blog site template. I turned on publishing and found this issue. I used the IE Developer tool and found ms-blogRightZone was the problem. I overrode in my CSS file to have a white background but again it was not perfect. A longer term solution would be that I am going to have to make the blog text area thinner so the ms-blogRightZone does not float off too far to the right.

clip_image016


Final Code


Here is the final master page code that I created.

<!-- =====  Start Scrolling Body Area ============================================================ -->

<!-- these two div id's are used to setup the main scrolling page area, they should stay if you are sticking the ribbon to the top -->
<div ID="s4-workspace" class="s4-nosetwidth"> <!-- NOTE: s4-nosetwidth is used when you are setting a fixed page width in css, remove for 100% -->
<div ID="s4-bodyContainer">

<!-- id="mso_contentdiv" required, helps SharePoint put the web part editing pane in the main body on the right, you can move the ID if needed -->
<div id="MSO_ContentDiv" runat="server">

<!-- control width -->
<div class="masterPageWidth">

<!-- header -->
<div id="header" class="s4-notdlg">
<div id="menu">
<div id="menu_list">
<!-- top navigation area -->
<div class="s4-notdlg">
<!-- top navigation publishing data source -->
<PublishingNavigation:PortalSiteMapDataSource
ID="topSiteMap"
runat="server"
EnableViewState="false"
SiteMapProvider="GlobalNavigation"
StartFromCurrentNode="true"
StartingNodeOffset="0"
ShowStartingNode="false"
TrimNonCurrentTypes="Heading"/>

<!-- top navigation menu (set to use the new Simple Rendering) -->
<SharePoint:AspMenu
ID="TopNavigationMenuV4"
EncodeTitle="false"
Runat="server"
EnableViewState="false"
DataSourceID="topSiteMap"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="1"
MaximumDynamicDisplayLevels="1"
SkipLinkText=""
CssClass="s4-tn">
</SharePoint:AspMenu>
</div>
</div>
</div>
</div>

<div id="logo" class="s4-notdlg">
<div id="logo_text">
<a href="/SitePages/Home.aspx">Branding Blog</a>
<br/><br/>
Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Pellentesque lobortis nibh
eu mauris. Morbi arcu tortor, auctor et,
facilisis nec, egestas sit amet, enim.
</div>
</div>

<!-- page editing status bar -->
<div class="s4-notdlg">
<div id="s4-statusbarcontainer" class="s4-notdlg">
<div id="pageStatusBar" class="s4-status-s1"></div>
</div>
</div>

<!-- styles needed to have left nav to the left of the main area -->
<div id="s4-leftpanel" class="s4-notdlg">
<!-- The quick launch bar / left navigation -->
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server">
<style type="text/css">
/* hide the left nav and titles for pages that don't override the left nav bar */
#s4-leftpanel {
display: none;
}
.s4-ca {
margin-left:0px;
}
</style>
</asp:ContentPlaceHolder>

<!-- The small menu attached Quick Launch bar. Used only on very specific pages -->
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server"/>
</div>
<!--end header -->

<!-- main -->
<div id="text" >
<!-- s4-ca is the main body div -->
<div class="s4-ca">

<table width="100%" class="s4-notdlg">
<tr>
<td width="90%">
<div id="breadcrumb">
<asp:SiteMapPath runat="server"/>
</div>
</td>
<td align="right">
<!-- search box loads from delegate, style with CSS -->
<div class="s4-notdlg">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4"/>
</asp:ContentPlaceHolder>
</div>
</td>
<td nowrap>
<div class="s4-notdlg">
<!-- links for I like it and Tags and Notes -->
<!-- use ControlID="GlobalSiteLink3" for larger icons or remove this line entirely for no icons -->
<SharePoint:DelegateControl ControlId="GlobalSiteLink3-mini" Scope="Farm" runat="server"/>
</div>
</td>
</tr>
</table>

<div class="s4-notdlg">
<!-- page title -->
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
</div>

<!-- place a table around this to handle funky markup in _Layouts/areacachesettings.aspx (if you want) -->
<asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" />

<div>
<!-- page content loads from the pages and pages layout -->
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"/>
</div>
</div>
</div>
<!-- end main -->

<!-- footer -->
<div id="footer" class="s4-notdlg">
<div id="left_footer">&copy; Copyright 2008 <b>Russo</b></div>
<div id="right_footer">
<!-- Please do not change or delete this link. Read the license! Thanks. :-) -->
Design by <a href="http://www.realitysoftware.ca" title="Website Design"><strong>Reality Software</strong></a>
</div>
</div>
<!-- end footer -->

<!-- the developer dashboard can be turned on by administrators and shows debuging and performance info for the page -->
<div id="DeveloperDashboard" class="ms-developerdashboard">
<SharePoint:DeveloperDashboard runat="server"/>
</div>

</div>
</div>
</div>
</div>

<!-- ===== End scrolling body area with these two previous div's ================================================ -->

Here is the final CSS that I modified through the process:

body { font-size:0.9em; line-height:14px; font-family:Tahoma, Arial; font-size:11px; border:1px solid #000; background: url(images/bckg.jpg) repeat-x #0A8FDE; }
a { color:#10639a; text-decoration:none;}
a:hover { text-decoration:underline;}
p { padding: 0 10px 5px 10px; }
h1 { font-family: "Myriad Pro", "Trebuchet MS", Arial; margin:0; padding:10px 0 0 10px; text-transform:uppercase; font-size:18px; color:#10639a; }

#header { background:url(images/header_bckg.jpg) no-repeat top right #0EA5FE;}
#logo { padding:50px 60px 0 40px; height:130px; background:url(images/head_bckg.jpg) no-repeat #0EA5FE; }
#logo a{ font-family: "Myriad Pro", "Trebuchet MS", Arial; color:#fff; text-decoration:none; font-weight:bold; font-size:20px; text-transform:uppercase; letter-spacing:5px; }
#logo_text { float:right; width:200px; font-size:10px; color:#fff; line-height:12px; padding-top:5px; }
#menu { background: url(images/menu_bckg.gif) repeat-x #fff; height:40px; padding-top:10px;}
#menu_list {width:600px; margin:0 auto;}
#menu a { display:block; color:#000000; float:left; font-size:14px; text-transform:uppercase; font-weight:bold; text-decoration:none; margin:0 20px; padding-top:12px; font-family: "Myriad Pro", "Trebuchet MS", Arial;}
#menu a:hover{ color:#078DE2;}
.splitter { display:block; float:left;}
.item img { background-color:#FFFFFF; padding:6px; border:1px solid #d0d0d0;}
.item a { display:block; float:left; font-size:12px; color:#bd131d;}
.description { display:block; float:right; width:220px; padding: 10px 20px 30px 0; line-height:12px;}
p.additional { margin:0 10px; color:#9c9c9c; font-size:10px; line-height:12px; border-top:1px solid #bdbdbd; padding: 10px 0; font-weight:normal;}

#text { margin: 0 0 0 0; background:url(images/content.gif); padding:10px; }
#sidebar { float:right; width:245px; padding: 20px 20px 0 30px; font-size:10px; }
#sidebar a{ font-weight:bold; }
#sidebar h1 { font-family: "Myriad Pro", "Trebuchet MS", Arial; margin:0; padding:0 0 20px 0; text-transform:uppercase; color:#000;}

#footer {font-family: "Myriad Pro", "Trebuchet MS", Arial; background:url(images/footer_bckg.gif) repeat-x #000; height:55px; clear:both; }
#left_footer { float:left; padding:20px 0 0 30px; color:#fff; font-size:12px;}
#left_footer a { color:#fff;}
#left_footer a:hover { text-decoration:none;}
#right_footer { float:right; padding:20px 30px 0 0; color:#fff; font-size:12px; text-align:right;}
#right_footer a { color:#fff;}

/* Control Page Width */
.masterPageWidth { width: 960px; margin: auto; background-color:white; }
#breadcrumb { font-family: "Myriad Pro", "Trebuchet MS", Arial; margin:0; text-transform:uppercase; font-size:18px; color:#10639a; }
/* fix scrolling on list pages */
#s4-bodyContainer { position: relative; }
/* hide body scrolling (SharePoint will handle) */
body { height:100%; overflow:hidden; width:100%; }
/* popout breadcrumb menu needs background color for firefox */
.s4-breadcrumb-menu { background:#F2F2F2; }
/* if you want to change the left nav width, change this and the margin-left in .s4-ca */
body #s4-leftpanel { /* width:155px; */ }
/* body area normally has a white background */
.s4-ca { background:transparent none repeat scroll 0 0; /* margin-left:155px; */ }
/*Fix some issues with the dialog boxes*/
.ms-dialog .masterPageWidth { width:auto !important; }
.ms-dialog body { background-color: white; background-image: none; }
/* make the background white*/
#s4-leftpanel { background-color:white; }
/* right zone override for the blog*/
.ms-blogRightZone { background-color:white; }

Conclusions


You can probably click around in a bunch more places and find more issues with my template. All of them should be easy to fix with some CSS changes. This is why I said I am not building a production ready branding implementation but this will show you how to start one.


Interesting Note


This is the second time I have done this template; and the third time I have done some real branding into SharePoint. One interesting thing that I did not encounter this time around was the double vertical scrollbar appearing. I cannot replicate the scenario right now but it is worth noting. Below is a somewhat related thing I ran into earlier. You may recall I lost the vertical scroll bar completely (screenshot below). Notice how the scroll bar is directly tied to the ribbon. In this case I had some CSS in the HTML template that was pushing the ribbon off the screen which subsequently pushed the scrollbar off to the right making it inaccessible.


clip_image002[8]


One interesting thing to take note of is the screenshot below. This is a screen shot after I fixed my custom CSS to show the ribbon correctly. You may not have ever noticed but in SharePoint 2010 the scrollbar does not go all the way up; it stops at the ribbon. SharePoint 2010 takes over the way the scrollbar is displayed to ensure that top ribbon is always displayable to the user. When implementing your custom templates and CSS you will have to make modifications to accommodate this.


clip_image003



Next


We are going to explore making anonymous pages work with the master page.

Saturday, May 15, 2010

New SharePoint 2010 Features Part 3 – Development Features

Development Features

In this part of this continuing series I am going to look at many of the new development features available to us in SharePoint 2010.

Client Object Model (Reference)

SharePoint 2010 provides a new client object model that allows us to access SharePoint data and features from remote machines or processes. We now have three new client APIs which we can use to access and utilize features and functionality of SharePoint 2010:

  • SharePoint 2010 can be accessed from .NET 3.5 or Higher
  • Can be accessed from Silverlight 2.0 or higher
  • ECMAScript (Javascript, Jscript) on the client site in a browser

Note this provides rich, but subset, of the SharePoint API.

Client Object Model Thoughts

I am personally very excited to see this as a developer because up to this point a lot of engineering work was required to utilize these web services to achieve sometimes what would be considered a simple operation if the code was using the SharePoint API.

What this enables us to do is access SharePoint data more quickly and easily from remote machines. We no longer have to only use SharePoint web services to access data. This allows us to rapidly create more seamless .NET solutions with SharePoint. I know it can be considered a more elegant solution to using SharePoint Web Service to retrieve SharePoint data from across application boundaries or domains. However there are still many ways you can architect a solution ensure there is strong decoupling maintained.

Seriously the ease getting data from lists and using that data in external processes using this new client object model is a game changer in my book. I have had so many instances where I have had to create solutions and wanted to use the SharePoint API, and had to host parts of that solution directly in SharePoint just when really did not need to. Now if I have custom ASP.net application, a web service connected to an InfoPath form, etc. I can simply use this API to integrate with SharePoint 2010.

Event Improvements (Reference)

What Microsoft means when referring to "New Event Improvements" are the events that are available to developers to create customizations to out of the box behavior. Typically in SharePoint 2007 this was adding an event handler to a SharePoint list for when a new item is added, deleted, checked out, etc.

So some of the new events that are available to us are:

  • New event handlers for when lists are added or deleted.
  • New event handlers for when before sites are created and after they have been provisioned.
  • Synchronous After Events. If you are a developer you will know that the default behavior that before events are synchronous and after events are asynchronous. Now you have the ability to make after events synchronous too so that you complete an operation after a list item has been committed to the database but before the user sees it in the list.
  • To support the new events for list and web events, events that typically could not be bound to the Site Collection level now can be.
  • Running under elevate privileges is commonplace to perform actions but when doing this you did not have access to the originating user. With SharePoint 2010 we now have access to this user.
  • Event Error page now allows developers to handle unexpected errors more gracefully than before.

New Event Improvements Thoughts

Many of these features really do not benefit the everyday business user however they really help developers create better solutions.

Alerts Enhancements (Reference)

The new important thing that is being supported is mobile messaging with Short Message Service (SMS) messages.

Alerts Enhancements Thoughts

This is really important because we all know how important mobile computing is for both consumers and business users. Better support of communication of content within SharePoint over mobile platforms is critical for the short-term success of SharePoint.

Mobile Device Development Enhancements (Reference)

For SharePoint 2010 there is greater support for mobile devices. We have already discussed SMS messaging is now supported. Along with we now have the ability to create mobile pages that function just like standard web part pages. This is supported through mobile adapters. A mobile adapter can be created for any web part that you write and most of the major web parts out of the box come with mobile adapters. Simply map mobile adapters to web parts on existing pages and when a mobile device accesses the web page, the web part page with the mobile web parts will be displayed.

As well, with SharePoint 2010 there several new mobile page templates and over 60 new public mobile controls. As well, there are new Mobile Document Viewers that enable users to open documents from document libraries on their device without having traditional desktop application installed.

Mobile Device Development Enhancements Thoughts

As I mentioned before business computing from mobile devices is only going to continue to grow over the next two years because they are not longer just viewed as communications tools for email or surfing the internet. It is imperative that SharePoint be able to support the sort of functionality that is being provided.

Query Enhancements (Reference)

SharePoint 2010 provides numerous new ways to access data that we did not have in previous versions of SharePoint. CAML queries are fine but the syntax could be challenging at times, especially if the queries had to be dynamic. This typically pushed developers down the path of using the SharePoint API to do "queries" however this could lead to other issues. How we have:

  • LINQ to SharePoint provider that will translate to CAML.
  • Ability to use client side code to perform queries. The new client object model can run either LINQ or CAML queries.
  • ADO.NET Data Services Framework provides to query content databases.

It was noted by Microsoft to avoid using the SharePoint Data Providing Web Services as better performance can be realized by using the client object model of ADO.net Data Services Framework. The web services will continue to be supported for interoperability and backwards compatibility.

Query Enhancement Thoughts

From a developer standpoint this is extremely exciting to see that SharePoint content and data is more quickly accessible than in previous versions of SharePoint. We now have the ability to use SharePoint data pretty much anywhere in the SharePoint stack by simply just referencing the SharePoint dll.

Ribbon

SharePoint now has a Server Ribbon which is the primary location where users can initiate commands from. The concept is identical to the MS Office 2007 Ribbon.

Ribbon Thoughts (Reference)

From what I have seen this is a great new way for users to initiate commands in SharePoint. In SharePoint 2007 there were several different places where menu items would be placed sometimes creating confusion. The ribbon concept as well allows new users to easily transition into using SharePoint based on their MS Office experience.

Service Application Framework (Reference)

The Service Application Framework provides developers with a platform in which they can build middle tier applications that can be hosted within SharePoint 2010. Services developed with this framework can be utilized natively within existing SharePoint features – like being centrally hosted, load balanced, claims based security, etc. As well they can take advantage of SharePoint 2010 administration as they can be managed in central administration just like any of the out of the box services, can upgrade packages created, made part of backup/restore and hook into account management. You can even build custom administration pages and host them in Central Admin.

Microsoft has used the Service Application Framework to develop their services like SharePoint Search. This framework is meant to replace the SSP of SharePoint 2007.

Service Application Framework Thoughts

This is again very exciting to see as it will open up a new market for Microsoft partners build solutions that can be hosted in SharePoint 2010. This can significantly reduce cost to create or purchase custom solutions as the entire SharePoint platform can be leveraged.

Silverlight Integration and Cross-Domain Data Access (Reference)

SharePoint 2010 now provides a web part that is made specifically for hosting Silverlight applications. This was possible on SharePoint 2007 however this has been made significantly easier with SharePoint 2010. All that needs to be done is deploy the Silverlight application and simply reference the URL to where it is hosted. If the Silverlight application accesses SharePoint data and is hosted in a different web domain a configuration file is needed.

In correlation with this there is Silverlight Cross-Domain Data Access (Silverlight CDA) which supports secure integration between SharePoint and Silverlight applications that reside on different domains. .

Silverlight Integration and Cross-Domain Data Access Thoughts

I am not sure if my description above does this justice but SharePoint 2010 and Silverlight integration is a game changer for delivery of custom solutions within SharePoint. Sometimes building custom applications with web parts does not always work well but Silverlight provides a platform to build Rich Internet Applications that can be easily accessible through SharePoint. I recently had a client who wanted to migrate off of Oracle Forms to save licensing costs and to reduce their desktop footprint. We recommended Silverlight because the new solution had to be web accessible, needed to support complex/dynamic data entry screens, and have little desktop footprint. ASP.net or WPF could not satisfy these requirements however Silverlight can. Now this new application can be embedded right into their Intranet providing users with a completely seamless user experience. I am really excited to see how this will be used.

UI Enhancements (Reference)

There are numerous, significant user interface enhancements that have been made to SharePoint 2010. For instance a new ribbon has been added to the screen which has an identical user experience to that of Office. Custom commands can be easily integrated into this framework. Second application pages now reference the site master pages which as not the case in SharePoint 2007. Third CSS has been significantly revamped and divided into multiple files to enable better customization and loading performance.

UI Enhancements Thoughts

Again the improvements to the athletics of SharePoint 2010 have been pretty good. It is more of a refinement of SharePoint 2007 which was a significant jump when compared to SharePoint 2003.

Custom Field Rendering Enhancements (Reference)

When building a custom list or refining an existing one, there was a file in WSS 3.0 called fldtypes*.xml which was used to control how fields were rendered on the Display, Edit, and New pages as well as Site Column, Change Site Column, Create Column, and Change Column pages. For SharePoint 2010 fields will be rendered on list view pages by using XSLT stylesheets.

Custom Field Rendering Enhancements Thoughts

This again is something more developers and just a change in the way custom fields will be defined. Only thing that you should consider is you are migrating custom solutions built for 2007, even though there is backwards compatibility, you should consider maybe refactoring the solution for 2010.