Blog - Robert Bogue [MVP]
Rob's Notebook
SharePoint Calendar

Categories

Links

Archives

Other Blogs

Thor Projects LLC - Welcome : Blog - Robert Bogue [MVP]
Sunday, June 01, 2008

Web Cast Q&A Follow up: Web Parts and Data Lists

I got a lot of great questions during the web casts for the Introduction to SharePoint for Developers series that Andrew Connell and I are doing for Paul Andrew. Specifically, the Web Parts and the Data Lists web casts. I wanted to share the Q&A here since there's no good place for the Q&A to appear on the MSDN web cast site. So here's the Q&A from the Web Casts event (slightly edited):

Web Parts

Q: Would it be possible to have a web part in another web part?
A: Yes, Web parts are fundamentally just server controls. Controls in the ASP.NET control tree can nest other controls.

Q: Do the Visual Studio Extensions for Windows SharePoint Services (VSeWSS) require that you develop on Windows Server?
Q: Is it better to do my development on the WSS Server or can I just as easily develop on a client machine and deploy to a development WSS Server?
A: Anything that you do with the SharePoint API requires that you be developing on the same server as SharePoint. Since SharePoint only runs on a server OS – you have to develop on a server OS. Typically you do this in a virtual machine.

Q: Have the Visual Studio Extensions for Windows SharePoint Services with support for VS 2008 been released yet, or is there an announced ETA on them?
Q: When will the SharePoint Extensions be available for VS 2008
A: Paul Andrew says "June 2008"

Q: Isn't the "Full" trust level an ASP.NET framework Code Access file which can be used in WSS? I thought WSS had only 2 built in CAS files defined.
A: Full isn't actually a file, it's a hardcoded setting that turns off Code Access Security. However, you are correct in that this is a part of the ASP.NET core and not something that SharePoint added.

Q: What version of Visual Studio supports the SharePoint Solution?
A: Visual Studio 2005 with the SDK and with the Visual Studio Extensions for Windows SharePoint Services is what I showed. Visual Studio 2008 has support for Workflows but doesn't have support for web part development.

Q: Why are your local property backing fields declared protected and not private?
A: It's an OO design thing. I only make my backing fields private if there's a specific reason why they shouldn't be touched by subclasses. If there's no code reason to protect them from subclasses I don't. One could argue best practice with me about this but I feel strongly that classes should make variables protected rather than private where possible.

Q: We use a lot of user controls in our MOSS publishing sites which are public facing. Should we be using web parts or does that not make sense for a publicly accessible web site?
A: I don't think user controls are bad. I show at the end of the presentations how to load them in a web part. There are some situations (like field controls) where user controls make a ton of sense. There's no right or wrong answer.

Q: What are the drawbacks of implementing our own interface passing element rather than using the IWebPartField interface? Any issue with SharePoint Designer?
A: Implementing your own interface means that you have to write the web parts to both produce and consume the information. The standard interfaces can connect web parts that you don't write. The generic interfaces require you know a bit more about type descriptors so are more difficult to work with – but more flexible. I haven't ever tried to connect web parts in SPD that use a custom interface but I assume it works.

Q: I noticed that the full webpart page needs to reload in your connected web part example. Is there a way to pass data without reloading the full web part page? Is it possible to use AJAX?
A: I'm getting a definitive answer here. However, the framework expects full page refreshes, it may be possible to work around this. I've asked Dan Larson (SharePoint MVP and champion of AJAX) if he knows of a workaround. I'll post an update with his response.

Q: My deploy of your basic web part to SP yielded the error 'No SharePoint site exists at the specified URL' where do I specify the URL?
A: In the project properties, (Right click the project select properties) Click the debug "page" it's the place where it says start a browser with this URL.

