Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 filesEasy    
2Fix resource leaks in CommonServices.javaFile1 and file2 should be fixed by closing them in byteBufferTestEasy    
3Remove deprecated dependencies in EmailServicesorg.ofbiz.common.email.EmailServices.java depends on FoScreenRenderer and HtmlScreenRenderer. Both should be replaced by MacroScreenRenderer.Moderate    
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 abstractionModerate    
5Add Generics to PaidInOutIn ofbiz.pos.screen.PaidInOut.java the DefaultComboBoxModel is not parameterized. Need to put the right generics in placeModerate    
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
Moderate    
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    
8Parameterize everything in DebugManagedDataSourceGenerics need to be introduced to multiple places. Requires knowledge in commons-poolModerate    
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    
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
Difficult    
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    
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    
13Start.javaThis has some problems which are being tackled in JIRA OFBIZ-6783DifficultIn ProgressUnknown User (taher)OFBIZ-6783 

 

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.

 

 

Info

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.