Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-3269

Need to refactor connectors and related code

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • None
    • None
    • LanguageResources

      Some derivative classes from editor_Services_Connector_Abstract at least editor_Services_OpenTM2_Connector and its related classes like editor_Services_OpenTM2_HttpApi need to be refactored because of grown complexity. Classes have grown significantly and it becomes more and more challenging to maintain them.
      What should be done:

      • Split code to smaller classes
      • Complete all TODOs and FIXMEs
      • Change processResponse to return typed DTO instead of stdClass
      • Remove public setters such as setResource and setLanguageResource etc. since they are breaking encapsulation and making it possible to have the model in an invalid state
      • Change resultList to be initialized on every request instead of constructor
      • Make services to be retrieved from registry and make them to be guessed by name and not by class (Original discussion here https://bitbucket.org/mittagqi/translate5/pull-requests/804)
      • Clean Up Fuzzy TM stuff, currently is cluttered over multiple levels of code and is to error prone (by saving fuzzy TM name to DB in case of errors etc)

            leonkiz Leon Kiz
            leonkiz Leon Kiz
            Axel Becher, Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: