One of the things I absolutely love about mojoPortal is the fact that it’s open-source (C#/Asp.Net/MSSQL, by default), and is accompanied by a wealth of articles and tutorial videos explaining how to implement custom development, step by step. That being said, there are still certain factors to consider when creating a custom feature (a modular plugin that can be added into any page in the mojoPortal CMS implementation). In this article, I’ll discuss factors to consider when developing custom applications that manipulate images.
1) What file types will you be expected to support? One of the custom features I’ve created for mojoPortal is the Ad Manager, a plug-in that allows site owners to upload ad images, set start and end dates, link advertisers to ads, and track payment history by ad. Having recently completed another feature leveraging GDI+, I used it in Ad Manager as well. Everything was going fine until shortly before delivery of the feature, when the client asked for support of animated GIFs. GDI+ will not support multi-frame images such as GIFs in .Net; this unwelcome discovery required some very focused last-minute refactoring to support the needs of the application.
2) Will you edit images after upload? If you plan to allow editing of images after upload, there are various approaches to consider. Do you want to save the image to a temp directory, and then after editing, place it in a different directory? Do you want to use cache, then save the edited file back as an Image in the database? GDI+ allows a great deal of flexibility in editing images “on the fly”, as well as the ability to add watermarks, create thumbnails, and much more. However, there are drawbacks (see animated gifs above).
3) Will you be implementing on a single server, or a server farm? If you’re planning on single-server instances, saving the image to a local file folder makes sense; however, if you’re planning on a larger instance that may be housed on a server farm, you may find it less cumbersome to save uploaded images in the database.
Each of these factors can require substantially different solutions to be implemented; carefully evaluate your application needs when deciding which options to pursue.