forge

Article: Caught Up in Code, or Quick Configuration

Many new programs are starting to blur the lines between something that should be enforced through specific flow control in code and when it’s the right decision to allow some decisions to be made by the configuration of the software. Here, you’ll explore that line and how it impacts your development.

Code is Well Known

Most developers and architects default to creating solutions for their problems directly in code. They put an “if…then” statement in the code and call it business logic. For example, if there is a specific property available, then the application must show an additional link. If the property shows that the user is a member of a certain group, then an additional menu may need to be displayed.

Situations like these arise every day. Creating a simple “if…then” statement is the obvious solution to the problem. But is the obvious solution always the right one?

Configuration Is Quick

Configuration, rather than a quick “if…then”, maybe the answer. Configuration is focused on creating ways to simplify individual business logic into a set of values that can be stored as configuration rather than hard coded into the logic of the program. Configuration is converting hard-coded logic into data that the program can operate on.

http://www.developer.com/tech/article.php/3556616

 

forge

Version Trimming

SharePoint’s ability to keep multiple versions of a document is a great benefit — but it can also gobble up space like Cookie Monster can eat cookies.  Several clients have had issues, particularly when trying to get a migration right, where there are too many versions of a document in their database chewing up space.

Other SharePoint users face the long term maintenance nightmare of trying to control the maximum number of versions of a document when they no longer have control of their users.

Because of this, I’ve developed a command line tool (which can be easily scheduled) which will go in and “version trim” a document library. You tell it the maximum number of versions that you want to allow for a document in a SharePoint site and it will go delete all of the versions in excess of the number you specify.

The tool is web service based which means it can be run from any machine — it doesn’t have to be run from the server.

I’m finishing up some Alpha level testing this week but will be looking for beta testers early next week.  Anyone interested?

forge

Link: SharePoint as a time tracking tool.

If you read this blog at all you know that I rarely link to other content directly, however, I thought this was an interesting idea…

http://www.devx.com/OfficeProDev/Article/29471

Easy Time & Billing with SharePoint, Outlook, & Excel (and VSTO too!)
These popular office system applications reduce the pain of recording and reporting your time, with very little code required.

by Ty Anderson

forge

Out of the darkness

If anyone has noticed that the blog activity has decreased, they’re right… It’s not because I’m abandoning the concept, It’s really just a concurrence of a few things …

1) I stopped doing the TechRepublic Stategies that Scale newsletter.  That was four postings a month (one a week.)  I really enjoyed writing the content for the newsletter but it wasn’t aligned to the things I was doing on a day-to-day basis so I had to let it go.

2) I’m transitioning between series at Developer.com.  Whenever I transition between series it disrupts the writing schedule.  We should be back on track this month but it means that I didn’t have the two posts per month I normally have announcing those articles.

3) I’ve been busy trying to figure out the eCommerce portion of the software development factory that I’m doing.  You’ve seen some announcements for betas…  I’ve got one issue to take care of in one of the products but otherwise the feedback has been good.  The net effect of which is I need to figure out how to start selling them.  I’ve taken a few wrong turns (www.windowsmarketplacelabs.com) and the delay has caused me to decide that I want to build the new site on ASP.NET 2.0 which has turned out to be a giant gravity well which my time is falling into.

4) .NET 2.0 is really cool.  I’ve been playing with generics and how they can take typical problems and make them easier.  The obvious answer is collections.  However, I’m also very interested in taking the factory pattern and making it strongly typed and generic…  Unfortunately, I’ve decided that I’m starting from scratch so that means new database access code, new configuration management code, new collections code, and the new factory code … That’s meaning that it’s consuming a lot of time.

5) I can’t stop developing products.  It’s sort of like an addiction.  I see more needs than I can fill … I wrote a tool to manage web parts on any web part page in SharePoint (here’s a hint, almost everything is a web part page — including list pages).  It will allow you to add, delete, extract, and enumerate web parts.  (It’s done if anyone wants to play with it.)  I’m finishing a Url Administrator that allows you to change SharePoint List Fields which are of type URL.  The idea is that users sometimes use URLs in the portal that you wish they hadn’t — or you need to change.  This tool will go through the entire portal and organize all of the links for you.  It’s about 50% done.  I also have a tool which will go through and trim the versions in document libraries — more than a few clients have accidentally turned on versions in their document libraries and now aren’t sure how to get the versions trimmed.  That’s about 40% done…

6) I’ve been sleeping.  I try not to but occaisionally I’ve just got to.  My favorite catch phrase is “Sleep is optional.”  I’m being reeducated that it isn’t.

