Stuff about Software Engineering

Month: September 2007 (Page 3 of 4)

Team Foundation Server 2008 Features

Administration, Operations & Setup

  • Share Point 2007 support
  • Enable use of Sharepoint on any server and any port
  • Support for MOSS 2007
  • Enable support for Reporting Services on any server and any port (new) (RTM)
  • Support for SQL Named Instances – This will allow customers to share a SQL server between multiple TFS instances, or with other applications.  This has been a commonly requested feature by enterprises.
  • “Longhorn” server support – TFS will support the next version of the server (and corresponding new version of IIS) that is currently under development.
  • Sync Large Groups – This is a set of work to improve the performance and robustness of TFS’s handling large groups of users (~30,000 or more) granted permission to a TFS instance.  Today this can result in a support call to recover from it.
  • Non-default ports – We’ve gotten a bunch of feedback from enterprise customers about TFS’s limited support for alternate web sites and ports running afoul of data center policies.  We are going to be improving TFS’s configurability in this respect in Orcas.
  • Simplify installation – In Orcas, we will be doing a variety of things to attempt to make installing TFS easier and quicker than it is now.  Improvements include eliminating the separate data-tier installation, simplifying the requirements around required domain accounts by supporting the built in machine accounts (like Network Service) where we can, etc.
  • Official testing and support for more configurations – This includes clustering, mirroring, log shipping, Virtual machine deployment, and more.
  • Support for client certificates
  • Upgrade from TFS 2005
  • Support for SQL 2008 (aka Katmai) (new) (RTM)
  • TFSDeleteProject now permanently deletes (destroys) version control content (new) (RTM)
  • New role for many operations activities (new) (RTM) – You don’t have to be server administrator to run many of the admin utilities any longer.
  • Enhancements to tfsadminutil (new) (RTM) – New capability to configure accounts, connections, etc on both TFS and the TFS proxy.

Build (more detail)

  • Support multi-threaded builds with the new MSBuild.
  • Continuous Integration – There are many components to this, including build queuing and queue management, drop management (so that users can set policies for when builds should be automatically deleted), and build triggers that allows configuration of exactly how when CI builds should be triggered, for example – every checkin, rolling build (completion of one build starts the next), etc.
  • Improved ability to specify what source, versions of source, and other build properties.
  • Improved extensibility of the build targets – such as ability to easily execute targets before and after each solution/project is built.
  • Improved ability to manage multiple build machines.
  • Stop and delete builds from within VS.
  • .NET Object model for programming against the build server.
  • Simplified ability to specify what tests get run as part of a build.
  • The ability to store build definitions anywhere in the version control hierarchy.
  • Scheduled builds – You can schedule builds to happen at specified times.
  • Improved build agent communication – We replaced .NET binary remoting with WCF web services, simplifying some configuration and security aspects.
  • Ability to run GUI tests as part of a build – Automated builds used to run tests in such a way as to prevent access to a GUI desktop.
  • New checkin policy for broken CI builds – Preventing checkin while the CI build is broken.
  • Support for HTTPS communication to the TFS server (new)
  • Continuous Integration build checkin policy (new)
  • Support for incremental gets and builds (new)

Data Warehouse

  • Add support for checkin policy overrides to the warehouse – an oversight from V1.

Migration

  • Migration toolkit – A toolkit for building conversion and mirroring solutions between TFS and other systems.  In addition, we will release one or more new tools to integrate with popular alternative systems. 

