sharepoint comments edit

I did some consulting a while back with a company who wanted to port their product into SharePoint Portal Server 2003 and they wanted to know how to develop web parts. The problem was, they didn’t quite have the technical background I assumed they did, so we spent a lot of time covering prerequisite knowledge and not too much time actually looking at web parts. That started me thinking that there are probably people out there who want to make web parts (either on Windows SharePoint Services or SharePoint Portal Server 2003) and they don’t really know where to start.

Below is my recommended path to web parts - from “not knowing how to program” all the way to “Hello World, web part style.” Once you’ve got web parts down, making them fancy and ultra-functional is up to you.

Learn HTML. While it’s important to note that HTML (HyperText Markup Language) is not a programming language (it’s a “markup language” - it describes how things look not how they function), knowing HTML is a key factor in developing web parts. Plus, because it’s reasonably easy to learn and you can see the results of your progress immediately (check it out in a browser while you’re writing), you should definitely learn HTML first.

While learning HTML, keep in mind that eventually you’re not really going to get a whole lot of trial-and-error testing to see how your web part looks (it’s a very, very slow process if you go that route), so even if you learn HTML using a WYSIWYG (what you see is what you get) editor like FrontPage or DreamWeaver, make sure you can write HTML by hand in something like Notepad. Having HTML down cold is a key to success. Web parts (like any standard web page or piece of a web page) display themselves in HTML.

Learn CSS. CSS, or Cascading Style Sheets, go hand in hand with HTML. CSS is a way to define the look of HTML more precisely. There are lots of other benefits to CSS, but you’ll learn about those as you learn how to use it. Regardless, web parts use CSS to maintain a standard format in their look and feel so knowing how to use CSS will ensure your web part looks consistent with the rest of the web parts on your page.

Learn general programming concepts. This is a little hard to describe, but this point is why they have computer science classes. What I mean here is you should learn things like data structures (what the different ways computers can store and manipulate data are), control structures (how you tell the computer what the next instruction is that you want it to run), and so forth. Usually when you learn about these things you also get taught a programming language, but I will work under the assumption that you might learn this stuff without actually learning a language. There are several books out there on these subjects, but I’d recommend possibly taking the first-year classes in a Computer Science degree program at your local university rather than just reading about it. Having some hands-on interaction always makes concepts like this a little easier to understand. You’ll need to know this stuff so you can program your web part and also so you know how your web part might store custom properties. You will use this in any programming project you do.

Learn batch scripting. Writing a batch script is probably the simplest introduction to programming there is. While it doesn’t directly pertain to web part creation, it does give you insight into the programming world in a simple, easy to learn way. It requires no compiler or special environment to write or debug, and there are few keywords to remember. Note that if you learned a different programming language while learning general programming concepts, above, you can skip this step. This is just to get your feet wet.

Learn JavaScript. JavaScript is a good introduction to a more structured programming language (at least, more structured than batch scripting). Plus, you can use this directly with your HTML and CSS skills to make some cool web pages with some great functionality. Not only that, but you will be able to use your JavaScript skills once you start writing web parts to port that functionality in. Web parts are not written in JavaScript; JavaScript can help you accomplish some fancy things on the client (browser) end, though.

Learn VBScript. VBScript is a stepping stone to the next technology you’ll learn, Active Server Pages (below). While you can write ASP in JavaScript, you’ll find most of the examples out there are in VBScript and it just makes it easier to learn ASP if you know VBScript. You’ll also be able to use this (and your JavaScript) in place of batch scripting, so if you wanted to write some handy utilities for yourself to automate some tasks, you now have the skills.

Learn ASP. ASP, or Active Server Pages, is the technology by which you insert script (like VBScript) into an HTML page. That script executes on the web server and renders HTML to the browser. This is a powerful thing - it allows you to take input in from the user, process it, and then return results. This is the grandfather technology to web parts, so you’ll need to understand how this works to really understand why your web parts do what they do.

Learn C#. The Microsoft .NET framework can be programmed in any number of languages, but I recommend C#. Web parts are all compiled .NET components, and you’ll need to know the language to write them in. It doesn’t matter right now if you’re learning just simple console applications or Windows applications or whatever, just learn how C# works.

It’s at this point that I recommend you spend the money to get a copy of Visual Studio, the programming envirionment of choice when working with anything .NET. There are free alternatives out there, but I’d still recommend getting actual Visual Studio.

Learn Windows SharePoint Services and/or SharePoint Portal Server. Now it’s time to take a short detour and actually install WSS or SPS

  1. If you haven’t already, get this fired up and learn it inside and how. Learn how to configure it, how to add and remove web parts from Web Part Pages, how lists work… everything. Know the product, because when it comes time to write for the product, it’ll make your life that much easier.

