Tuesday, December 15, 2009

Share Point Free E-Books



Professional Microsoft SharePoint 2007 Workflow Programming
SharePoint 2007 Workflow offers a vast array of rich workflow programming facilities
so that you can implement and deploy your own custom workflows and activities, allowing
you to create features and functions that were never before possible. Packed with
practical, real-world examples and step-by-step recipes, this book presents you
with detailed code walkthroughs and in-depth technical discussions to help you gain
the skills, knowledge, and experience you need to develop and to deploy your own
custom SharePoint workflows and activities. You'll discover the similarities and
differences between workflow programming and traditional procedural programming
languages such as C#. You'll also explore workflow association and initiation input
forms and examine how SharePoint takes advantage of the extensibility points of
Windows Workflow Foundation to add support to specific functions of SharePoint.
Along the way, you'll discover how to implement data description and manifest files
to deploy your custom workflows and actions through SharePoint solution packages.
What you will learn from this book *The standard SharePoint activities inherited
from CallExternalMethodActivity and HandleExternalEventActivity activities *How
to take advantage of workflow security in your own custom workflows *Techniques
for implementing a custom workflow edit task input form and deploy it as part of
the deployment of a site content type *How to develop, deploy, and test a custom
Office SharePoint Designer 2007 action *Ways to use the XML markup language to describe
your own custom actions and conditions to Office SharePoint Designer 2007



SharePoint 2007 Development Recipes offers a range of ready to use code recipes
that provide the building blocks for solving many common SharePoint 2007 programming
dilemmas. This practical, handsจCon guide categorizes recipes by problem area, for
example site management, event handlers, users, lists, and web parts, and source
code is provided in both VB and C#. As well as providing an invaluable reference,
Mark Gerow also includes clear, supporting guidelines to help you modify the code
samples for the broadest range of applications. For each recipe you will find *
Background and design considerations * Source code in both VB and C# * Discussion
of variations on the provided examples * Cross reference to core SharePoint classes
* If you find yourself asking, กฐHow do I solve this SharePoint development problem?
you will find all the answers in Mark Gerowกฏs supremely useful book. What you'll
learn * SharePoint Recipes will provide readyจCtoจCuse examples of how to programmatically
* Add web parts to pages. * Calculate exact storage used for a list, site, or group
of sites. * Track and record site, page, and link hits. * Manage users, roles, and
groups using both Windows and FormsจCbased authentication. * Create sites and site
collections. * Create lists and a document library. * Upload and edit documents
and list items. * Develop event handlers and workflows. * Use JavaScript to alter
the behavior of web part pages. * Edit built in web site properties. * Work with
features and solutions.



SharePoint is a web-based collaboration and document management platform from Microsoft.
Microsoft Offce SharePoint Designer (SPD) is a WYSIWYG HTML editor and web design
program, which has replaced FrontPage, and is the ideal environment for working
with pages on a SharePoint site. This book is ideal for people new to SharePoint
Designer who need to put together a working SharePoint site as quickly as possible.
If you want to get started, and finished, as quickly as possible, this book is for
you. You won’t just learn how to use SharePoint Designer; you’ll see how to use
it to put together a SharePoint site. This book will introduce you to the SharePoint
Designer environment, and lead you through the key features as you complete important
SharePoint customization activities. Throughout the book, you will be developing
an example site for a wine business, and you will see what help SharePoint Designer
offers, and step through clear instructions to get things done. The book begins
by familiarizing you with the Designer environment and helping you to connect to
your SharePoint site. You will then learn how to add and format content, and use
SharePoint’s workfow tools to collaborate with other content creators before learning
how to connect to different SharePoint data sources. You will also learn to use
ASP.NET Web Parts in your SharePoint site to create calendars, graphs, integrate
with Exchange Server, and add powerful search tools to your site.



SharePoint 2003 Advanced Concepts : Site Definitions, Custom Templates, and Global
Customizations

