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 5 Next »

Based on the feedback raised in on the mailing list discussion. http://ofbiz.135035.n4.nabble.com/Framework-Cleanup-Options-Tidy-Up-amp-Refactor-tt4676797.html#none . We would like to start some refactoring work to tidy and clean up areas of the framework.

What is re-factoring?

Refactoring is the cleaning, tidying or improving the existing code yet keeping the same functionality.

Why do we want to do this re-factoring?

Refactoring is something that tends to happen naturally over time as code evolves. We have identified some key areas that could really benefit from an refactoring effort so would like to promote these areas for active clean up and refactor. 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?

Looking at some of the OFBiz code we have identified some of the following:

  • 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

 

 

 

Extending classes from external libraries into the core APIs
- Writing to implementations instead of interfaces
- Files too long
- Different levels of abstractions mixed together
- Poor test coverage, lack of TDD
- Implicit (hidden) dependencies (I dislike this the most)

 

 

Planning and Approach

Include ideas for design philosophy (note from Taher)

need to document our design philosophy for others to consider when writing code. I don't mean just formatting conventions but also things like writing to interfaces, TDD, design rules specific to OFBiz, and so on.

Use of JIRA for tracking work - can use subtasks linked to one overall task ? Open a master issue with macro sub-task, linked to wiki for each conception detai

 

People available to help

Jacques, Taher, Nicolas, Julien, Gil, Sharan, ??? Hotwax team?

 

Initial Approach

Initial Deliverables

Initial Milestones

Milestone / Deliverable Planning and Tracking

Scope

Everything including core API interfaces ?? (Need to clarify this so it is totally clear - what does everything mean??)


Initial Areas for Refactoring

Initial ideas suggested by Taher.


  Refactor Reason / Issue   
1EntitySaxReader EntitySaxReader implements javolution interfaces and looks hideous    
2HtmlFormRendererHtmlFormRenderer is 3000 lines of code and the interfaces it implements
are also huge
   
3 XmlFormRendererXmlFormRenderer does not implement more than half of the methods    
4Dependencies on Deprecated Classes / ConstructorsLots of dependencies on deprecated classes / constructors (e.g.
HtmlScreenRenderer, FoScreenRenderer)
   
5Start.javaLots of dependencies on deprecated classes / constructors (e.g.
HtmlScreenRenderer, FoScreenRenderer)
   
6Implementations with no interfacesImplementations with no interfaces (e.g. TemporalExpression, GroupModel,
Cache, etc ...)
   
      
      
      


 

  • No labels