FAQ
Refactoring class generator classes
-----------------------------------

Key: CAY-926
URL: https://issues.apache.org/cayenne/browse/CAY-926
Project: Cayenne
Issue Type: Improvement
Components: Cayenne Core Library
Affects Versions: 3.0
Reporter: Andrus Adamchik
Assignee: Andrus Adamchik
Priority: Minor
Fix For: 3.0


I am going to do some renaming and code refactoring to make class generator code easier to extend. Here is a few points I am planning to work on:

1. Naming. CayenneGenerator, ClassGenerator, MapClassGenerator are all independent classes, none inheriting from each other. Just by looking at the name , it is impossible to tell that CayenneGenerator is an ant task, ClassGenerator is a template processor, and MapClassGenerator is a controller for multiple templates

2. Version 1.1 vs. version 1.2... Ideally we should get rid of the versions, but for now it would be nice to may be nice to just split different version handlers into different subclasses... Don't have a clear idea yet how to do it...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Anonymous at Dec 2, 2007 at 2:31 pm
    [ https://issues.apache.org/cayenne/browse/CAY-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12610 ]

    Kevin Menard commented on CAY-926:
    ----------------------------------

    While I agree that the ant class name could be better named, just be careful with that one. Renaming the class could break a lot of existing code as the fully qualified name is apt to be specified to load the task.
    Refactoring class generator classes
    -----------------------------------

    Key: CAY-926
    URL: https://issues.apache.org/cayenne/browse/CAY-926
    Project: Cayenne
    Issue Type: Improvement
    Components: Cayenne Core Library
    Affects Versions: 3.0
    Reporter: Andrus Adamchik
    Assignee: Andrus Adamchik
    Priority: Minor
    Fix For: 3.0


    I am going to do some renaming and code refactoring to make class generator code easier to extend. Here is a few points I am planning to work on:
    1. Naming. CayenneGenerator, ClassGenerator, MapClassGenerator are all independent classes, none inheriting from each other. Just by looking at the name , it is impossible to tell that CayenneGenerator is an ant task, ClassGenerator is a template processor, and MapClassGenerator is a controller for multiple templates
    2. Version 1.1 vs. version 1.2... Ideally we should get rid of the versions, but for now it would be nice to may be nice to just split different version handlers into different subclasses... Don't have a clear idea yet how to do it...
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Andrus Adamchik at Dec 2, 2007 at 2:37 pm
    That's been taken care of by deprecating CayenneGenerator and making
    it a subclass of new CayenneGeneratorTask. The rest of the classes are
    sort of private to the framework (the only known external user of this
    API is WOProject wogen task), and anyways, I am following the
    deprecation path in almost all cases.

    Andrus

    On Dec 2, 2007, at 4:30 PM, Kevin Menard (JIRA) wrote:


    [ https://issues.apache.org/cayenne/browse/CAY-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
    #action_12610 ]

    Kevin Menard commented on CAY-926:
    ----------------------------------

    While I agree that the ant class name could be better named, just be
    careful with that one. Renaming the class could break a lot of
    existing code as the fully qualified name is apt to be specified to
    load the task.
    Refactoring class generator classes
    -----------------------------------

    Key: CAY-926
    URL: https://issues.apache.org/cayenne/browse/CAY-926
    Project: Cayenne
    Issue Type: Improvement
    Components: Cayenne Core Library
    Affects Versions: 3.0
    Reporter: Andrus Adamchik
    Assignee: Andrus Adamchik
    Priority: Minor
    Fix For: 3.0


    I am going to do some renaming and code refactoring to make class
    generator code easier to extend. Here is a few points I am planning
    to work on:
    1. Naming. CayenneGenerator, ClassGenerator, MapClassGenerator are
    all independent classes, none inheriting from each other. Just by
    looking at the name , it is impossible to tell that
    CayenneGenerator is an ant task, ClassGenerator is a template
    processor, and MapClassGenerator is a controller for multiple
    templates
    2. Version 1.1 vs. version 1.2... Ideally we should get rid of the
    versions, but for now it would be nice to may be nice to just split
    different version handlers into different subclasses... Don't have
    a clear idea yet how to do it...
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Kevin Menard at Dec 2, 2007 at 2:48 pm
    Good stuff. I was pretty sure I wasn't telling you anything you already
    knew, but decided to be safe than sorry.

    --
    Kevin

    On 12/2/07 9:37 AM, "Andrus Adamchik" wrote:

    That's been taken care of by deprecating CayenneGenerator and making
    it a subclass of new CayenneGeneratorTask. The rest of the classes are
    sort of private to the framework (the only known external user of this
    API is WOProject wogen task), and anyways, I am following the
    deprecation path in almost all cases.

    Andrus

    --
    Kevin Menard
    Servprise International, Inc.
    Remote reboot & power control for network equipment
    www.servprise.com +1 508.892.3823 x308
  • Anonymous at Dec 2, 2007 at 11:03 pm
    [ https://issues.apache.org/cayenne/browse/CAY-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12612 ]

    Andrus Adamchik commented on CAY-926:
    -------------------------------------

    this is done except for switching the modeler to the new class generation mechanism.
    Refactoring class generator classes
    -----------------------------------

    Key: CAY-926
    URL: https://issues.apache.org/cayenne/browse/CAY-926
    Project: Cayenne
    Issue Type: Improvement
    Components: Cayenne Core Library
    Affects Versions: 3.0
    Reporter: Andrus Adamchik
    Assignee: Andrus Adamchik
    Priority: Minor
    Fix For: 3.0


    I am going to do some renaming and code refactoring to make class generator code easier to extend. Here is a few points I am planning to work on:
    1. Naming. CayenneGenerator, ClassGenerator, MapClassGenerator are all independent classes, none inheriting from each other. Just by looking at the name , it is impossible to tell that CayenneGenerator is an ant task, ClassGenerator is a template processor, and MapClassGenerator is a controller for multiple templates
    2. Version 1.1 vs. version 1.2... Ideally we should get rid of the versions, but for now it would be nice to may be nice to just split different version handlers into different subclasses... Don't have a clear idea yet how to do it...
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Anonymous at Dec 4, 2007 at 10:26 pm
    [ https://issues.apache.org/cayenne/browse/CAY-926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Andrus Adamchik closed CAY-926.
    -------------------------------

    Resolution: Fixed
    Refactoring class generator classes
    -----------------------------------

    Key: CAY-926
    URL: https://issues.apache.org/cayenne/browse/CAY-926
    Project: Cayenne
    Issue Type: Improvement
    Components: Cayenne Core Library
    Affects Versions: 3.0
    Reporter: Andrus Adamchik
    Assignee: Andrus Adamchik
    Priority: Minor
    Fix For: 3.0


    I am going to do some renaming and code refactoring to make class generator code easier to extend. Here is a few points I am planning to work on:
    1. Naming. CayenneGenerator, ClassGenerator, MapClassGenerator are all independent classes, none inheriting from each other. Just by looking at the name , it is impossible to tell that CayenneGenerator is an ant task, ClassGenerator is a template processor, and MapClassGenerator is a controller for multiple templates
    2. Version 1.1 vs. version 1.2... Ideally we should get rid of the versions, but for now it would be nice to may be nice to just split different version handlers into different subclasses... Don't have a clear idea yet how to do it...
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedDec 2, '07 at 12:47p
activeDec 4, '07 at 10:26p
posts6
users3
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase