atomsite.net

The AtomPub server for .NET

AtomSite Plug-Ins

Posted in Technical, About by JarrettV on 3/17/2009 1:46:00 AM - CST

Tutorials

AtomSite plugins are the heart and soul of AtomSite.  In fact, everything in AtomSite is built as a plugin.  This makes it easy to extend and customize.  Out-of-the-box, there are many core plugins which provide most of the common functionality a blog or CMS may need.  However, if there is something you want to add, the following guide will show you how to create a plugin.

Plugin Interface

All plugins must implement the IPlugin interface.

public interface IPlugin
{
  string DefaultAssetGroup { get; set; }
  int DefaultMerit { get; set; }
  bool CanUninstall { get; set; }
  PluginState Setup(IContainer container, string appPath);
  PluginState Upgrade(IContainer container, string appPath, Version previous, Version current);
  Plugin GetPluginEntry(IContainer container, string appPath);
  PluginState Uninstall(IContainer container, string appPath);
  void Register(IContainer container, List<SiteRoute> routes, ViewEngineCollection viewEngines, ModelBinderDictionary modelBinders, ICollection<Asset> globalAssets);
}

The best way to do this is to extend the BasePlugin class as it provides many useful pre-built funtions that make building a plugin much easier.

Useful Setup Functions

under construction

Useful Upgrade Functions

under construction

Useful Register Functions

under construction

© Copyright 2010 Powered by AtomSite 1.3.1.0