You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Anil K Patel (JIRA)" <ji...@apache.org> on 2006/12/01 21:05:24 UTC

[jira] Created: (OFBIZ-512) Unused createCustomer simple methods in CustomerEvents.xml should be removed.

Unused  createCustomer simple methods in CustomerEvents.xml should be removed.
------------------------------------------------------------------------------

                 Key: OFBIZ-512
                 URL: http://issues.apache.org/jira/browse/OFBIZ-512
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: ecommerce, party
            Reporter: Anil K Patel
            Priority: Minor


While working on refactoring of CheckOut process, I came across too many createCustomer simple methods.

Ecommerce component --> CustomerEvents.xml file has simple method with the name createCustomer.

Party component --> CustomerEvents.xml file has simple method with the name createCustomer, This is not called. Most of the code in this method is from createUser simple method in Party component.

New Customer screen in Party uses NewUser form in PartyForms.xml. This Form uses the Field Names that will work with createCustomer simple method. But this form Posts to createCustomer simple method defined in UserEvents.xml file, this simple method is real simple and uses createUser simple method. This makes it clear that Party::CustomerEvents.createCustomer should be removed.

Order::CustomerEvents.createCustomer method is made for custom "custsettings.ftl" file. I think "custsettings.ftl" file can be modified to use Party::UserEvents.createCustomer.  "newcustomer.ftl" file in ecommerce follows naming of fields that works with createCustomer.  In such situation we can remove Order::CustomerEvents.createCustomer method.

We can also remove Ecommerce::CustomerEvents.creatCustomer by pointing request to Party::UserEvents.createCustomer.








-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-512) Unused createCustomer simple methods in CustomerEvents.xml should be removed.

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-512?page=comments#action_12456511 ] 
            
David E. Jones commented on OFBIZ-512:
--------------------------------------

For the various CustomerEvents.xml files I wouldn't be too aggressive about combining them. If the one in the Party Manager isn't used (please verify this better because there is a new customer page in the party manager...) then it can be removed.

In general these may be named similarly but are different forms and different form input processing routines... and they aren't meant to be all the same.

> Unused  createCustomer simple methods in CustomerEvents.xml should be removed.
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-512
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-512
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, party
>            Reporter: Anil K Patel
>            Priority: Minor
>
> While working on refactoring of CheckOut process, I came across too many createCustomer simple methods.
> Ecommerce component --> CustomerEvents.xml file has simple method with the name createCustomer.
> Party component --> CustomerEvents.xml file has simple method with the name createCustomer, This is not called. Most of the code in this method is from createUser simple method in Party component.
> New Customer screen in Party uses NewUser form in PartyForms.xml. This Form uses the Field Names that will work with createCustomer simple method. But this form Posts to createCustomer simple method defined in UserEvents.xml file, this simple method is real simple and uses createUser simple method. This makes it clear that Party::CustomerEvents.createCustomer should be removed.
> Order::CustomerEvents.createCustomer method is made for custom "custsettings.ftl" file. I think "custsettings.ftl" file can be modified to use Party::UserEvents.createCustomer.  "newcustomer.ftl" file in ecommerce follows naming of fields that works with createCustomer.  In such situation we can remove Order::CustomerEvents.createCustomer method.
> We can also remove Ecommerce::CustomerEvents.creatCustomer by pointing request to Party::UserEvents.createCustomer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-512) Unused createCustomer simple methods in CustomerEvents.xml should be removed.

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-512?page=all ]

Chris Howe updated OFBIZ-512:
-----------------------------

    Attachment: createCustomer.patch

createCustomer.patch

I've had pretty good results (read much more reuse) following the pattern used in this patch in my own projects.  I broke up CustomerEvents.xml#createCustomer into their logical groupings in the event that the request map that is currently calling createCustomer in ecommerce cannot call this directly, it will it least be able to call many of the groupings instead of using redundant code in ecommerce.  I generally leave the if tags in the parent method and reassign the variable to a new map but I think it's safe to assume these variables are coming from a form that's containing many variables.

> Unused  createCustomer simple methods in CustomerEvents.xml should be removed.
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-512
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-512
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, party
>            Reporter: Anil K Patel
>            Priority: Minor
>         Attachments: createCustomer.patch
>
>
> While working on refactoring of CheckOut process, I came across too many createCustomer simple methods.
> Ecommerce component --> CustomerEvents.xml file has simple method with the name createCustomer.
> Party component --> CustomerEvents.xml file has simple method with the name createCustomer, This is not called. Most of the code in this method is from createUser simple method in Party component.
> New Customer screen in Party uses NewUser form in PartyForms.xml. This Form uses the Field Names that will work with createCustomer simple method. But this form Posts to createCustomer simple method defined in UserEvents.xml file, this simple method is real simple and uses createUser simple method. This makes it clear that Party::CustomerEvents.createCustomer should be removed.
> Order::CustomerEvents.createCustomer method is made for custom "custsettings.ftl" file. I think "custsettings.ftl" file can be modified to use Party::UserEvents.createCustomer.  "newcustomer.ftl" file in ecommerce follows naming of fields that works with createCustomer.  In such situation we can remove Order::CustomerEvents.createCustomer method.
> We can also remove Ecommerce::CustomerEvents.creatCustomer by pointing request to Party::UserEvents.createCustomer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-512) Unused createCustomer simple methods in CustomerEvents.xml should be removed.

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-512?page=comments#action_12456525 ] 
            
