Opened 17 years ago
Last modified 17 years ago
#33 new defect
Refactor, document, and unit test overly complex functions
Reported by: | Slava Akhmechet | Owned by: | Slava Akhmechet |
---|---|---|---|
Priority: | medium | Milestone: | 0.2 |
Component: | weblocks | Version: | pre-0.1 |
Keywords: | refactor 'handle-client-request' | Cc: |
Description
Currently 'handle-client-request' is a complex function that's somewhat poorly tested and documented. We should refactor it into more manageable pieces, provide better tests and document its behavior more therally.
Change History (8)
comment:1 Changed 17 years ago by
Summary: | Refactor, document, and unit test 'handle-client-request' → Refactor, document, and unit test overly complex functions |
---|
comment:3 Changed 17 years ago by
We should also refactor the part of the linguistics module that deals with message generation from typespec. It should take advantage of custom dispatching on slot-management-generic-function metaclasses.
comment:4 Changed 17 years ago by
There is a lot of visible slot processing code. We get all visible slots, map over them, check if the slot should be rendered inline, and take some action. We should refactor with HOFs. There are already some HOFs in place, but they're only flexible enough to use for renderers.
comment:5 Changed 17 years ago by
We should refactor humanize-typespec aspect of the linguistics module.
comment:6 Changed 17 years ago by
We should refactor object-visible-slots. It isn't nicely structured and it walks over the elements multiple times. Additionally, if it proves to be a problem, object-visible-slots should cache its computation.
comment:8 Changed 17 years ago by
Prevalence backend should reuse as much of memory backend code as possible.
We should refactor and unit test 'object-from-request-valid-p' along with 'handle-client-request'.