December 19th, 2008
When I read Nikhil’s “Effects and Transitions for Silverlight” and its accompanying Silverlight.FX framework, I was impressed by how easy it was, and is, to create an animation and declare it on any Silverlight framework element.
<Grid>
<Grid.RowDefinitions>...</Grid.RowDefinitions>
<fxglitz:Effects.ClickEffect>
<fxglitz:HighlightEffect TargetName="highlightImage" HighlightColor="Yellow" Duration="00:00:01" />
</fxglitz:Effects.ClickEffect>
<Border x:Name="highlightImage">
<Image Source="/Silverlight.png" />
</Border>
<TextBlock Grid.Row="1">Highlight</TextBlock>
</Grid>
With a framework this powerful, I wanted to extend it even further by providing a fluent interface, similar to jQuery, to compose and chain animations together. This way, you can declare a common animation element and behavior once, and apply it to any framework element you require, swap…
Continue reading "Composing animations with Silverlight.FX" »
December 16th, 2008
If you’re not familiar with Wrox Blox, they are shorter than books, and aim to give developers focused, contextual information on new technologies to get and stay productive quickly. I’m happy to report that Jumping from ASP.NET to Silverlight 2 was published today.
In it, I try to provide a solid base from which to learn Silverlight 2 coming from an ASP.NET development background. If you’ve held off getting into Silverlight 2, but are anxious to learn and build on what you already know about web development, I sincerely hope this is helpful for you.
Continue reading "Jumping from ASP.NET to Silverlight 2 available now" »
December 11th, 2008
One pattern I’ve grown to love, as it provides an expressive and maintainable way to remix business logic, is the specification pattern. Using a specification, I can define business rules against an object as single statements of truth, and compose more complicated rules out of those smaller rules. Here’s a quick example:
// Specification
class ShortWordSpecification : SpecificationBase<string>
{
public override bool IsSatisfiedBy(string instance)
{
return instance.Length < 5;
}
}
// Usage
var spec = new ShortWordSpecification();
bool result = spec.IsSatisfiedBy("GOOG");
In the example above I have defined what my application considers to be a short word. Using composition in my…
Continue reading "Improving the readability of the Specification pattern" »
December 8th, 2008
Recently I needed an easy way to figure out whether an instance or type implements a given interface, whether or not that interface is generic, as well as obtain the generic arguments (the real types the instance uses in place of a generic type) for that interface.
So I’ve written a small set of extension methods to give you these features. There are only two methods, but they are available with multiple signatures. The first method allows you to determine if an instance implements any interface, whether it is generic or non-generic.
// A regular, non-generic interface
var result = instance.Implements(typeof(INoDeclaredTypes));…
Continue reading "How to determine generic implementers and type parameters at runtime" »
November 13th, 2008
I spend a great deal of time reading and trying to understand technologies and methodologies that radiate outward in the software development industry and the bulk of these efforts are bundled under the banner of better, faster, cheaper; the reply from the passionate or the dangerous is usually “you can have better, faster, or cheaper, but you can only pick two”.
Whether we like it or not, all great software is built slowly. If it’s also true that a software project is completed quickly, that’s a bonus. Nothing in your project that was built fast works well. If it does, it’s…
Continue reading "Slow software: open source and the cult of speed" »
Page 3 of 11«12345»...Last »
Socialized