Stuff about Software Engineering

Author: Peter Birkholm-Buch (Page 16 of 17)

May 2007 content on MSDN for WSS 3.0 and MOSS 2007

For reference:

[Cross-posting of RandallI’s blog entry.]

Here is the rundown of Technical Articles, Visual How-to Screencasts, and their accompanying downloads published over the last couple of weeks on MSDN.

Technical Articles

Visual How-to Screencasts

  • Enabling Users to Act on LOB Data with Business Data Catalog Actions
    Learn how to enable your users to act on line-of-business data by using Business Data Catalog Actions.
  • Activating Auditing Programmatically for a Single Document Library in Windows SharePoint Services 3.0
    Microsoft Windows SharePoint Services 3.0 includes a powerful new infrastructure for auditing user access to pages, and document and list items. You can enable auditing for an entire site collection, but it can be more efficient to enable auditing with more granularity. For example, you might want to enable auditing for one specific list or document library. You can go even further and just enable auditing for one specific list item or one specific document.
  • Activating Auditing Programmatically for a Site Collection in Windows SharePoint Services 3.0
    Microsoft Windows SharePoint Services 3.0 includes a powerful new infrastructure for auditing user access to list items, and documents and pages. In Windows SharePoint Services, auditing is configured on a site collection-by-site collection basis. It just takes a few lines of code to fully enable the auditing for an entire site collection. When you do this, Windows SharePoint Services writes an audit entry to its audit log each time a user views or modifies a list item, document, or site page.
  • Configuring IntelliSense with CAML files when developing for SharePoint 2007
    When developing for Windows SharePoint Services 3.0 (WSS), you are often required to create and modify XML files that contain Collaborative Application Markup Language (CAML). It is recommended that you configure Visual Studio on your development workstation to reference a XML schema file named WSS.XSD so that IntelliSense works properly when working with CAML-based files.
  • Create a Custom HttpHandler in Windows SharePoint Services 3.0
    ASP.NET programming supports the creation of custom HttpHandler components, which provide a flexible and efficient way to process requests that don’t return standard HTML-based pages. For example, HttpHandler components are great for situations in which you want to return simple text, XML, or binary data to the user.

    Although development techniques involving HttpHandler components are useful when creating standard ASP.NET applications, you should also see them as a valuable building block for building business solutions for Microsoft Windows SharePoint Services 3.0 and Office SharePoint Server 2007.

  • Creating a Feature for an Entry Control Block Item in Windows SharePoint Services 3.0
    You can add a custom menu item for an entry control block to a list item or a document in Microsoft Windows SharePoint Services 3.0 by creating a Feature with a CustomAction element. In this way, you can add custom commands to the default SharePoint user interface. These menu commands allow users to perform custom operations on items and documents. For example, you can create a custom menu item for an entry control block for a list item or document that redirects the user to a custom application page. Use this as a starting point to create business solutions that provide an intuitive user interface to automate domain-specific tasks on list items and documents.
  • Creating a Feature for the Site Actions Menu in Windows SharePoint Services 3.0
    You can add a custom menu item to the default Site Actions menu in Microsoft Windows SharePoint Services by creating a Feature with a CustomAction element. In this way, you can add custom commands to the default SharePoint user interface. These commands are available to users as they move between pages on a SharePoint site. When you create a Site Actions menu item, you can configure it to redirect the user to any URL. For example, you can redirect the user to another Web site. You can also redirect users to a custom application page that allows them either to see a custom display of data, or to perform custom operations on the content within the current site.
  • Creating a Solution Package in Windows SharePoint Services 3.0
    Microsoft Windows SharePoint Services 3.0 introduces a deployment mechanism named “solution packages.” A solution package is a CAB file with a .wsp file-name extension that contains all the files that must be deployed on the front-end Web server and a set of XML-based installation instructions. Windows SharePoint Services provides a rich infrastructure that simplifies deployment of solution packages in a Web farm environment.
  • Creating a Visual Studio Project for Windows SharePoint Services 3.0
    Development for Microsoft Windows SharePoint Services 3.0 often involves deploying custom source files into the WSS TEMPLATE directory. It is helpful to create a Microsoft Visual Studio project with a directory structure that parallels the TEMPLATE directory so you can automate copying your source files into the location required for deployment and testing.
  • Creating an Application Page in Windows SharePoint Services 3.0
    You can create custom application pages to add user interface components to a custom solution based on Microsoft Windows SharePoint Services 3.0. Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL. They are also used across all sites within a server farm. For these reasons, they perform better than site pages. With application pages, you can also add inline code. With site pages, you cannot add inline code.
  • Displaying Data by Using the SPGridView Control in Windows SharePoint Services 3.0
    When you create ASP.NET applications, you often need to display data in the format of rows and columns. Although you could create an HTML table by using code, you become much more productive by using server-side controls such as the GridView control introduced with Microsoft ASP.NET 2.0. The Microsoft Windows SharePoint Services platform provides a grid control named SPGridView that inherits from the ASP.NET GridView control. The SPGridView control provides a great alternative for displaying tabular data in SharePoint-based solutions.
  • Reading Entries from the Audit Log in Windows SharePoint Services 3.0
    Microsoft Windows SharePoint Services 3.0 introduces a powerful new infrastructure for auditing user access to list items, documents, and pages. However, you must write custom code to take advantage of this auditing infrastructure because no default features utilize it. Some of the other Visual How-To topics show you how to enable auditing. Here you can learn how to retrieve information from the audit log so that you can display and report on user activity within a custom solution based on Windows SharePoint Services.
  • Reading ListId and ItemId from an Application Page in Windows SharePoint Services 3.0
    In Microsoft Windows SharePoint Services 3.0, you can create a menu item for an entry control block that redirects users to a custom application page. For example, the MSDN article Item-Level Auditing with SharePoint Server 2007 demonstrates how to provide each document within a document library with its own menu item in the entry control block. This menu item redirects the user to a custom application page that displays the audit history for that particular document.

    When a user clicks a menu item in the entry control block, it runs an application page. The code behind the application page typically must program against the list item or document that supplied the menu item. To do this, the application page must be able to identify the list item or document. Windows SharePoint Services does this by passing the information that identifies the list item or document to the application page in a query string. The page uses this information within the page-initialization code to create an SPListItem object and its containing SPList object.

  • Running Commands with Elevated Privileges in Windows SharePoint Services 3.0
    Microsoft Windows SharePoint Services uses impersonation so that code running within a Web Part or behind a custom application page executes with the identity and permissions of the current user. In the vast majority of cases, this behavior is exactly what you want because it prevents standard users from being able to execute commands or see information that is intended only for privileged users such as a site administrator. However, occasionally your code must call restricted methods within the Windows SharePoint Services object model even though the request is initiated by a nonprivileged user. In such cases you must be able to elevate the privilege of your code as it executes on the Web server.
  • Writing Custom Entries to the Audit Log in Windows SharePoint Services 3.0
    Microsoft Windows SharePoint Services provides an auditing facility that allows you to see the actions users take within the context of a site collection. Examples of user actions that you can audit automatically include viewing, updating, and deleting list items and documents, as well as viewing site pages. One important limitation of the built-in auditing facility is that it cannot audit access to application pages that are deployed within the LAYOUTS directory.

    If you want to audit the actions of users as they view your custom application pages, you must add code that writes custom audit entries into the Windows SharePoint Services audit log. You can write custom audit entries within the context of any auditable object, such as those of type SPSite, SPWeb, SPList, and SPListItem.

May 2007 content on MSDN for WSS 3.0 and MOSS 2007
sptblog
Mon, 21 May 2007 03:39:18 GMT

Introducing the Team Foundation Server / Project Server 2007 Connector

In this interview we asked Lenny Fenster of Microsoft Consulting Services to show us the recently released “Connector” for Team Foundation Server 2005 and Project Server 2007. This connector makes it easier for organizations to manage their development projects by providing a synchronization and workflow between Team Foundation Server and Project Server.

Introducing the Team Foundation Server / Project Server 2007 Connector

MOSS2007; Content Query Web Part step by step

 

Body:

UPDATED (12/07/2007): Issue arises in last block of code when calling $bodyContent, should be $formattedBodyContent. Also fixed the case issue as noted by Matthew. 🙂

Well I am currently working on a project that has a great need to use the Content Query Web Part for exposing different content onto a central page. The solution will be made up of a top level publishing portal with various different types of private and public sites and site collections that will exist underneath. In this post I wanted to take you through a step-by-step look at exposing the content into a CQWP and customising it slightly to display the correct fields. There are various people who have already posted about elements of this such as:

Steven Van de Craen

http://www.microsoft.com/belux/msdn/nl/community/columns/stevenvandecraen/contentquerywebpart.mspx

http://www.sharepointblogs.com/vandest/archive/2006/10/30/15487.aspx

