docs: add What is Factories?

This commit is contained in:
kenjis 2022-04-04 12:37:48 +09:00
parent e9e0bc1692
commit 99e5e0a2fb
No known key found for this signature in database
GPG Key ID: BD254878922AF198

View File

@ -9,8 +9,13 @@ Factories
Introduction
============
Like ``Services``, ``Factories`` are an extension of autoloading that helps keep your code
concise yet optimal, without having to pass around object instances between classes. At its
What is Factories?
------------------
Like :doc:`./services`, **Factories** are an extension of autoloading that helps keep your code
concise yet optimal, without having to pass around object instances between classes.
At its
simplest, Factories provide a common way to create a class instance and access it from
anywhere. This is a great way to reuse object states and reduce memory load from keeping
multiple instances loaded across your app.