.NET Developments


February 13, 2008  12:29 PM

Fun Windows Workflow Foundation tutorial webcasts



Posted by: Brian Eastwood
.NET workflow (Windows Workflow Foundation)

Joe Stagner usually blogs about ASP.NET. However, recently he’s been getting inquiries about Windows Workflow Foundation. In the grand scheme of things, this isn’t surprising — anyone who’s ever built an ecommerce site knows that such processes can be quite complicated and, thusly, can benefit from a workflow engine.

To aid the curious, Stagner did a little digging and discovered a seven-part Windows Workflow Foundation tutorial webcast series, to which he linked in a single blog entry. (Note: Registration is required for these webcasts. If you have a Windows Live ID, then use that information to log in.)

We hope you find these helpful.

February 12, 2008  2:12 PM

MSDN Code Gallery — Yet another place to find stuff



Posted by: Brian Eastwood
.NET programming downloads

Remember GotDotNet? Miss it?

Well, Microsoft has rolled out yet another place for programmers to post stuff. It’s called MSDN Code Gallery, and it was formally unveiled a couple weeks ago.

In a blog announcement, Soma Somasegar described it as “a portal for snippets, samples and other resources.” From the home page, programmers can browse the existing library or upload their own resources and, thus, add to the library. New releases and most popular releases are aggregated under separate headings on the bottom of the page.

We half-sarcastically call this “yet another place to find stuff” because it is not the first code and resource repository Microsoft has rolled out since it phased out GotDotNet. As Somasegar pointed out, there’s CodePlex, which is meant for live code projects, and there’s the Microsoft Download Center, which is for formal releases like SDKs and Service Packs.

In contrast, he said, “Code Gallery is a pure storage site with no project management capabilities.” Basically, it’s a place to share code you’ve written, with the hope that others in the community will benefit from it. We think folks will appreciate the egalitarianism — and, as the Shameless Plug Dept. tells us, the popularity of our own VBCode.com site suggests the same. In contrast, he said, “Code Gallery is a pure storage site with no project management capabilities.”

Basically, it’s a place to share code you’ve written, with the hope that others in the community will benefit from it. We think folks will appreciate the egalitarianism — and, as the Shameless Plug Dept. tells us, the popularity of our own VBCode.com site suggests the same.


February 11, 2008  4:08 PM

Danger! Windows mobile developments ahead



Posted by: YuvalShavit
Mobile applications

Mobile development has undergone some changes in recent years. A big influence has been Google, which among its various efforts is pushing the Android software stack (including an application framework and SDK, a virtual machine, a DB and a browser) for mobile devices. The software represents yet another attempt to make Web apps ‘play nice’ on cell phones and other mobile devices.

With the new approaches to software services in mind, Microsoft made a new foray into the mobile space today with news of a Windows Live Mobile Developer Program, enabling programmers to develop mobile versions of its Windows Live services. Windows Live services include Hotmail, Messenger, Photo Gallery photo sharing, and Spaces personal blogs. The announcement came at the Mobile World Congress in sunny Barcelona.

At the same time, Microsoft entered into an agreement to acquire Danger Inc., a maker of software for consumer handset applications, most notably, the Sidekick cell phone. The cost of the deal was not disclosed, but it is presumably less than Microsoft’s recent $40-billion-plus offer for Yahoo! Some former Danger principals are working on Android within Google.


February 11, 2008  12:39 PM

TFS to the rescue — almost



Posted by: Brein Matturro
Architecture and the SDLC, C#, Visual Basic, VS 2005 and .NET 2.0

(Editor’s note: This is the first blog post by Christopher Yager, who will be writing on the .NET Developments blog from time to time. Yager is chief software architect at GLD Solutions Inc. and is currently using .NET 2.0 for his new development projects. Here he will blog about topics such as Windows Communication Foundation, Team Foundation Server and SQL Server. Welcome aboard, Chris!)

Before I get into this — welcome to my blog.  I’ll be posting mainly about my adventures in .NET programming — feedback is welcome.  I’m no guru but I did stay at a Holiday Inn Express last night.  (Actually as I write I’m still at said Holiday Inn… )

So TFS (Team Foundation Server), Microsoft’s answer to the software lifecycle management problem, really is a great product.  My team uses most features on a daily basis.  My headline is somewhat misleading but allow me some latitude while I state my case.  I run a software development company.  We produce software products and we have customers that use them.  (Go figure.)  We have a QA staff.  We test our products.  TFS has no way to capture the guts of a user defined test against a product that tests a particular requirement.  Specifically we needed to save metrics of test runs with success and failure rates, reasons for failure, environments tested, and lot of other neat stuff.  I didn’t expect TFS to have all this rich user testing goo so I expected we’d roll our own.  This article is about how we connected our hand-rolled testing metrics program with our Team Foundation Server.

The problem:  A scenario test fails; a bug is created against a product/task/whatever and needs to be linked to the test that caused the problem.

The Solution:  The TFS API!

Team Foundation Server has a plethora of components that you can leverage allowing seamless integration with the back end of your TFS implementation.  These components are found in the following path normally: 

[Program Files Root]\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

**Client requirement: On any system you install your custom TFS linked software, Team Explorer must be installed.  An obvious server requirement is that you have a Team Foundation Server installed somewhere in your network or available via the Web.  If you’re interested in getting TFS running (and why wouldn’t you be?!) you can download a trial from Microsoft.

Our general requirement for this task was to view a list of active bugs for a team project and allow selection of one. 

OK — some meat for you code monkeys. 

Create a windows forms project in your favorite language.  Mine is C# but any .NET language will do.

Add references to the following assemblies.  You’ll need to browse for them since they are not in the GAC or otherwise registered for easy VS reference adding.  The image shows them all together but this is a doctored image to save space.

tfs references

Put a tab control on the form and set it to dock-fill (leave the 2 tab pages alone), size the form to 800X600 (this just saves us some time and coding).

We’re basically going to create two functions that perform the guts of the scenario.  The GetWorkItems function which utilizes the DomainProjectPicker dialog class to allow the user to select the team project they wish to examine and the PickWorkItemsControl user control which allows searching of the TFS work item store. 

                   

private void GetWorkItems() 
{ 
    DomainProjectPicker dpp = new DomainProjectPicker(); 
    DialogResult dr = dpp.ShowDialog(this); 
    if (dr == DialogResult.OK) 
    { 
        tfs = dpp.SelectedServer; 
        tfsProject = dpp.SelectedProjects[0]; 
        this.Text = "My Team Foundation Link - " + tfsProject.Name; 
        Store = (WorkItemStore)tfs.GetService(typeof(WorkItemStore)); 
        TeamProject = Store.Projects[tfsProject.Name]; 
        pw = new PickWorkItemsControl(Store); 
        pw.Dock = DockStyle.Fill; 
        pw.PortfolioDisplayName = TeamProject.Name; 
        this.tabPage1.Controls.Add(pw); 
        pw.PickWorkItemsListViewDoubleClicked += 
            new PickWorkItemsListViewDoubleClickedEventHandler( 
            pw_PickWorkItemsListViewDoubleClicked); 
    } 
} 

The InitWorkItemControl function allows the user to view the details of a selected work item and utilizes the WorkItemFormControl control.

 
private void InitWorkItemControl() 
{ 
    this.WorkItemControl = new WorkItemFormControl(); 
    this.WorkItemControl.Dock = System.Windows.Forms.DockStyle.Fill; 
    this.WorkItemControl.FormDefinition = null; 
    this.WorkItemControl.Item = null; 
    this.WorkItemControl.LayoutTargetName = "WinForms"; 
    this.WorkItemControl.Name = "WorkItemControl"; 
    this.WorkItemControl.Size = new System.Drawing.Size(683, 428); 
    this.WorkItemControl.TabIndex = 0; 
    this.tabPage2.Controls.Add(this.WorkItemControl); 
} 

We’ll tie this all together in the constructor for the form:

 
public Form1() 
{ 
    InitializeComponent(); 
    InitWorkItemControl(); 
    GetWorkItems(); 
} 

Here is what the finished product looks like: (This is an out-of-the-box dialog,  I didn’t write any of it.)
tfsConnect

The search control on this form does not have any of my code in it.  I only provided the tab control for it to live in.
tfssearch
The dialogs and controls exposed by the TFS API take care of the majority of the user interface, we just need to hook the stuff together with a little glue.  You can download the sample solution which has both C# and VB .NET versions of the program. 

Special thanks to Brian Randell who taught me this stuff through an article on MSDN Magazine.

 Download the source code here


February 11, 2008  10:14 AM

Yahoo rejects Microsoft’s offer



Posted by: Brian Eastwood
The Microsoft-Yahoo saga

Yahoo announced today that it has rejected Microsoft’s acquisition offer of $31 a share. Given that no other bidders have emerged, this could simply mean that Yahoo wants to drive up the price. It could also mean that Yahoo thinks it can go it alone. It could also mean that Yahoo wants to merge with AOL.

The 411 is available on SearchWinDevelopment.com: Yahoo rejects Microsoft bid, may talk to AOL instead. We’ll keep you posted.


