Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensibility of UblReader and UblWriter #65

Open
zaltysz opened this issue Nov 11, 2024 · 0 comments
Open

Extensibility of UblReader and UblWriter #65

zaltysz opened this issue Nov 11, 2024 · 0 comments

Comments

@zaltysz
Copy link

zaltysz commented Nov 11, 2024

UblReader and UblWriter do lots of heavy lifting and are nicely split into specific methods for specific parts, however, it is practically very difficult to extend these classes.

This would be easier, if:

  1. methods were 'protected' instead of 'private';
  2. UblReader had Invoice and Invoice Line factory methods (i.e., createInvoice() and createInvoiceLine()) instead of creating these objects with 'new' inside some huge method. That would allow easy use subclasses of Invoice and InvoiceLine.

The reasoning is real systems wander off standards and this improvement in extensibility would help with cases when something additional or something differently must be parsed in XML. In my particular case I am dealing with government system which is somewhat lax with rounding and totals, and so I have requirement to get some values 'as-is' from XML rather than rely on them being derivable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant