Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

variable/object to store global state of the software #37

@openpaul

Description

@openpaul

So, I will try to explain what I mean with that title. In DNApy the genbank-data is saved in the genbank.gb class. All modifications are directly written to this object and can be exported to a file.

Settings for DNApy are stored in a text-file and loaded into a global variable called settings. Moreover some Classes have some settings in their init-method.

Selected enzymes or other changes of settings are not handled consistent yet. I think it would be good practice to have some central setting-object that has the ability to bind listener to it to trigger some updates whenever a certain setting changes. This would enable selective updates of the GUI, allow more easy implementation of new features and prevent fragmentation of different storing and update mechanisms.

Some researching brought the therm observer patterns (https://en.wikipedia.org/wiki/Observer_pattern) to my attention as well as properties (https://docs.python.org/2/library/functions.html#property). I don't know which way would be the way to go. Maybe you've got some more ideas?

What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions