Tuesday, May 26, 2009

Monday, May 4, 2009

export of a versioned list neglects data (WSS v3)

The use of versioning is typically very important to users. At one of my engagements using WSS V2, the IT group discouraged the use of the versioning feature since the storage mechanism (inside WSS) was very inefficient.

In WSS V3 the storage mechanism for versioning was improved and some very nice additional user features for versioning were added. Basically these are: 1) tracking versions by individual meta-data 2) alert notifications showing the old and new values.

Now I have just found out that one feature in V2 was deprecated by these changes. If you export a versioned list to Excel, only the latest version is exported. Apparently this is also true for content deployment in ECM. A user has told me that this exported all data (including previous versions) in WSS V2.

Unfortunately the only work-arounds I have found so far involve code. :-(

I have made some web services code to dump the previous versions. This was written in C#. Another approach is to write an Object Model program to address this limitation. Either approach can be written in C#, VB.Net or PowerShell.

Regards..

Wednesday, April 15, 2009

Did some testing with SharePoint Guidance

I found this out on the MSoft patterns & practices site.

Similar to the MVC thing it is designed [one hopes] to motivate SP programmers to greater productivity levels.

One thing it does for sure is show:
  • how a real application can be integrated into SP
  • how many pieces-and-parts [at the code level] are frequently required to accomplish this
There are some gotchas that I found. For an experienced SP developer, these are easy to work-around. I have not dug in to fix all of these, but for sure fixing some of these would not be easy. They are listed here along with the perceivable symptom:

  • does not work on non-port 80 webapp - instantiating the site just hangs
  • workflow build issue - second project will not build complaining about feature scoping; the fix is straightforward although you also run into some Visual Studio bug fixing it (maybe this is related to the original bug)
  • workflow run-time issue - could not get this to run correctly when set to the original site instantiated for the application; may be related to the fact that it must be instantiated in a site collection
  • theme selection issue - the theme project does not install into the Site Settings location; so the customer cannot test it out with built-in themes
  • install to more than one webapp does not work - this is because of GUID collisions
  • workflow DLLs not installed in the Contoso VPC - so when you open the workflow source code, Visual Studio complains and cannot open it
  • the directions talk about error checking, but when I schedule a course with the end date before the start date it spits out an ugly ASP.NET exception screen

So it is some distance from best practices. Rather than 1.0, I would call this a 0.7 version of guidance. Many of the issues above could be put into the destructions. Then someone does not have to stumble over the problems one-by-one.

Of course, it is more fun that way.

Regards..

Sunday, April 12, 2009

ASP.NET MVC 1.0 free book contains broken code

Hey...what a news flash!

MVC 1.0 is a new application framework for ASP.NET. I wanted to figure out what it is because it, like some other "frameworks" I use are designed to make application development closer to Code Free. This specifically is on my list since:

1) It took me a while to get my head around the ASP.NET 2.0 declarative markup programming model. It is so vast and so powerful that you need to understand at least 30-40% to be productive at all. And a higher knowledge level is needed to debug it. I have had some success using 2.0 and pushing it over to Sharepoint with relatively minimal problems.
2) Now I read about MVC like it is something new. The first time I read about it was in a SmallTalk book in the 80's.
3) Even MSoft had a MVC-type framework called MFC, again from the 80's.

Here is the blog that announces the 1.0 version.

So I loaded the Contoso VPC for SharePoint to test another framework [described in another blog entry]. Then I decided to try this MVC thing in that VPC-image. To install it, nothing more than the usual .Net framework hassles to overcome.

The link above also allows you to download the completed code that is [presumably] built up step-by-step in the book.

I have seen many cases where some group gave a tutorial book and the code and they did not agree. Whether I cared about that or not depended on the subject matter. There have been times in the past where if I really wanted/needed to learn the material and I ran in to the book does-not-equal code case, I would just skip the book and go to the documentation for the code.

In this case although I was ready for it, now that we know this is the case again, I am a little more disappointed because:

1) frameworks are big entities to learn
2) the stated goal of this book is to help someone learn
3) I have read this Scott Guthries blog in the past and he seemed like a stand-up guy
4) After reading the chapter before trying the code, almost none of the ASP.NET 2.0 decalrative framework carries over; even more reason for this think to work
5) I guarantee you these guys know the [lack of] pedagogical value of having a how-to book that is incorrect and the final code; of course, it is better than just having the book!
6) MSoft usually treats programmers better; I have seen lots of cases where they give not-quite-ready stuff to users, but they usually understand the developers have a bigger hill to climb
7)the purpose of a framework is to let the developer think big-picture; having to dig into the guts of MVC routing on your first trip to nirvana with this thing is not what the doctor ordered

So again I am naive; again the industry chucks one huge framework to move to a slightly better one that is just as hard for developers to learn.

I guess that this is another one of the benefits of open source. I guess if anybody could do it, they wouldn't need programmers, right?

Finally, there is a tweet out there somewhere found by Google when I type in "errata" about this mess. Wanna guess the fixes will be printed at the back-of-the-newspaper?

Ohh, I got up to page 45...and the code will not breakpoint in DinnerController...must be a user error!?!

Regards..

Monday, March 30, 2009

Examples of my SharePoint work

All of these are sites that are internal to the client. Contact me if you want more information.

A public utility in NorCal

· internal directory application exposing AD - Active Directory was dumped to a SQL2k5 DB and I made an ASP.NET 2.0 application to access and expose this as an SP application in /_layouts/

A large pharmaceutical in SoCal

· InfoPath FormServer integration – create InfoPath chemical compound shipping form with simple approval workflow included; test with users; deploy to FormServices
· web services based administration tools – crawl multiple sites to make security and other settings changes without touching the SharePoint backend
· email settings crawled from client – write a Powershell script to use .NET to make a "keyboard robot" to access/change settings not available to web services
· powerpoint slide manager – integrated consolidated slide deck application by using SharePoint facilities (e.g. permissions) and adapted a script to do consolidation with PowerPoint OM
· project schedule webpart – integrated SharePoint facilities (e.g. alerts) with script driving MSProject OM XML extraction to feed a SP XML webpart on the SP site
· XL Services integration – import/deploy chem-informatics spreadsheet to XL Services for search and customer access
· Integration to an internal Java application – built web part to integrate chemistry data and expose internal application results using web services
· BDC setup – XML definitions to use DBC to access Oracle data; included SP list integration, SP Designer web-parts as well as search integration
· Administration of the developers SP environment – installation, configuration and customization of the local developers SP environment including MSDN, TFS and compiler setup
· education for scientists - wrote and presented SP for Scientists class at 2 levels

A large health system in Missouri

· Initial TFS setup – installed and configured a developer image under VMWare delivered as a DVD
· Project design consulting – architecture design; use case review; deployment design
· Installation, configuration of TEST/PROD deployments – debugging related to FBA, IIS setup
· HTTP module development – C# module for custom authentication

A financial services company in NorCal

· integration in a large system - integrated Sharepoint upload into ASP.NET 2.0 application
· team participation beyond SP - responsible for several non-SP modules in the system
· ASP programming - used ASP.NET 2.0 declarative programming extensively
· Build setup/operation – installation, configuration and customization of build environment for developers for TFS, MSDN and SharePoint

Tuesday, March 24, 2009

Application #2

Let's call this: slide deck managment system

The business analyst asks the user: What is the requirement?

We have the slide deck of about 300 Powerpoint slides that we need to manage every 3 months or so. Each team leader has about 25-30 slides for which they make sure the content is correct.

We have to keep these separate so no one destroys anyone else's content. Then at the end of the quarter, we need to consolidate them all into one deck. When the consolidation comes, we need to lock out the changes and let everyone know where the final version is.

