Introducing an application framework FormalBears, which is built on BEAR.Sunday and provides new meta for BEAR.Sunday applications.
1 of 21
Download to read offline
More Related Content
The Birth of FormalBears - A new META for BEAR.Sunday applications
1. BEAR.Sunday Meetup #6
April 28 2018
The Birth of FormalBears
A new META for BEAR.Sunday applications
PHP Mentors
Atsuhiro Kubo @iteman
2. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
The Birth of FormalBears
1.META
2.FormalBears
3. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
久保敦啓 (Atsuhiro Kubo)
●
Framework / multi-paradigm / learn
architecture / DCI guy
●
A follower of James Coplien @jcoplien
5. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Open Source Software
●
PEAR/Net_UserAgent_Mobile(2003)
HTTP mobile user agent string parser
●
Piece_Unity(2006)
A Web application framework
●
Workfower(2015)
A BPMN 2.0 workfow engine for PHP
●
FormalBears(2018)
7. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
META
8. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
http://www.hearthstonetopdecks.com/hearthstones-best-standard-ladder-decks/
9. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
The metagame is the mix of
diferent decks that players bring
onto the ladder, that you can
expect to see. If you know what
decks players are bringing, your
deck can be especially good
against ‘the meta’.
― Ben Brode (was Game Director for Hearthstone)
10. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
META from Hearthstone
●
SPITEFUL DRUID
●
SPITEFUL PRIEST
●
QUEST ROGUE
●
QUEST WARRIOR
●
DRAGON PRIEST
●
BIG DRAGON DRUID
●
…
●
META + (HERO) CLASS
11. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
META for applications
●
(RESTful) BEAR.Sunday (vanilla)
●
RESTful Symfony
●
(Confgurable) Symfony (vanilla)
●
Confgurable BEAR.Sunday (FormalBears)
●
Workfower Symfony
●
Workfower BEAR.Sunday (FormalBears)
●
…
●
META + FRAMEWORK
12. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
FormalBears
13. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Confguration Language
# etc/config/modules/framework.yaml
framework:
imports:
- { app: 'OjizoTracking', host: tracking }
scheme_representations:
page: html
16. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Doctrine Integration
// ...
class Foo extends ResourceObject
{
private $defaultEntityManager;
private $specifiedEntityManager;
/**
* @param EntityManagerInterface $defaultEntityManager
* @param EntityManagerInterface $specifiedEntityManager
*
* @Named("specifiedEntityManager=database_entity")
*/
public function __construct(EntityManagerInterface
$defaultEntityManager, EntityManagerInterface $specifiedEntityManager)
{
$this->defaultEntityManager = $defaultEntityManager;
$this->specifiedEntityManager = $specifiedEntityManager;
}
17. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Scheme Representations
# etc/config/modules/framework.yaml
framework:
# ...
scheme_representations:
page: html
app: json
# resource/Page/Foo.php
# ...
/**
* @Representation(“json”)
*/
class Foo extends ResourceObject
{
/**
* @Representation(“xml”)
*/
public function onGet(): ResourceObject
{
18. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Extension Points (Multiple Bindings)
namespace FormalBearsFrameworkModule;
// ...
class FrameworkModule extends AbstractConfigAwareModule
{
// ...
protected function configure()
{
$this->defineExtensionPoint(RenderInterface::class,
RendererProvider::class);
// ...
$this->registerExtension(RenderInterface::class,
JsonRenderer::class, 'json');
// ...
19. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Other Features
●
Workfower Integration
●
DCI Support
●
...
20. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
Currently work in progress…
21. Copyright (c) 2018 Atsuhiro Kubo <kubo@iteman.jp>, All rights reserved.
参考文献
●
Meta - Hearthstone Wiki
https://hearthstone.gamepedia.com/Meta
●
History Of The Meta (Oficial Hearthstone Video)
https://www.youtube.com/watch?v=WZm5v7EEdKQ