Q:What was the site where the source code is going to be available again?
Q: Where can we get demo code from and download it?
Q: Where can I download the sample code and slides?
Q: What was the url to download the code?
Q: What was the Url of the site where the source code will be posted
A: mssharepointdeveloper.com It was also posted at http://www.microsoft.com/downloads/details.aspx?FamilyID=25f9cc59-4ea3-4381-8b37-9430f664eac6&displaylang=en if you want to get it before it's available on mssharepointdeveloper.com

Q:Is there any way to pass the MOSS user information to your web part so it can pull data based on the logged in user?
A: It's already there. If you do SPContext.Current.Web.CurrentUser you get the SPUser object for the current logged in user. There's a similar way to get the current user's MOSS profile – but I don't remember that off the top of my head.

Q: How do you make custom properties not web browsable?
A: Use the attribute WebBrowsable(false) – or don't include the WebBroweable attribute at all

Q: When will we get a real designer experience for SharePoint Web Parts in Visual Studio?
A: This isn't a SharePoint issue. It's a Visual Studio issue for server controls (from which Web Parts derive.) I don't have an answer here – however, my thoughts are not soon. Particularly since you can load user controls if you want.

Q: What if I want to reference a javascript or image file in my web part – Where does it go and how do I include it in the package?
A: I've got an article "SharePoint Localization Tips and Tricks" which shows you how to deploy resource files with your Web Part. It should have what you need.

Q: Can you recommend a book to get started on how to create SharePoint Web Parts as well as Server Deployment and Management?
A: For development, I'd recommend "Real World SharePoint 2007: Indispensible Experiences from 16 WSS and MOSS MVPs" (Disclosure: I contributed a chapter to this book and tech edited the rest), or "Inside Windows SharePoint Services 3.0". For Deployment and Management I recommend "Microsoft Office SharePoint Server 2007 Administrator's Companion"

Q:Is Integration between SharePoint and SQL Reporting Services possible?
A: Yes, check out Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies.

Q: Is it possible to connect user control web parts?
A: Yes, you just need to implement the interfaces and have your wrapper web part call the interfaces in the user control web part. However, I would consider writing them as web parts directly if you're going to use SharePoint specific functionality or interfaces like connections.

Q: Where do I get a copy of the VPC image that you're using today?
A: It's available at http://www.microsoft.com/downloads/details.aspx?FamilyID=1beeac6f-2ea1-4769-9948-74a74bd604fa&DisplayLang=en

Q: Do we have to install Visual Studio 2005 on the Server or can we develop web parts in Windows XP or Vista?
A: You can develop ASP.NET 2.0 web parts on XP or Vista. If you need to use any SharePoint specific functionality you'll need to develop on a SharePoint Server.

Q: Can you install these extensions (VSeWSS) on Windows XP?
A: No, they must be installed on a server with SharePoint installed.

Q: Are there any best practices for caching web parts?
A: There aren't best practices for caching web parts per se. Caching data is really driven by the data that you're displaying and caching. This is something that should be evaluated on a case-by-case basis. However, you have a configuration point in terms of the persistable properties. Because of that you can make your caching solution something that the end user can tune.

Q: Are the connection interfaces supported by the out of the box SP web parts documented somewhere? Can a custom part implement more than one type of provider interface?
A: I've not seen a comprehensive list of the interfaces exposed by the out of box web parts. However, you can discover what interfaces are supported yourself by using the .NET reflector on the classes of the web parts. You can support more than one kind of interface.

Q: I have VS2005 but I am not able to create webparts, how do I add that capability?
A: Download and install the Visual Studio Extensions for Windows SharePoint Services 1.1

Q:Any special considerations for AJAX?
A: Yes, look at www.codeplex.com/Features there's a AJAX configuration feature that helps. Dan Larson is the guy that knows SharePoint and AJAX best.

Q: I'm having problems where the custom properties don't display when I inherit from System.Web.UI.WebControls.WebParts.WebPart but they do when I use Microsoft.SharePoint.WebControls.WebPart. What can be wrong?
A: Make sure you include the following three attributes when deriving from the ASP.NET 2.0 class: Personalizable, WebBrowsable(True), and WebDisplayName. The most likely cause is one or more of these attributes are missing.

