SharePoint and Stratocasters

by agrace 16. December 2007 03:13

Family Pets Apologies for not posting for so long. This is just a quick update of what I've been up to and what I'll be blogging about in 2008. First off, there have been two new additions to the family, as shown in the picture. We got Tripper (Tripper Grace, not to be confused with Tipper Gore) as a nine-week old puppy in Northern California and he is still being housetrained! The other addition was a Rory Gallagher 1961 Stratocaster, hand-made by Fender.

Las Vegas I'm in the process of setting up the new SharePoint Intranet for the County where I work. As part of the training, a team of us attended the DevConnections conference last month in Las Vegas. The most informative session for me was the "Structured Approach to Building MOSS 2007 Publishing Sites" given by Andrew Connell. My goal is to have a repeatable deployment model which lends itself to source control. In addition, I'm looking to have a comprehensive backup and restore process. By comprehensive, I mean one which takes into account such missing pieces as customization, Web Parts and the IIS metabase. This is an ongoing task for me right now. But Andrew's presentation brought me a lot closer. Chapter 4 of Real World SharePoint 2007 was penned by Andrew and gives a good insight into Feature-based deployment.

SharePoint is one big jigsaw with a couple of pieces missing. The real task is identifying these missing pieces and not blindly trusting the OOTB functionality. This is true whether you are creating a development environment or a backup and restore process. I will blog more about my experiences in the coming months.

kick it on

Heart of CSS: The Box Model

by agrace 13. October 2007 06:51

Box Model I wanted to write about positioning in CSS but recently I realized that I needed to go back to the beginning before grappling with issues like the Position and Display properties.

The box model is the starting point to understanding positioning in CSS. In fact, every single element in your markup is actually a box. Make this your personal mantra. Every element on a page is a box described by the content, padding, border and margin properties. This is so simple as to be totally elusive. It isn't immediately obvious because the default value for the border element isn't visible and the background default setting is transparent. To the browser, even a single period is treated as a little box.

Since a box has four sides, the padding, border and margin properties each have four settings for the top, right, bottom and left sides; designers often use the word TRouBLe as a memory jog. For example:

 /*   Top Right Bottom Left   */
 padding: 5px 10px 5px 10px;

Box Model

In theory, padding, border and margin values are optional and should default to zero. In the real world, this is often not the case. The user-agent stylesheet of different browsers may add values for the padding and margin. To overcome this, I always add a universal selector rule to the start of my style sheets to zero these out:

* {
    margin: 0;
    padding: 0;

The visible dimensions of the box are the sum of the content + padding + border values. The margin values determine the distance between the elements, horizontally and vertically.

Collapsing Margins

Most designers won't admit to their original ignorance of this one. They may have set several block elements vertically, then added top and bottom margins to each element. When the elements didn't have the expected vertical spacing between them, I'll bet they just shrugged, stuck in a few <br /> tags and marched on. Of course, that never happened me ;-)

Here's how it works: when vertical margins meet, they will collapse to form a single margin whose height will equal the larger of the two combined margins. Mystery solved. Note however, that this rule only applies to boxes in the normal flow of the document.

You can also use negative margins, but that is beyond the scope of this article (I've always wanted to say that).

Margin and Padding Shorthand

You may have been confused in the past when viewing CSS and coming across margin or padding rules with less than four values. This is actually a shorthand syntax. You can use one, two, three or four values within a shorthand declaration:

 /*   Padding on all sides   */
 padding: 5px;

 /*   Top and Bottom: 5px, Left and Right: 10px   */
 padding: 5px 10px;

 /*   Top: 5px, Left and Right: 10px, Bottom: 15px   */
 padding: 5px 10px 15px;

To sum up, whenever you set the width of an element on the page, you are actually setting the width of the content within it. If you set values for margins, padding or borders, you increase the space this element occupies on the page. Understanding this is fundamental, and necessary, before attempting to handle the other issues of positioning in CSS.

kick it on  



View other SharePoint posts...

SharePoint Blues By now, you should have a fixed clone parent VM with the server OS installed and configured. You should also have a linked clone with VS 2005, SQL Server 2005 and any other developer tools you use frequently.

Before installing Microsoft SharePoint Server 2007 (MOSS), you need to configure SQL Server. If you do not see SQL Server Management Studio (SSMS) in your Start menu, install if from the client tools on your CD. This is not obvious! As mentioned previously, refer to Keith Pattons's blog postings for detailed steps.

Since this is purely a standalone development machine, you can use your Windows administrator COMPUTERNAME/Administrator login for the database also. Set up the roles as shown in the diagram below. In a production environment, you would first install the database and then set up seven separate domain accounts. Be sure to use the Surface Area Configuration Manager to enable TCP/IP and Named Pipes connections. Then, stop and re-start the database engine service for it to take effect. Also, set SQL Server "Maximum Server Memory" to half of that allocated to the VM. You can do this by right-clicking the server name in SSMS under properties. One more thing regarding the DB: if you plan on playing with Team System, note that it will not work with a "Developer" edition of SQL Server 2005.

SQL Server Roles

The next step is to install Microsoft SharePoint Server 2007 (MOSS). Create a new linked clone as before, and grab a free six-month trial of SharePoint here. In VMWare, right-click the drive icon in the task bar and select edit. Now, you can point it to the SharePoint ISO image you just downloaded to the desktop of your host PC. Choose the "Advanced" installation option. Then, on the "Server Type" tab, select the "Complete" option. Follow the steps outlined here. Since this is not a production machine and will not be joining a domain, you do not need to run Sysprep. After the install, you can run the configuration wizard. Aside from starting services and setting up email, note the following order of operations:

  * Create Shared Services Provider (configure index server first)
  * Create Web Application (and reset IIS using iisreset /noforce)
  * Create Site Collection

When you have things configured, run Windows Updates, as you should after each major install. Open Visual Studio at least once. Next, install the tools and extensions. This is the order in which I installed them:

  * Visual Studio Extensions for Windows SharePoint Services (VSeWSS)
  * Visual Studio Tools for Office Second Edition (VSTO)
  * Visual Extensions for Windows Workflow Foundation (VSeWWF)

Both VSTO and VSeWWF wil display success message panels after a successful installation. You can check for a successful installation of VSeWSS by opening Visual Studio and choosing to create a new project. If the install was successful, you should be able to see the SharePoint project templates shown below:

VSeWSS Extensions

Aside: Tips for Team Development Environment VM:
  * Sysprep the base VM
  * Do not use vOptimizer
  * Do not run the SharePoint Products and Technologies Wizard on the original VM

You should now be up and running. I have kept this series of blog posts brief and referred the reader to step-by-step instructions already covered by other blogs. The goal was to record my personal experience as I attempted to create a SharePoint development environment for my own learning purposes. This was an obvious first step before attempting the slightly more ambitious task of setting up a cloned team development VM. My machine is 3GHz, 2GB RAM and runs XP. My external drive is 160GB. My new environment works like a treat and is reasonably fast when running a single VM. Happy coding!

kick it on