Modularity in OO
Speaking on modularity and repeatability of OO flow design, I am wondering if you guys can help me with this:
what is the best/quickest way to build say a module/subflow, which will get as an input (from user, or from file) the list of e.g. URLs, or server_names, or something else - and outputing it as one-by-one item to some other process/subflow?
Any example I can look?
Thanks a lot!
Not sure what you mean ... you mean taking a list of something like this:
And the iterating over the values feeding them one by one into a subflow or step ?
If that's what you're asking about use "List Iterator".
Saying the modularity I am actually asking about the structure of flows, e.g. If our flow is an execution of some process, which has components, such get variables, check target servers status, verify some specific service, or some flag of processes server has, run scripts, start some gathering data from the server or DB, create some report, connect to DB and fill some tables with that report, or something like that. So basically pretty complicated process.
But it might be broken down by many subflows, which could be standard for any further usage. That what I called modularity.
So, my rephrased question is: Do you have something done? some special modules (beside of native HPOO library)?
You can write special flows for general purposes. For example, for general logging and sending log data, or for calling a web service via http post method, you can write general sub flows. But I think it depends on the flows that you do.
For complex processes/flows you should write subflows for every workgroup. I mean if you have a loop in your flow and in the loop if you do many thing it s better you write a subflow for steps in the loop. It makes the flow readable and modular.
We should think this like object-oriented programming. If something is useable for general purpose, we should make it as possible as modular.