Version Control

  • Annotate – This is based on the TFS Annotate Power Tool but includes numerous improvements.
  • Folder Diff – Also based on the TFS Tree Diff Power Tool with numerous improvements.
  • Destroy – The ability to permanently delete version control files/folders from TFS.  It can also be used to destroy the file contents while preserving the change set history.
  • Get Latest On Checkout – There have been many requests for this feature (which was a change in behavior from SourceSafe).  There is now an option that allows you to specify that you want TFS to download the latest version of files when you check them out.
  • Workspace improvements – Workspaces will now support mapping a folder or file under a cloaked folder and wildcard mappings so that you can map all files in a folder without mapping sub folders.  Based on experience with large projects, this will simplify workspace definitions for many people.
  • Performance improvements – A variety of Version Control performance enhancements that will improve virtually all aspects of version control performance.  The gains for smaller servers/projects (< 10,000 files) will be modest.  The gains for larger projects (particularly where the file count approaches 100,000’s) will be substantial.
  • Scale improvements – Fixed out of memory problems on the server when operating on more than a few hundred thousand files at a time.
  • Offline improvements – We’ve signficantly improved the experience going offline and integrated the tfpt online capability into the IDE for going back online.
  • Extranet support for the TFS Proxy – allowing you to access a local TFS proxy with a different set of credentials than the TFS server.
  • Command line help – You can now type “tf command /help” and get a console dump of the usage of that command.  This is much more convenient than always being launched into the richer GUI hypertext help when you just want to remember what the options for a command are.  You can still launch the GUI help by running “tf msdn”.  You can get a console dump of available commands by just typing “tf help”.
  • Source Control Explorer refresh improvements – This includes less redrawing and reloading but even more important it enables updates based on changes made in other instances of TeamExploror or the command line.  That’s right, if you checkout a file from the command line, any instances of TeamExplorer you have running on the same machine will automatically refresh.
  • Async loading of the Source Control Explorer (new)
  • The SCE local path can now be selected and copied (new)
  • Merge improvements (new) – Improved the logic that detects merge conflicts to generate fewer false positives and handle more scenarios.

Work Item Tracking

  • Performance & Scale improvements – A variety of improvements that will make both the work item server and client faster and able to handle larger servers.
  • Query builder usability improvements – Drop down filtering based on current project, better MRU lists, column drag & drop, shift-click mouse based multi-column sorting, etc.
  • Attachments improvements – Save button, drag & drop for adding an attachment, multi-select for attaching files.
  • Tooltips on field names contain the field name used for querying
  • Server side support for deleting work items & work item types – We didn’t have time to do client UI support for it but we plan to release a Power Tool that will take advantage of the new server side feature.
  • Support for security on the iteration hierarchy (new)

Web Access

  • Adding Web Access UI to TFS – As you’ve seen many places, we acquired devBiz and their TeamPlain Web Access product.  We are releasing it as a Power Tool in the next few months and plan to release it as an official product in the Orcas timeframe.  We have not figured out how the release date will line up with the Orcas date but it will be in the same general timeframe.

Bug fixes

  • In addition to all of the feature work, we’ve spent months testing the product and fixing any bugs we’ve found.  We expect Orcas will have even better stability and robustness than TFS 2005.

Compatibility (no change since last time)

As Orcas is an adoption focused release, we have put a lot of emphasis on compatibility with VS2005.  We are striving for near 100% compatibility.  The Orcas client will be able to work with a VS2005 server and a VS2005 client will be able to work with an Orcas server.  There are only a few compatibility issues.

  • Client side VS add-ins will need to be recompiled (or have policy changed) because the TFS OM assembly versions will change and add-ins will need to bind to the new assemblies.  The APIs themselves are generally not changing, so we don’t expect much in the way of code changes – just recompilation.
  • Build is the only area where we plan to have some compatibility disconnects.  In general, most build operations – listing build definitions, starting and stopping builds, examining build reports, etc. will work both with 2005 client -> Orcas server and Orcas client -> 2005 server.  However, here are a few caveats:
    1. An Orcas TFS server will only work with an Orcas build server – so you’ll need to upgrade your build server when you upgrade your TFS server.
    2. For an VS2005 client to start a build on an Orcas server, the build definition needs to be stored at $/<TeamProject>/TeamBuildTypes/<name>.  In Orcas, you have more flexibility as to where to put them.
    3. Changes made to properties in the .proj file that are in the database in Orcas will not be updated in the database and will no longer be in sync.
    4. VS2005 will be able to start a build, but it can’t queue a build, see the list of builds in the queue, see the list of build agents, etc.
    5. An Orcas client will not be able to create a new build definition on a TFS2005 server.
    6. When starting a build, an Orcas client will not be able to change any parameters in the dialog for a TFS2005 Server.

Team Foundation Server 2008 Links

Team Development with TFS Guide:

http://www.codeplex.com/TFSGuide

Project Server 2007 VSTS Connector:

http://www.codeplex.com/pstfsconnector

Team Build integration med FinalBuilder:

http://www.finalbuilder.com/articles.aspx?mid=370&ctl=ArticleView&articleId=20

Teamprise cross platform support (bla. Eclipse integration):

http://www.teamprise.com

TFS Migration and Synchronization Toolkit:

http://www.codeplex.com/MigrationSyncToolkit

inkl. WSS – TFS sync samples:

http://www.codeplex.com/MigrationSyncToolkit/Wiki/View.aspx?title=WSS%20to%20TFS%20Tools&referringTitle=Home

Windows 2008 Install; Step By Step

Just for reference:

Body:

As an early adopter for windows 2008 (a.k.a Longhorn Server) I decided to setup my new VPC with it on. I downloaded the June CTP from my MSDN account. The file I have is called:

en_windows_server_2008_ids3_enterprise_datacenter_standard_x86.iso

To begin the install I created a blank VM and allocated it 1GB Ram and 130GB of disk space. I attached the ISO to the VM and let it start. Firstly you will notice that it looks like a Vista Install.

As I am in the UK I selected the settings above.

Now for the easy bit simply press “install now”.

As you can see we now have two versions of the server, one is the standard server that you and I are used to with the GUI; the other is called “Server Core” which is a command line version of the server. For this install I will select the standard server.

As you can see the install is now intelligent enough to realise that I don’t have another version of windows installed so only offers me the “Custom” install option.

I will partition the drives as shown below.

Now we leave it for a while to complete. Actually on my VM running on my Toshiba Tecra M7 it took about 15 minutes for the first part of the install and then a little longer to complete the rest. Not bad I thought.

Once it has installed you get prompted to set your password.

Once you have reset your password and windows server tells you it has updated it should then start to load your user profile and ultimately the desktop.

I am going to set my server as a domain controller so firstly I need to set my server with a static IP address. This can be done by selecting the “configure networking” option.

This link just simply opens the standard IP Address settings for the server. Now I have mine set I can start the domain controller install. However before I do I am going to install a few things.

This is the new “skinned” server manager for windows 2008. If you notice there is a “roles summary” option. If we expand this option we can click the “Add Roles” button shown below:

We will now follow the wizard as shown below:

From the list I have selected the “Web Server (IIS)” role, notice that when you select it, it will prompt you to activate the relevant features. This is now built in to each role that you select.

Now the role will be activated.

Once the role is activated we still need to configure it. There is a wizard that will launch as shown below:

We now need to select the relevant role services for IIS; in our case I am selecting the “Application Development” items. Notice that you will be prompted for the relevant feature activations.

Once you have selected the items you want the wizard will then install and activate the role. In the roles summary the new “Web Server (IIS)” role should be listed.

Now we will repeat the same process but for making it a domain controller. I won’t screen shot it all as it is fairly similar. Once the role is activated the wizard should look as below:

I won’t run through the process as most of you should at some point done this. If not let me know and I will post about it. After the initial reboot of the server upon completing the “Active Directory Domain Services” the initial configuration tasks windows should now look as below:

Now we have a server built we can start looking at some of the new features and also whether we can get MOSS2007 installed on the server. Bob Fox has posted a great article about installing WSS v3 and MOSS2007 on Windows 2008. Check it out here:

http://bobfox.net/spblog/Lists/Posts/Post.aspx?ID=58

Category: Longhorn

Published: 01/08/2007 11:16

BlogTitleForUrl: windows-2008-install-–-step-by-step

Categories: Longhorn;General

Windows 2008 Install – Step By Step
Liam Cleary
Wed, 01 Aug 2007 10:16:24 GMT

MOSS2007 Web Parts

Web Parts in common with WSSv3

  • Content Editor Web Part – Use for formatted text, tables, and images.
  • Form Web Part – Use to connect simple form controls to other Web Parts.
  • Image Web Part – Use to display pictures and photos.
  • Members – Use the Members Web Part to see a list of the site members and their online status.
  • Page Viewer Web Part – Use to display linked content, such as files, folders, or Web pages. The linked content is isolated from other content on the Web Part Page.
  • Relevant Documents – Use this webpart to display documents that are relevant to the current user.
  • User Tasks – Use this webpart to display tasks that are assigned to the current user.
  • XML Web Part – Use for XML, and XSL Transformation of the XML.
  • List View Web Part 
  • Data View Web Part

