Petals CDK

Add a context to the component

Details

  • Type: Improvement Request Improvement Request
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 5.1
  • Fix Version/s: None
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    Note : This entry is an design pattern proposal, please comment.

    A component developer generally instanciates classes and pass AbstractComponent, Loggers and more to the constructor. AbstractComponent is then casted into the implementation and logger instance is propagated from class to class which drive us to a very poor application design.
    In order to avoid this type of design, I suggest that the CDK provides sort of context which can be easily retrieved from any component class without any cast need where the component class instance, the logger, the SUManager are available.

    Show
    Note : This entry is an design pattern proposal, please comment. A component developer generally instanciates classes and pass AbstractComponent, Loggers and more to the constructor. AbstractComponent is then casted into the implementation and logger instance is propagated from class to class which drive us to a very poor application design. In order to avoid this type of design, I suggest that the CDK provides sort of context which can be easily retrieved from any component class without any cast need where the component class instance, the logger, the SUManager are available.
  • Environment:
    *

Activity

Mathieu Carrolle made changes - Fri, 1 Oct 2010 - 10:08:18 +0200
Field Original Value New Value
Affects Version/s 5.1 [ 10134 ]
Affects Version/s 5.0.4 [ 10077 ]
Priority Blocker [ 1 ]
Mathieu Carrolle made changes - Thu, 4 Nov 2010 - 14:29:08 +0100
Priority Blocker [ 1 ] Minor [ 4 ]
Victor NOËL made changes - Fri, 19 Jun 2015 - 17:08:55 +0200
Status New [ 10000 ] Open [ 10002 ]
Assignee Mathieu Carrolle [ mcarrolle ] Victor NOËL [ vnoel ]
Hide
Victor NOËL added a comment - Fri, 19 Jun 2015 - 17:09:54 +0200

And particularly, new Logger should be created (using getLogger(...) from the ComponentContext or delegating to it) for each classes instead of sharing the Logger instance.

Show
Victor NOËL added a comment - Fri, 19 Jun 2015 - 17:09:54 +0200 And particularly, new Logger should be created (using getLogger(...) from the ComponentContext or delegating to it) for each classes instead of sharing the Logger instance.
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
1751d 23h 36m
1
Victor NOËL
Fri, 19 Jun 2015 - 17:08:55 +0200



People

Dates

  • Created:
    Wed, 1 Sep 2010 - 17:32:41 +0200
    Updated:
    Fri, 19 Jun 2015 - 17:09:54 +0200