...
Refactoring is the cleaning, tidying or improving the existing code yet keeping the same functionality. If you want to know more, here you go!
Why do we want to do this re-factoring?
...
The key benefits of any refactor is cleaner, neater and simpler code.
What sort of issues have been identified that the re-factoring could help with?
...
- Some of the classes have been extended from external libraries into the Core APs
- Some of the files are too long
- Different levels of abstractions are mixed together
- Poor test coverage, lack of Test Driven Development
- Implicit (hidden) dependencies
Planning and Approach
The re-factor covers the whole OFBiz code base so we need a simple approach that makes it easy for people to pick up, re-factor and improve an area. This means that we probably wont be able to run it as a traditional linear project. Instead we will look to highlight areas of work where the community can help.
Main Approach
- Identify a list of 5 possible key re-factoring areas
- Ask the Community for volunteers to help re-factor in these 5 selected areas
- As one area is completed, top up the list of 5 with another area
- Use of JIRA for tracking work (e.g open a master issue for each area identified and include individual sub-tasks)
Reasoning
- A short list of 5 is good number to highlight the key areas
- A list will help focus the community
People Available to Help
If you are interested in being part of the working group on this please add your details to the table below.
Name | Contact Details | Location |
---|---|---|
Taher Alkhateeb | taher at apache dot org | Kuwiait |
Jacques Le Roux | jleroux at apache dot org | France |
Nicolas Malin | nmalin at apache dot org | France |
Julien Nicolas | jnicolas at apache dot org | France |
Gil Portenseigne | pgil at apache dot org | France |
Sharan Foga | sharan at apache dot org | Czech Republic |
Hotwax Team ?? | ||
Current Top 5 Re-factoring Focus Areas
AREA | REASON FOR RE-FACTOR | STATUS | WHO IS WORKING ON IT? | JIRA MASTER ISSUE LINK | COMMENTS | |
---|---|---|---|---|---|---|
1 | EntitySaxReader | EntitySaxReader implements javolution interfaces and looks hideous | ||||
2 | HtmlFormRenderer | HtmlFormRenderer is 3000 lines of code and the interfaces it implements are also huge | ||||
3 | XmlFormRenderer | XmlFormRenderer does not implement more than half of the methods | ||||
4 | Dependencies on Deprecated Classes / Constructors | Lots of dependencies on deprecated classes / constructors (e.g. HtmlScreenRenderer, FoScreenRenderer) | ||||
5 | Start.java | Lots of dependencies on deprecated classes / constructors (e.g. HtmlScreenRenderer, FoScreenRenderer) | In Progress | Taher Alkhateeb |
It looks like a lot of work - is it worth it?
Yes, it will be a lot of work . There are a lot of areas that could do with re-factoring but if we can engage the community to help then this workload can be shared.
Yes, we do believe that it is worth the effort. The main benefit will be a cleaner, tidier code base that will allow us a lot the flexibility to grow and interface to a range of technologies easily.
Want to help?
Add your coordinates to the Current Team.
Take a look at:
- the Project Approach for details about what how we want to achieve the re-factor and;
- the Current Re-Factor To Do List for a list of the tasks that need doing.
If you see a task that someone has taken on that you would like to work on, contact the person to see how you can help.
If you see a task that is not assigned that you want to start, put your name down and create a JIRA to start the task if one has not already been created.
If you see a task from the list of other things that need doing, that you want to work on, add it to the table of activities, create a JIRA and assign it to yourself.
If you decide to get involved
If after you've taken a look at what we want to do and you are keen to help then please read the section on coding practices. One of the goals of the re-factoring is to improve the quality of the design and code.
The application of modern coding practices and design patterns is the key to achieving these goals.
Not sure where to start? Need more information?
If you'd like to help out but are not sure where to start then please contact our development mailing list or leave a comment on this page...