|
Writing A Multi-Currency Converter Using WMLScript (cont.)
by Wei Meng LEE
|
Lessons Learned
What was originally thought of as a simple project turned out to be quite an experience for me. Let me share them with you what I have learned.
Caching Problems
I have tested the application on three emulators:
- UP.Simulator 4.0
- Nokia WAP Toolkit Version 1.3 Beta and 2.0
- Ericsson WapIDE 2.1
The Nokia WAP Toolkit 2.0 and the UP.Simulator have no problem with caching. However, the Ericsson Wap IDE performs caching
regardless of setting the HTTP header to expire the cache at a certain time. The Ericsson emulator will only work correctly
if the cache is disabled. This result is the ASP document is executed everytime the application is loaded, which significantly
causes an increased load time, both on the client and server sides.
Bugs In Emulators
Recall that we have this line in the last part of our WMLScript:
amount *= 1.0;
This seemingly redundant line resolves a bug in the UP.Simulator's implementation of the format() function in the String library.
String.format("%.2f",amount)
The problem with this function is that if the amount is an integer, it will not format the string correctly.
When used together with the alert() function from the Dialogs library, the screen simply remains unchanged
even when the user presses the Calculate soft key.
This problem was irritating, as it was hard to pinpoint at the beginning of the project. The other emulators like Nokia WAP Toolkit
and the Ericsson WapIDE do not have problems with this issue.
Emulators Are Unstable!
When it comes to running WMLScripts, emulators are still pretty unstable. I spent a good portion of my time trying to run
the application on the different emulators. Sometimes it worked, sometime it doesn't. So far, the UP.Simulator has been
pretty stable, except for the bug noted above.
Next: Conclusion
|