Q: Is there a detailed listing published some where that shows how to deploy a WebPart on SharePoint?
A: Yes. I wrote an article titled "Deliver Web Parts with Solution Packages" that can help.

Q: Why not develop straight ASP.NET web parts and use SharePoint web services for data access?
A: Because the SharePoint Object Model is much easier to use and is much richer than the web service model. Additionally, web services do not perform as well as direct object model calls – not just in SharePoint but in any application.

Q: How easy is it to access SharePoint objects such as lists and document libraries?
A: Very easy, that was the subject of the next web cast: Data Lists

Q: Are there limitations to creating a Web Part in SharePoint Designer vs. Visual Studio 2005?
A: You can't actually create web parts with SharePoint Designer. You can create instances of the Data View Web Part and configure instances of the ListView web part – but you're not actually developing or creating any new web parts.

Q: Can an existing SharePoint web part be used outside of a SharePoint environment on a public web site?
A: No, they all have a reference to Microsoft.SharePoint.dll which is only available on a SharePoint Server.

Q: What is the process to deploy a solution to a production environment after you are done developing on a developer workstation?
A: Deliver the .WSP (SharePoint Solution) file to the infrastructure team. They can add the solution to the SharePoint solution store with STSADM –o addsolution –filename mysolution.wsp (where mysolution.wsp is the name of your solution file.) Once it's added they can deploy via the central administration operations section's solutions management page or via STSADM –o deploysolution.

Q: Are there deployment issues when developing a WebPart that leverages code from a separate assembly? (e.g. a common library used for other applications as well as the web part?)
A: No. Just make sure to include the assembly in the WSP (SharePoint Solution) package.

Q: If a WebPart generates an error – can you have a different WebPart show in it's place?
A: Not directly, ideally the WebPart will gracefully handle errors.

Q: Can I use a Silverlight WebPart?
A: Yes, Andrew Connell shows how to do this in his web cast.

Q: Is there a way to change how SharePoint treats/stores custom properties?
A: Absolutely. In the custom part of the presentation I showed GetEditorParts(). If you look at the EditorPart interface you'll see methods to override how the editor part serializes data?

Q: Since the ListViewWebPart is sealed and therefore cannot be inherited, is there another way to get the out of box ListViewWebPart Ajaxified?
A: There are various techniques, however, writing your own vs. relying on ListViewWebPart might be well advised. It's pretty much my least favorite web part due to "issues."

Q: Do you have a suggestion for the steps you should take when you need to create a database to support your web part?
A: See the Data Lists webcast.

Q: When starting with SharePoint should you start with Windows SharePoint Services (WSS) or Microsoft Office SharePoint Server (MOSS)?
A: Most development is done against WSS. So it's a good starting point – however, migrating from WSS to MOSS is easy.

Q: You can simulate the SPListViewWebPart using SPList/SPView.RenderAsHtml methods. These return HTML similar to what the WebPart does. Just set the properties or pass a query.
A: I don't recommend the use of Render … in any form. Although technically possible, there are limitations around event/click handling that are difficult to work around.

Q: What strategies are available for versioning web parts where the schema of the underlying list has changed?
A: There are a myriad of different strategies here. I recommend that you have a feature receiver make the changes to the schema for you – or that you have the WebPart itself ensure the schema is correct.

Data Lists

Q: Can you tell us when the code from today's and yesterday's webcasts will be available and where it will be located?
A: mssharepointdeveloper.com It was also posted at http://www.microsoft.com/downloads/details.aspx?FamilyID=25f9cc59-4ea3-4381-8b37-9430f664eac6&displaylang=en if you want to get it before it's available on mssharepointdeveloper.com

Q: Is there a recording and a powerpoint available from the previous WebPart webcast?
A: The same links that you used to register for the event will take you to the recorded version including the powerpoints. If you want the power point files, the transcription, and the source code files (but not the recording) you can go to http://www.microsoft.com/downloads/details.aspx?FamilyID=25f9cc59-4ea3-4381-8b37-9430f664eac6&displaylang=en