Also, take some time to see how the product(s) work. You’ll see that they’re using HTML, CSS, and JavaScript to make things happen on the browser end. With your newly learned skills, check this out and see if you can determine what makes different things happen.

Note - if you’ve used SharePoint Team Services or SharePoint Portal Server 2001, don’t assume you know all you need to here. It’s a better assumption that you don’t know anything about the product, since WSS/SPS are so very different than their previous incarnations. Even if you’ve used these prior products, take this time to get intimately familiar with the new versions. You’ll thank me.

Learn ASP.NET. ASP.NET, the .NET version of Active Server Pages, is the backbone of Windows SharePoint Services and SharePoint Portal Server

  1. Web Part Pages are all ASP.NET pages, so knowing how ASP.NET web forms and controls work is an absolute must. Write a small web site that takes some data in, handles some button click events, does something with some data, and spits it back out. Look at what you wrote compared to what ASP.NET generates for you. You’ll see some extra stuff in there that you didn’t put there. If you installed and checked out WSS or SPS 2003, some of it will look familiar - the standard ASP.NET stuff in your pages will look a lot like the standard ASP.NET stuff in WSS/SPS. It’s all starting to come together, isn’t it?

This is also the step where you really need to learn how to use the Visual Studio debugger. Up until now, you’ve probably been writing out text lines to the screen to debug your problems, right? Sure you have - everyone does. Now you need to learn how to do it with a real debugger. Learn how to debug ASP.NET web pages on your local development workstation, then learn how to debug ASP.NET web pages on a remote machine. It’s a similar process, but you’ll want to know both because chances are you won’t be developing right on a WSS or SPS server - you’ll write your code, compile it, deploy it to a test server, and then need to remote debug it.

Really, learn ASP.NET. I can’t stress this enough. You need need need need to learn ASP.NET to get web parts running successfully. Learn it inside and out. All the fancy stuff. Don’t rely on the WYSIWYG designer - learn to write it in code view. When you get to web parts, there’s no designer ability, so you can’t assume that will be there. Learn what you can about Session state, Viewstate, caching, and so on. You will use everything you learn in ASP.NET while you develop web parts. Be very, very comfortable with ASP.NET - web parts are just specialized ASP.NET.

Learn ASP.NET web server (custom) controls. “Custom controls,” “web custom controls,” or “web server controls” - all of these are the same. This is different than user controls. In ASP.NET, user controls are sort of like miniature ASP.NET web forms that can be embedded into other web forms. That’s not what I’m talking about here. You know when you’re working in ASP.NET and you can drag a “text box” or a “button” onto your form? Those are server controls. Those are what I’m talking about, and those are what you need to learn to write. It’s a little more complicated than writing your standard web form, but this is crucial - web parts ARE ASP.NET server controls. This is pretty much what you’ve been building up to this whole time. Learn to write server controls and you’re there.

Download the SPS/WSS SDK documentation. The SDK documentation contains code samples and notes on how to write web parts. If you’ve learned all of the stuff in this list up until now, this should make total sense to you.

Write your first web part. Using the code samples in the SDK, write your very first web part. It doesn’t have to be anything fancy, and you can even copy and paste the example code they’ve given you. Just get it running in WSS or SPS. Now, step through it in the debugger to see how it works. Once you get it, the world is yours. Read through the SDK and you’ll learn how to save custom properties, how to interact between web parts… now you’re ready to really cut loose.

That’s it! It seems like a long list, but you have to figure there’s a reason that developers get paid to write programs - if you could learn it all in a day, everyone would be doing it. That said, if you take the time to figure out how the technology works, then progress through the steps, you, too, could soon be writing your very own web parts.

No, not the mayonnaise. I’m talking about actual food - like, the best foods out there.

I’m a simple person when it comes to food. I’m not big on most of the “gourmet,” over-spiced stuff. If I want a burger, I want someone to chuck some ground beef on the grill and call it a day; if it takes you longer to season the beef and make the patty than it does to cook it, you’re overdoing it.

It occurred to me the other day that Big Kat might be one of the top 10 candy bars of all time. I’m a big fan of the regular Kit Kat, but super-sizing the thing is brilliance. Now if they’d only sell a super-sized full Kit Kat (rather than just one Kit Kat stick). I may go to the store after work and get a bunch of Big Kats just to put them together into one big Kit Kat.

With that thought in mind, I started thinking about what my favorite foods are. Like, is there any food that I would be really sad if someone said I could never eat it again? Here’s what I’ve come up with so far.

Shrimp. I love shrimp. Not trying to sound like Private Benjamin Buford “Bubba” Blue, I love pretty much anything with shrimp in it. My favorite has to be the coconut shrimp, though. Very tasty.

Cheesecake. Plain or flavored, doesn’t matter. Any kind of cheesecake. More is better. I am partial to strawberries, so if you have some, throw ‘em on.