In SharePoint 2003 Advanced Concepts, two world-class SharePoint consultants show
how to make SharePoint jump through hoopsกฑ for you and do exactly what you want.

Jason Nadrowski and Stacy Draper have built some of the most diverse SharePoint
enterprise implementations.


Now, drawing on their extraordinary in the trenchesกฑ experience, they present solutions,
techniques, and examples you simply wonกฏt find anywhere else.

SharePoint 2003 Advanced Concepts addresses every facet of SharePoint customization,
from site definitions and templates to document libraries and custom properties.


The authors cover both Windows SharePoint Services and SharePoint Portal Server
2003 and illuminate SharePoint's interactions with other technologies Chelping you
troubleshoot problems far more effectively. Next time you encounter a tough SharePoint
development challenge, donกฏt waste time: get your proven solution right here, in
SharePoint 2003 Advanced Concepts.

• Construct more powerful site and list templates


• Control how SharePoint uses ghosted and unghosted pages

• Use custom site definitions to gain finer control over your site


• Build list definitions with custom metadata, views, and forms

• Troubleshoot WEBTEMP, ONET.XML, SCHEMA.XML, SharePoint databases, and their interactions

• Create custom property types to extend SharePointกฏs functionality

• Integrate with other systems and SharePoint sites so that you can use their information
more effectively,

• Customize themes and interactive Help, one step at a time

• Customize email alerts and system notifications

• Extend the capabilities of document libraries

• Control document display and behavior based on extensions

PassWord:www.ITeBookHome.com




Essential SharePoint
Essential Sharepoint will help you do just that. It's not only the most complete
guide for setting up and using these increasingly popular sites, but it also explains
in detail the integration that makes SharePoint exciting. Everything you need to
know about SharePoint is covered, including: * hosting choices * administration
* customization * integration with Microsoft Office * developing new SharePoint
functionality * when to use SharePoint portal server Essential Sharepoint covers
all the key topics for getting up and running with this powerful and popular set
of collaboration tools. And it's not just for members of the IT staff. This comprehensive
guide is for anyone in an organization who wants to explore Microsoft SharePoint
in order to foster collaboration with other users




Beginning SharePoint Administration: Windows SharePoint Services
and SharePoint Portal Server
Beginning SharePoint Administration: Windows SharePoint Services and SharePoint
Portal Server Wrox | ISBN 0470038632 | PDF | 2006 | 522 pages | 7,1 MB This practical
guide covers the many uses of SharePoint 2003 as well as the differences between
SharePoint Portal Server (SPS) and Windows(r) SharePoint Services (WSS). In addition,
the book will help you decide if you need only WSS or if you should also implement
SPS. While the main focus is on planning, installation, configuration, and administration,
you'll also learn how to customize SharePoint by creating templates, building your
own Site Definition, and using FrontPage(r) to enhance the look and feel of SharePoint
sites. In addition, you will learn the business-critical methods of backing up and
restoring your system. Microsoft MVP and author Goran Husman shares numerous tips
for smart add-ons and utilities that will enhance the functionality of SharePoint
by providing better navigation, the ability to integrate with other systems, and
effective workflow solutions. His practical and easy-to-follow instructions will
help you get your SharePoint environment up and running in no time. He even shows
you how to make your eventual upgrade to SharePoint 2007 seamless. What you will
learn from this book * How to install Windows SharePoint Services (WSS) and SharePoint
Portal Server (SPS) * Tips on what to focus on when customizing SharePoint * How
to productively use SharePoint with Microsoft Office and Microsoft Outlook(r) *
Various ways to handle backup and restore procedures * The many free utilities and
commercial third-party products that are available * How to create and work with
intranet pages


Thursday, December 10, 2009

Sharepoint Accesibility

One of the most painstaking web programming tasks is achieving web accessibility. Although estimates vary, between 5 and 10% of web users have some sort of accessibility need.
There are several standards, and determining which ones to support depends largely on your business needs and location. The US Government for instance has Section 508 compliance while the Canadian Government has Common Look And Feel 2.0 Accessibility standards.
Generally all of these standards build upon the specifications of the W3C's Web Content Accessibility Guidelines, specifically the Priority 1 and 2 requirements.
Some examples of WCAG requirements are that all web pages must have valid HTML and CSS code, images must have alternative descriptive text, and there must be alternative methods of viewing data or accessing page functionality. Accessible browsers such as JAWS cannot interpret client scripts or view images in the way that a regular browser can, but they can still provide a spoken translation of the markup code.
What happens if you have a SharePoint site that needs to be accessible? Well, unfortunately SharePoint currently outputs a lot of non-compliant code. Luckily, there is a lot of interest in the community in finding the workarounds, and SharePoint is nothing if not flexible.

Accessibility Options Within SharePoint

There seem to be a collection of elements that can go into creating a web accessible SharePoint site.
To begin with, you might wish to start with the Microsoft Minimal Master Page and a blank page layout. This will give you a fighting chance generating XHTML code, which is the first vital step. Zac Smith blogs about how to do this in detail.
Another requirement is to change the markup that the SharePoint web parts and user controls generate.
The easiest way to do this is to use a native SharePoint feature called "More Accessible Mode" that you can enable. This changes the UI rendering by applying Microsoft Active Accessibility (MSAA) standards for assistive devices. From the Microsoft Office Online site:
You turn More Accessible Mode on or off by pressing the TAB key immediately after placing focus on the page in a browser. Press the TAB key until you reach the Turn on more accessible mode or Turn off more accessible mode link. Even though the link to turn on More Accessible Mode is the first element in the tab order — which means that it is the first option that you interact with on the page — you may need to press the TAB key more than once to activate the feature.
Another way to change the rendering is to rewrite the output of web and user controls.
Web Parts are generally problematic as the HTML the web parts and the web part zones render is non-compliant. User Controls however are more easily changed. You could choose to do this using delegate controls.
At run time, the delegate control on the page selects the search control that has the lowest sequence number and displays the control to the user.
Another option is to use the .NET CSS Friendly Adapters that were introduced last year to help cleanup the markup the existing controls generate. John Ross (aka "Mossman") talks about this in his blog posting, "CSS Friendly Control Adapters in SharePoint 2007 (A Walk-Through)".
Client side scripts can be modified by using Regular Expressions to modify them at runtime (in the OnLoad methods of a page), but this may pose problems for future upgrades.

Third Party Solutions

HiSoftware has just announced that it will be partnering with Microsoft to create a Web Accessibility Kit for SharePoint:
The Accessibility Kit for Office SharePoint Server will include site templates, Web parts, documentation, instruction and tutorials enabling partners and customers to develop Web sites that conform to the guidelines set out in Section 508 of the U.S. Rehabilitation Act and the W3C’s Web Content Accessibility Guidelines (WCAG). The solution will also provide accessibility updates for Office SharePoint Server templates and Web parts for Web publishing, corporate intranet, team and project collaboration sites and more. This allows users to create a site and replace “out-of-the-box” MOSS components with accessibility kit templates, reusable Web content and Web parts.
Telerik offers a Rich Content Editor for SharePoint that contains more accessibility options and may be worth investigating.
I've heard SiteCore recommended as a good front-end for MOSS and it could be a useful alternative to a MOSS internet portal if meeting accessibility standards is a core requirement.
Third party web part vendors may generate more compliant markup.
Finally, you can follow the Glu Mobile approach and use SharePoint as a platform to help with content management and other functionality, but build an ASP.NET application on top of it, which will give you full control over what markup is generated.

Guide to making SharePoint XHTML Compliant

