Create Managed Metadata Columns and Using Managed Metadata in SharePoint 2010.

Managed metadata are hierarchical sets of terms that can be used as attributes for content in SharePoint. A term is a word or phrase that can be associated with content. A term set is a group of related terms.

An example of how managed metadata would be used can include the management of statuses. In Ozone you may track the status of various projects and initiatives. You may also have a specific defined set of statuses these projects or initiatives follow. We will assume that the statuses used are pending, approved, active, complete, and archived.

If you want the ability to use this managed set of statuses as options, you would create a term set called Statuses and add the listed statuses as terms within the term set. You can then create columns in content types, lists, and libraries and identify that the values for the columns must come from the terms within the term set.

It’s best to read Managed metadata overview article before you start to create understand Metadata in SharePoint 2010, see:

Term Store Administrators

The management of terms and term sets occur through the Term Store Management options in Site Settings. Term store administrators have the ability to manage term sets. You can identify term store administrators as follows:

  1. Navigate to the Site Settings page where you want to identify term store administrators.
  2. On the Site Settings page, in the Site Administration section, click the Term Store Management link.
  3. On the Term Store Management Tool page in the Term Store Administrators section, enter the people who should be provided the ability to create and manage term sets, and click Save. The term store administrators are saved, and the Term Store Management Tools page is refreshed.

Managing Term Sets

Term sets are created through the Term Store Management tool. Within this tool, you can create new term sets manually or import term sets from a CSV import file. To import a term set file do the following:

  1. Navigate to the Site Settings page where you wish to import a term set.
  2. On the Site Settings page, in the Site Administration section, click the Term Store Management link.
  3. On the Term Store Management tool page, in the Taxonomy Term Store section, select the Import Term Set option from the group’s context menu.
  4. On the Term Set Import window, select the CSV file to import, and click OK. The term set is imported, and you are returned to the Term Store Management Tool page. To create a new term set manually, do the following:
    • Navigate to the Site Settings page where you wish to create a term set.
    • On the Site Settings page, in the Site Administration section, click the Term Store Management link.
    • On the Term Store Management Tool page, in the Taxonomy Term Store section, select the New Term Set option from the group’s context menu.
    • On the Term Store Management Tool page, enter the name for the new term set next to the new term set icon.
    • Hover over the new term set. From the term set’s context menu, select to create a new term, and enter the new term next to the term icon. Repeat this step for each term that should be added to the term set.

The newly created term set can then be used within content type, list, or library columns.

(Reference: SharePoint 2010 User’s Guide)
You can also find how to create Managed terms in these links:

Create Managed Metadata Column

Create a column which is a type of Managed Metadata and use Managed Terms you created before, in this new column. If you use Customize your term set, it should not be available to others as enterprise key words.


Get Started with Silverlight and WCF RIA Services

If someone wants to learn Silverlight and not really knowing where to start, I thought I’d write something to help people get started with the resources which helped me to learn.

People often ask where Silverlight Fits in web development when they start to learn Silverlight. The answer is:

  • Silverlight executes in the client browser.  What does this mean? It means:
  • Silverlight applications need to be hosted on a web server
  • Silverlight does NOT need to be hosted in IIS, any web server will do
  • Silverlight does NOT need ASP.NET on the server
  • Silverlight applications cannot access databases without an intermediary (like a web service)
  • Silverlight applications cannot access server-side classes or variables without an intermediary (like a web service)
  • Silverlight also can run on any major browser or on any major OS

Silverlight needs Asynchronous Services Calls. Thats where Microsoft WCF RIA Services comes in.

RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms. It provides a pattern to write application logic that runs on the mid-tier and controls access to data for queries, changes and custom operations. It also provides end-to-end support for common tasks such as data validation, authentication and roles by integrating with Silverlight components on the client and ASP.NET on the mid-tier.

This website contains all the Silverlight and RIA downloads and the video walks through creating a simple CRUD application with Master/details, validation, paging, and authentication using WCF RIA Services.

http://www.silverlight.net/learn/advanced-techniques/wcf-ria-services/get-started-with-wcf-ria-services

I will now answer some of the entry level knowledge questions you need to know before starting Silverlight development.

What is XAML?

Extensible Application Markup Language, or XAML (pronounced “zammel”), is an XML-based markup language developed by Microsoft. XAML is the language behind the visual presentation of a Silverlight application, just as HTML is the language behind the visual presentation of a Web page.

Explain dependency properties

<TextBlock Text=”{Binding LastName}” />

Text is a dependency property since it’s the binding target. LastName is a standard CLR property in a class that implements INotifyPropertyChanged.

When you’re implementing a standard class (which becomes the DataContext of a “control”), you’ll want to use INotifyPropertyChanged instead of dependency property. This allows that class to be a binding “Source”.

What’s a style?

You can think of a Style as a convenient way to apply a set of property values to more than one element. For example, consider the following TextBlock elements and their default appearance:

<Window.Resources>

<!-- ... -->

