--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/AFFDB8E9-EC20-4CC4-AF48-2BE651ECD32A%40gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/xC1CCjtyVnw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAGOJM6KHsB_tNhz2CB11q%3Dq-kZBXDWxbk6RpTVF2Zp8KQwd5dg%40mail.gmail.com.
Woody,
Use a callback. As in a function.
You the have a file of route handlers, which incidentally are basically identical to your controller anyway. Or if you want more organization, organize the functions in multiple files. The question that it raises is why do controllers need to be objects, if you are never using them polymorphically.
Anthony
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/75526edd-3191-46ed-a126-a5a2e8b5374a%40googlegroups.com.
@Jan this is standardizing a locator, not an injector: you are missing the point, and you didn't read the thread.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/05e09a0f-dc81-461e-bb82-178b1d1a807a%40googlegroups.com.
Hi list!
Hi list!
@Marco: I know that it is standardizing the "locator", I've read the thread, I didin't miss the point and I made many points about serious concerns of this PSR.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/3745fd3c-1b2d-44f2-8c1f-3deb7d2bf6c4%40googlegroups.com.
Hi list!
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/d60cf2fd-337b-480a-8dac-423dc6c37705%40googlegroups.com.
I agree with Jan. The only real benefit I see from this standard is using multiple containers side-by-side, and I don't understand why anyone would want to do that.
On 3 June 2015 at 15:05, Bernhard Schussek <bsch...@gmail.com> wrote:I agree with Jan. The only real benefit I see from this standard is using multiple containers side-by-side, and I don't understand why anyone would want to do that.
That's the actual use-case: we got a load of meta-packages (Bundles/Modules/Extensions) that just provide service bindings for specific frameworks.
Are you sure about the "Interface" in the interface class name? I mean, there is no ArrayAccessInterface as far as I know.
Especially as a get() method requires a name, which would then also need to be standardized which seems quite unrealistic.
So, I agree that we should get rid of these meta-packages, but I don't think we can get rid of duplicated DI configuration. Instead, a package could contain multiple configuration files/classes for different DI containers. If you use the package, you'll load the adequate configuration for the DI container of your app.
In the worst case you could have something like 4 or 5 containers running side by side. One single DI container can be highly optimized, but multiple parallel ones can't.
Premature optimisation is the root of all evil.
Hi list!
So PSR-7 being finally accepted, time to focus on other would-be PSRs :)
I proposed in February to move container-interop to the PHP-FIG.
Since then, I have had a chance to talk with a number of PHP community members, and to gather some feedback.
Using this, I wrote a first pre-draft version of a "PSR-Container":
- Container interface
- Meta document
Paul M. Jones agreed to be the coordinator for this PSR and Jeremy Lindblom will act as the second sponsor.
Also, adoption of container-interop has kept improving, with Aura.DI being a fully compatible implementation, and the next release of Slim (the HTTP micro router) being container agnostic, thanks to container-interop.
Finally (although a bit off-topic) I wrote a small article explaining why PSR-7 and PSR-Container are a perfect match for designing framework agnostic modules
I'd be very interested into gathering as much feedback as possible from this pre-draft (although we already gathered a lot), and then, Paul can hopefully open the entrance vote.
Best regards,
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/E4CAA15F-7BF7-4039-B37F-E5EE872ABA6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Especially as a get() method requires a name, which would then also need to be standardized which seems quite unrealistic.
Definitely, standardizing names seems unrealistic. There is a big gap between container based on auto-wiring and containers based on configuration files. But you can use aliases to go around this problem.
Furthermore, if your container does not support aliasing, you can add it using the ContainerInterface.
Have a look at this pet project: https://github.com/thecodingmachine/alias-container
It's a simple class that takes a container in parameter and adds aliasing support.
Using the ContainerInterface, you can extend existing containers with additional behaviour (another use case we have not yet spoke about).
Think about adding aliasing capabilities, or lazy loading capabilities to an existing container that does not provide those.....
Hi list!
So PSR-7 being finally accepted, time to focus on other would-be PSRs :)
I proposed in February to move container-interop to the PHP-FIG.
Since then, I have had a chance to talk with a number of PHP community members, and to gather some feedback.
Using this, I wrote a first pre-draft version of a "PSR-Container":
- Container interface
- Meta document
Paul M. Jones agreed to be the coordinator for this PSR and Jeremy Lindblom will act as the second sponsor.
Also, adoption of container-interop has kept improving, with Aura.DI being a fully compatible implementation, and the next release of Slim (the HTTP micro router) being container agnostic, thanks to container-interop.
Finally (although a bit off-topic) I wrote a small article explaining why PSR-7 and PSR-Container are a perfect match for designing framework agnostic modules
I'd be very interested into gathering as much feedback as possible from this pre-draft (although we already gathered a lot), and then, Paul can hopefully open the entrance vote.
It is important to distinguish the two usages of a container:
Most of the time, those two sides are not used by the same party. While it is often end users who tend to configure entries, it is generally the framework that fetches entries to build the application.
This is why
this interface focuses only on how entries can be fetched from a
container.
-----
Hi list!
So PSR-7 being finally accepted, time to focus on other would-be PSRs :)
I proposed in February to move container-interop to the PHP-FIG.
Since then, I have had a chance to talk with a number of PHP community members, and to gather some feedback.
Using this, I wrote a first pre-draft version of a "PSR-Container":
- Container interface
- Meta document
Paul M. Jones agreed to be the coordinator for this PSR and Jeremy Lindblom will act as the second sponsor.
Also, adoption of container-interop has kept improving, with Aura.DI being a fully compatible implementation, and the next release of Slim (the HTTP micro router) being container agnostic, thanks to container-interop.
Finally (although a bit off-topic) I wrote a small article explaining why PSR-7 and PSR-Container are a perfect match for designing framework agnostic modules
I'd be very interested into gathering as much feedback as possible from this pre-draft (although we already gathered a lot), and then, Paul can hopefully open the entrance vote.
Best regards,
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/cacd0fc6-624c-4b2e-8343-77089bb8d166%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/7aa880e7-3d9e-42a5-821c-c1926f9b31ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I am against standardizing a container interface because we would be implicitly endorsing the use of containers in application code (passing around containers), which is a bad practice. I would rather see FIG create a standard around configuring a container (i.e. Symfony's ContainerBuilder et al), so libraries could ship with one class that would add services to whatever container you are using in your application.
> My Program A uses Library B, C, D. Each of which have their own container.
This is the problem with the current proposal. It assumes that libraries having a container is okay, when libraries being aware of a container is an anti-pattern.
JNDI ( http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface ) was largely successful and is very useful despite being (basically) a locator standardization.
2015-06-11 18:46 GMT+02:00 Marco Pivetta <ocra...@gmail.com>:JNDI ( http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface ) was largely successful and is very useful despite being (basically) a locator standardization.I don't think this is comparable. In a Java container (server), a service (generally) remains started once you start it. Accessing that service via a name makes a lot of sense.With PHP's shared-nothing architecture, you can't have that. We need to take much more care that the bootstrapping of an application is as efficient as possible.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/xC1CCjtyVnw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CADyq6s%2BPb04yaKdoaoqX6Diw3KLzdG7Vkp_ZtrLWFdH%2BT4hf1g%40mail.gmail.com.
If only 5% of requests require an email, than only 5% of your
responding classes (controller or domain or whatever pattern you use)
should contain a reference to EmailSubsystem.
Again, this is just another example of how a DI container can be
abused and become an anti-pattern.