This is intended as a pretty high level overview of how you can get MOSS to validate against the W3C XHTML 1.0 recommendation. The aim of this article is not to explain every intricate detail of getting a MOSS site to be XHTML compliant. However it should demonstrate some techniques to get people started and eventually develop better methods of achieving compliance.
Firstly it should be noted that this is really just for public facing publishing sites. In other words we're talking about using just the WCM features of MOSS. You are not going to get your fully featured Intranet to be conformant in the current releases of SharePoint. The reason for this is that SharePoint generates out a lot of non W3C validating code. This is largely due to the richness of many SharePoint features like web parts.
Some of the techniques mentioned in this article are equally applicable to standard ASP.NET sites. So if you're totally unfamiliar with XHTML validation it may be worth having a look at the Microsoft technical article on Building ASP.NET 2.0 Web Sites Using Web Standards. It is also likely that some of these techniques will be unsupported by Microsoft; so use at your own risk.

Web.Config

The first step is to add the conformance configuration setting to your web.config file. This will force certain asp.net controls to only output attributes that comply with XHTML standards.
<xhtmlConformance mode="Strict" />
This is only really important if you are trying to conform to the strict standard. If the setting is omitted the default output for ASP.NET controls is XHTML transitional. I prefer to add the tag in any way to make it explicit. Unfortunately many SharePoint controls are still going to output non-compliant tags.

Master Page Basics

The master page is where you are going to do the majority of the validation work. It really pays to start fresh with the Microsoft minimal master page. You are going to cause yourself a serious amount of pain if you try and tweak one of the out-of-the-box master pages. It is also best to start off using a page that is based on a blank page layout. This will help identify where any validation errors are actually coming from. The first thing to do with the master page is set the doctype to reflect the xhtmlconformance setting. For example if I'm using the strict standard my doctype will be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
You can also add a few XHTML attributes to the html tag:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

At this stage it is worth performing a W3C validation check to get a feel for the types of errors that need to be fixed.
My initial check yielded a horrifying 232 validation errors, with no content or navigation. Did I say this was going to be easy?
If you scroll through some of the errors you should notice that most of them are to do with invalid attributes. The majority of the errors come from only a few controls; namely the site actions menu and publishing console (referred to as Authoring Controls from here on).

Authoring Controls

These controls aren't as big a problem as they first appear to be. We only really care about W3C compliance for anonymous (public) accessing users. As the authoring console is security trimmed when a normal public user accesses the site the authoring html won't be rendered at all. You can prove this by enabling anonymous access, logging out and then trying to view the page anonymously. Make sure you have checked in and published the master page and layout page or you won't be able to see the changes. The page will only display the welcome control displaying the 'Sign In' message. A quick validation check should show only a dozen or so validation errors. About half of these errors will have something to do with the site actions control. Although it has been removed from the page visually it is still rendering some HTML. There is an easy to solution to this problem; the SPSecurityTrimmedControl. This control allows blocks of content to only render when the user has specified a specified permission set. By wrapping the site action control inside the security trimming control and setting a required permission, the site action control is prevented from rendering any HTML at all.
<SharePoint:SPSecurityTrimmedControl PermissionsString="AddAndCustomizePages" runat="server">
    
<PublishingSiteAction:SiteActionMenu runat="server"/> </SharePoint:SPSecurityTrimmedControl>

Remove/clean non-compliant HTML

Upon making a closer examination of the remaining validation errors it becomes obvious that most of them are to do with poorly declared script tags. Unfortunately these script tags are usually generated by the HtmlForm control so it's not easy to override the output. The one technique that can be applied is to override the Page.Render method and do a bit of tag cleaning. This effectively lets us hijack the HTML rendering process and have a chance to add, modify or remove parts. It does involve writing a bit of inline code in the master page. Assuming that you have set your master page to allow inline code we can add some code similar to the following in the master page.
<script type="text/c#" runat="server">
protected override void Render(HtmlTextWriter writer)
{
 
// extract all html
 
System.IO.StringWriter str = new System.IO.StringWriter();
 
HtmlTextWriter wrt = new HtmlTextWriter(str);

  // render html
 
base.Render(wrt);
 
wrt.Close();
  string html = str.ToString();
  // find all script tags
 
Regex scriptRegex = new Regex("<script[^>]*");
  MatchCollection scriptMatches = scriptRegex.Matches(html);

  // go through matches in reverse
  for (int i = scriptMatches.Count - 1; i >= 0; i--)
 
{
    // identify script tags with no type attribute 
    if
(scriptMatches[i].ToString().IndexOf("type") < 0)
   
{
   
  // add type attribute after script opening tag
     
html = html.Insert(scriptMatches[i].Index + 7, " type=\"text/javascript\"");
   
}
  }

  // write the 'clean' html to the page
 
writer.Write(html);
}

