Saturday, September 24, 2005

Enforcing code standards

Link to the item I am talking about

While looking around for code standards and best practices I saw many references to the FxCop product. It had many good things said about it. It is free download so I guess I will have to get it and check it out.

Anything that helps enforce code standards CAN be a good thing. It is much easier for an automated "code review" to enforce standards than haveing a peer review. And since I don't really have any peers on this project I couldn't do that anyways.

I also found a few articles on using FxCop

And the location for user-submitted rules (and other items) is:

Interesting read

Link to the item I am talking about

A good comprehensive post of the different naming conventions for .NET programming. I knew most of these, and the suggestion of moving away from Hungarian notation.

I am mainly listing it here just for my reference, so i can find it later.

Sunday, September 18, 2005

Finding best practices on writing plugin interfaces

Link to the item I am talking about

Well after deciding to design first and code later, I started looking around the net for some articles on designing plugin interfaces.

The article listed above with this post, covers the basic fairly well. The one thing that came from this article is the idea of a second interface for the plugins to communicate BACK to the host application. This is now a second interface I have to think about and decide if I need this, and then if I feel it is needed then I would need to determine what kind of feedbacks I want the plugins to be able to send back to the host application.

But for the interface for the plugins to implement I am still determining exactly what methods and properties I want in the interface. I am using the IBlogExtension (I think that's the name) as a starting point for ideas. This is the plugin interface that RSSBandit uses as the plugin architecture and the one I had to implement in the RSSBandit plugin I wrote.

I am still looking for some articles on what process should/could be used to determine what properties and methods to use for, as well as naming structure for them. For example the IBlogExtension has properties named HasConfiguration which is used to indicate whether this plugin has a configuration screen. The question is should you setup properties like this or a single Implements properties that is a bit masked field for the different possible optional items the plugin can implement. I am just looking around to see if it is just personal preference or if there is a best practice.

At the end of the article he says "... feel free to use the PluginServices.vb file in your own applications." I just downloaded it and will be trying to use it in my application when I get to coding it. I am a VERY BIG believer in not reinventing the wheel, if a collection of code is there to use for iterating over a series of files and finding ones that support the requested inteface as well as a factory for instantiating the plugin I will use it.