I have a Rails 2.X model with 421 lines of code/comments that does a significant amount of work on the backend (opening HTTP Get requests, parsing RSS, parsing HTML, etc.). At the same time, I m moving to Resque in order to more quickly get through this backend code. I m wondering what the best way to refactor this would be. Should I move this back-end code to a library that I include in the model? A module? A gem?
Your thoughts would be much appreciated.
我基本上对每个数据项目一米处理有单独的核心任务。 i.e. 分配RSS的饲料,配对一个吉大港定居地,管理该地的管理机构,以及其他一些任务和权利,即目前拥有500项或该模式中的代码线;尽管该模式的大部分内容是通过由戒严操作的背后方文字确定的。
因此,使之更具有活力,更便于转播;即考虑为每组转播单课,并在那里采用静态方法。
然后,如果你愿意的话,我可以要求背信封的管制人打上这些班子。 这种做法是否有意义?