Q: Will you be able to address using a SharePoint list to accomplish a one-to-many relationship?
A: Out of the box SharePoint lists don't provide the same relational context as a SQL based relational database. SharePoint lists work best where referential integrity is not a primary concern and code can be used to manage relationships.

Q: Can we refresh a SharePoint List with a SQL Table?
A: Access 2007 can natively write to both SQL and SharePoint. It can be used to refresh data in a SharePoint list. However, it may not be best to think of SharePoint as a shadow copy of a live database.

Q: Since a document library is a kind of list, can I turn on check in/check out on a list?
A: No, the semantics for a list item vs. an item (file) in a document library are different. However, you could create a dummy document and use the metadata on the document library with the check in/check out symantics.

Q: How can we get a SharePoint list to function similar to Intuit Quickbase?
A: I don't know Intuit Quickbase and therefore don't know what functionality you're talking about?

Q: I am having a problem with the "Save As" feature that was mentioned in the presentation. Can you point me to documentation on troubleshooting the "Save As" Feature?
A: F1 – Word Help should be able to get you to the right documentation. From your question it's not clear what the problem is.

Q: What's the link for Managing Enterprise Metadata with Content Types?
A: (Thanks Paul Andrew) http://technet.microsoft.com/en-us/library/cc262729.aspx

Q: What are the major differences between a SharePoint List and a SharePoint Document Library? At the core is a SharePoint Document Library also a list?
A: Exactly. A Document library is fundamentally a list that always has one and only one attachment to the item.

Q: What level of this hierarchy is Shared Services at?
A: Shared Services is a web application.

Q: Is it easier to build a list from the UI or from SharePoint Designer?
A: I always build them from the Web UI … mainly so I don't have to start up another program.

Q: [Statement] IDisposable cannot be used on the current site.
A: It's true that you should not call the Dispose() method on a SPSite or SPWeb object you get from SPContext.Current.Site or SPContext.Current.Web. However, if you create the SPSite or SPWeb object yourself you should still dispose it.

Q: Is there a way to know the internal name of the field if it was renamed subsequently? Can I do it without writing custom code?
A: Yes, go to the List Settings. Click on one of the fields in the list. The final parameter in the QueryString is Field. This is the internal name of the field.

Q: Are you going to talk about LINQ to SharePoint at all?
A: No, those are community projects and are not required to work with list data in SharePoint.

Q: Is there a way to share a data list between multiple sites?
A: No. However, you can display the data from one site in three different sites – if you configure a DataView web part correctly.

Q: Can you move documents between different SPWebs and SPSites and retain the information about the author, timestamp, etc?
A: Yes, see SPFileCollection.Add() in the SDK.

Q: Can you move a folder with content from one document library to another document library?
A: Through the user interface yes. Through custom code yes. As a single method call in the API, no.

Q: Can we use VB.NET instead of C#?
A: Yes, VB.NET is supported. I just code quicker in C#.

Q: Is there sample code for accessing lists across site collections in the same farm?
A: Not per se. However, you can construct your own SPSite object (new SPSite(url)) and that will give you access to another site collection on the farm.

Q: Do you recommend using the out of box new, display, and edit forms?
A: 90+% of the time I use the out of the box forms because they are easy. Sometimes users need/want more control and therefore write custom pages.

Q: Are there any good references for CAML Syntax?
A: Yes, in the SDK CAML is well covered.

Q: How can you import a SPList using web services since they don't support a collection?
A: Actually, you can send a batch of transactions. The syntax of the web services is documented – although somewhat minimally.

Q: For your "Copy and Move" web part, why did you call CreateChildControls in your btnMove_Click event handler?
A: Because after a move the files available in the source library changes. However, I've already drawn the interface. My CreateChildControls clears the control tree and starts over – so I can just call it again to force the display to be regenerated. It's a quick hack to make the demo easier to read without a ton of code to handle reprocessing for items changed in the event handlers.

Q: How does ASP.NET viewstate work when you are dynamically adding child controls to your WebPart?
A: This is pretty out of scope for this talk. The short is that the general presumption is that the control tree will match the last time it was drawn. However, I do not recommend the use of view state.

Q: Are there any concerns with developing custom code within SharePoint – or should we use the web services instead?
A: If you use the well defined interfaces, you shouldn't have problems upgrading. Using web services won't really help that much. (if at all).

Q: Does WSS allow "Uplaod Multiple Documents" or is that only in MOSS?
A: The demo VPC is WSS only – Upload Multiple Documents is in WSS. You must have client integration turned on for it to work and you must be running IE.

Q: What are some of the potential cause for a list template not showing custom forms?
A: If the forms aren't present SharePoint will revert back to the out of box forms. It's most likely that the form didn't get deployed.

Q: Is there a way to have multiple documents in the same record?
A: No, however, you can create a separate folder for each record or use a list item and attach the documents to the list item.

Q: Where can I find out how to work with the attachments of a list item?
A: The Attachments property as documented in the SDK is a good place to start.

Q: How do picture libraries and forms libraries differ from a document library and other lists?
A: Picture libraries offer thumbnails which document libraries don't have. Forms libraries offer the summarization of data that document libraries don't offer. Otherwise they're the same

Q: Is there a way to have the same slide deck in multiple places in a slide library?
A: Not to my knowledge.

Q: How is security on the list applied to a web part's operations?
A: The web part's operations are by default in the context of the user. Thus a web part cannot do something a user can't do – except if the WebPart author uses a special API to get elevated priviledges.

Q: Can we update the "User Information" list programmatically?
A: Yes, look at SPSite.AllUsers.

Q: How do you restrict viewing certain list columns programmatically?
A: You can't really do that. There are some hacks but fundamentally column level security isn't supported.

Q: Can I show different forms to different users on the same list?
A: No, but you can make your custom forms intelligent enough to display a different user interface to users. However, it would technically be the same form.

Q: Can we have a SharePoint Document Library attached to an item of a list?
A: No, but you can have a URL pointing to a document library as a field in the list.

Q: Should we use the internal field names or display names in CAML Queries?
A: Always, internal names. CAML gives you some ugly/bad messages if you try to use display names.

Q: Can lists contain child lists?
A: No, but you can have folders in lists.


Categories: Professional | 4 Comments
 
Thursday, May 29, 2008

Be an Expert (Or Play One on TV) – With SharePoint Introduction Webcast Materials

I've posted previously about the web casts that Andrew Connell and I are doing. I'm happy to announce that the materials that Andrew and I are using for these web casts are now available for everyone. Not only do you get the source code but you've got the slide decks as well (including a transcription of the web cast in the notes.)

Sidebar: We're aware that the demos for my first two recordings are REALLY small. It looked fine when they were live. I'll rerecord them in the next few weeks and will make a post to let you know that they're fixed. Thanks for your patience.


Categories: Professional | 0 Comments
 
Friday, May 23, 2008

How Best Are Your Best Practices

In my work with Andrew Connell on the Web Casts for Paul Andrew, we've been struggling to make sure that what we're delivering in the web casts and in the hands on labs that will accompany them represents state of the art best practices. It surfaces in tons of little ways. For instance, you should always dispose SPSite and SPWeb objects you create yourself (and not those you get from SPContext.Current) so the sample code has using statements in it to make sure that the objects are properly disposed. We've also religiously defended against the possibility of using Render() or RenderContents() in a web part as dozens of demos have done. Why? Well, because there's a consensus around using CreateChildControls(). The reasons are somewhat simple – because ASP.NET can work with CreateChildControls() to change the display for alternate devices (via ControlAdapters), post back values and event firing works, etc. Basically it's a well behaved member of the family where as render and render contents are more ASP-Classic in their approach where you just write whatever you want.