</script>

This code block uses some regex matching to find all script tags and add a type attribute to any tags that don't already have one. It is only a partial solution to the script tag problem, more code will need to be written to completely clean the tags.
Note that this code is crude and untested, but it should give you an idea of what can be done. It would be prudent to keep this kind of code to a bare minimum, so that performance is not affected. In other words you should only be using this method when you have no other option.

Meta Tags

You could extend the render code sample to remove all of your non-compliant code if you want. I would suggest that this is not the best way of doing things. Another technique is to replace standard SharePoint controls with your own custom built controls. A simple example of where this can be done is with the RobotsMetaTag. Using Lutz Roeder's Reflector I was able to extract the following (simplified) code for the RobotsMetaTag control:

public class RobotsMetaTag : SPControl
{
 
protected override void Render(HtmlTextWriter output)
 
{
   
if (!SPControl.GetContextWeb(this.Context).ASPXPageIndexed)
   
{
     
output.Write("<META NAME=\"ROBOTS\" CONTENT=\"NOHTMLINDEX\"/>");
   
}
 
}
}

We can see that the META, NAME and CONTENT elements all violate the XHTML rule that stipulates all tags should be lower case. The offending line can be rewritten in a custom control as:
output.Write("<meta name=\"ROBOTS\" content=\"NOHTMLINDEX\"/>");
Now deploy the custom control to your SharePoint environment and add it to the master page in place of the RobotsMetaTag. Two more validation errors out of the way. I recommend using this approach wherever possible.

Content

Between the security trimming control, render code and custom control methods it is now possible to fix all validation errors and eventually get a conforming web page. Great, we have just made a virtually blank web page comply. The next step is to add all the content and navigation back in. To achieve total compliance it will be necessary to create a custom control for many of the components on each page. The trick here is to make these controls as re-usable as possible.
The majority of the content in your site will come from page layouts and thankfully most of the field controls output XHTML compliant code out-of-the-box. When you come across a control that doesn't comply, again, you will need to make your own.
When it comes to navigation you have a couple of options. Either create custom navigation controls from scratch, or extend the SharePoint AspMenu control, as the source code has now been released for this control.

Web parts

At first I thought web parts were going to be no trouble when it came to W3C validation. Most of the web parts I use have an XSL source editor so all that is involved is to make sure that the XML is transformed into valid HTML right? Wrong, unfortunately web parts such as the Data View Web Part use some surrounding tables for layout. This is intrinsically bad practice for web development and accessibility but worse is that the tables use all kinds of non-standard attributes. The only solution that I have found to this is to override the render method as explained earlier. I recommend keeping web part use to a minimum. Web part zones should definitely not be used; they introduce a large amount of layout tables and non compliant HTML.

Summary

Hopefully this gives you a bit of a starting point in getting a SharePoint WCM site XHTML compliant. It is definitely not a simple task, however if you are doing a lot of SharePoint development you are bound to come across a project that requires it (e.g. government sector work). I believe that Microsoft is quite aware of these compliance issues and they will hopefully be addressed in the next release if not a service pack. I plan to maintain this document over time as I discover better techniques for dealing with the various validation issues that SharePoint presents. Good luck in getting your site to validate, you can look forward to seeing the following message to reward your hard work.