Skip to content

zend framework 2 (zf2) - where to find the default manager config key names

For exampe, you want to add your own controller plugin in the module.config, do you know the key name out of the box? Me neither, but i know where to look.
Open the ModuleManagerFactory and serch for view_helpers to get the spot where and how the configuration array key names are defined.
After this, the adding of your controller plugin is a solveable task :-).

Next Level DevOps And Softwarearchitecture Of A Modern Onlinegame - PHPUserGroup Meetup

Mindworks
Jarrestraße 42A
Hamburg

Next Level DevOps By Ole Michaelis

Preliminary Consideration

  • infrastructure is created by feature (but without clean up or cleaning things up)
  • did a practical training round in admin team for half a year

What Is DevOps?

  • you build it, you run it (until it goes offline)
  • monitor it, automate it, measure/metering it
  • build small tools and services to form an api

How Became A DevOp?

  • extend your development skills
  • learn and do refactoring
  • learn the shell
  • learn the operation system
  • pull deployment with deployment hooks

Softwarearchitecture Of A Modern Onlinegame By Tobias Rojahn

Preliminary Consideration/Requirements

  • crossplattform (mobile and web)
  • realtime game (fast information about status changes)
  • multiplayer (user can influence each other)

Architecture

  • user (request websocket from web server)
  • NodeJS (handles websocket connection to redis and global redis)
  • redis (message queue with push and pull)
  • php worker (long living php process, asks webservices or database, are forkable by using php forking mechanism)
  • if something is calculated by the php worker, the message is pushed in the global redis

The PHP Worker

  • long living workers
  • worker is observing the queue (and event handling) and is pushing the message to the dispatcher
  • each message has a type to push to the right controller
  • dispatcher is using the right controller (with a bunch of internal to external mapping and nearly zero logic)
  • controller is pushing the message to the right domain service (using the right domain objects and/or repositories)
  • controller is working with multiple db views
  • domain service can also call the event dispatcher to trigger other systems (not core systems)

Deamon

  • only creates messages
  • just time controlled game events

Cronjob

  • only creates messages

NodeJS

  • socket (via socket io) replaces session
  • add additional data (with indexes to gain speed) to the socket (via message queues from php)
  • node to php: send all data
  • php to node: a combination of data to all connected sockets
  • forwarding of fitting messages (with removing of internal datas)

Testing

  • API-Tests
    • description
    • ingoing message (test data)
    • outgoing message (expectations)
  • based on fitrues
  • only php layer
  • rollback on each test

Reusability Of Symfony Component - Mindworks

By Oliver
Mindworks
Jarrestraße 42A
Take a look to knpbundles.

Hurdles

  • problem is solved in other language
  • problem is solved in other licence
  • can be solved by design patterns (abstract solution)
  • write a good bundle/component that is general enough takes much more time

Anti-Pattern

Reuseage by copy and paste.

  • decreases maintainability
  • decreases testability
  • violates dry principle

Scenario

  • community web application
  • users seek other users by interests
  • how to input data to easy up matching?

What Do We Need?

  • form widget (js and css based)
  • data transformer (converts format from storage to human readable presentation and back)
  • form type (provides name for form widget, called in FormTypes, gets TagManager injected and defines DataTransformer)
  • Entity Trait (avoid copy and paste)
  • Taggable Subscriber
  • Make it reusable (dedicated bundle, created composer project)
  • Use JavaScript and CSS via "composer component" (see web/bundles, RobLoach/component-installer)

Live Demo

Available on github

web - Rechtswidrige Telefonprotokolle: Deutsche Ermittler belauschten Strafverteidiger

Hamburg - Deutsche Ermittlungsbehörden haben offenbar über Jahre hinweg Telefonate abgehört, die Strafverteidiger mit ihren Mandanten führten. Nach SPIEGEL-Informationen wurden diese Mitschnitte in etlichen Fällen rechtswidrig protokolliert, ausgewertet und zum Teil jahrelang aufbewahrt.

Von einem "elementaren Verstoß gegen unseren Rechtsstaat" sprach der Vizepräsident des Deutschen Anwaltvereins, Ulrich Schellenberg. "In Zeiten, in denen Geheimdienste wie die NSA überall schnüffeln, sind offenbar nicht mal mehr essentielle Berufsgeheimnisse geschützt."
[...]

Quelle

Denkt daran, wenn euch das nächste mal jemand Überwachungstechnik verkauft, die nur zum "Schutze der Kinder" oder "Gegen die Terroristen" eingesetzt werden soll - ein Armutszeugnis und der Beweis, dass unser BKA kein Stück besser ist :-(.