first_page

Hours and Hours and Hours of SharePoint

Buy this Book at Amazon.com! This is my SharePoint turning point. It’s 4pm on a W2-labor-camp holiday and I have not eaten a thing. This is what I’ve learned so far:

  • Master Pages do not allow code blocks. So showing something as simple as the current date on every page is not possible directly in the master page.
  • This attribute __designer="" is actually used by SharePoint Designer to render design-time previews and has nothing to so with your code—but these things (at times) show up in your code. From a Visual Studio point of view, this “feature” is outrageous crap.
  • It has been said that Windows SharePoint Services (WSS) “will not accept” relative URLs. Specifically, the $SPUrl syntax does not work in WSS—this depends on Microsoft.SharePoint.Publishing which is a part of MOSS—not WSS.
  • Without $SPUrl, the only relative URLs you have at your disposal in SharePoint are: /_vti_bin, /_controltemplates, /_layouts, /_admin, /_vti_adm. It’s the /_layouts path (or with the ASP.NET tilde syntax to ensure parent-level access: ~/``_layouts) that’s most important for WSS UI designers. For more information, see “Figure 8 Common File Locations Accessible from WSPs” in “10 Best Practices For Building SharePoint Solutions.”
  • There must be other relative-URL conventions in SharePoint because I see that some ASP.NET controls use ~site/ to obtain a relative path—but this, it seems, is not a global convention.
  • SharePoint slang: “the 12” or “the 12 hive” refers to %CommonProgramFiles%\Microsoft Shared\Web server extensions\12. In my earlier (failed) forays into SharePoint “branding” I refused to take this raggedy folder seriously. But the Microsoft documentation clearly compels me to reconsider (or buy into MOSS).
  • ASP.NET Expressions in SharePoint page files, like $Resources:wss,navigation_accesskey, use files, like wss.resx, in the App_GlobalResources folder of your SharePoint Site Collection.
  • The great and powerful Heather Solomon’s “Minimal or Base Master Pages” are invaluable. WSS users only need to worry about HeathersBaseCollaborationMasterPage.master because the other file refers to Microsoft.SharePoint.Publishing which is a part of MOSS—not WSS.
  • The asp:ContentPlaceHolder with id="PlaceHolderNavSpacer" uses a spacer image (/_layouts/images/blank.gif) to ensure “proper” layout of columns. I have failed to prevent this control from inserting an image even when it is supposedly hidden. I haven’t taken the use of spacers in Web page layout seriously for almost a decade. I can excuse the semantically- and accessibility-hostile use of table elements for layout but this is ridiculous! (But I hear tell that SharePoint cash-cow herding is a profitable business.)So scrawling all those ragged notes above is actually a celebration with mixed feelings of being able to customize pages in SharePoint (WSS especially) using Master Pages. Yeah. Wow. Literally, an entire day was taken from my wretched life… This better pay off later! But it would be a welcome (and hurtful) surprise to hear a Microsoft announcement about how Scott Guthrie finally got his capable technological hands on a future version of SharePoint that dog foods all of the modern Web development technologies from Microsoft. SharePoint should be a showcase of cutting-edge Microsoft technologies… ASP.NET MVC should be in SharePoint, ADO.NET Data Services should be in SharePoint, ASP.NET Dynamic Data forms, ASP.NET AJAX (featuring jQuery) should be in SharePoint, etc. Microsoft has the technology to actually make SharePoint elegant and exceptional… like in most large organizations, the issues are most likely political, logistical and administrative…

Comments

Himani, 2009-06-20 12:13:43

Could you please clarify the following: -

Meaning of: Text="" Meaning of: MasterPageFile="~/_layouts/application.master" %> (In this what does tilde indicate (current site or root's master page). If I want to reference root site's master page, how do I do that?

rasx(), 2009-06-22 23:21:33

I do not know what Text="" means other than it appears to be some kind of attribute called "Text."

The tilde (~) in MasterPageFile="~/_layouts/application.master" is an ASP.NET convention. For more information, see this:

http://weblogs.asp.net/rternier/archive/2007/10/30/two-asp-net-features-that-are-usually-missed-or-misunderstood.aspx

rasx()