Those are some of the easier ones to put a stake in the ground on. They've got clear cut advantages, disadvantages, and enough people willing to stand up for them. There are more subtle things that we've been defending as well. Things like building web parts instead of web pages in SharePoint – because the platform is about modular, reusable UIs. However, my point here isn't to enumerate all of the things that I think are – or should be best practices. The point is that I think there's a natural problem that we have in the industry that everyone needs to help solve. (Yes, I mean you reading this right now.)

First, let me quote James Bach who was speaking about software development methodologies "There is no consensus about what practices are best, unless consensus means 'people I respect also say they like it.'" I believe our situation with SharePoint is not all that different. We've got a handful (or more) opinions about what a best practice is but little consensus on what the best practice is. I think that this is because that there isn't one perfect answer. There isn't in anything else either. We have suspension bridges, cable-stayed bridges, arch bridges, etc. Not one kind of bridge fits all. They each have different benefits. So while I can pretty definitively call out CreateChildControls() as a best practice, I find it much harder to persuade Todd Bleeker that my configuration based approach to loading user controls is better than his integrated project approach. I think that both can be best practices in the space. (I know I haven't defined the details of the approach, ignore that for now, it's not important to this discussion.)

However, there's another problem – one that in my opinion is much more insidious. There's a large gap between the State of the Art and in the State of the Industry. In other words, we know what to do but we don't do it. I've been talking about this problem in the software development space for a long time. However, I think that the problem might actually be worse in the SharePoint space. A buddy of mine, Shane Young, recently posted a blog entry -- What makes a "good" SharePoint Consultant. One of the things he is saying without directly saying is that he gets called in, like I do, to clean up a ton of messes that some SharePoint consultants are creating because – in this case – they don't know what the product can do out of the box. I wish I could make as bold of statements as Shane can about needing to know a lot about SharePoint before doing any work on the platform. I can't because it seems like I am still learning something new about SharePoint every week – given the amount of experience I've got, the problems I've solved, and the solutions I've created – that shouldn't be the case but it is. I say shouldn't because at some point you should know everything about a system. However, I'm realizing that it's bigger than any one person (or team of people) can experience.

Back to my point, there's a large gap between what we know to do and what we actually do. Ben Curry just posted a blog entry about quick performance tips for SharePoint. Most of us know that these are best practices, but how many of us do them when we setup a new server? My observation is very few. Ben and Bill have gathered a whole set of these Best Practices into a book Microsoft Office SharePoint Server 2007 Best Practices that will be out soon. Will their best practices be the best practices – or merely a best practice? I suspect a bit of both. However, knowing what to do as someone might after reading the book is only half the battle. When are we going to actually do what we say?

Need another example? How about the SharePoint Governance Checklist guide that Joel Oleson distilled from my SharePoint Governance articles (Part 1 and Part 2) and then added some additional content to? How many take the 20 minutes it takes to get through this content and answer the important questions that are raised? In my observation, very few folks – even those that know about the materials – actually take the time to ask the questions and figure out the answers before implementing SharePoint.

Another thing (besides Ben and Bill's book that's focused on infrastructure) that may help drive us to the right place is the work that the Patterns and Practices team at Microsoft is embarking on now. Glenn Block posted on his blog that they're looking for feedback. They're trying to understand how people develop with SharePoint so they can provide some direction. They've put together a survey to try to get that feedback.

My only hope is that we can all settle on a set of best practices and actually start to use them.


Categories: Professional | 0 Comments
 
Monday, May 19, 2008

Article: Office Space - From VBA Macro to Word Add-In

 
 
 
 

Categories: Articles, Professional | 0 Comments
 
Wednesday, May 14, 2008

Become a SharePoint Developer Instantly, If Not Before

