![]() |
Platforms, Frameworks & Libraries »
Mobile Development »
Applications
Intermediate
PocketBalance ApplicationBy Chris CavanaghA bank balance prediction utility for PocketPC |
C#, Windows, .NETCF, .NET, MobileVS.NET2003, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

PocketBalance is a bank balance forecasting utility. I wanted something that could tell me what my account balances would be next month, without having to put in much effort to keep it up to date.
I�d tried a few commercial money packages some years back, but my bank was a bit backward and it was a pain to integrate the two. I had to manually enter stuff and regularly reconcile things to keep it happy. In the end it was too much bother, and I had more success crawling out of debt with a simple Excel worksheet :o)
All that�s needed to keep PocketBalance happy is a list of recurring transactions (utility bills, salary etc) and an occasional snapshot of the current balance. It can:
Of course you can throw in a whole load more detail for PocketBalance to play with if you like. The more detail it has, the more accurate its balance prediction will be.
I�d not even attempted to write a PocketPC application before. I�d done plenty with ASP.NET, loads of class libraries and some Windows Forms, but was a definite newbie here.
I knew I wanted DataSets, and wanted to get the Framework to do all the hard work for me. My plan was to throw together a nice typed dataset, bind it to a few things, add a few buttons and some calculations and I�d be done. Cake ;o)
I spent the next few evenings (real job during the day + 3 kids = little time to play) cursing Microsoft for not giving me typed datasets, XML serialization or a decent sized screen. Everything I wanted to use seemed to be missing :o( Rarely a quitter, I picked them off bit at a time:
DataSet were there, so I just loaded the XSD in (with ReadXmlSchema) and my tables were defined and looking very pleased with themselves. I roared with delight.
I created some dummy data and put it in as an embedded resource (SampleData.xml). Until I got it loading and saving stuff, it could play with this.
After that it�s a bit of a blur. I went down a couple of wrong roads and reversed best I could. I realized I didn�t know half as much as I thought I did about databinding in Windows Forms. There was a whole world of BindingContexts and things I�d never tried, so if nothing else it was good practice.
Some of the nasties I battled on the way were:
PocketGraph assembly).
ListView control to display the transactions, but it beat me. It painted each row in a half-assed way, and didn�t support databinding :o( I hated it so much I wrote my own (DetailView in the PocketControls assembly). It wasn�t a complete replacement, but it did everything I needed.
DataSet (to save me having to worry about uniqueness), but the PocketPC didn�t know how to make them :o( Fortunately MSDN came to the rescue with this article (posted on CodeProject), which became a new �PocketGuid� assembly.
Eventually I got it doing everything I wanted (I�m sure there are a billion bugs) and set about writing an installer for it. This would have been headache-inducing (it�s not as slick as creating a regular setup project) if not for a guy called Simon Kittle who put together this very useful article.
It�s certainly not a �best practice� implementation. I�ve kept it reasonably simple, but there are places it�s a bit inconsistent (it�s largely using data binding, but there are a couple of examples of manually initialized stuff). Nothing hugely wrong with it though - I�ll just regard it as a learning exercise ;o)
Since starting this I�ve realized developing PocketPC applications is pretty satisfying. Some of the uglier moments are like having teeth pulled by enema, but once you accept the constraints it [mostly] falls nicely into place. I�ve already decided what my next PPC project will be� If it turns out OK, I�ll post it here :o)
None yet, but lots to come!
| You must Sign In to use this message board. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads.
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 8 Jun 2004 Editor: Nishant Sivakumar |
Copyright 2004 by Chris Cavanagh Everything else Copyright © CodeProject, 1999-2010 Web21 | Advertise on the Code Project |