Web Parts specific to MOSS2007

Business Data
  • Business Data Actions – Display a list of actions from the Business Data Catalog.
  • Business Data Item – Display one item from a data source in the Business Data Catalog.
  • Business Data Item Builder – Creates a Business Data item from parameters in the query string and provides it to other web parts. This web part is only used on Business Data profile pages.
  • Business Data List – Display a list of items from a data source in the Business Data Catalog.
  • Business Data Related List – Display a list of items related to one or more parent items from a data source in the Business Data Catalog.
Content Rollup
  • Colleague Tracker – Displays your list of colleagues and any recent changes they made have had.
  • Memberships – Displays your site and distribution list memberships.
  • My Links – Use to display your links
  • My SharePoint Sites – Use to display documents authored by you on sites where you are a member and sites of your choice.
  • My Workspaces – Displays sites created under your My Site.
  • Site Aggregator – Use to display sites of your choice.  
Dashboard
  • Key Performance Indicators – Shows a list of status indicators. Status indicators display important measures for your organization, and show how your organization is performing with respect to your goals.
  • KPI Details – Displays the details of a single status indicator. Status indicators display an important measure for an organization and may be obtained from other data sources including SharePoint lists, Excel workbooks, and SQL Server 2005 Analysis Services KPIs.
Other
  • Excel Web Access – Use the Excel Web Access to interact with an Excel 2007 workbook as a Web page.
  • I need to… – Displays tasks and tools from a list
  • IView Web Part – Displays iViews from SAP portal servers.
  • RSS Viewer – Renders RSS Feed
  • This Week in Pictures – Use to display the images library in the News web
  • WSRP Consumer Web Part – Displays portlets from web sites using WSRP 1.1.
Filters
  • Authored List Filter – Filter the contents of web parts using a list of values entered by the page author.
  • Business Data Catalog Filter – Filter the contents of web parts using a list of values from the Business Data Catalog.
  • Current User Filter – Filter the contents of web parts by using properties of the current page.
  • Date Filter – Filter the contents of web parts by allowing users to enter or pick a date.
  • Filter Actions – Filter Actions
  • Page Field Filter – Filter the contents of web parts using information about the current page.
  • Query String (URL) Filter – Filter the contents of web parts using values passed via the query string.
  • SharePoint List Filter – Filter the contents of web parts by using a list of values from a Office SharePoint Server list.
  • SQL Server 2005 Analysis Services Filter – Filter the contents of web parts using a list of values from SQL Server 2005 Analysis Services cubes.
  • Text Filter – Filter the contents of web parts by allowing users to enter a text value.
Misc
  • Contact Details – Use to display details about a contact for this page or site

Outlook Web Access

  • My Calendar – Use to display your calendar. This part works with Microsoft Exchange Server 2003 and above.
  • My Contacts – Displays your contacts using Outlook Web Access for Microsoft Exchange Server 2007.
  • My Inbox – Displays your inbox using Outlook Web Access for Microsoft Exchange Server 2003 or later.
  • My Mail Folder – Displays your calendar using Outlook Web Access for Microsoft Exchange Server 2000 or later.
  • My Tasks – Displays your tasks using Outlook Web Access  for Microsoft Exchange Server 2003 or later.

Search

  • Advanced Search Box – Entry point for advanced search
  • People Search Box – Entry point for people search
  • People Search Core Results – Web part to display the people search results.
  • Search Box – Entry point for search.
  • Search Core Results – Web part to display the search results.
  • Search High Confidence Results – Web part to display the special term and high confidence results.
  • Search Paging – Displays search paging.
  • Search Statistics – Displays search statistics.
  • Search Summary – Displays search summary.

Site Directory

  • Categories – Displays categories from the Site Directory
  • Sites in Category – Displays sites in the Site Directory
  • Top Sites – Display the top sites from Site Directory

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.

« Older posts Newer posts »

© 2026 Peter Birkholm-Buch

Theme by Anders NorenUp ↑