tami: Closures im Zend Framework

Beitrag lesen

hi,

Ich finde noch: "Reduce your closure usage for factories

It’s common usage in ZF 2 to handle dependencies through the use of closures as factories in the getServiceConfig of your Module.php class. Instead, you’d better use explicit class factories, and set define the factories in the module.config.php file (in the service_manager key). This is slightly more efficient (because closures are instantiated, it’s faster to create a string than a closure), allow you to cache config file (closure are not cacheable), and remove the unreadeable Module.php with tons of closures."

http://www.michaelgallego.fr/blog/2013/01/21/some-tips-to-write-better-zend-framework-2-modules/

und

"However, I prefer factories for mainly readability and maintainability. With factories you don't end up with some massive configuration file with tons of closures all over the place.

Sure, closures are great for rapid development but if you want your code to be readable and maintainable then I'd say stick with factories."

http://stackoverflow.com/questions/19479175/factory-classes-vs-closures-in-zend-framework-2

mfg

tami

0 52

Closures und Rekursion

Tom
  • php
  1. 0
    1UnitedPower
    1. 0
      tami
      1. 0
        1UnitedPower
        • javascript
        1. 0
          tami
    2. 0
      Tom
      1. 0
        tami
      2. 0
        1UnitedPower
        1. 0
          Tom
          1. 0
            tami
  2. 0
    tami
    1. 0

      Closures und Rekursionm, please Pimp my Knowledge

      Tom
      1. 0
        tami
  3. 0
    molily
    1. 0
      Tom
      1. 0
        tami
    2. 0
      Tom
      1. 0
        tami
        1. 0
          Tom
          1. 0
            tami
            1. 0
              tami
              1. 0

                Wann machen Closures in PHP überhaupt Sinn?

                tami
                1. 0
                  Tom
                  1. 0
                    tami
                    1. 0
                      Tom
                      1. 0
                        tami
                2. 0
                  mrjerk
                  1. 0
                    tami
                    1. 0

                      Closures im Zend Framework

                      tami
                      1. 0
                        Tom
                        1. 0
                          tami
                      2. 0
                        tami
                        1. 0
                          tami
                          1. 2
                            1UnitedPower
                            • zu diesem forum
                            1. 0
                              tami
                              1. 0

                                Closures im Zend Framework und bei php.net

                                tami
                                1. 0

                                  Closures im Zend Framework und bei php.net = anonyme Funktionen

                                  tami
                                  • php
                                  1. 0
                                    tami
                    2. 0
                      Tom
                      1. 0
                        tami
            2. 0
              Tom
              1. 0
                tami
              2. 0
                tami
                1. 0
                  Tom
                  1. 0
                    tami
  4. 0

    Closures und Rekursion. into the depth

    Tom
    1. 0
      tami
    2. 0
      1UnitedPower
      1. 0

        Fehler gefunden

        Tom
        1. 0
          1UnitedPower
    3. 0
      Tom
      1. 0

        New messages from "dem schönen Oberharz" (Forumsidee!)

        Matthias Apsel
        • zu diesem forum