Ziff-Davis Enterprise 
DevSource: Microsoft Developer Resource
Add OnsArchitectureLanguagesTechniquesUsing VSForums
 
Home arrow Techniques arrow The Sharp Design Philosophy Behind Paint.NET
The Sharp Design Philosophy Behind Paint.NET
By DevSource

Rate This Article:
Add This Article To:
The Sharp Design Philosophy Behind Paint.NET
( Page 1 of 2 )

You don't often get a peek behind the curtains in a development project — at least, not the ones you aren't personally involved in. The developers behind the successful Paint.NET application explain their language and library choices, UI design, and

Paint.NET gives commercial photo editing programs some serious competition, which is all the more impressive since it began as a classroom project. This free program was developed by a team of computer science students at Washington State University, under a partnership with Microsoft.

Paint.NET is still considered to be in the midst of development. Yet, its current version, the second beta release of 2.1 (Figure 1), is very usable, stable, and nimble for an application that was created by full-time students within a 40-week timespan. It includes many of the convenient tools you'd expect to find in a commercial photo editor or image paint program, such as red eye-removal, a clone stamp, and color replacer. At this stage, most of the features that the original Paint.NET developers wanted to put into the program have been implemented.

ADVERTISEMENT

For many on the Paint.NET team, taking part in developing a photo editor was motivated by love of the commercial products — which, in turn, affected how Paint.NET itself was designed.

Figure 1. Paint.NET.

"We all used other photo editors when we were younger, so each of us had some sort of inspiration when working on Paint.NET," admits Craig Taylor, a 23-year-old graduate of WSU, who today works at Boeing in Kent, Washington. Taylor worked on various aspects of the Paint.NET code, most notably its red eye-removal tool. "I fondly remember my days of PhotoShop. Another member had fond memories of MS Paint. There would sometimes be a push or pull toward each person's preferred photo editor. That was definitely a good thing; we would always be opening up different editors to check out how each of them worked."

More Features In Less Time

Paint.NET was written in C#, a decision the developers say was based primarily on the language's ease-of-use. Had C++ been chosen instead, say the Paint.NET team, they probably would not have been able to add as much functionality as with C#, especially within such a short amount of time.

"[C#] makes UI programming much, much easier to deal with than C/C++. The code base would be 50 percent larger, just to deal with all of the extra stuff C++ makes you worry about," says Rick Brewster, 23 years old, who was the lead programmer for the first version of Paint.NET. Brewster now works for Microsoft at its headquarters in Redmond, Washington, but still mentors the Paint.NET 2.0 team.

The results that Brewster and his fellow students on the Paint.NET team achieved is considerable; none had prior experience with C#.

"Even though we had classes that taught us object orient approaches, I don't think they really went in-depth enough," Taylor says. "This project really brought it all down on my head. Learning how a real, extremely large, object-oriented program worked was really helpful. This is especially true now that I'm in the industry — they do object-oriented programming! I am pretty happy that I learned all this stuff in school, rather than on the job."

Four significant libraries were incorporated into the Paint.NET code:

When the project was first started, Brewster describes encountering "serious performance limitations" that were inherent in a certain control in WinForms (a part of .NET). He had to come up with a way to implement things geared towards performance without sacrificing the clean programming interface that .NET provides. This affected the way image data would be accessed by almost every other part of the program, so it had to be done carefully and correctly.

"Don't assume that .NET will allow you to avoid worrying about things like performance or quality. And don't assume that the .NET Framework is bug-free," Brewster advises others.



 
 
>>> More Techniques Articles          >>> More By DevSource
 



DevSource video
Devsource Video Series
Manipulating Society through Technology
Jeremy Bailenson, Director of the Virtual Human Interaction Lab at Stanford University, talks about virtual reality, avatars, Moore's law, how real world behaviors influence online reality, and societal manipulation through technology!
>> Play video
>> Read article
>> See all videos
DevLife Blog
Julia looks at the changes to ADO.NET!
MSDev Blog
Is the latest Delphi product, RAD Studio 2007, really necessary?
Make it Work
.NET makes runtime type checking a breeze. See what Peter has to say about it in this week's tips!
News
Microsoft Counts on App Support for Vista
Microsoft has taken pains to demonstrate that Windows Vista will have ample application support.
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.