Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 84dd725

Browse files
committed
Added tooling section to document.
1 parent cd6e65f commit 84dd725

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

doc/book/cookbook/factories-vs-abstract-factories.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ classes and implementations; in addition, since requirements are often changing
3535
regularly, this boiler-plate code can be a nuisance.
3636

3737
In such situations, one or more abstract factories — such as the
38-
[ConfigAbstractFactory](../config-abstract-factory.md) or the
38+
[ConfigAbstractFactory](../config-abstract-factory.md), the
39+
[ReflectionBasedAbstractFactory](../reflection-abstract-factory.md), or the
3940
[zend-mvc LazyControllerAbstractFactory](https://docs.zendframework.com/zend-mvc/cookbook/automating-controller-factories/)
4041
— that can handle the bulk of your needs are often worthwhile, saving you
4142
time and effort as you code.
@@ -80,10 +81,18 @@ What it comes down to is which development aspects your organization or project
8081
favor. Hopefully the above arguments detail what tradeoffs occur, so you may
8182
make an appropriate choice.
8283

83-
> ### Tooling
84-
>
85-
> We will likely provide tooling in the future to convert
86-
> `ConfigAbstractFactory` configuration into discrete factory classes in the
87-
> future, allowing you to mitigate the performance issues of using an abstract
88-
> factory when in production. As such, tooling support should also be a
89-
> consideration when deciding on your project strategy.
84+
## Tooling
85+
86+
Starting with 3.2.0, we began offering a variety of [console tools](../console-tools.md)
87+
to assist you in generating both dependency configuration and factories. Use
88+
these to help your code evolve. An expected workflow in your application
89+
development evolution is:
90+
91+
- Usage of the `ReflectionBasedAbstractFactory` as a "catch-all", so that you
92+
do not need to do any factory/dependency configuration immediately.
93+
- Usage of the `ConfigAbstractFactory`, mapped to services, once dependencies
94+
have settled, to disambiguate dependencies, or to list custom services
95+
returning scalar or array values.
96+
- Finally, usage of the `generate-factory-for-class` vendor binary to generate
97+
actual factory classes for your production-ready code, providing the best
98+
performance.

0 commit comments

Comments
 (0)