Archive for June, 2013

Enabling Twitter cards

Monday, June 24th, 2013

Twitter cards are summary widgets that show up for links to websites that have them enabled. There are a few types of cards: summary, summary with image, photo, product, and a few others. To enable twitter cards a few things need to happen. First, the website must include meta info in the page header to tell twitter what to put in the card. Next, the website must request to have cards activated for the site.

This evening I set up twitter cards for this blog.  This blog runs on WordPress. Luckily there are a handful of plugins that take care of inserting the meta data into the page header. I installed JM Twitter Cards plugin. It had the most downloads and 5 stars. Install was painless, and setup was easy. Just filled out the forms for the summary cards in the settings JM Twitter Cards plugin.

Next I logged into Twitter’s dev site where there is a Twitter Cared Validator and validated that the plugin was working. Sure enough  everything looked good. So I clicked the submit button for approval. I filled out the form will a few easy questions about my website. Upon submission was told to expect a response within weeks.  It took about 5mins to get a response.

That is it.



ASP.NET Dropin DLL Plugin – Part One

Wednesday, June 12th, 2013

My intro to web programming was with PHP and scripts such as phpBB and other internet forum software. I always like that installing a plugin normally just worked. You would drop a folder into some directory and the script would see it and you could install it. I have yet to really see this recreated in ASP.NET MVC.

For the past year or so I have been trying to find a way to recreate this. There are many blog posts and half tutorials on this. There is even a few libraries out there on how to do this.

And old blog post from 2008 was my starting off point. It talked about Virtual Paths. It worked but the syntax was terrible.

I knew if I was going to do this, I wanted everything to just work as easily as possible. I also wanted the plugins to be runnable on there own if the developer wanted (for dev and debug reasons).

Griffin.MvcContrib has a way to do this. It seems overly complicated to me. So I kept at it.

After some more searching I found an example of some code that implemented a virtual path provider. I don’t know from where or who but I feel bad because I would like to give them credit. I finally had enough to start tinkering on my own.

I finally have something to show for all of this. I have posted on github a working example of how to create a ASP.NET MVC plugin system. This system allows for DLLs that contain all necessary files, compiled or embedded, to be dropped into the bin directory of a main site and then those files served from the DLL.

Over the course of a few more post, I will cover how the important bits work and what the gotchas are. If you need this now, check out the github project. Currently, it has one plugin that has JavaScript and image examples.

Questions are always welcome.

ASP.NET Dropin DLL Plugin – Part Two