With all of the interest in SharePoint I sometimes think that people walk up to me and want to know how to become a SharePoint developer instantly. (Just add water, as they say.) If you read my MSDN Magazine End Bracket article "You Should Learn SharePoint" you probably already realize that it's not quite that simple. However, Paul Andrew has been leading a charge that Andrew Connell and I've been a part of to get a good primer for SharePoint developers out there so anyone who has the desire to learn will have all of the tools they need to get started with SharePoint development. The first part of the campaign is ten (!) hour long web casts where we cover the things you need to know about SharePoint and some of the cool things to learn about SharePoint that can make building your solutions easier.

They are every Tuesday & Wednesday from 12p-1p EDT (GMT -0500) starting next week for the next five weeks. Here's a break down of the schedule:

Date (all times EDT)

Topic & Registration URL

Presenter

Tues, May 20 : 12-1p

Web Parts

Rob Bogue

Wed, May 21 : 12-1p

Data Lists

Rob Bogue

Tues, May 27 : 12-1p

Silverlight

Andrew Connell

Wed, May 28 : 12-1p

Event Handlers

Andrew Connell

Tues, June 3 : 12-1p

Site Branding

Andrew Connell

Wed, June 4 : 12-1p

Workflow

Rob Bogue

Tues, June 10 : 12-1p

Web Services

Andrew Connell

Wed, June 11 : 12-1p

Page Navigation

Andrew Connell

Tues, June 17 : 12-1p

User Management

Rob Bogue

Wed, June 18 : 12-1p

Content Types

Rob Bogue

Special thanks to Paul for getting this ball rolling, and the awesome set of people participating both at Microsoft and external to Microsoft to make this happen. I'm excited to be a part of it.


Categories: Professional, Articles | 0 Comments
 
Thursday, May 08, 2008

Creating SharePoint Sites from Global Templates with the Object Model

I recently had the pleasure of delivering the first SharePoint Workshop for Bamboo Solutions in Chicago, IL. One of the cool things about the project was the ability to put together what I believe are some of the best workshop materials out there. I may be biased (and the pope may be catholic) but I believe that the common thread that runs between the labs can really help you understand how all of the pieces of SharePoint fit together.

One of the challenging parts of putting together the workshop was building a tool which could quickly create the individual user ids and site collections for each of the students. One particularly quirky part was creating the site from a global site template through the object model. You see when you upload a template to a site collection and you want to create an instance of it via code you use templatename.stp in your code to refer to the template. This is what most folks document when demonstrating how to do it. However, because I needed to create separate site collections for the students, I couldn't upload the site template that way, I needed to use STSADM –o addtemplate to add the template globally.

When you upload a template globally, the template gets assigned an ID that starts with _GLOBAL_#0. The next template would be _GLOBAL_#1 and so on. None of this was new to me because I've used this format before. However, the interesting thing was that the code I wrote worked when I used one of the site definitions (STS#0) but not when I tried the template. In the end, I realized that the account I was using didn't have access to the site. I had installed SharePoint with a service account and I was logged back in as the administrator. The administrator account didn't have an entry in the Policy for Web Applications – once I put a policy entry in for the administrator the creation tool started working fine.


Categories: Professional | 0 Comments
 
Monday, May 05, 2008

Instructional Design: One Quick Tip

I've received many comments about how easy the SharePoint Shepherd's Guide for End Users is to use.  I was just editing some other material and I realized one of the reasons why.  It's automatic for me but apparently not for everyone.
 
When doing step-by-step instructions you basically have two options for how to structure the step:
 
1) Select Option A in Field B
2) In Field B, select Option A
 
Any idea which one's easier to read?  The second one.  Because you're not forcing them to remember the value while locating the field.  It reduces what is called cognitive load.  In short, you're requiring less brain power to be able to follow the steps.
 
If you're thinking that it only applies to end user materials ... um, no.  The less brain power consumed actually trying to follow the steps the more mental resources there are to be able to reach higher levels of understanding (see Bloom's Taxonomy/Taxonomy of Educational Objectives)
 
The next time you're putting together step-by-step instructions you may want to think about how you structure the steps.

Categories: Professional | 0 Comments