SuperSecretary

The following is the beginning of a series of posts with detailed information on my open source personal projects. The intention is to provide information about the application, development, design decisions and lessons learned.  Enjoy!

Overview

I don’t recall exactly when I started working on SuperSecretary, but I originally looked at a folder of various photos on my machine and set out to look for a way to keep them under control. I looked for software to sort photos by date taken and couldn’t find anything to meet my criteria. It didn’t seem that there were any options that were user-friendly, and there certainly weren’t any that were free.

I started building SuperSecretary specifically as an app to manage photos, but quickly realized that the concept could be expanded upon to manage all types of files. There are even some features, such as sorting music files by ID3 tags that are on my to-do list for future versions.

Design

I knew from the beginning that I wanted the application to eventually support plugins for users to handle files in any matter that they deemed necessary. This led me to the creation of the “Handler” in SuperSecretary. It is essentially just a simple, verbatim implementation of the Strategy pattern. Each handler has a Do method that passes in the path to the file that is being acted upon, along with some options that have been selected by the user. The handler returns the name of the folder that the file should be sorted into.

For example, when the user chooses to sort a photo by the Date taken attribute, the system uses a DateTakenHandler. The sorting engine loops through the files that need to be sorted and runs the DateTakenHandler for each one. The DateTakenHandler will retrieve the Date taken property from the EXIF data and format it based on the format selected by user. For cases when the user chooses to sort based on multiple attributes, the system will return and then move on to the next Handler. The handlers all inherit from the same interface, allowing a plugin system to be implemented.

The only thing I dislike about this design is that it is not the most efficient option. The system loops through each file, then loops through each of the handlers and acts before moving on to the next. However, some processes are more efficient when grouped together. For example, if the user chooses to sort on two EXIF attributes, say Camera Model and Camera Maker, it makes sense to retrieve that information together. However, batching these operations together makes the system less extensible. Ultimately I chose the more modular approach.

Development

I started development on a proof of concept right away. Since the application was meant to be a small utility that I used myself, I did not put much effort into researching features or deciding on what options to provide right off the bat. I kept the user interface compact and simplified as possible.

After completing the proof of concept, I began to think about the bigger picture of all of the things that could be possible. I pondered on a plugin system and the possibility of multiple interfaces, including a console front end for automating the application as a scheduled task. I even started building a WinRT front-end, which didn’t go so well. More on that in another post.

All of these more end user focused features led to many development decisions. I re-factored the application into two projects, a core library and the Windows Forms application. I focused on keeping the Windows Forms view as thin as possible and moved all of the logic to the core library.  I moved detailed output of the results of each run to an update event that could be implemented in to display information in the UI, a log file, or any manner that is specific to the target platform.

Packaging

Releasing a desktop application as a product was an entirely new concept for me. All applications need a few common elements, one of which is a deployment package. I had very little knowledge on creating a Windows installer. I really only knew that Visual Studio Installer Projects had been recently discontinued and that I needed to find a new option.

I discovered the WiX Toolset, a fantastic framework for building MSI installers. I admit that my implementation is very simple, but to this point I have not run into anything that I needed that I could not achieve using WiX.

The other common element that an application needs is assets and branding. I come from a primarily web focused background and working as a part of a team, so I had never had the complete responsibility of creating assets for a project. Icons, logos, screenshots and information were all things that I had never created and compiled from scratch. I am not a designer so I tackled those to the best of my ability. Paint.NET became my friend.

Distribution

I initially built the Razium web site specifically for hosting an installer for SuperSecretary. I created the site in a format that was more focused on the end user as a target audience, rather than toward developers. I will do a post in the future entirely focused on the creation of the Razium site, since there are some interesting tidbits there.

Originally I hosted the files there as well, but I have since moved those to Sourceforge. Hosting on Sourceforge obviously requires that your application be open source, but for those that are, it provides the added benefits of handling bandwidth costs and also the exposure that you get from being included in their library. In the first day on Sourceforge I had more downloads than the whole time that SuperSecretary was up on the Razium site.

Thanks for reading.  For more information on SuperSecretary, or to download version 1.1, click here.  To view the source code or fork the project, visit the GitHub repository.

Advertisements

Razium

I have taken a little bit of time away from updating the blog lately to work on a few little personal projects. Some of these were ideas that started years ago that never got into any kind of working order and others were utilities that I wanted to create simply because there was no free option available. A few of these projects have been open sourced and in development for some time. From a glance at my GitHub history you can see that my development schedule is a little bit scattered to say the least. A good summary would be to say that I work on what I want when I want to and I develop selective amnesia regarding the rest of the projects until I find my way back to them. After all, they are personal projects, right?

To break from my habits I have been putting some effort into seeing a couple of these projects through to usable applications. I have done that with the 1.0 release of SuperSecretary, my file sorting application, and I am near that point with MembershipManager, my ASP.NET Membership utility. Most developers are used to relying on GitHub for open source projects, but since these applications are more than just developer tools, it makes sense to have something more than a GitHub repository where the source code can be pulled and built. Enter Razium.

Razium is a site where I will provide more end-user targeted information about these projects. This may be lists of features, screen shots or comparisons depending on the project. It will also be where your average user goes to download compiled binaries and installers for the applications (via SourceForge). The site is very basic at the moment and only contains detailed information for SuperSecretary, but will be evolving over the coming months.

In the near future, I will be posting blog entries about each of my open source projects. I hope to provide a brief overview of the current state of each of the projects with some challenges and lessons learned from development to date. I am excited to document and share the knowledge that I have gained throughout the process of turning an open source project into a product. Stay tuned!

.NET Decompiler Software Options

Every once in a while a project comes along that requires integrating with a third-party library or working with existing compiled code.  On occasion those libraries can come with either poor or no documentation at all.  This can make debugging a nightmare.  In this case, having a peek at the source code can point you in the right direction or even solve the problem altogether.  Believe it or not, there are several solutions available for decompiling .NET code on any budget, including many that are completely free.  You can even (gasp!) make changes to the library and re-publish!  Here is a look at the options.

Red Gate .NET Reflector

Reflector was previously the only solution available for decompiling .NET assemblies.  They offer a complete desktop application and an option for Visual Studio integration.  I say “previously” because .NET Reflector recently switched to a paid application, which spurred many of the competitor products.  Pricing for Reflector starts at $95.

Jetbrains dotPeek

dotPeek is my favorite .NET decompiler application.  It has a clean, familiar design and also has many IDE-like features for navigating through the decompiled code.  My only complaints are that it only decompiles to C# code at the moment and that it does not allow direct editing of the library.  You can however save the code as Visual Studio project and rebuild it on your own.  Best of all, it’s free.

Telerik JustCompile

JustCompile has many of the same features as dotPeek including the ability to create Visual Studio projects.  It is also very fast and provided free of charge.  I ended up using JustCompile for a recent project because it is compatible with Reflexil, a plugin that allows you to directly edit the library.  It is not as simple as just writing new code, but it is very helpful for situations where you just need to make small changes and don’t want to rebuild.  (Note: Reflexil also works with Reflector, but JustCompile is the only free application that it supports.)

CodeReflect

CodeReflect is a decompile-only product, meaning that it does not provide any of the Visual Studio project features of some of the other options.  It has a very simple interface and is also free of charge.  CodeReflect can decompile .NET code into either VB.NET or C#, whichever you prefer.

ILSpy

I have not used ILSpy, but I wanted to include it in the roundup since it is the only open source .NET decompiler.  ILSpy can decompile to either VB.NET or C# and save as a project in C#.  If you are a developer who is curious about decompiling, you can check out the source code to learn how it all works.

Thanks for reading.  Do you have a favorite .NET decompiler that is not on the list?  Feel free to leave a comment!

From the Bookmarks Bar – August 3, 2013

It’s a little late, but I’ve got a few awesome links for this week’s bookmarks bar.  They include a great new piece of open source software, an update to an awesome web development framework and some suggestions for self improvement for developers.

Tox

Tox is a brand new piece of open source software for secure messaging, calls and video chat.  It was created to provide a more secure alternative to Skype following the news that Skype was providing data to the NSA.  While it is not in wide release at this time, you can pull from the Tox git repository and build the application on your machine, if you would like.

12 Things That Would Make You a Better Developer

While I can’t say that I agree that all of these are absolutely necessary, many of these can help you become a much more efficient developer at the least.  I would recommend the section on pushing for more automation.

Bootstrap 3

Twitter’s Bootstrap framework for front-end web development has just unleashed the release candidate of version 3.  The framework boasts an all new flattened look with a focus on speed improvements.  Don’t like the look?  There are plenty of add ons out there to customize Bootstrap to your liking!

Thanks for checking out this week’s links.  Found any cool Bootstrap designs?  Let me know on Twitter!

From the Bookmarks Bar – July 19, 2013

This week the bookmarks bar has some design and licensing links in addition to a couple of development related links.

Choose a License

Struggling to choose an open source license for your intellectual property?  Answer a couple of questions about your project and this site handles the hard part for you.

Redesigning a Flight Search Application

Rarely do we get detailed look at the redesign of such a data rich application.  We’ve all used a flight search site at one point or another and know how complicated they can be.  Here is Cleartrip’s development log of the process.

Comments in Modern Software Development

The opinion on the usage of comments has changed over time.  Comments used to be absolutely entirely necessary to understand a block of code, but many developers have since turned to better naming and segmentation to take the place of comments.  Here are some additional things to think about regarding comments.

WebAPI in ASP.NET MVC 4

ASP.NET MVC may not seem like the ideal choice for a small WebAPI project, but you can make it work.  Here is a good tutorial on the setup process.

Have some great links from your bookmarks bar that you like?  Post them in the comments below!  Thanks for reading.