Sunday, October 28, 2007

What The ....!! : VSTS Unit Testing



One of the awesome features of VSTS (although most are still prefer the NUnit / MbUnit). It's ok guys.. Since I'm gonna play with the VSTS, i'll go for its unit testing capabilities first. Appreciate any input. (For my quick reff)

Unit testing—the process of testing the smallest possible piece of code that can run


Cool stumbled:
Walkthru, Jason's Q&A on Unit Testing in VSTS, Brian's findings , Jeff Levinson's How-To

Remember...

Taking advantage of this functionality isn't difficult, but it does require that you think through the process carefully; otherwise, you'll create holes in the tests you conduct. I'll show you how to implement unit tests with VSTS, first by creating a small sample app to test with, then walking you through the assorted steps.




"Aaaaahhh.... awesome result"


The truth?

Tracking Bugs is Easier Well, not necessarily. How do you know that your tests are correct? That they fail when something actually breaks down? How do you know that you're covering enough code in your tests to ensure that if anything is wrong in your production code, that some test, somewhere, will break?

What happens if you have bugs in your unit tests? You'll suddenly start getting a lot of false positives—essentially, a bug will be found, but the problem won't be in your code under test. Your test's logic has a bug and therefore the test fails. These bugs are the most annoying and hardest to find because you're usually looking in the wrong place, checking your application instead of checking your tests. In Section I, I'll show you how to ensure that having a lot of unit tests does in fact make tracking bugs easier.

Code is Easier to Maintain Considering the last point, you're probably inclined to think this belief isn't necessarily true either. And you're right. Let's say that for each logical method in your code you have at least one test method. (Realistically, you'll probably have even more.) In projects with good test coverage, as much as 60 percent of the code can be unit tests. Now consider that the tests have to be maintained as well. What happens if you have 20 tests against a complex logical method and you add a parameter to the method? The tests won't compile. The same thing happens when you change constructors of classes. Suddenly you find yourself needing to change a lot of tests just to make sure your application still works. And that takes lots of time.

For this belief to be true, you need to make sure your tests are easy to maintain. Write them while keeping the DRY rule in mind: Don't Repeat Yourself. I'll look at this issue more closely later.

Code is More Understandable This is a benefit of unit tests that people don't usually expect at first. Think about changing code (say, a specific class or a method) in a project you've never seen before. How do you approach the code? You probably go around all the project code looking for places where this specific class or method is being used. Not surprisingly, unit tests are a great place to find such examples. And, when written correctly, unit tests can provide a handy set of API documentation for the project, easing the process of documenting and understanding code behavior written by old and new developers on the team.

However, this is only true if the tests are readable and understandable, a rule that many unit test developers don't follow. I'll expand on this belief, and show you how to write readable unit tests in the Readable Tests section of this article. -via


Wednesday, October 24, 2007

In cool control : Ascend.NET controls

A must have Windows Forms controls "collectibles". Currently only available in English and Chinese (simplified). Wait for (Brazilian, Portuguese, French, German, Italian, Spanish and Turkish) languages version. But thats a great start dude. Big Kudos to the team.

The Ascend.NET controls are a collection of Windows Forms controls written in C# targeting Visual Studio 2005 and .NET 2.0.
The intent is to provide controls that are flexible but easy to use that will hold up well under heavy usage.


via [cp]

Sunday, October 21, 2007

Google Gmail vs Microsoft Hotmail : Coz Mr Ballmer Said So

"They Read Your Mail and We Don't," Says Mr. Ballmer


Haha.. Read on dudes. Reserve my comment.. to more "appropriate" time.. (Do I have any?) :)

via[syscon]

San Francisco, Here I Come (hopefully) : SOA World Conference & Expo 2007



In the event you guys have the extra-deep pocket, to burn.. :) and of course "looking to stay in front of the latest Web technology!"...

SOA World Conference & Expo 2007 West will take place on November 12-13, 2007 at the Grand Hyatt in San Francisco.


What's being offered?
SOA World:
> Enterprise Mash-Ups
> SOA and Web 2.0
> SOBAs
> Patterns and Anti-Patterns
> Governance Enforcement
> AJAX RIA and SOA
> Run-Time Governance
> Wikis and Lightweight Software
> Policy-Driven SOA
> Complex Event Processing
> Windows Interoperability
> EAI Without the Cost
> Mixed Portal Environments
> Reference Architecture


Virtualization:
> Service Virtualization
> The Effect on Enterprise SOA
> Managing Data Centers
> Virtualization Economics
> OS Virtualization
> Adaptive Infrastructure

Go there

Thursday, October 18, 2007

Open Source forum for .NET platform : YAF


After a long festive-holiday, we're baacckk!! :)

Dudes, how about 'YetAnotherForum.NET' (YAF). Yeap, its name 'in-some-ways' could directly tell anyone who ever had any question regarding this so called .NET community forum. Also had modules to be used in either DotNetNuke or Rainbow. Interested? Read on mate! (its Open)

Features:


* 100% C# ASP.NET
* Microsoft SQL Server 2000/2005 database support.
* User configurable cultures. See dates and numbers the way you are used to.
* All dates and times in local time zone for registered users.
* Unlimited number of categories, forums and messages.
* Includes private messaging and private messaging notification features.
* Possibility to hide forums when user has no access.
* Unlimited user groups, with option to automatically promote users based on number of posts.
* Access rights based on groups.
* Polls can be added to posts.
* Administrators can mass email to all users or specific group.
* Template for easy integration with your current site design.
* Web based administration.
* Member list.
* Move topics to other forums.
* Active topics list.
* Active users list.
* Print topics.
* Email topics.
* Setup moderators with the ability to moderate topics, posts and users signatures.
* Watch forums or topics for new posts.
* View and delete subscriptions from the user control panel.
* Change password in control panel.
* Recover lost passwords.
* Supports smileys/emoticons.
* Quick and easy installation.
* IP banning.
* Points for points system.
* Multiple boards support.
* Comes with many themes to choose from.
* Supports common "Rich Text Editors" including FreeTextBox and FCKEditor.


more [YAF]

Wednesday, October 10, 2007

ASP.NET tree viewer : JQuery style



Cool tree viewer armed with full code dudes! Now thats what i call awesome coding... (VS 2005, C# code provided at source, visit 'em for more)

...if someone doesn't have Javascript activated (say a search engine spider for one example) they will be still be presented with all the content and it's possible to follow links etc.




source

Tags: dddn,jquery,aspnet

Tuesday, October 9, 2007

SharePoint From Scratch : by sharepointblogs

You'll for sure stumble upon here (like me) while sharepoint-ing the www. Nice work SPRobot! Before moving any further, make sure all the prerequisites are well taken care dudes.

source|sharepointconnect

Monday, October 8, 2007

Drools.Net and Windows Workflow : by Tom Lake

Stumble here while drooling...

I am not familiar with Drools.Net rule engine but in general Windows Workflow Foundation comes with a rules engine, which is not replaceable. You could create a custom activity condition, see blog post here , but it you would not be able to use it with the out of the box activities that have conditions, e.g. while, conditioned activity group & if else branch.


So essentially you are saying that I cant plugin any third party rules engine like ILOG, InRule, Blaze or open source like NxBRE, Drools. Is there a particular reason why its not possible. Does it mean that the rules that is bundled with Window Workflow is tightly coupled and there is no way to replace it


Answer :

Correct, Windows Workflow Foundation (WF) ships with a rules engine and it is not replaceable. However, you can create custom conditions that can call your custom rules engine. You can use the custom conditions with any activity but within VS you won't be able to set any of the out of the box activities to use your custom conditions. What I mean by this is you currently get "Code Condition" & "Declarative Rule Condition" in the dropdown for condition properties, you can't add "Custom Condition" to the out of the box activities.


more

Sunday, October 7, 2007

.NET Remoting Or Web Services?

Stumble upon awesome explanation regarding these two. Previously, almost got ultimate 'bera' headache reading /deciding both two. A bit clearer now :) . Good for my PG.

- By default, use ASP.NET Web Services. They are simpler to implement and use, and offer the broadest reach to clients.
- Consider .NET Remoting if you need a more traditional distributed object model with full CLR type fidelity, don't need interoperability with other platforms, and have control over client and server configurations.
- If you choose .NET Remoting, prefer the HTTP channel registered with IIS and ASP.NET. Otherwise, you will have to build your own process lifecycle management and security infrastructure.
- Given that .NET Remoting requires .NET client, it makes sense to use the binary formatter instead.
- Use Enterprise Services when you need declarative transactions.

(chooose.. baby)

Pay 'em a visit (or more)


Hello Earth! Doing .NET lately? Join us here..

Share those valuable .NET 'secrets' dudes.