codex-blackboard icon indicating copy to clipboard operation
codex-blackboard copied to clipboard

Break up large, mixed-purpose files

Open Torgen opened this issue 7 years ago • 1 comments

lib/model.coffee has the definitions of all the collections, and the methods that operate on them, and some stuff that isn't related to any particular collection. This could be separated into a few files for clostly related collections--for example, messages, pages, presence, and maybe nicks in one, puzzles, rounds, and round groups in another. Also, model.coffee contains server-side batch processing which never needs to be loaded on the client. (I don't mean the methods, since those are required for simulation.) That could be moved to the server directory. server/hubot-scripts/codex.coffee has every blackboard-related command in it. It could also be split up-- one file for tags, another for puzzle/round creation, another for announcements, etc.

Torgen avatar Feb 04 '18 05:02 Torgen

It would probably be good to do #161 at the same time as this--e.g. by adding tests for code as we move it from monolithic files to more focused ones. Also, maybe going to explicit imports instead of eager loading would also be part of this.

Torgen avatar Jul 09 '18 23:07 Torgen