Microsoft

http://msdn2.microsoft.com/en-us/library/aa981241.aspx

http://msdn2.microsoft.com/en-us/library/ms497457.aspx

http://blogs.msdn.com/ecm/archive/2006/11/06/building-tylerbutler-com-part-2-building-content-types-and-page-layouts.aspx

http://blogs.msdn.com/ecm/archive/2006/11/16/building-tylerbutler-com-part-3-customizing-content-query-styles.aspx

To begin with we will need to look at creating some custom content types that will be used within the portal solution. Just for information the basic structure of the sites will be as below:

Now that we have the basic structure let’s look at the various content that we need. Firstly we will create a content type called “Demo News” and create various columns to it. This will then be added to a list that we will create on the department public site.

To create the content type, open up the portal and select the following:

Once the page loads you need to select the “Site Content Types” from the “Galleries” section.

Press the “Create” button and complete as below:

Now we need to add some site columns to the content type, this is done by pressing the “Add from new site column” link shown below.

In this example we will add two extra columns as per the table below:

Column Name

Column Type

Column Required

Column Values

Begins

Date & Time

Yes

N/A

News Category

Choice

Yes

Local

Internal

External

Global

When the above have been created the list should then look as below:

No we need to access department public site and create a new list based on the announcement template. Once this has been created we need to add the new custom list content type to it. To create the list open up the public site and select the “View All Content” link from the “Site Actions” menu. The select the “Create” button and select the link shown below.

The list has been configured as below.

Once this has been created we then need to firstly allow management of content types and then associate the “Demo News” content type with this list. This is done by accessing the properties of the list and selecting the “Advanced Settings” option. Then we can enable the following option.

Now we can select the content type from the list of existing ones as below.

When we look at the content types that are associated with the list now, we should see the standard one plus the “Demo News” one.

So now we have the plumbing let’s add some sample news, be sure to select the menu next to the “New” button and select “Demo News” as the content type.

I have added the following items and ensured that I selected a different new category as we will use these later.

So now we have some news items and the main structure we need to add a Content Query Web Part to the main parent portal and then attach this to the correct data.

To do this open up the main portal page and select the “Edit Page” option from the “Site Actions” menu.

Then when the page has loaded navigate to the web part zone you wish to use and select the “Add a Web Part” link.

From the popup windows select the “Content Query Web Part” from the “All Web Parts” section.

Once this is done it will be loaded onto the main page and automatically populated with some content from the site. In order to display our custom data we need to modify the configuration for the web part. To do this press the “Edit” button on the web part and then the “Modify Shared Web Part” menu item.

The configuration for the web part should then load. The configuration that needs modifying is contained within the “Query” section. The default configuration is shown below.

We will now change the configuration to the following:

After you apply the above, the content query web part should then display the following:

Even though is a good view it does not show the rest of detail, also I would like the content to be grouped by the “News Category”. To group the content modify the web part and select the presentation section. Within the Group dropdown menus you will see the “New Category” field.

Select the “New Category” and apply. The web part should then render as below.

To make it look a little more exciting than the plain standard style we can use some of the built in styles. To change the styles modify the web part and select the “Presentation” section again but this time scroll down to the styles section.

As a test to show you what the base ones look like simply select the “Title with Background” option and apply this to the web part. This should then be displayed as below.

