[
https://issues.apache.org/jira/browse/OFBIZ-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15300278#comment-15300278 ]
Taher Alkhateeb commented on OFBIZ-6783:
----------------------------------------
I agree totally, things should be fixed, but one thing at a time as you said.
My main focus right now is on the startup logic. I believe ofbiz can be much faster not only in startup time but in operation if we untangle all the messy startup logic.
I think once we sort out all the startup logic and the problems the way multi-threading is handled then many bugs would disappear or get fixed on the way. Multi-threading bugs can lurk for years without being detected. That's why the world is moving to functional languages, but that's another topic altogether.
Also, I really believe we cannot fix bugs if we don't understand the code, and the code in many places right now is not understandable. There is sooooooooooooooooooooooooo much hidden state that makes things impossible to debug. Refactoring code is the KEY, to even begin tackling these bugs.
Anyway, good to know I didn't set anything on fire so far
> Refactor the start component
> ----------------------------
>
> Key: OFBIZ-6783
> URL:
https://issues.apache.org/jira/browse/OFBIZ-6783> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: Upcoming Branch
> Reporter: Taher Alkhateeb
> Assignee: Taher Alkhateeb
> Labels: framework, main, refactoring, start
> Attachments: OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, StartCommandUtil.java, error.log, ofbiz.log
>
>
> Looking at the main method and design of Start.java and the start component overall looks ugly. The things I would like to fix so far are:
> - the files are too long
> - some variables are not even needed (loaderArgs?)
> - the level of abstraction is wrong
> - main throws an exception!
> - the arguments processing logic is terrible, need to move it to commons-cli
> It's just so messy and ugly to look at. So for me refactoring starts at Start! Given that this is an important component, I will provide a patch to be reviewed by the community before committing just to be on the safe side.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)