Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 37 Next »

This page contains the current list of the tasks that need to be done as part of the Framework Re-Factor. The goal is the allow volunteers to select a task and provide a patch that will resolve each of the tasks listed. The list of tasks have three degrees of complexity (Difficult, Moderate and Easy) allowing contributors at any level to participate.

To pick up any of these tasks

  1. Add your name to the "Who is working on it" column
  2. Create a JIRA Issue for the task (e.g use the name or area as the title and copy the what needs to be done into the issue description)
  3. Remember to use the trunk as the code source for your re-factor and patch

In order to improve the quality of what is being re-factored, please note that for each task the developer should also:

  • Write unit tests for every line of code being re-factored.

 

REFNAME OR AREAWHAT NEEDS TO BE DONECOMPLEXITYSTATUSWHO IS WORKING ON IT?JIRA MAST ISSUE LINKCOMMENTS
1remove dead importsRemove all unnecessary import statements in all java filesEasyFixedUnknown User (mbrohl) OFBIZ-6971 - Getting issue details... STATUS  
2Fix resource leaks in CommonServices.javaFile1 and file2 should be fixed by closing them in byteBufferTestEasyFixedUnknown User (mbrohl) OFBIZ-6972 - Getting issue details... STATUS  
3Remove deprecated dependencies in EmailServicesorg.ofbiz.common.email.EmailServices.java depends on FoScreenRenderer and HtmlScreenRenderer. Both should be replaced by MacroScreenRenderer.ModerateFixedUnknown User (deepak) OFBIZ-5780 - Getting issue details... STATUS  
4Simplify getChildHRCategoryTreeThe method getChildHRCategoryTree in org.ofbiz.humanres.HumanResEvents is too long and complicated. The business logic can be considerably reduced and simplified. The function should be broken down into multiple private functions to simplify the calls and to create the right level of abstractionModerateFixedKulwant Singh OFBIZ-6986 - Getting issue details... STATUS  
5Add Generics to PaidInOutIn ofbiz.pos.screen.PaidInOut.java the DefaultComboBoxModel is not parameterized. Need to put the right generics in placeModerateIn AtticUnknown User (jleroux) OFBIZ-7804 - Getting issue details... STATUS  
6CommonWorkers.java needs simplifying and cleaning up

Refactor CommonWorkers.java. Lots of code is repetitive and can be factored out into shared private methods. This includes things like:

  • Exception handling
  • Queries
  • Building the return data structures
ModerateIn ProgressMartin Becker OFBIZ-6984 - Getting issue details... STATUS  
7Cleanup FindServices.java

Many problems exist in this file:

  • Commented out code should be removed
  • File is too big, need to be broken down
  • Ugly business logic in most of the functions which can be simplified considerably
  • Delegator code needs to be isolated and side effects kept down to a minimum
Moderate Malin Nicolas OFBIZ-6974 - Getting issue details... STATUS  
7bRefactoring permission service

Homogenise the call to permission service by ModelService.

Clean deprecated code

ModerateIn Progress Malin Nicolas OFBIZ-7113 - Getting issue details... STATUS  
8Parameterize everything in DebugManagedDataSourceGenerics need to be introduced to multiple places. Requires knowledge in commons-poolModerateIn ProgressMartin Becker OFBIZ-7039 - Getting issue details... STATUS  
9XML shared dependencies between accounting and HRMany shared dependencies exist bi-directionally between accounting and HR including screens, entities and other items. All such XML should propagate down to the commonext componentModerate Unknown User (pranayp) OFBIZ-7208 - Getting issue details... STATUS  
10Redesign EntitySaxReader

org.ofbiz.entity.util.EntitySaxReader requires refactoring to achieve the following goals

  • Refactor EntitySaxReader to an interface
  • Create an implementing class
  • Remove all dependencies on Javolution
  • Fix all dependencies in the framework to match the new signature of the interface
  • Delete the javolution library from the framework
DifficultIn ProgressMartin Becker OFBIZ-7040 - Getting issue details... STATUS  
11Redesign org.ofbiz.entity.datasourceAll objects under org.ofbiz.entity.datasource need to be redesigned into an interface model and implemented with concrete classes. Things like the GenericDao should be broken down to many pieces as it is massive, complex, and overly designed (Interface Segregation principle violated)Difficult 

Unknown User (mridulpathak)

Divesh Dutta

  OFBIZ-7210 - Getting issue details... STATUS  
12XML shared dependencies between accounting and orderMany shared dependencies exist bi-directionally between accounting and order including screens, entities and other items. All such XML should propagate down to the commonext componentDifficult Unknown User (pranayp) OFBIZ-7207 - Getting issue details... STATUS  
13Start.javaThis has some problems which are being tackled in JIRA OFBIZ-6783DifficultFixedUnknown User (taher) OFBIZ-6783 - Getting issue details... STATUS  
14Enforce noninstantiability to all Utility classesDesign flaw needs to be fixed on all Utility Classes, discusses over mailing list.ModerateFixed

Rishi Solanki

Unknown User (arunpatidar)

OFBIZ-7272 - Getting issue details... STATUS All

 

Still want to help but in other areas ?

If our current re-factor to do list seem a little too much for you to take on then you can help in other areas too, and a little bit of work quickly adds up.  Please take a look below for some other ideas for helping remove clutter and help clean up the code base.

  • Obsolete / irrelevant comments: anything out of date
  • Commented out code:  it belongs in the version control system
  • Functions with too many arguments: anything beyond 3 arguments is probably too much unless there is a good reason for it.
  • Functions that do too many things - multiple languages in the same text file
  • Big files / Big classes / Big anything really!
  • Duplication and cut-and-paste patterns
  • Mixed levels of abstraction: You can't declare high level stuff like starting the framework with details like flag parsing in the same place. Things should read like a story from high level down to the details. Main calls higher level functions which then call lower functions which executes detailed code.
  • Any concrete class not implementing an interface is probably a code smell, especially if too many dependencies point to it.
  • Cluttered code, sandwiched in an ugly way
  • Pretty much all the Java warnings in the current code base
  • Too much use of the "new" keyword instead of having a proper factory
  • Writing to classes instead of interfaces - Confusing names for classes, functions, and variables. Things should be very clear and simple
  • Confusing test names - Lack of testing for any production code. Ideally, our tests should cover 100% of the code base.
  • Inconsistent formatting conventions. Tabs instead of spaces, wrong number of spaces for indentation, and so on
  • Also, one of the worst things I usually encounter is hidden state. For example, you get hidden state in a Java class if the constructor declares a field that was not passed into the constructor. It makes the declaration hidden and the dependency obscure.

 

 

IMPORTANT: If you have any questions about any of these tasks or need feedback on a proposed patch then please post a message on the development mailing list.

  • No labels