The business analyst writes down:

This is just like a group of editors who are each managing a bunch of chapters of a book. Let's use Sharepoint facilities to provide:


  • check-in/check-out
  • alerts
  • permissions
Then I need the tech guys to make a script that will consolidate all of the slide decks. The business analyst finds a script that will [almost] do it here:

Together the busines analyst and the tech guys come up with the solution by following these steps:


  • create a site with unique permissions
  • create a document library
  • name the slide decks so that the script can read them in the proper order
  • upload the various slide decks
  • set the alerts on each slide deck to point to the team leader for that deck
  • set the alerts so that when the consolidated deck is stored, the correct people will be notified
  • get each team leader to initially check-out their deck so no one else can modify it

Then modify the script to:

  • read the slide decks from the SharePoint site using the UNC name
  • store the consolidated file back into the site
  • be run every 3 months or at the behest of the business user consolidator


This stripped-down implementation will work [I implmented it for one of my clients] and is in-lieu of a custom system that would cost big-dollars to develop/deploy/support/operate.

Monday, March 16, 2009

Application #1

Let's call this: The Plungers Ordering system

The business analyst asks the user: What is the requirement?

We always order plungers through Bob. He adds the details of the order as a row in a spreadsheet file. This works fine except: There is only one "correct" version of the file. Most of the time Bob has it. Sometimes other people have it. And then Bob does not have the latest one.

Then we order stuff we already have in-house.
Also, other people will add stuff to the sheet they want ordered without Bob knowing about it.


Lastly the spreadsheet can accidentally be seen by people in other groups and then they cause a political ruckus.

The business analyst writes down:

We just need to share this file, be able to review it before placing new orders, search for orders already placed and know we are looking at the latest version of the file. Also if we make a mistake we need to see what changes are made and optionally go back to an earlier version of the data.

We also need to make sure that noone outside of our group can see the contents of the file.

What is one technical alternative?
  • Load the spreadsheet into a DB.
  • Write some desktop or web code to access the DB.
  • Work with the users to design the screens.
  • Add a module to enforce security or put this in the DB DDL.
  • Add a module to do versioning in the DB and screen to allow them to select/use old versions.
  • Add help support to the system.Teach the users how to use the application.
  • Have a QA process to make sure the application meets the business requirement.
  • Roll out the application to production.
  • When it needs to be changed [e.g. somebody quits], tell the users to call the programmer.
Usually the tech people go beyond this and also add:
  • A forms system to order plungers
  • A status screen to show everyone the status of the plunger orders.
  • A security system to show everyone who has what permissions and to allow them to change the permissions.
What is an easier code-free alternative?
  • Use Sharepoint.
  • Optionally create a site to hold the data.
  • Create a custom list by importing the spreadsheet data.
  • Set Versioning=on for the custom list.
  • Set up the security giving the appropriate people read access and others write access.
  • Optionally, tell the Sharepoint administration group to make sure search works for this site.
  • Test the application security and search functions.
  • Show Bob how to check-in/check out the spreadsheet so versions will be kept.
  • Show Bob how to change the security for the system.
Compare/contrast tech vs. code-free alternatives.


Advantages=Benefits
  • tech - application is *exactly* like the users wants and no more
  • code-free - user can build it themselves
  • code-free - application goes to production much quicker
  • code-free - user can use it immediately, on their own schedule
  • code-free - application is managed by the user (security, et.al.)
  • code-free - application can be changed by the user
  • code-free - other code-free applications will behave the same
Disadvantages=Costs
  • code-free - some SharePoint screens may not be exactly to the users taste
  • code-free - MSoft bug in import needs a workaround
  • code-free - users may proliferate applications that may need cleanup by IT staff
  • tech - a coder is needed
  • tech - application takes much longer to create/test/deploy
  • tech - application is available to the users on IT schedule
  • tech - application needs a coder to manage it (security, et.al.)
  • tech - application needs a coder to change it