You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eine der fiesesten Dinge ist dabei diese riesige sehr abstrakte Loop. Eine der größten Gemeinheiten dort ist, dass sich document_type_obj zur Laufzeit von einem String zu einem Objekt ändert (uäh!), was von Mongoengine reinkommt und viel Spaß beim Debuggen gibt. Aber auch so: das ließe sich sicherlich aufhübschen, indem man das in mehr Codefragmente aufteilt.
Es ist auch eine Überlegung wert, manchmal nicht gar so abstrakt zu agieren. Diese extrem abstrakte Darstellung mit "alles definiert sich über das MongoEngine Datenmodell" hatte ich damals gewählt, weil wir nicht wussten, wie stabil und zuverlässig die OParl-Relationen auf nahezu alle Gegebenheiten passen. Da nun aber klar ist, wie gut OParl zur Realität passt, könnte man auch überlegen, das Abstraktionslevel zu senken, wenn das zu besser zu wartendem Code führt.
The text was updated successfully, but these errors were encountered:
Den Code vom Sync-Client könnte man wirklich hübscher machen:
Eine der fiesesten Dinge ist dabei diese riesige sehr abstrakte Loop. Eine der größten Gemeinheiten dort ist, dass sich document_type_obj zur Laufzeit von einem String zu einem Objekt ändert (uäh!), was von Mongoengine reinkommt und viel Spaß beim Debuggen gibt. Aber auch so: das ließe sich sicherlich aufhübschen, indem man das in mehr Codefragmente aufteilt.
Es ist auch eine Überlegung wert, manchmal nicht gar so abstrakt zu agieren. Diese extrem abstrakte Darstellung mit "alles definiert sich über das MongoEngine Datenmodell" hatte ich damals gewählt, weil wir nicht wussten, wie stabil und zuverlässig die OParl-Relationen auf nahezu alle Gegebenheiten passen. Da nun aber klar ist, wie gut OParl zur Realität passt, könnte man auch überlegen, das Abstraktionslevel zu senken, wenn das zu besser zu wartendem Code führt.
The text was updated successfully, but these errors were encountered: