The multipurpose WeblogPost EmoticonID property

Custom Community Server applications typically extend the out-of-box applications like forums, blogs or the (new in CS2008) media gallery. To reduce development time and original coding, we can treat certain properties of the application’s core objects as ready-made multipurpose containers.

My Jobs Management Application extends CS Blogs, with each job architected essentially as a blog post.  This means I use the WeblogPost object extensively, as well as a custom JobPost object that derives from WeblogPost.

In many instances I’m faced with the prospect of writing original code or changing the underlying logic of methods to perform simple functions, like passing an integer to the JobUrls.Instance().SomeUrl method as shown below. Many weblog urls are created using the Weblog and WeblogPost objects, so the easiest and most simple approach is to pass an integer as part of the WeblogPost object.  In my example I’m passing a Purchase Order ID.  Here and elsewhere, the WeblogPost.EmoticonID has become my go-to property for passing integers.

This may appear hackish to the code purist, but it’s clean, efficient and can be done in a snap, with less lines of code and fewer billed hours for my clients.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.