Iíve finished my first mini-project for the summer. Yet Another Calculator, or YAC, is a simple desktop calculator. I have created a website for the project. In this post, I want to analyze what I did and determine the benefits of my work.
What I Did
I created a WPF application in Visual Studio 2010 using .NET Framework 4.0. I have read about WPF before but I had never created an application using it. So, this was a new experience for me. I started by creating the layout of the calculator (which later changed) without adding functionality.
After creating most of the controls, I decided that I wanted to integrate this application with a F# parser. To my dismay, I found out that .NET 4.0 doesnít come paired with fslex and fsyacc. These two tools are, in my opinion, the most powerful part of the language and the crux of my deciding to use F#. So, I decided to go away from that and create and expression builder / evaluator in C#.
After creating the evaluator, I had a working calculator. After that, I had a few user interface changes that I think significantly improved the program. Additionally, I added ìtip balloonsî that appear the first time that you run the program. I also added the ability to ìshiftî and click buttons. I pulled the results display from the entry display so that they could be kept separate. I also created the About box and the Help box.
In reality, if this were a real product, I wouldnít start out with the user interface (unless this was to be a prototype). Instead, the architecture would have needed to be laid out and major decisions about the architecture of the project would be decided. However, since this is such a small project I didnít have an architecture.
Likewise, with a MVC or Code-Behind model, I should work vertically, incrementally adding features. However, on a project I think that this entire project should be considered a sizable feature set that could be implemented vertically. So, I didnít feel too bad about that.
The expression builder / evaluator in C# is very primitive and untested. This is really an inadequate solution to even this project but I needed something quick ní dirty so that I could have a working application. Instead, I would suggest using a tried and true math parser. Iím not sure where to get one but Iím sure it exists somewhere.
The user interface changes at the end of the project really improved the experience for the user. These changes took a relatively low amount of time to implement and refactor. In terms of the application development, those huge improvements took maybe 10% of the project time. With more time, Iím sure the user interface could drastically improve.
Overall, the code behind / evaluator are terrible and not maintainable. Iím pretty happy with how the user interface turned out, even with an unskilled UI programmer at the helm. In terms of project success, Iím pretty happy. With more time, effort and skill, this could be a good model for how to create a better desktop calculator.
I gained some experience in UI development, which was my goal for this project. In addition, I learned more about WPF (which was thankfully similar to ASP.NET). I really didnít learn much of anything about C#, though, and my evaluator wasnít anything special. However, I met (really, exceeded) my project goals and that makes this a success for me.
My next project is a Ruby IDE. Iím still trying to decide on language and how I want to proceed with that. My goals for that project include (but are not limited to) making further improvements to my desktop application UI skills / experience and to learn another UI framework other than WPF, Windows Forms and Javaís Swing.