<!--A Style that affects all TextBlocks-->
<StyleTargetType="TextBlock">
  <SetterProperty="HorizontalAlignment" Value="Center" />
  <SetterProperty="FontFamily" Value="Comic Sans MS"/>
  <SetterProperty="FontSize" Value="14"/>
</Style>
 
<Stylex:Key="GreenButtonStyle">
  <SetterProperty="Control.Background" Value="Green"/>
</Style>

<!-- ... -->

</Window.Resources>
<TextBlock>My Pictures</TextBlock>
<TextBlock>Check out my new pictures!</TextBlock>
<ButtonStyle="{StaticResource GreenButtonStyle}">I am green!</Button

What’s a template?

The control model used by Silverlight and WPF allows you to go much further than just customizing the inner content of a control. It optionally allows you to completely replace a control’s visual tree with anything you want – while still keeping the control behaviour intact.

For example, let’s say we don’t want our buttons to have the default rectangle push button look, and instead we want them to have a custom round button look.

Check this post for more details.

http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-7-using-control-templates-to-customize-a-control-s-look-and-feel.aspx

How to Databind.

This QuickStart shows you how to bind a control to a single item or bind a list control to a collection of items. In addition, this QuickStart shows you how to customize the display of control items, implement a details view based on a selection, and convert data for display.

http://www.silverlight.net/learn/data-networking/binding/data-binding-to-controls-(silverlight-quickstart)

Silverlight Object Trees

You can reference objects in the Silverlight object tree in Silverlight during run-time, either in managed code or JavaScript. This topic describes how to work with the object tree in the Silverlight managed API.

Check this post for more details.

http://msdn.microsoft.com/en-us/library/cc189034(v=vs.95).aspx

ObservableCollection<T>

ObservableCollection is a generic dynamic data collection that provides notifications (using an interface “INotifyCollectionChanged”) when items get added, removed, or when the whole collection is refreshed.

INotifyPropertyChanged

INotifyPropertyChanged is not a collection, it’s an interface used in the data object classes to provide PropertyChanged notification to clients when any property value gets changed. This will allow you to raise PropertyChanged event whenever the state of the object changes (Added, Removed, and Modified) to the point where you want to notify the underlying collection or container that the state has changed.

http://www.codeproject.com/KB/silverlight/SLListVsOCollections.aspx

Silverlight Routing

Basically it works pretty much like MVC/asp.net routing.

http://www.orktane.com/Blog/post/2009/03/10/Silverlight-Routing-a-la-MVC-Routing.aspx

Also have a read on following topics

Mid-level topics:

  • Routed Events & Commands
  • How to implement a panel?
  • Blend/Cider
  • ClickOnce Deployment
  • Skinning/Themeing
  • Custom Controls
  • How can worker threads update the UI?
  • DataTemplate vs HierarchicalDataTemplate
  • ItemsControl vs ItemsPresenter vs ContentControl vs ContentPresenter
  • Different types of Triggers
  • How to do Animations through StoryBoards

Advanced topics

  • Example of attached behavior?
  • What is PRISM,CAL & CAG?
  • How can worker threads update the UI?
  • MVVM/MVP
  • Performance tuning
  • Pixel Shaders
  • Purpose of Freezables

Developer day on IoC

I attended the recent Readify developer day on IoC. (More info and resources here: github.com/readify/iocdevday )

The Readify developer day was a full-day presentation by Nicholas Blumhardt (founder of the Autofac Project – http://autofac.org . The focus of the day was to teach IoC from the ground up using Autofac as the IoC container.  It began with an introduction to IoC, an overview of production-quality containers for .NET. It continued on to how to evaluate IoC containers, and interactions between an IoC container and domain modelling, Relationship modelling, Tooling, debugging and diagnostics when used Autofac as IoC container.

Nick is a good presenter but he went though some of the complex parts too quickly. What was missing was a hands-on-lab. I encourage you to visit Nicholas Blumhardt’s blog almost everything he presented is covered there in great detail. In particular a topic on relationship management is very education and an interesting read – The Relationship Zoo/.

He showed us a helpful IoC container profiling tool called Whitebox that currently only works with Autofac. To use it have download the source code and to run it with your application to profile as it’s not yet a shipping product. Download it from http://code.google.com/p/whitebox/source/checkout

It comes with a sample ‘ProfiledApplication’ project showing how to use it. Note that it’s compiled against a specific version of Autofac. If you are using a newer version of Autofac you have to update the Whitebox projects with the same version.

Also worth having a look at is Scott Hanselman’s blog post listing many IoC containers.

For some historical reference Martin fowler article walks through the basic concepts behind IoC as a pattern.

For more analysis discussions there is a very detailed book out now (Sept 2011) from Mark Seeman, the first chapter is free.


JQuery UI Dialog Demo

JQuery UI Dialog Demo coming soon

$(document).ready(function() {
    var $dialog = $('<div></div>')
 { 
   //still working on this...
 }
});

			

Sara’s Quick Technical Posts

When I have time I will post little snippets of code of things I work on that either I had trouble finding a good example of or original work that might be useful to others.

Won’t be sticking to any schedule.


Follow

Get every new post delivered to your Inbox.