[jira] [Updated] (OFBIZ-6783) Refactor the start component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-6783) Refactor the start component

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Taher Alkhateeb updated OFBIZ-6783:
-----------------------------------
    Attachment: OFBIZ-6783.patch

Ok,

I made one more change but it suddenly made the code much clearer to me and makes more sense.

What this new patch achieves is everything in the previous patch plus adding a new class called AdminPortClient.

What is AdminPortClient? It's everything communicated to the OFBiz server through network, not directly.

This means that everything relating to controlling OFBiz directly happens through StartupControlPanel such as start, stop or init for the server, and everything which happens indirectly through the network (by an admin client) is done through the AdminPortClient (which talks to AdminPortThread)

This makes the code understandable and really nice on the eyes. Now the whole start component makes sense in a way and you understand the parts of the system and how they talk to each other.

I look forward to your feedback.

> 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-hiddenfiles.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, 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)