Tomas Jelinek has posted comments on this change.

Change subject: webadmin: Network builders
......................................................................


Patch Set 4:

Well, consider the following disadvantages of static utility methods:

- no way to use inheritance (like BaseInitSelectedNetworkBuilder and it's 
children)
- no way of chaining - for example I have the following code:
...builder(
new SetupNetworksBuilder<List<VmNetworkInterface>>(cluster.getId(), false),
new AddNullNetworkBuilder((VDSGroup) getModel().getCluster().getSelectedItem()),
new InitNewSelectedNetworkBuilder(engineNetworkName))
).build(...
...
- anti OOP - clean procedural code

And yes, the InitEditSelectedNetworkBuilder sounds like a method name, because 
it is a step in the chain (like all the builders). Like "new Executor(doA, doB, 
doC).execute()". But the methods are not first class citizens in java, so have 
to be wrapped to classes.

On the other hand, I understand that this network related logic is simple so I 
can extract it to NetworkUtils if you still think it is better. hm?

--
To view, visit http://gerrit.ovirt.org/13918
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icae2963687ad7978c3caa026e7062e7a1937d320
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to