Changes between Version 8 and Version 9 of TracPluggableModules
- Timestamp:
- Nov 22, 2004, 1:55:17 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracPluggableModules
v8 v9 48 48 49 49 {{{ 50 #!python 50 51 class XxxModule(Module): 51 52 … … 75 76 76 77 {{{ 78 #!python 77 79 def get_timeline_events(self, start, to, filters): 78 80 # return a list of TimedEvent objects in the time span delimited … … 91 93 92 94 {{{ 95 #!python 93 96 def process(self, req): 94 97 # ... … … 139 142 140 143 --ChristianBoos 144 145 ''I don't see how the two ideas are complementary, other than both are refactoring discussions.'' 146 --ChristopherLenz 141 147 142 148 === Modules and Configurability === … … 207 213 --ChristianBoos 208 214 215 I don't see the original problem, to be honest. If you wanted to add a plug-in that adds e.g. ticket comments to the timeline, just do that. No need to subclass the Ticket module, or add a configuration flag. Just add a new plug-in: 216 217 {{{ 218 #!python 219 class TicketCommentsInTimeline(Module): 220 221 def get_timeline_events(self, start, to, filters): 222 if 'comments' in filters: 223 # get all comments from the ticket_change table and return them 224 return [] 225 226 def get_timeline_filters(self): 227 return [ ('comments', 'Ticket comments') ] 228 }}} 229 230 This is, in my humble opinion, a lot simpler than adding typed extension points and what not. 209 231 210 232 == Identity Crisis? == … … 212 234 Eclipse is a fantastic tool and an excellent example of a very impressive plug-in architecture... but, Eclipse is a "Rich Client Platform" - a universal tool. It wants to be everything to everyone. I think a better model for Trac to follow would be jEdit which has a wealth of plug-ins, but jEdit remains a text editor, not a plug-in manager with a text editing plug-in. (I believe my example is correct, I've never looked under the hood of jEdit). 213 235 236 ''Eclipes is first and foremost an IDE featuring an extremely modular architecture (the whole RCP thing was slapped on much later). Whether you call the pieces of the software "components", "modules" or "plug-ins" doesn't really matter. Anyway, I might have taken the analogy with Eclipse too far, please don't let that distract you from the rest of the message.'' --ChristopherLenz 237 214 238 Trac, as defined in the logo at the top of this page, is an SCM Issue Tracker/Project Manager. It makes good design sense to have a modular architecture (as it is now) and a plug-in interface for non-core extensions, but to make everything a plug-in?? What would Trac become? It would be an empty shell that loads Python modules - but we already have Python to load Python modules. 215 239 216 240 ''Not an empty shell that loads Python modules, but a shell designed to contain SCM-related modules, combined with a collection of useful modules focused around project management.'' 217 241 242 ''The way I see it, Trac would be the sum of the modules that make up the functionality we have now. The fact that the actual core would just consist of a plug-in manager and request dispatcher is an implementation detail that serves to make the architecture more modular. It should have no immediate effect on the user or administrator apart from allowing more flexible deployments.'' --ChristopherLenz 243 218 244 I would say that the features available in Trac 0.8 are pretty close to what I would consider core functionality - but that is because I want the total package, one-stop shopping: SCM Issue Tracker/Project Management. I can spare the 50 or 100k of disk space per module, even if I don't use them. 219 245 220 246 If a user doesn't want to use the TracRoadmap or the TracBrowser, etc - then why not have some boolean settings in TracIni to disable their appearance? Its a poor-man's way to eliminate "bloat", but it would keep the current "core" intact. 221 247 248 222 249 ''What benefit is there to maintaining a high level of coupling between the core modules?'' 223 250 … … 235 262 236 263 --James Moger 264 265 ''James, the idea I was trying to get through with this proposal is that modularizing the current core of Trac, while allowing the mechanism to be used for plugging in new or custom functionality, would probably be easier and than developing a well designed plug-in interface, '''and''' come with more benefits.'' --ChristopherLenz