Opened 19 years ago

Last modified 19 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 by Slava Akhmechet, 19 years ago

Summary: Refactor, document, and unit test 'handle-client-request'Refactor, document, and unit test overly complex functions

We should refactor and unit test 'object-from-request-valid-p' along with 'handle-client-request'.

comment:2 by Slava Akhmechet, 19 years ago

We should use 'progv' in 'handle-client-request'.

comment:3 by Slava Akhmechet, 19 years ago

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 by Slava Akhmechet, 19 years ago

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 by Slava Akhmechet, 19 years ago

We should refactor humanize-typespec aspect of the linguistics module.

comment:6 by Slava Akhmechet, 19 years ago

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:7 by Slava Akhmechet, 19 years ago

Refactor datagrid class to use mixins.

comment:8 by Slava Akhmechet, 19 years ago

Prevalence backend should reuse as much of memory backend code as possible.

Note: See TracTickets for help on using tickets.