On numerous occasions the Code Project website has provided ideas and examples of techniques to solve a problem that otherwise I was having difficulty with. To all those who operate and contribute to Code Project I say thank you.
As a way of possibly giving back a little I offer this professionally complete application for surfing through image collections, also known as albums. This application combines many ideas found else where on Code Project site but it also includes my view of what constitutes the minimum aspects of a professional application. I fully understand that this is a subjective concept and the beauty is in the mind of the beholder. Software development is a combination of a set of finite rules and creativity. The creativity provides many solutions to the same problem. After years of experience in the industry I believe there are characteristics that permit one to label a solution as a "good" one.
Characteristics of a professional application
- It must provide the user an intuitive interface and perform the task the user needs to do in an easy to understand fashion.
- It must be complete, that is it would include a polished looking splash screen, an easy to use parameter modification interface, an informative About Form and a complete help implementation.
- From a development point of view it should be consistent in style and be written and documented in such a way that another developer can understand and maintain it. This would be without spending months to figure it out.
That's my view of software beauty and I am sticking to it.
This application includes all the items listed above. After using it for a month or so it is exactly what I wanted, hopefully you will find it useful. It employs all the natural image types that .NET 1.1 knows about and really performs nicely given the amount of code written to solve the task.
A couple of functions have to reach outside of .NET to provide the features that were needed and you will see their references in the
As a C# application all XML comments are complete and I have provided an IDE macro file that provides formatting of function signatures as they are in the example code. The output of an NDoc execution is also provided as an example.
Basically when the user selects a graphics file to view, this application checks the directory of which it is a member and makes a list of all other graphics files in that directory for selecting through.
The project incorporates the following features:
- Ability to select the image, zoom and scroll with key presses only. I have become partial to the mouse wheel for image selection.
- Drag and drop a new file to the form to switch directories and file lists.
- Select an area from any displayed zoomed image and save as a new file in any supported image format including selecting JPEG quality.
- Persistence of user selections for the next execution. Use of registry or local XML file is a developer option.
- Display the image properties.
- A complete HTML help project to support the application.
- A full deployment project.
I have been in the software profession for many years which includes stints as a college instructor and as a group manager. As you might assume I have formed some strong opinions about what represents a job well done. This project exhibits what I think is the best in style and form. Over the years I have on many occasions reviewed other people's code searching for style and techniques that can make my own code better. I have come to understand that there is great elegance in simplicity. In fact, sometimes the hardest thing you can ever do is factor a problem into its constituent parts to provide the simplest yet complete solution.
I am an unabashed fan of Hungarian notation and try to structure a line of code so that just viewing it, without the aid of an IDE to tell scope type and function, is adequate to understand what it is attempting to do.
I use the major parts of this application as the basis for every new application I write. Why reinvent the wheel?
Points of interest
The whole project from the beginning to end took about two months figuring out this and that. Hopefully you will save some time if you find it useful.