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
Modular model VS all-in-one #154
Comments
Original comment by |
Original comment by |
Original comment by
|
Original comment by |
Original comment by
|
Original comment by |
Original comment by
|
Original comment by |
Original comment by |
Original comment by |
Original comment by |
Original comment by |
Original comment by |
In my opinion it is almost irrelevant whether the code lives in one file or multiple files. The only thing that is important is that code for one target is separated from code for other targets. The separation should come from using a separate class for each target. Optionally, we can discuss if each class should live in its own file. Currently, the code is a mix of general translation code and target-specific code à la "if target == 'tex': do-tex-specific things". We have to separate the txt2tags core from the target-specific code. The ultimate goal for the modularization has to be that there are no occurences of "if target == 'XXX'". Once this is the case, devs can add support for a new target without having to read and understand code for other targets. Also, we will be able to maintain the core without having to read code for specific targets. txt2tagslite has made some steps in the right direction. It moved data for targets out of the core. The next step is to move code out of the core. One possibility for achieving this is to create an abstract base class |
I also noticed all the targets are imported during run-time. It means if users want to remove targets from the targets folder because they don't use them at all, it will raise an error like: import targets isn't it possible to import them dynamically, i.e. if they don't exist they are not imported, and if there is a new one it will be imported, without touching the core code? |
@farvardin there is a file named |
Original issue reported on code.google.com by
eforg...@gmail.com
on 6 Jul 2012 at 6:36The text was updated successfully, but these errors were encountered: