I'm trying to keep my code legible if not elegant. I have MULTIPLE web service calls getting and updating data.
I have an activity housing the JobDone & UrlDone subs.
I would like to know if its impossible to call specific parsers in other code modules from this single JobDone Sub. I'm trying to separate the objects, sorry the types for a bit more clarity in the code.
SUMMARY ::
My test to hop into another code module has been fruitless, however simply calling ANOTHER parser in the same code module is apparently working but ... this isn't much different than the over crowded select case statement I was already going to implement
Example ::
getCartLocParser.Parse(InputStream, "getCartLocParser")
This works , its not trying to jump into another code module
So I'd either;
have some 12-19 different parsers in this single module each manipulating its specific "type" (class) of course each has its start & end element subs.
OR
One gigantic almost unintelligible confusing mess of if statements and try catches as I juggle these various requests and responses from the web service in ONE parser (two actually considering the begin & end element subs)
You see why I want to break this out into object ,, excuse me.... type specific responses, requests
I humbly and gratefully appreciate ANY and ALL insight or ideas in addressing this concern.
I have an activity housing the JobDone & UrlDone subs.
I would like to know if its impossible to call specific parsers in other code modules from this single JobDone Sub. I'm trying to separate the objects, sorry the types for a bit more clarity in the code.
SUMMARY ::
B4X:
Sub JobDone (JobPassed As String)
Select JobPassed
Case "Logout"
HttpUtil Stuff Here Stream Stuff
parser.Parse(InputStream, "Parser")
Case "GetLocMap"
HttpUtil Stuff Here Stream Stuff
daObject.cLocParser.Parse(InputStream, "daObject.cLocParser")
Case "SomeOtherWebMethod"
HttpUtil Stuff Here Stream Stuff
sumOtherObject.ItsSpecificParser.Parse(InputStream, "sumOtherObject.ItsSpecificParser")
My test to hop into another code module has been fruitless, however simply calling ANOTHER parser in the same code module is apparently working but ... this isn't much different than the over crowded select case statement I was already going to implement
Example ::
getCartLocParser.Parse(InputStream, "getCartLocParser")
This works , its not trying to jump into another code module
So I'd either;
have some 12-19 different parsers in this single module each manipulating its specific "type" (class) of course each has its start & end element subs.
OR
One gigantic almost unintelligible confusing mess of if statements and try catches as I juggle these various requests and responses from the web service in ONE parser (two actually considering the begin & end element subs)
You see why I want to break this out into object ,, excuse me.... type specific responses, requests
I humbly and gratefully appreciate ANY and ALL insight or ideas in addressing this concern.