February 8, 2008  5:26 PM

As the Microsoft-Yahoo world turns, Part 3 of n



Posted by: Brian Eastwood
The Microsoft-Yahoo saga

Here’s the latest entry in what promises to be a lengthy series on the Microsoft-Yahoo megastory.

That’s it for now.


February 8, 2008  10:10 AM

Interactive Builds with TFS



Posted by: YuvalShavit
.NET Web services (Windows Communication Foundation), Methodologies (Team Development, Agile and so forth)

Steve Porter at Imaginet Academy has been working to get Team Foundation Server (TFS) up and running, and one of his tasks was to take an existing project and migrate it over. His former build was using a couple of tasks from the MSBuild Community Tasks Project (specifically the StopServices and StartServices tasks).

He writes: This worked without a hitch with our 2005 build machine, but when I migrated this script over to our 2008 build machine, the build started failing on these tasks.

The answer in getting these tasks to work lies in using the Interactive Build feature of Team Build 2008, he notes. Team Build now uses WCF to communicate with the build agent and the experience is different than with .Net Remoting based Team Build.


February 7, 2008  11:32 AM

They could have told me



Posted by: Brein Matturro
Visual Basic, VS 2005 and .NET 2.0, VS 2008 and .NET 3.5, WinForms

(Editor’s note: This is the first blog post by Chris Madsen, who will be writing on the .NET Developments blog from time to time. Madsen is a consultant who programs in Visual Basic and Visual Studio 2005. Her first few posts will cover the ups and downs of migrating from VS 2003 to VS 2005; she’ll also write about some of the Visual Studio 2005 features that surprised her. Welcome aboard, Chris!)

The other day I got the latest edition of Visual Studio magazine in the mail. Along with it came a glossy, full-color pirate’s map. Evidently, that’s how Microsoft thinks of Visual Studio 2008 — “made for the likes of developers, and other scoundrels.”

I know the calendar says 2008, but in the real world of developers, it’s barely 2005. And I’m more a captain of a leaky little fishing boat than I am a pirate. It takes everything I have to get my work out the door on time. I upgrade my tools (such as Visual Studio) when I can’t live without a new feature, not when I get glossy maps in the mail.

I’m not alone: I still see plaintive questions begging for help with VB 6 apps, and with upgrading to VB .NET. I’ll leave it to others to reveal all the cool new stuff in VS 2008. I’m going to concentrate on Visual Studio 2005, including the woes of upgrading from VS 2003.

Whenever I run across a juicy bit, I’ll let you know. These are the things they never tell you, the information that’s written between the lines in the documentation, the stuff they leave out. It’s the stuff you find after opening a hundred Google links, buried in the answer to the answer to the answer to a question on some obscure site.

Who is this “they” who never tells me stuff? I’ll leave it up to you to decide.

I program mostly in Visual Basic .NET, so that’s what I’ll be talking about. I work almost exclusively with WinForms, and I’ve done a lot of work using Access, Word, and Excel in .NET apps. I love to write macros to make my life easier. I am a consultant with clients in Florida, Massachusetts and Maine. Just to keep things interesting, I live across country from all of them, in Washington State. So I might throw in some tidbits about telecommuting and consulting. Let me know if you are interested.

I’m sure I’ll write about some things you already know. Maybe they’ll make you smack your head and exclaim, “What sort of idiot is she?” But I figure if it wasn’t obvious to me, it wasn’t obvious to someone else, and that’s who the tidbit is for. I’m glad you have a better grasp of some things than I do.

But they could have told me.


February 6, 2008  10:25 AM

JNI for MSMQ



Posted by: YuvalShavit
.NET-Java Interoperability

A JNI library for MSMQ has just been added to the collection of downloadable software on CodePlex. It is basic, and will grow depending on peoples’ interest. The library allows Java applications to connect to MSMQ on Windows.


February 6, 2008  9:26 AM

As the Microsoft-Yahoo world turns, Part 2 of n



Posted by: Brian Eastwood
The Microsoft-Yahoo saga

Now that a few days have passed since Microsoft made its bid to buy Yahoo, the dust is beginning to settle, and news is trickling in slowly enough that it is not engulfing everything else that we at SearchWinDevelopment.com try to do.

As it stands, here’s an update on the most interesting stories we have seen in the last few days.

Since we have a feeling this whole brouhaha isn’t going away, we have added a new blog category called “The Microsoft-Yahoo saga.” We expect that we will be filling it with blog entries like this — that is, short recaps of what we’ve seen and heard — until something big happens.

Finally, it oughta go without saying, but feel free to add your $0.02 here. We know you have an opinion; why not share it?


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: