Thursday, September 13, 2007

Attack Of The Blob!


(Image taken from WikiPedia's entry on The Blob!)

Yesterday I had a frustrating day trying to modify a CSS file for a SharePoint look and feel task.


For some reason, no matter what I did, the CSS never refreshed in the browser. When viewed in SharePoint Designer it did show the updated version, but no amount of IIS resets, file deletion, or browser cache clearing prevented my web browsers (both Internet Explorer and Firefox) from rendering the old version.

Eventually I happened to look on the file system and notice a folder on the root called "blobcache". Aha! I was using a new Virtual Machine and unbeknownst to me Blob Caching had been enabled to improve performance.

Inside this blob cache folder I found my css file with a .cache file extension on the end of it. I tried to delete manually but it then started to show "File Not Found." errors.

The solution was to flush the blob cache. The option is on the site collection's Site Settings. Select "Site Collection Object Cache" and then click "Force this server to reset its disk based cache."

The BlobCache is enabled in the web.config file and looks like this:


<BlobCache location="C:\blobCache" path="\.(gifjpgpngcssjs)$" maxSize="10" enabled="true" />


I could just remove the css reference from the path but during development I think the better approach is to just to set enabled to false.

Interesting note: David Marsh and I think SharePoint Designer was able to view the newly deployed file because it was using WebDav and so was hitting the database rather than having IIS redirect it to the BLOB cache which is what happened to the browsers.

Saturday, September 08, 2007

Bottlenecks and Headaches

A new article on Computer World suggests that IT is a "key barrier to corporate Web 2.0 adoption", according to speakers at the Office 2.0 conference in San Francisco.

An example of how the IT team were slow to facilitate Web.20 projects:

[The] head of digital media at the National Endowment for Science, Technology and the Arts (NESTA)  in London, noted that she first had to bypass IT to get Web 2.0 technologies to the group's end users. Once she started the effort, she said, "IT started to realize it was happening without them anyway. They weren't interested until they started to get multiple requests from around the business. Eventually, they came on board."

The Pendulum Swings

Information Technology trends swing along a pendulum from complete decentralization to centralization. With Web 2.0 the pendulum is currently swinging away from central IT control.

In general I think this is a good trend,  since the pool of "developers" will deepen if it starts to include technical end users who are able to  create and configure their own systems (perhaps by mashing up a bunch of third party web services) or install and manage third party tools.

I'm just worried that a whole bunch of enterprise problems are being reintroduced by this decentralization, with much less transparent "ownership" of the challenges than if an IT team is in charge of development.

For instance, later in the article, the head of digital media at NESTA says that her organization

 uses many free tools, so it's easy to prove their value to management. "The value is instantly visible, especially when you do an ROI and your investment is zero," she said.

If a tool is "free", is it really zero investment? What is the opportunity cost of adopting and trying to integrate a free tool, without evaluating the alternatives? What are the costs of moving data in and out of it over time?

On page 2 of the article, there is this quote:

[GlaxoSmithKline Social media champion Lee] White said one of the biggest challenges to corporate Web 2.0 use is that demand generally bubbles up from users, while in the traditional corporate paradigm, upper management decides what tools workers should use.

I would suggest  that "demand generally bubbles up from users" anyway, whether Web 2.0 existed or not. After all, IT staff don't roll out of bed on Monday morning and decide to build a Leave Tracking System - they do it because HR users are requesting it.

I would argue that any "resistance" IT is putting up is probably due to its awareness of the incredible complexity of software development.

Hidden Complexities

Enterprise development is incredibly labyrinthine. A programmer's skill requirements range from user psychology to writing to research and analysis to understanding the basics of contract and intellectual property law - and I haven't even mentioned technical skills.

Keeping on top of information technology issues is a full time job. If end users are empowered to whip together "applications" using the latest services and tools then tremendous productivity gains may result - but what will the implications be?

Some of the open questions that spring to mind when I think about this new development paradigm are:

  • Who fixes bugs in an End-User Developed (EUD) application?
  • Who is responsible for managing code changes to an EUD?
  • In the world of the permanent beta, what happens when a third-party web service that an EUD system relies on stops working or is discontinued?
  • What happens when the service the EUD system is relying on changes?
  • Who trains the other users to use the EUD system? Who documents the system functionality and business rules?
  • What are the legal issues of using Web 2.0 systems in a corporation? Who owns the data? Who is responsible for adhering to the licensing terms of any components?
  • What are the security implications of EUD systems that use third party software or services without any central oversight? Who ensures that security is properly applied?
  • How does a company know what EUD systems are in use if there is no central control?
  • How do these systems talk to each other? Is it important that they do?
  • How does data integration occur if a variety of EUD systems expose the same types of information, such as user account details?
  • Does a company need development standards anymore? If so, how does it enforce them on end users?

Are we heading from a bottleneck to a headache?

Wednesday, September 05, 2007

SharePoint Accessibility

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.

 

More Information

If you have any tips or advice on how MOSS can be made more accessible, or any real world examples of MOSS portals that meet compliance standards, please feel free to post!