Fear and Loathing
Gonzo blogging from the Annie Leibovitz of the software development world.
-
Tread carefully when using ReadOnly="TRUE"
SharePoint list definitions (found in SCHEMA.XML) have a nice feature in that you can mark a field as read-only. Just add ReadOnly="TRUE" to your field definition and the end-user will not be able to edit or change it. This is very much like a calculated field which is also read-only but a read-only field allows you to set it. Of course you'll need a way to set it so some custom code is needed but it's a great use of a status field or something through a little C# where you don't want the user changing it (even if they have FrontPage and are site admins).
However adding the ReadOnly attribute also has it's drawbacks. You will not be able to see this field in the UI unless you specifically add it to a view. Adding the ShowInEditForm="TRUE" attribute doesn't do what you might think it would. It's there to force the rendering of fields to the edit form. Any average person would think that once you do this, voila, the field will now show up on the form and since it's read-only you'll get a display of it that nobody can edit right? Wrong. There's no way that I can concievably find that will show a field on either the new form (when adding and item/document) or the edit form. I tried the Viewable="TRUE" attribute but that didn't work either. You can use it on views as it's available there but for forms it just doesn't show up.
Inversely if you add the attribute Hidden="TRUE" to your field definition you'll never see it. Handy for storing stuff in lists that you don't want anyone to get at, but if just remember it's there as it won't show up normally.
-
Wrong or Right, it's all over the frickin' place
While looking through my referrals (yeah, I need a life) I found one from Computerworld which was odd because I had never blogged there nor did anyone that I (normally) know did that linked to my posts. It Seems Mikes article keeps making its rounds and this time ended up in a mish-mash article that lumped "Dell clueless, SharePoint annoying, and Longhorn teaseful" all together. Nice.
What's wrong with Sharepoint? Long-time Microsoft consultant Mike Drips tells us. Paul Schaeflein rebuts some points and later summarizes other posts. MS blogger Robert Scoble responds, adding his own list. IBM blogger Ed Brill finds the blog responses from the MS community "interesting." Canadian MVP Bill Simser has his own take. Ferris Research is looking for your opinions and offering a nice bribe inducement.
Now if we could just generate as much energy over helping understand and make the product better the world might be an easier place to live.
P.S. Can't anyone ever spell my first name right? I know it's odd but is too much to ask?
-
Get your butt to PDC
Registered last night for PDC (to make the early bird cutoff and save $300). You have until this Friday to cash in on the savings, otherwise you'll pay the full price of $1995USD. Hope to see various bloggers, MVPs, Micrsoquishy guys, and anyone else there. Now I need a good Wi-Fi notebook to take with me to capture notes and do some blogging during the 5 day conference. I've been looking at Motion Computings LS800 as it's smaller than a laptop but bigger than a PDA, but then Alienwares Area-51m 7700 looks too sweet to not get. Let me know what you guys think. The big thing of course is all the new SharePoint stuff as Microsoft will be letting loose and not holding anything back on the next release for SharePoint as well as Office 12 (or whatever it will be called). So get your butt to PDC and see you there!
-
Oh bother
Okay, Saturday was a bad day for me and after reading Ed Brill's blog on the whole Mike Drips article (and my response which he quoted a few times) I decided to delete the post. It's the first time I've done that and I normally wouldn't but in reality the post was my emotions getting the better of me and taking it out more against Mike than the content of his post. Daniel McPherson makes some good comments about getting to the bottom of "what's wrong" with SharePoint and ways that the team can fix it. I think we all agree there are things wrong with SharePoint but it's not a bucket of bolts that has no purpose or value. It's just articles that are primarily negative seem to cast a shadow so people new to the scene might not get both sides of the story (hence why I'm leaving my Five Things Right With SharePoint post). So back to being the kinder and more gentler SharePoint guy that I should be.
-
Five Things Right With SharePoint
While Mr. Drips got his shots in (and I did my own share of mudslinging) I thought I would take the time to come out with my own spin on this and present the five things right with SharePoint. Feel free to agree or disagree with me, add your own, or go have a protein shake.
1. Quick and Easy Creation and Collaboration
This is probably one of SharePoints biggest features and the easiest to use. Want to get some teams that are geographically disjointed, can't rely on email for communications, and don't have time to set meetings up with everyone? A team site is just what is needed and brings everyone together in a quick and easy way. Where else can you offload site creation with a self-driven service and yet still monitor and be able to throttle users on how much storage they take up (or remind people about inactive sites for those that were just "playing").
Far too many people shun SharePoint because it doesn't do this or that out of the box and expect much more. If you take a step back and look at what you have and not what you don't, you'll find a vast set of resources that can be used for not only simple collaborative team sites but help desks, knowledge bases, employee performance tracking, wikis, blogs, and much much more. While there are physical limitations on implementations, the sky is the limit on your imagination.
2. .NET and Web Services
Let's face it, building business solutions is tough no matter what technology is out there. For the most part though, business solutions are really quite easy. Really. Their hasn't been a complex business problem that I've seen yet. Complicated perhaps. Many moving parts maybe. But actually complex, not so much. When you can start leveraging things like SSO and talking to infrastructure services that don't require complex data models to keep track of simple things, SharePoint just works. Add to that the fact that most of the major large vendors out there (Seibel, SAP, etc.) are giving away Web Parts for your sites to talk to their products.
No longer do I have to hand bomb some crazy ass service to connect to my Enterprise systems. I have extensibility and expandability. With more and more people out there writing .NET components, Web Parts are naturally springing up to solve various problems and fill some gaps people have been wanting the product to do (like RSS feeds). I can now tie my sites into Enterprise tools with minimal effort, attach to pre-built accelerators that provide a piece of functionality, and custom build systems that suite my specific business needs. All from one interface delivered, managed, and secured through the web. That's not so bad.
3. Integration with Office and other Microsoft Products
Open a Microsoft Word document from your hard drive and you'll get the usual gammet of features. Open one from a SharePoint site and you'll have a vast amount of new things that will not only help increase your productivity and put you in touch with teams but it will also give you new things like presence and status. Click on a user column and I can now access my colleagues calendars, availability, and contact information. The fact that the mere presence of a product in my environment and that it changes the behavior of other products is pretty interesting, but I can also leverage this and rather than building custom chat tools or deal with the inadequacies of web editing, just let them use Word. Complete with custom properties I can build views and groupings of documents that should drive people away from the archaic file systems folder heirarchy where I can't group things by two different values.
Throw on top of that a workflow engine out of BizTalk and sophisticated data entry via InfoPath forms (all stored in SharePoint) and I can start building things like automated recruiting systems that get me away from the crazy email and phone based solutions (or custom built systems) just to ensure a new hire has a computer. This can be looked at as an early incarnation if you will of Software Factories in action but stay tuned as it can only get better.
4. Microsoft's commitment to evolving an ongoing suite of tools
Microsoft has made it clear that SharePoint is a key player in the Office space and the tool to enable you to deliver collaborative solutions. Let's face it, Office has been pretty stagnant since it's inception. What great new features have you seen in Microsoft Word in the past 10 years? Collaboration and productivity is becoming the core of the Office Suite now as you just can't get any better with a word processor or a spreadsheet.
SharePoint 2003 was a test-bed for creating the next generation Web Sites and you see this in .NET 2.0 with the Web Part framework being expanded out and SharePoint and .NET 2.0 coming together. This isn't a half-baked idea that just evolved into something large and unruly, these are ideas and concepts that stretch back to the early days and now come full circle to provide a platform rather than a tool or technology. If you think SQL Server is just a database, you probably think SharePoint is just a web site. It's that and much more and Microsoft is behind this for the long run.
5. The SharePoint Community
While I go on and rave about how great this platform is, it does have it's shortcomings. However there are a lot of resources out there. Looking back to when we had SharePoint 2001 and the 5 of us that blogged about it, we now have over 100 dedicated people that are always writing about new things they're discovering, answering questions, and creating new tools. Go on. Go out and ask.
More often than not, the problem has already been solved and someone is more than willing to share. If not, it becomes a challenge for those of us that wish to take up the gauntlet. The SharePoint community is quite large and grows each day but it is a community and a two-way street. A street that you can either play on or help pave. I for one welcome our new portal overlords, you should too.
-
PDC all the way baby...
PDC is the bomb and I'm excited to be able to go this year. Yes, even more excited than TechEd which I didn't get to go to and whined about it for many posts. Like a good
whinewine (or woman for that part) the best part of PDC is waiting in anticipation for it. Channel 9 has their PDC contest going strong for another month so see my auto-magic post below. I think I'm doing pretty good on standings so far. Last time I checked (a couple of days ago) I was in the one of the top 3 or 4.Me: 72
Steve Hebert (smarter dude than me): 85
Roy Osherove (another smarter dude than me): 80Not bad for the portal guy who whines
winesa lot. Of course this is just on referrals alone and we all know its also about content and not just clicks (feel free to use that sometime as it has a nice ring to it). In any case, here's another pathetic plea for you to send a geek to Los Angeles for a week of debugging and debauchery.Hmmm, update. I just checked the PDC05 Contest Sightings page and found that Steve Hebert is WAAAAAAY out front now with 164. Also a bunch of others have crept up in the last few days leaving me back down in the dust. Guess everyone found Steve's blog and hey, why not vote for the smarter dude. Anyways, maybe the SharePoint community will take pity on me and help an old portal guy out. Here's the updated standings (counting all referrals):
Me: 102
Steve Hebert: 164
Roy Osherove: 92This time I'm using Brendan Tompkins most excellent Web Service to write my entry. Brendan took it upon himself to be creative on his entry and think outside of the box. Rather than writing some funny or provocative or even useful (like Roy Osherove who posted his RegEx blog and then decided to give a fine tutorial on Regular Expressions to boot) Brendan built a Web Service that you can call to create the blog entry for you. I was one of the first ones to try it out and it's great. Brendan personally has my vote to go. Anyways, check out his service if you want your own blog entry and join the club. Simply brilliant.
Here's what you need to quickly bang something together and get the results delivered to you in a string:
private void Form1_Load(object sender, System.EventArgs e)
{
EntryServiceRequest request = new EntryServiceRequest();
request.BlogUrl = "http://weblogs.asp.net/bsimser";
request.FirstName = "Bil";
request.LastName = "Simser";
request.Interests = ".NET, C#, ASP.NET, SharePoint, Agile, DDD, TDD";
PDCContestEntryService service = new PDCContestEntryService();
EntryServiceResponse response = service.CreateBlogPostEntry(request);
textBox1.Text = response.PostBody;
}
Then just cut and paste the results (from response.PostBody) into your blog. Mine follows below. Guess I need to get a little more worldly as far as Amazon is concerned. And hey, while you're scrolling down the page feel free to click on the bloggie icon and bump up my counter. Yeah, I need to take as many cheap shots as I can as we get into the home stretch, this won't be the last grovelling from me on this.
You really don't want me whining for another week about how I couldn't go and if I do win, you'll get my lovely blow-by-blow commentary on all things SharePoint and .NET 2.0 that I stumble over and after a few drinks we'll kick up a live demonstration of Whack-A-Fitz.
I’m Blog’n my way to the PDC!
If you haven’t heard, Channel9 has started a contest where you can win a ticket to the PDC, including an airline ticket and hotel! This is one amazing contest, and all you have to do to enter is have a blog, and post why you should win the prize. So here’s my official entry:
Here's some information to help you get to know me better:
Why me?
Why do I want to go to the PDC? Because I love to blog! And I'm prolific! Here's some of my more popular blog posts links according to Google :
- SharePoint Version Bug
- Fear and Loathing
- SPS Customization
- Syncronization of Office Document Properties with WSS Document ...
- Adjusting the DisplaySize of your Fields
What are my interests?
Well, here’s a list of books that I'll probably be reading on the plane to LAX :
I'm not very interesting according to Amazon.Did I type up all this ugly HTML for this Blog post myself?
Heck no! I’m lazy! But that’s exactly why I need to go to PDC! The PDC is all about the future, and in the future, we’ll all be using cool technology to do things like typing tedious, boring contest entries. I’m getting a head start on the salad days, so I figured out how to use ASMX web service that Brendan wrote! To prove it, you can see that I'm on this list of other, lazy coders who would rather sit back and use a distributed Web Service to do their work!
-
A good reporting solution for SharePoint Applications?
Hope everyone had a good holiday. I know the Americans did the big fireworks display for the 4th and as usual, in Canada, we had two guys in a fishing boat with a flare gun.
I've been looking at reporting solutions in SharePoint, specifically building reporting around data kept in SharePoint itself and not necessarily reporting on SharePoint but more business-specific reporting. On the SharePoint reporting side, there are a lot of great options like the recently released SQL Server Report Pack. That's great if you're looking at reporting on how SharePoint itself is doing, the site collections, how many documents are in each site, etc. but what if you want to know how well sales are doing when you store the sales figures in a SharePoint list?
If you build a business application using SharePoint and store the business information in SharePoint lists then getting the information out is like pulling teeth. All reporting tools (Crystal, BusinessObjects, SQL, etc.) need a datasource for the information. None of them can use SharePoint lists as a datasource. The closest you can get is using the SharePoint List Web Service to get the information out, but even then it's not very good either. So far the solution I'm going down is using a .NET managed reporting tool (ActiveReports for .NET from Data Dynamics) and just creating an XML datasource that represents my business objects (mostly through serialization in my business layer which isn't the best). Just wondering if anyone has any other solutions for this type of problem?
-
Control Injection for SharePoint Web Parts
This week has been pretty busy so I haven't even got to my blog backlog as well it was a bit of a living hell for me as we were experiencing various problems with a few common components that provide mail which in turn required us to do a quick "comment out" code release to demo a product. Anyways, now that that's over and it's July 1st (Canada Day, much like Independance Day that Americans will celebrate on the 4th but without the aliens).
I was on one of my more favorite geek sites, The Code Project, and found an interesting article that resonated with the SharePoint side of my brain. The author wasn't too happy with the lack of design support for building ASP.NET server controls (as are all of us that write Web Parts) and came up with an interesting solution to the problem. He uses an approach similar to string.Format to inject controls into a composite control layout string. After a couple of iterations he then took the HTML page for his composite control and made it an embedded resource in his server control and this became the layout string to inject the controls into.
The same principle can be easily applied to Web Parts. Just create a new embedded resource which is your HTML layout then in your CreateChildControls call, create the controls and inject them using the layout file. It still has it's drawbacks so something like SmartPart and User Controls give you the design-time capabilities that this doesn't offer, but it's a good alternative if you're struggling writing out gobs of HTML in your codebase and doesn't require deployment of .ascx pages or anything. Check out the Code Project article here.
-
The Collective vs. the Individual
Is it that difficult to get along and agree to an idea? Probably not. What the hell am I talking about? The SharePoint community of course. No, there's no rebellion going on with some twisted and evil Sith Lord reigning supreme and the rest of us are just battling it out in the trenches, waiting for some rebel group to topple the regime and take down the Emperor. Oh, sorry. Had something on my mind. Okay, I'm back now.
A while ago I threw an idea out (I think it was through the newsgroups, which I've horribly been vacant from but will return shortly). The idea was that we (i.e. the more active SharePoint we) should put together a central resource for all stuff being SharePoint. Recently I've seen a lot of updates to tool lists, resource lists, lists of bloggers, you know, the usual. It seems like everybody and his brother have a list of bloggers, there are several (very good) lists of tools and resources, and almost everyone who's anyone will have a page of SharePoint resources with links to various places on the net.
I guess I'm just somewhat astonished at how difficult it is to get information sometimes. I mean, Google is my friend and the first place I turn to to find something if I don't have it on the top of my brain (and it's really embarassing when you google for an answer only to find your own blog entry to have it). However I just keep stumbling over multiple resources for the same thing. Is this a good thing? Maybe. The problem is that if I put my SharePoint newbie hat on and try to find info I sometimes can't see the forest for the trees. I looked at a few of the SharePoint blogger lists out there. Great resources but they're all individuals view of the world. Some have most of the MVPs, some don't; some have links to some really smart dudes, others don't. Again, a great resource but it's hit and miss for anyone looking for the best set of information.
Given that SharePoint is all about collaboration I just get torqued over the fact that we, as a community, can't do the same. I don't know why we can't agree to a single resource location so that a) it's consistent b) it's as complete as it can be and c) it's organic and not someone's page that unfortunately hasn't been updated because they don't have time or forgot they even had it. I believe the collective view of the SharePointVerse is a better thing, in any dimension, than one mans (or womans).
It's a pretty simple concept. An open system that follows the following principles:
- Anyone and everyone can contribute to it. Sure there needs to be a group of people that keep an eye out for dupes, malicious posts or spam but that can anyone with some time and passion.
- If you contribute something you should be responsible to keep it up to date. Like a good boy scout, clean up after yourself.
- If you see something out of date, update it.
- If anyone asks about something that would be on the list (where can I find a list of SharePoint bloggers which gets asked a lot) you point them at the list. If it's not on the (and you know the answer) that would be a trigger to add it.
Doesn't seem that difficult however there were a few hurdles that never got this idea off the ground. First, nobody wanted it hosted by a single person (i.e. it shouldn't be say a site Bil runs, or Mike, or Patrick, or whomever). Second, nobody could seem to agree that a single resource is the right thing. Anyways, it may not be the "right" thing but in my meager mind, it's the correct thing.
-
Followup on SharePoint Versioning
Thanks to some fellow MVPs and co. I got more information on the whole versioning thing. As mentioned, Serge van den Oever posted a blog about it (being one of his bigger griped about versioned libraries). I spent the better part of yesterday morning with Microsoft going over it, trying out a dozen or so test scenarios and trying to come to a pretty complete understanding on what was happening and what it meant.
When your add a document to a versioned document library in SharePoint, the document is put into the SQL database and various bits of information are set (created date, modified date, etc.). When the next version of that document comes along, the current one (which is the one you address via the url that you might send out to people) is moved into a virtual folder (under a _vti_history directory) and the new copy is setup to replace the previous one (as far as addressing the file through a url is concerned).
The problem however basically breaks down to this. Using checkin/checkout will trigger a change in updating a previous version. The change isn't the content, just that move that happens when the current version is copied down into the _vti_history directory. If you simply upload the file (or save it directly using your Office 2003 client), then a new version is generated but the previous version's time and date stamp is left intact. It seems there's two paths here. One will update your previous versions timestamp, the other won't. I suspect (but haven't dug in deep enough with Reflector to see what's going on) that they're taking two different calls to do this (something like the difference between Copy and Move in a document library where one will copy the history and other doesn't).
Yeah, bugs the crap out of me. I'm currently working on a Contract Management System built in SharePoint so we're dealing with many versions of legal documents and the business user needs to know who modified what and when. We've been pushing them to use the checkout/edit/checkin cycle but now it looks like that might change as we can no longer tell the when part.
There was a recommendation by Dustin Miller to build an event handler for the library to get around this. That's great if you only have one handler and don't want to use 3rd party tools like Nintex's doclibs as there's a one handler per doclib restriction in effect. There is a new TODO on my very large list of SharePoint goodies to cook up now. An Event Handler Factory is needed for SharePoint that can invoke other event handlers or chain event handlers together. Seems like a fun thing to do (but feel free to build one yourself if you're so inclined).