By the way, I’m looking for a mentee, protégé, coachee, who would be willing to work for a little bit of money and some good experience.  I need some help clearing some of my development tasks since I just can’t seem to get them all done.  If you’re interested drop me a line.

forge

Is Everything in SharePoint a CAB file?

I’ve known for quite a while that SMIGRATE backups (FPB)s were simply renamed CAB files.  Today I had a collegue show me that STP files are just renamed cab files too.  When you create a template — either for a list or a site the resulting STP file is just a renamed cab file with a manifest.xml file.  I’m not sure what I’m going to do with this new found knowlege but it is definitely cool.  (It might make it possible to apply a template to a different site definition for instance.)

forge

SharePoint and XPath

I blogged earlier about using the XmlNamespaceManager to get back nodes from SharePoint XML fragments.  I found a better way (with the help of some BizTalk MVPs that I got to hang out with recently).  Instead of doing /wp:Fields/wp:Field or whatever nonsense that you need to do to get the XmlNamespaceManager to work use the local-name() function so … /*[local-name() = ‘Fields’]/*[local-name()=’Field’]

I’m sure someone will tell me why that isn’t very performant … but I don’t care it works, it’s clear to read, and I don’t have to go through hoops to get the XmlNamespaceManager hooked up.

forge

Troubleshooting Web Parts and Deployment

This isn’t the article that I set out to write. While researching another article (coming soon) I soon realized there just isn’t a lot of good material on how to troubleshoot Web part deployment, or even precisely how Web part deployment via STSADM even works. This article is designed to explain the moving parts of the deployment process and describe what can go wrong. Hopefully, it will help a few people get their implementations up and running more smoothly.

Why Deploy with STSADM?
Before getting too deeply involved in fixing STSADM Web part deployments, it’s important to understand what STSADM is and why it’s a good platform for troubleshooting Web part deployment.

STSADM is a ‘utility knife’ type of tool that ships as a part of Windows SharePoint Services. It does a wide range of things from site creation to Web part pack installation. If you have SharePoint Services, you already have this utility; it is typically found in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Bin.

http://www.devx.com/webdev/Article/29352

forge

Doing the impossible: Maurice Prather clarifies AppDomain Usage

Maurice Prather’s original post on AppDomains to get around some issues with impersonation and the object model was great.  It was an approach that works to allow most applications to do what they need within the SharePoint world — even if SharePoint doesn’t allow the user to directly perform the action.  His update fills in some small holes in the original article — including one or two that I must admit I fell into. Maurice was kind enough to help track down the issue (the second call to impersonate that I wasn’t doing but he was)  and get things straightened out.  My problem was the one exposed by Mike Donovan on IRuntimefilter getting roles for a user.He worked around it with a web service call, but that’s not an option in my environment since performance will definitely be an issue.

I can also say that a SharePoint architect that I placed with another client has used the AppDomain technique to get by a wide variety of issues.  So in short, if you need to do impersonation, this is the way to do it…

 

forge

Article: Five questions to ask before buying a new tool

Before buying a tool, make sure that you understand the problem, all of the alternative solutions to the problem, what else you’ll need to implement the solution, and whether it’s a problem you should even try to solve on your own. Developing a routine before buying tools will help to prevent purchasing tools that you’ll never use.

My father is a tool guy. He has more tools than any sane person should have. I learned that there are a dozen different saws—each for a different purpose. I’ve inherited this love for tools, although I get more crazy about gadgets than power tools. I realize that I’m not alone. Often times I recognize an automatic instinct in clients towards buying a software package to solve a problem — and occasionally even a hardware purchase. Unfortunately, the tool—whatever it is—is just a tool. It can’t solve the problem by itself. It needs to be wrapped in a solution to solve any problem. Here are five questions to ask before you buy a tool to try to solve a problem.

Do you understand the problem?

Most of the time IT professionals are so pressed for time that they don’t make sure that they fully understand a problem before they try to solve it. We talk about requirements for big projects but we often forget that the same principles apply to smaller purchases.

For instance, a recent client was confronted with a group that needed Act!. Of course, that was a solution, not the problem. The problem was a basic contact management problem. They needed to keep basic details of contacts for a group of people. The client already had Exchange — but ended up purchasing Act! because the requirements weren’t understood. The group that Act! was purchased for is slowly moving back to an Outlook and Exchange public folder solution. (To be clear, there are some problems for which Act! is the right solution — it just wasn’t a good fit for this organization.)

http://www.techrepublic.com/article/five-questions-to-ask-before-buying-a-new-tool/

forge

Useless SharePoint Error Messages

I have been promising for a while to get some of my favorite error messages up … here are a few.  I couldn’t find my all time favorite — Catastrophic error.