DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
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
- Add your name to the "Who is working on it" column
- 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)
- 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.
| REF | NAME OR AREA | WHAT NEEDS TO BE DONE | COMPLEXITY | STATUS | WHO IS WORKING ON IT? | JIRA MAST ISSUE LINK | COMMENTS |
|---|---|---|---|---|---|---|---|
| 1 | remove dead imports | Remove all unnecessary import statements in all java files | Easy | Fixed | Unknown User (mbrohl) | OFBIZ-6971 - Getting issue details... STATUS | |
| 2 | Fix resource leaks in CommonServices.java | File1 and file2 should be fixed by closing them in byteBufferTest | Easy | Fixed | Unknown User (mbrohl) | OFBIZ-6972 - Getting issue details... STATUS | |
| 3 | Remove deprecated dependencies in EmailServices | org.ofbiz.common.email.EmailServices.java depends on FoScreenRenderer and HtmlScreenRenderer. Both should be replaced by MacroScreenRenderer. | Moderate | Fixed | Unknown User (deepak) | OFBIZ-5780 - Getting issue details... STATUS | |
| 4 | Simplify getChildHRCategoryTree | The 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 abstraction | Moderate | Fixed | Kulwant Singh | OFBIZ-6986 - Getting issue details... STATUS | |
| 5 | Add Generics to PaidInOut | In ofbiz.pos.screen.PaidInOut.java the DefaultComboBoxModel is not parameterized. Need to put the right generics in place | Moderate | ||||
| 6 | CommonWorkers.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:
| Moderate | In Progress | Martin Becker | OFBIZ-6984 - Getting issue details... STATUS | |
| 7 | Cleanup FindServices.java | Many problems exist in this file:
| Moderate | Malin Nicolas | OFBIZ-6974 - Getting issue details... STATUS | ||
| 7b | Refactoring permission service | Homogenise the call to permission service by ModelService. Clean deprecated code | In Progress | Malin Nicolas | OFBIZ-7113 - Getting issue details... STATUS | ||
| 8 | Parameterize everything in DebugManagedDataSource | Generics need to be introduced to multiple places. Requires knowledge in commons-pool | Moderate | In Progress | Martin Becker | OFBIZ-7039 - Getting issue details... STATUS | |
| 9 | XML shared dependencies between accounting and HR | Many shared dependencies exist bi-directionally between accounting and HR including screens, entities and other items. All such XML should propagate down to the commonext component | Moderate | ||||
| 10 | Redesign EntitySaxReader | org.ofbiz.entity.util.EntitySaxReader requires refactoring to achieve the following goals
| Difficult | In Progress | Martin Becker | OFBIZ-7040 - Getting issue details... STATUS | |
| 11 | Redesign org.ofbiz.entity.datasource | All 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 | ||||
| 12 | XML shared dependencies between accounting and order | Many shared dependencies exist bi-directionally between accounting and order including screens, entities and other items. All such XML should propagate down to the commonext component | Difficult | ||||
| 13 | Start.java | This has some problems which are being tackled in JIRA OFBIZ-6783 | Difficult | In Progress | Unknown User (taher) | OFBIZ-6783 - Getting issue details... STATUS |
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.