As you can see they are quite basic and probably not what you would want to use. So let’s look at changing it slightly but using XSL to display extra fields and change the layout. Firstly you need export the web part to our machine. To do this, select the export menu item from the edit menu of the web part.

You will then be prompted to save the file as below.

Now open up the file in any text editor, I will use Visual Studio but notepad will work just as well. Now in the file there is a property called “CommonViewFields”. This needs to be changes as below.

Before

<property name=”CommonViewFields” type=”string” />

After

<property name=”CommonViewFields” type=”string”>Body, Text</< span>property>

Now we need to upload the newly edited web part into the page and remove the current one. This is done by editing the page again clicking the “X” icon to close the current one then clicking the “Add a web part” button again. This time instead of picking a web part from the windows press the “Advanced Web Part gallery and options” link as below.

This will now load the gallery of web parts into the right hand side of the window. At the top of the new window click the arrow on the right side of the browse button and select the “Import” menu item.

Now navigate to your edited web part and press ok to import. This should then appear in the list below and can be dragged onto the page just like any other web part.

The web part will now load as before but still not show the extra field we added in. To add this field in we need to make some changes to the XSLT for the content query web part. All of the styles that we looked at earlier for the content query web part are stored within two XSL files. These files are stored in a style library stored within the site. The easiest way to make the changes is to simply take a copy of the “ItemStyle.xsl” and open it in Visual Studio. Once this is opened you can change the relevant template section as below. For this example we will use the “Image on Left” style. Within the template is a section as below:

This needs to be changed as below, so it will now show the “@Body” field instead of the description one listed by default. The new code is listed as below:

If you now save the file and upload this file into the “Style Library” and select the overwrite with a version checkbox. Once this is done, simply refresh the main page and the web part should now list as below:

Notice that the CQWP is showing the HTML code, obviously we do not want this for our live solution. To fix this we can create a function within the XSLT to fix this. A great example of all of the work I am doing here and a specific function can be found here:

http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx

The function that we will use is as below.

This needs to be added to the “ItemStyle.xsl” file. The code block is shown below.

version=”1.0″

exclude-result-prefixes=”x d xsl msxsl cmswrt”

xmlns:x=”http://www.w3.org/2001/XMLSchema”

xmlns:d=”http://schemas.microsoft.com/sharepoint/dsp”

xmlns:cmswrt=”http://schemas.microsoft.com/WebParts/v3/Publishing/runtime”

xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” xmlns:msxsl=”urn:schemas-microsoft-com:xslt”>

The display code we changed earlier now needs to be changed as below.

No we have done this and saved the file back, when we refresh the page the web part should now display as below.

Now what we would also like to see is a [more] button instead of showing the full details as above. This can be added by simply using the “substring” function to split the body up and then add some extra fields to the XSLT to turn the [more] into a hyperlink. The code would look as below.

…[

more]

The CQWP should then display as below.

So as you can see with a little modification you can create highly customized CQWP to display your content. Just want to say, a great big thanks to George Perantatos who posted some of the content I have used here. J

Hopefully you will find this useful, I had great fun in working out all the steps that needed to be taken to achieve this.

Category: SharePoint

Published: 15/01/2007 20:21

BlogTitleForUrl: moss2007-–-content-query-web-part-step-by-step

Categories: Development;SharePoint;Office System 2007

MOSS2007 – Content Query Web Part step by step
Liam Cleary
Tue, 03 Jul 2007 18:58:35 GMT

Overview of Microsoft Visual Studio 2008

image

Microsoft has just relased a whitepaper which gives a great overview of VS2008. VS2008 is centeret around three pillars:

Improve Developer Productivity

In Visual Studio 2008, developer productivity doesn’t end with the code editor and wizards. By extending this concept to application architectures and the underlying platform, Visual Studio 2008 delivers not only a productive development tool, but also enables developers to tackle new business problems while decreasing the total cost of solution construction. In Visual Studio 2008 developers, designers, and database professionals will see new tools and frameworks become available to simplify their tasks.

Manage the Application Life Cycle

Visual Studio 2008 enhances the end-to-end value of Visual Studio Team System by increasing its role-based coverage and delivering enhanced traceability throughout the software development life cycle. With deep integration across roles in the software life cycle and the Team Foundation Server, Team System enables customers to amplify the impact of their teams and improve software quality.

Employ the Latest Technologies

As users look for new ways to comprehend and retain information, developers must still grapple with basic desktop and application security. Visual Studio, Windows Vista, and the 2007 Office system, enable developers to deliver a safe, robust and compelling user experience in any type of application. These fundamental advances enable customers to rapidly create connected applications that deliver the highest quality, rich user experiences regardless of project complexity or organization size.

Highly recommeded reading:

http://download.microsoft.com/download/b/f/d/bfdb8b1b-323a-435e-b328-cadc8b67bbee/An%20Overview%20of%20Visual%20Studio%202008.xps

Creating WPF applications with VS2008 and Blend

“Cider” is the codename for the WPF designer in Visual Studio 2008.  These screencasts covers some of the new features in Cider and walks you through building a small application to apply the features.

Part 1 shows you how to create a WPF application using VS2008.

Part 2 shows you how to use Blend to style a WPF application created with VS2008;  see how you can seamlessly go back and forth between the two tools to get the best out of a developer (intellisense, code wiring, etc.) and designer ( styling, templating) tools for creating WPF applications.

Parental Control…

This is a completely personal post about children surfing the web.

My kids are 6½ and the surf the web on their own computers. Until now there’s been no need to guard against unwanted sites and content, but now they’re starting to write things like “spiderman” and “ben10” in the search field in IE7 and then browse the different sites in the search results list. Now, I’m at a point where I need to be able to control which sites my kids may or may not stumble upon.

There’s already built-in parental control in Windows Vista; here’s a great post on that – and I was going to upgrade their computers to Vista, but not quite yet.

So I needed a Windows XP solution, and after a bit of surfing I found

K9 Web Protection

They offer a completely free filter for Windows XP (and Vista) which based on a central repository of rating and categorization of sites. If your kid accidentally tries to open site which has been classified as inapropriate – the filter blocks access and displays a block page with an error message.

Since the software is of US origin I find the filter a bit too restrictive, but I’d rather be safe than sorry.

Pre-Announcing the “Accessibility Kit for SharePoint” (AKS)

Cross posting from: http://blogs.msdn.com/sharepoint/archive/2007/09/05/pre-announcing-the-accessibility-kit-for-sharepoint-aks.aspx 

Background

About a month ago on July 31st, HiSoftware issued a press release, announcing an agreement with Microsoft to develop the Accessibility Kit for Microsoft Office SharePoint Server (MOSS) 2007. The kit will provide templates, master pages, controls and Web parts along with technical documentation to advance the accessibility of MOSS based web sites and applications for people with disabilities, especially those who are vision impaired. All of the source code will be provided via the Microsoft Permissive License and will be available on CodePlex and/or another (more accessible) web site later this year for customers and other Microsoft partners to download, reuse, and extend. This e-mail provides more details about the announcement.

Overview

Microsoft has hired HiSoftware as a vendor to develop the Accessibility Kit for MOSS 2007, also known as Accessibility Kit for SharePoint or AKS. The decision was made primary based on HiSoftware’s in-depth expertise and broad industry experience in providing tools and services for improving accessibility to the point of compliance with various standards and beyond. The contractual Statement of Work calls for HiSoftware to deliver a kit that can significantly reduce the time, knowledge, and effort required to implement a SharePoint-based web site that conforms to the World Wide Web Consortium’s (W3C) Web Content Accessibility Guidelines 1.0 Priority 1 and 2 checkpoints, which are collectively known as WCAG 1.0 AA. The AKS can also be used to address the exceptions that have been identified in the U.S. government’s Section 508 of the Rehabilitation Act’s Voluntary Product Accessibility Template or VPAT documents for MOSS 2007. While most of our customers find the improvements in accessibility (more info at Office Online) over previous versions of SharePoint to be adequate for their needs, a growing number has asked us to provide even more.

Approach

The AKS is being developed as a set of building blocks rather than an end-to-end solution. We expect many SharePoint partners to take various pieces of the kit and integrate them into their respective product or service offerings while some customers will integrate particular components of the kit into their deployment processes. Furthermore, HiSoftware and Microsoft will jointly establish and nurture a community of SharePoint site designers and developers that’s focused on accessibility advancement and standards compliance.

To ensure optimal prioritization and completeness of features and documentation, the AKS project team is planning to work with a small group of partners and customers in a private beta program that will kick off within the next couple of weeks. If you are very seriously interested, please contact Dana Simberkoff, VP of Business Development at HiSoftware, but be forewarned that the acceptance criteria will be quite stringent due to the aggressive timeline of the deliverables described below.

Deliverables

These deliverables were established based on customer and partner feedback that we’ve received thus far and are prioritized based on the scenarios that would impact the most end users of a MOSS-based web site down to the least.

  • Milestone 1: AKS 1.0 Private Beta – ETA September 17, 2007
    This initial milestone will provide a testable version of the kit that focuses on the web content publishing and authoring scenarios for Internet facing web sites as well as intranet portals.
  • Milestone 2: AKS 1.0 Release to Web – ETA October 29, 2007
    This milestone will provide a production ready version of the kit that can be used in the implementation of live MOSS based web sites or portals.
  • Milestone 3: AKS 1.5 Update – ETA December 17, 2007
    This milestone will provide accessibility improvements for advanced web content authoring and team collaboration scenarios.

Conclusion

The Microsoft product teams for Windows SharePoint Services, Office SharePoint Server, and Office SharePoint Designer are committed to improving accessibility and enabling everyone to utilize the power of SharePoint. More details about the AKS will be forthcoming as the project progresses over the next few months. In the meantime, if you have any questions, suggestions, or concerns about accessibility, please post them in the SharePoint – Accessibility forum.

<Lawrence />

Pre-Announcing the “Accessibility Kit for SharePoint” (AKS)

WSS3.0 and MOSS2007 Webcasts

To quickly get an introduction Microsoft Windows Sharepoint Services 3.0 and Microsoft Office Sharepoint Server 2007 go and view these excellent webcasts:

TechNet Webcast: Windows SharePoint Services: Overview and What’s New (Level 200)

This webcast covers the technical fundamentals of Microsoft Windows SharePoint Services, the next generation of Web workspace technology from Microsoft. Find out what is new with Windows SharePoint Services, what has changed, how it works, and why you should use it to develop and deploy information sharing solutions. We recommend that you view this session before viewing the “Office SharePoint Server 2007: Overview and What’s New” webcast.

Presenter: Mike Fitzmaurice, Senior Product Manager – Portals, Microsoft Corporation

TechNet Webcast: Microsoft Office SharePoint Server 2007: Overview and What’s New (Level 200)

Microsoft Office SharePoint Server 2007 is much more than an upgrade from Microsoft Office SharePoint Portal Server 2003 and Microsoft Content Management Server 2002. This webcast provides an overview of the features in SharePoint Server 2007, and covers technical fundamentals, new sets of server functionality, and other factors developers and IT professionals must consider. Since Office SharePoint Server 2007 is built on Microsoft Windows SharePoint Services 3.0, it is recommended that you attend the “Windows SharePoint Services 3.0 – Overview and What’s New” webcast first.

Presenter: Mike Fitzmaurice, Senior Product Manager – Portals, Microsoft Corporation

Speed Up Windows Vista Startup with a Processor Tweak

  • Click on Start>Run
  • type msconfig and click OK.
  • Once that box opens, click on the bootup tab.
  • Under the Boot tab, click on Advanced
  • Click the box next to the number of Cores, and choose the proper number from the dropdown box.
  • Apply and save the changes. Your computer may require a reboot. If it does, go ahead and do so, and notice the difference!

    image 

  • « Older posts Newer posts »

    © 2026 Peter Birkholm-Buch

    Theme by Anders NorenUp ↑