Anil K Patel commented on OFBIZ-512:
------------------------------------

David,

The new Customer page in Party Manager is very generic. It uses same form that is used for Employee etc, which is good. There is similar page newcustomer.ftl in ecommerce, but easier to use.

The new Customer/Employee/Vender etc pages in Party manager have lots of details,  I think if we use ftl for doing such page, they can be made much more friendly. If this is acceptable then I can redo this code.

I created Jira Issue so we can get track the patch as well. In future I'll take care.





> Unused  createCustomer simple methods in CustomerEvents.xml should be removed.
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-512
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-512
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, party
>            Reporter: Anil K Patel
>            Priority: Minor
>
> While working on refactoring of CheckOut process, I came across too many createCustomer simple methods.
> Ecommerce component --> CustomerEvents.xml file has simple method with the name createCustomer.
> Party component --> CustomerEvents.xml file has simple method with the name createCustomer, This is not called. Most of the code in this method is from createUser simple method in Party component.
> New Customer screen in Party uses NewUser form in PartyForms.xml. This Form uses the Field Names that will work with createCustomer simple method. But this form Posts to createCustomer simple method defined in UserEvents.xml file, this simple method is real simple and uses createUser simple method. This makes it clear that Party::CustomerEvents.createCustomer should be removed.
> Order::CustomerEvents.createCustomer method is made for custom "custsettings.ftl" file. I think "custsettings.ftl" file can be modified to use Party::UserEvents.createCustomer.  "newcustomer.ftl" file in ecommerce follows naming of fields that works with createCustomer.  In such situation we can remove Order::CustomerEvents.createCustomer method.
> We can also remove Ecommerce::CustomerEvents.creatCustomer by pointing request to Party::UserEvents.createCustomer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-512) Unused createCustomer simple methods in CustomerEvents.xml should be removed.

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-512?page=comments#action_12455006 ] 
            
Anil K Patel commented on OFBIZ-512:
------------------------------------

Is there a reason why fields in PartyForms::NewUser form are named like USER_FIRST_NAME instead of userFirstName? 
Is it ok of change them to be more consistent with rest of the system?




> Unused  createCustomer simple methods in CustomerEvents.xml should be removed.
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-512
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-512
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, party
>            Reporter: Anil K Patel
>            Priority: Minor
>
> While working on refactoring of CheckOut process, I came across too many createCustomer simple methods.
> Ecommerce component --> CustomerEvents.xml file has simple method with the name createCustomer.
> Party component --> CustomerEvents.xml file has simple method with the name createCustomer, This is not called. Most of the code in this method is from createUser simple method in Party component.
> New Customer screen in Party uses NewUser form in PartyForms.xml. This Form uses the Field Names that will work with createCustomer simple method. But this form Posts to createCustomer simple method defined in UserEvents.xml file, this simple method is real simple and uses createUser simple method. This makes it clear that Party::CustomerEvents.createCustomer should be removed.
> Order::CustomerEvents.createCustomer method is made for custom "custsettings.ftl" file. I think "custsettings.ftl" file can be modified to use Party::UserEvents.createCustomer.  "newcustomer.ftl" file in ecommerce follows naming of fields that works with createCustomer.  In such situation we can remove Order::CustomerEvents.createCustomer method.
> We can also remove Ecommerce::CustomerEvents.creatCustomer by pointing request to Party::UserEvents.createCustomer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-512) Unused createCustomer simple methods in CustomerEvents.xml should be removed.

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-512?page=comments#action_12456509 ] 
            
David E. Jones commented on OFBIZ-512:
--------------------------------------

The form field names are just really old. Changing them while cleaning this stuff up is fine. This sort of message, BTW, should probably go on the dev list rather than in an issue which it is only somewhat related to.

> Unused  createCustomer simple methods in CustomerEvents.xml should be removed.
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-512
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-512
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, party
>            Reporter: Anil K Patel
>            Priority: Minor
>
> While working on refactoring of CheckOut process, I came across too many createCustomer simple methods.
> Ecommerce component --> CustomerEvents.xml file has simple method with the name createCustomer.
> Party component --> CustomerEvents.xml file has simple method with the name createCustomer, This is not called. Most of the code in this method is from createUser simple method in Party component.
> New Customer screen in Party uses NewUser form in PartyForms.xml. This Form uses the Field Names that will work with createCustomer simple method. But this form Posts to createCustomer simple method defined in UserEvents.xml file, this simple method is real simple and uses createUser simple method. This makes it clear that Party::CustomerEvents.createCustomer should be removed.
> Order::CustomerEvents.createCustomer method is made for custom "custsettings.ftl" file. I think "custsettings.ftl" file can be modified to use Party::UserEvents.createCustomer.  "newcustomer.ftl" file in ecommerce follows naming of fields that works with createCustomer.  In such situation we can remove Order::CustomerEvents.createCustomer method.
> We can also remove Ecommerce::CustomerEvents.creatCustomer by pointing request to Party::UserEvents.createCustomer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira