Edgewall Software

Changes between Version 8 and Version 9 of TracPluggableModules

Nov 22, 2004, 1:55:17 PM (18 years ago)
Christopher Lenz

Responding to some of the comments


  • TracPluggableModules

    v8 v9  
    5051class XxxModule(Module):
    7779    def get_timeline_events(self, start, to, filters):
    7880        # return a list of TimedEvent objects in the time span delimited
    9396    def process(self, req):
    9497        # ...
     145''I don't see how the two ideas are complementary, other than both are refactoring discussions.''
    142148=== Modules and Configurability ===
     215I 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:
     219class TicketCommentsInTimeline(Module):
     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 []
     226    def get_timeline_filters(self):
     227        return [ ('comments', 'Ticket comments') ]
     230This is, in my humble opinion, a lot simpler than adding typed extension points and what not.
    210232== Identity Crisis? ==
    212234Eclipse 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).
     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
    214238Trac, 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.
    216240''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.''
     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
    218244I 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.
    220246If 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.
    222249''What benefit is there to maintaining a high level of coupling between the core modules?''
    236263--James Moger
     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