Last night at the Raleigh.rb group there was an great talk on writing an application as a plugin. Clinton Nixon was talking about the common problem of looking for a CMS and a blog. (which is exactly what I am looking for to rewrite infozerk.com) The problem in just about any framework is that it is very hard to merge two different applications to act as one. In Rails I would love to have a mashup of Simplelog and Radiant, but I imagine it would be quite a task. I may end up simply running them as separate applications, but then it would be separate logins, etc. The speakers solution to this is to build an add-on application as a plugin, in his example a blog application. The idea is that you would be able to install the plugin and be able to quickly integrate a blog into your application.
I was still thinking about this while watching Kevin F’s screen cast and the second thing he shows off is a user control he wrote for logging into an application. Even though it is in .NET he took a very similar approach as the speaker at last night talk. First he compiled the code into an assembly which is referenced from the web application. He then has the login.ascx control in the web part of the application so you can edit the view part of the control. In rails the speaker did a very similar thing. The logic for the application stayed in the plugin directory but the view portion was copied to the application. Kevin’s example is much more simple than an entire application, but it is the same general idea.
It’s an interesting approach in both examples and I expect to see it more and more in both camps, Kevin also plans on doing another screencast to talk more about this approach.
-James

{ 5 comments }
I read this and it suddenly hit me: you’re describing SharePoint! We still have openings when you get bored doing the independent thing.
thanks for the mention James.
I’m pretty sure ScottGu posted about building reusable user controls awhile back and that’s where I got the idea.
Some devs like to isolate the markup in a server control but that’s too limiting most of the time, and sometimes its warranted.
It all depends on the situation.
I will tell ya though, trying to customize the asp:login control was what first brought me to this solution.
When you have very specific needs sometimes the asp.net controls just don’t give enough and you need to do your own thing. This is just the path I took and I think others may find it helpful to them when needed.
cheers
Matt,
I think the theory is the same as sharepoint, but I believe in sharepoint you still have to do everything in a single custom or user control… can you split the view out like these guys are doing?
One of the design principles of the ASP.NET MVC Framework is that it makes it very easy to integrate apps into your project (similar to how Django handles this).
For example, you could easily integrate a blog engine, cms editing, administration tool, etc – and easily parent them anywhere you want in the URL hierarchy (because routing with the ASP.NET MVC framework is DRY – no code in the controllers or views need to change to support this).
We’ll be talking more about this support, as well as a bunch of MVC application modules that are being built, in the weeks ahead.
Thanks,
Scott
sidenote – I love that ScottGu and MS are following the Django guys. Django is a great framework and deserves the attention.
I’m excited to see them implement the same Projects/Apps concept found in Django.
Comments on this entry are closed.