Resizer 1.2 - More Goodness

27.12.2009 • 11:59 • permalinkComments (0)

Once again, I've felt the need to upgrade my image resizing application, and I present to you version 1.2! The app seems to follow a natural evolution as I come up with more and more requirements for it, this time because I decided to put more images into my blog posts. These images must be no wider than 450 pixels so I thought it would be useful to have a feature specifying which dimension to resize after, instead of it being the biggest dimension.

A totally unrelated plant

Version 1.2 changelog:

  • Added options for setting length of the minimum, vertical and horizontal dimensions, instead of just the maximum dimension.
  • The resizing work is now done in a background thread making the UI responsive while working.
  • Added support of cancelling work.
  • Removed a bug preventing the progress bar from being updated properly.

Recently, I've been very interested in architectural patterns for improving modularity, testability and other such desirable properties. The Model View Presenter pattern (The Supervising Controller variant) is one of these, and after reading an introduction to it by Phil Haack, I've been playing around with it for the GUI of my card game compiler. It provides a great way to keep the UI classes very thin and only deal with UI business, allowing us to maintain the single responsibility principle.

While it was hardly necessary, I implemented the MVP pattern for the single view in the Resizer app but I'm beginning to get the feeling that it will grow a lot in the future.

For those who are interested in architecting better apps, the Composite Application Guidance for WPF (Code named Prism) is also a good read. Actually, it's more than just guidance, it's also a library that can help you get up to speed on these practices in no time and it includes very helpful code samples for all the important points. The project comes out of the Microsoft Patterns & Practices department which provides guidance for all sorts of .NET development.

As usual, you can get the source code here and the binary here.

Comments

Name:

Comment (no HTML):