Edgewall Software

Changes between Version 8 and Version 9 of TracPluggableModules


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

Responding to some of the comments

Legend:

Unmodified
Added
Removed
Modified
  • TracPluggableModules

    v8 v9  
    4848
    4949{{{
     50#!python
    5051class XxxModule(Module):
    5152
     
    7576
    7677{{{
     78#!python
    7779    def get_timeline_events(self, start, to, filters):
    7880        # return a list of TimedEvent objects in the time span delimited
     
    9193
    9294{{{
     95#!python
    9396    def process(self, req):
    9497        # ...
     
    139142
    140143--ChristianBoos
     144
     145''I don't see how the two ideas are complementary, other than both are refactoring discussions.''
     146--ChristopherLenz
    141147
    142148=== Modules and Configurability ===
     
    207213--ChristianBoos
    208214
     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:
     216
     217{{{
     218#!python
     219class 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
     230This is, in my humble opinion, a lot simpler than adding typed extension points and what not.
    209231
    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).
    213235
     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
    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.
    215239
    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.''
    217241
     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
    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.
    219245
    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.
    221247
     248
    222249''What benefit is there to maintaining a high level of coupling between the core modules?''
    223250
     
    235262
    236263--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