Morning,
I'm building a new application but now i'm not sure how to continue.
The user has to go step by step (screen by screen) through a specific path with an array of data. At the end of the path the user has to aquire a signature and save it to disk. Then it is send to the server and then the user has to go back to step one.
What is the best way to build up the program? At this point i've build multiple layouts and activities, every step is a new activity and layout. After signing i send the file to the server and i clear the array. On every activity resume i check if the arraysize is zero. If so than i call activity.finish.
Is this the right way?
Sending the signature is at activity "X" (with a jobdone). But when the server isn't reached the signature isn't send to the server but remains on disk. To resend all signatures on disk there is a button in activty/layout "A". But this means that i have two places with a jobdone.
-----------------
The other problem is the data which the user has to work with. If the app starts it looks for an XML-file and reads it with Saxparser, al working. This happens at activity "B"
But when there is no XML-file the user has to retreive an XML-file from the server. This is at activity "T" but for reading the xml with the Saxparser i've to add again the parsing-code and the "_endelement"-sub..
----------------------
Should i use:
- 1 activity with multiple layouts
the pro is that i can use 1 jobdone and 1 _endelement-sub for parsing the code. The con is that i have one gigantic file with code
- multiple activities and layouts
the pro is that i have my code better viewable. the con is that i have multiple pieces of code which are exactly the same (which is more work to do work with / keep in sync.) (i was thinking of the parsing and the jobdone)
I'm building a new application but now i'm not sure how to continue.
The user has to go step by step (screen by screen) through a specific path with an array of data. At the end of the path the user has to aquire a signature and save it to disk. Then it is send to the server and then the user has to go back to step one.
What is the best way to build up the program? At this point i've build multiple layouts and activities, every step is a new activity and layout. After signing i send the file to the server and i clear the array. On every activity resume i check if the arraysize is zero. If so than i call activity.finish.
Is this the right way?
Sending the signature is at activity "X" (with a jobdone). But when the server isn't reached the signature isn't send to the server but remains on disk. To resend all signatures on disk there is a button in activty/layout "A". But this means that i have two places with a jobdone.
-----------------
The other problem is the data which the user has to work with. If the app starts it looks for an XML-file and reads it with Saxparser, al working. This happens at activity "B"
But when there is no XML-file the user has to retreive an XML-file from the server. This is at activity "T" but for reading the xml with the Saxparser i've to add again the parsing-code and the "_endelement"-sub..
----------------------
Should i use:
- 1 activity with multiple layouts
the pro is that i can use 1 jobdone and 1 _endelement-sub for parsing the code. The con is that i have one gigantic file with code
- multiple activities and layouts
the pro is that i have my code better viewable. the con is that i have multiple pieces of code which are exactly the same (which is more work to do work with / keep in sync.) (i was thinking of the parsing and the jobdone)