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

refactor contactdb_api db access code after contractdb and uix stabilize #21

Open
bernhardreiter opened this issue Feb 27, 2017 · 1 comment

Comments

@bernhardreiter
Copy link
Member

The current code in intelmq-mailgen:26f585021b6c5485c6ff7dea323306eed6ab012a
for contactdb_api uses database access strings that are similiar at places and could be refactored using more common functions.

It was a design choice to not produce more elegant code here, because the contactdb schema will be most likely changed as the upcoming new configuration method is fully implemented (and because of other lessons learned, like the inconsistencies found https://github.com/Intevation/intelmq/issues/18 and https://github.com/Intevation/intelmq/issues/19) In addition change is very likely after understanding the problem domain and use cases better with a running and working interface.

Very likely change in db structure and semantics, as potential changes in the user interfaces make better code coverage through tests unfeasable, it would be additional code to be potentially completely reworked.

If all the changes are done, the database access and the internal abstraction may be refactored.

@bernhardreiter bernhardreiter changed the title refcator contactdb_api db access code refactor contactdb_api db access code after contractdb and uix stabilize Feb 27, 2017
@bernhardreiter
Copy link
Member Author

It would also make sense to join database access in the bots/experts/certbund-contact (or at a different place). Right now the code does not separate and does not encapsulate the database layer. This has the advantage that changes are cheaper and can be one on the knowledge of how the database has to be driven. (Any abstraction would have been learned.) However the drawback is that code is scattered around different places that access the database.

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