I've been stepping through the Javarosa codebase to better familiarize myself with it. The main question I wanted to be able to answer was "could large parts of the custom parsing logic be replaced with a standard library like JAXB?"
Along the way, I found large-to-mid-size tasks: for instance, XFormParser is a recursive-descent parser, when it doesn't necessarily need to be. The xml file has already been parsed into a Document object, which could be processed with a series of XPath statements directly to the important nodes in an order that makes for best readability.
I also found small, stylistic changes that could be made: for instance, XFormParser has a method called initState(). This method is only called once prior to parsing and could be moved to the constructor.
My questions are:
- Has anyone else given any thought to replacing any of the Javarosa logic with standard XML utility libraries, and if so, did you already rule anything out as being an option?
- Is there a process in place to enumerate and triage smaller stylistic fixes like the above? It seems like filing a github issue for each would be excessive, is there a better way to contribute these small changes?
- Is there a process in place to undertake any larger refactoring tasks, and if so, are there any that are on the radar currently? Rumor has it (i.e. @LN told me) that @dcbriccetti has done some thinking along these lines, so I'd be interested to hear his (and anyone else's!) thoughts.