Webinar SignUp

Using .NET AddIns to Modify AspDotNetStorefront

AddIns are one of the more interesting additions to the .Net Framework. AddIns are bundles of code to extend an applications functionality, or behavior.

Based on a streamlined contract/interface design idiom, developers can create application “hooks” to “attach” to functions, constructors, or methods and extend their functionality.  AddIns let the currently running event, or trigger, make a modified logical computation, depending on which interface the contract allows for implementation.

This sounds tricky, but a great example can be found in the current Accelerated C# 2010 series by C# guru, Trey Nash. 

Trey uses the metaphor of a virtual zoo.  The type ZooKeeper needs to be able to communicate with the animals in the zoo, respectively called ZooAnimals.

In order to move these animals from one location to another, we’ll have to use some act of movement, or in essence, the public interface IMovement, which contains both Flying{animal ZooAnimal}, and Walking(animal ZooAnimal).

Now, not all animals can fly so some types within ZooAnimals will not be able to implement this contract. However, at the very least, they could support the Walking contract as a base implementation.

AddIns separate the abilities of one type versus another, facilitating robust and exception neutral programming.

As an AspDotNetStorefront developer, AddIns mean you can manipulate your application, without disturbing any of the source code that is already there.

Our platform for building these modules give developers a wide range of capabilities in designing store-specific AddIn’s that operate when triggered by in-store events.

For example, an AddIn could be used to change the appearance of your store by a user initialized click event called btnChangeAppearance_Click(object sender, System.EventArgs e) that returns a specific XmlPackage object.

The AddIn would “hook” into this process and return the graphical elements of the most preferred skin that users on your site choose. This is just like the events that happen during runtime, they all contain a measurable amount of work that can be modified using an AddIn.

This contract/interface based programming creates a high level of flexibility in your Storefront application, which is never a negative in the online production environment.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Developer Tips | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 3 = 4

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>