yysun's space

I Like ASP.NET Web Pages–Part III

Posted on: February 23, 2011

After Part I and Part II, here comes the part of making a dynamic site.

I am always impressed by PHP based CMS, like Joomla, Drupal, Wrodpress and etc. Nothing from .NET comes close to them.

With the WebMatrix, I want give it a try myself to build a dynamic and extensible site. It is going to have features of

  • Modules
  • Plugins
  • Templates
  • NuGet Package


Modules are a deployment packages of certain functionality. E.g. Pages, Blog, News, User Management … Modules are deployed as NuGet Packages. Modules can be enable and disable at runtime.

Many CMS have the concept of module (Drupal, XOOPS, DotNetNuke, Orchard…). It is called Component in Joomla.

Module functions are extensible. Modules publish extension points to allow other modules to extend functions.

The concept of Extension points is famous in Eclipse. MEF uses Import and Export. WordPress uses Hooks. Inspired by WordPress, I will use Hooks.

Hooks are a loosely coupled event publication and subscription. From anywhere of the site modules, you can request to run a hook (like fire a event). If any module has added (registered) the hook implementation, it will be invoked. The result of all hooks are chained.

E.g. In the _PageStart, there is a line.

Layout = Site.RunHook("get_layout") as string;

The template module responses to the hook get_layout and return the layout file name.

That’s it. The core mechanism of a dynamic site is that modules request hooks and as well as implement the hooks. Hooks glue all program pieces together.

Put it all together I will create a framework, the Rabbit Framework for WebMatrix.

Name it Rabbit, just because rabbit are small, light, fast, delicate … and this year is the Year of Rabbit.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


    • Pk: The horizontal view is a pleasure to use! Good thinking
    • randyburden: A valiant and commendable effort. Your use of Tuple is a little weird but it offers a feature that most other microORMs don't. Your use of a static Gu
    • reav: great work done on Rabbit Framework. just started to learning it, and by now i think it will solve all my problems and questions, that i had in webpag


    %d bloggers like this: