my dog learned polymorphism*
The moose likes Java Micro Edition and the fly likes My desgn model and Form concerns - Help please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "My desgn model and Form concerns - Help please" Watch "My desgn model and Form concerns - Help please" New topic
Author

My desgn model and Form concerns - Help please

Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Hello all,
Please I will need a help on the kind of design I chose in order to implement a job.
I am developing a large application for mobile phones and i am using the LWUIT APIs.

From decoupling perspective, I have decided to break the implementation of every of my operations into a classes, implemented in a Form class (LWUIT Form); i.e. I use a form for specific operation, and from a form calls on another form, and frm there calls another, and so on.........
I always call another form from a form, base on the operation to perform, for example;

1. I always have my class declared like this.......



2. I always transfer controls or call another class/Form like this......


My concerns here is this, since there is no way to close/end a Form,
Will these Forms that are loaded after the other remain in the memory?
Will each of the call/invocation of Forms (or their constructors), be called in a stack (just like the normal method invocation)?

I am writing an application, and half way into the development i already have 30 classes, i hope if a user has to perform operation for a long time, the application will not crash?
What could possible be the best practice in this case?

Thanks - Juwonlo
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

You may do the following to ensure that, at any point in time you have only one form loaded.

* Collect data from the current form
* Store the contents into a bean
* Close the current form
* Show the new form (use the contents in the bean to fill the form automatically, if required)
* Remove the bean


S.D. MADHAN
Not many get the right opportunity !
Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Hello Madhan,
Thanks for the response......
you said
Close the current form


How do i close a LWUIT form?

Thanks - Juwonlo
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

You may do the following.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My desgn model and Form concerns - Help please
 
Similar Threads
Problem in LWUIT Theme
LWUIT License for commercial usage.
Problem Using Bitmap Font In Text Area LWUIT
table using lwuit in j2me
LWUIT: Custom List Renderer with checkboxes to select multiple items