Bread, particularly sourdough. I can eat a loaf of sourdough bread just by itself as a meal. Nothing on it, just the bread. I’m also partial to King’s Hawaiian.

Cheetos. Oh, yeah. The crunchy ones are better than the puffy ones.

Hawaiian Punch. Way better than any old Kool-Aid.

Pizza. I’m a meat-lover’s fan, but I’d go with your standard pepperoni or Hawaiian style any day. Hawaiian on white sauce is my latest favorite.

Frappuccino. Venti mocha Frappuccino == ambrosia.

Tapioca pudding. Lots of folks don’t like this because of the texture, but I think that’s one of the primary reasons I do like it. I can sit down with a giant tub of this and finish it before you blink.

I’m sure there are others, but those are what I’m thinking of right now. What did I miss?

Last Friday I bought a brand new blender because our old blender was leaking and pretty much weak (good luck crushing ice or even making milkshakes). The new blender rules. After making some piña coladas, though, I finished up a batch, rinsed out the jar, and while drying it I stabbed my right index finger on the blade. That sucked, and hurt quite a bit.

Minor detour: Our dishwasher sucks. Ever since we moved in it hasn’t washed dishes for crap. Okay, now we continue.

Last night, Jenn and I got so fed up with the stupid dishwasher that we were considering just using it like a drying rack until we had money to get a new one, when I reached down in and pushed the turning-spray-thing in the bottom an dit barely turned. On further investigation, I saw a rubber band wrapped around it, causing it to not move too well. I reached in and started untangling the rubber band, scraped my finger a little, and pulled out the rubber band.

By the time I got the rubber band out, I noticed there was this berry red juice all over in the bottom of the dishwasher and all over my hands… and it was coming out of my right index finger. That was when I noticed the gigantic hunk of broken glass in the bottom of the dishwasher that I had cut myself on - not scraped, cut.

Now it’s today, and I’m typing (barely) with four fingers on my right hand as I avoid touching anything with my (now throbbing painfully) index finger.

Last night I watched the series finale of Angel.

I’m not an avid TV watcher. I have certain shows I watch - CSI, Survivor, Alias - but I don’t usually get sucked in to a show. I mean, if last season of Survivor was it, I’d just move on with life. I was a fan of the whole Buffy thing ever since the original movie, though, and I watched the Buffy TV show from beginning to end, all seven seasons. There’s a certain sci-fi soap opera need that’s filled in me by Buffy. Long about the time the writing in Buffy started to wane, they brought in the Angel spin-off series, and I was an avid watcher of that for its entire five-year run. Angel was a little edgier, and while some of the stories weren’t as cool as others, they tended towards the sci-fi (while Buffy seemed to veer off towards the soap opera).

When Buffy ended, the show had sort of reached its natural conclusion. They had fought all there was to fight, and the characters had come to sort of a point where they needed to move on. The way they ended was perfect - a big bang, the end of one story and the beginning of another chapter in the characters’ lives as they rode off into the sunset.

With Buffy over, I was glad to have Angel around to continue that mythos - the characters crossed over from Buffy, the universe had continuity… it was like Buffy never ended, it just had a sequel. An even better sequel, because the shows remained compelling and the characters were always changing it up. You never knew what was coming next. Kind of like when the X-Files was still good. Remember that?

After five years of Angel, they ended it last night. And while I’m not an avid TV watcher and don’t generally get sucked into shows, I was really sad to see them go. It’s like seeing an old friend leave for the last time, never to return except in the photo album you occasionally flip through. I’ve read through a few message boards and a lot of people (including Jenn) were disappointed in how the show ended, but I really wasn’t. The gang went out fighting the good fight, trying to stop evil, and while it was left open-ended as to whether they survived or not, I’d like to think they did.

From an interview with David Boreanaz:

Q: If there’s never another Angel adventure, where would you say we’re leaving this character?

A: In battle. Battle for his own self and battle for humanity, pretty much. Striving for excellence and continuing the good fight, whatever that good fight is.

On an even larger scale, the end of Angel is also sort of like closing a chapter on my own life. It’s sort of sad that people can define times of their lives with television shows, but look at all the Friends watchers out there. The TV in today’s day and age is more than just entertainment. I think we spend enough time with the characters in our favorite shows that they become like family to us - sort of indirect voyeuristic acquaintances. When they go, it’s like losing that friend. Ever have a pet fish when you were a kid? Remember what it was like when it died? Pretty terrible, right? I think it’s like that. So the end of Angel marks a sort of end of an era for me. It’s not going to hinder me from functioning or anything, but it’s still sad.

So, thanks, Joss, for the years of entertainment, for the friends you created and the universe you opened a window to, just for me. I anxiously await the next great adventure.