Google Developers Group
#Incheon
PHP7vs Python3
benchmarksgame.alioth.debian.org/u64q/php.html
언어 자체가 빠르다고 해도,
PHP는 매 리퀘스트마다 프로그램을 처음부터 실행해야해서,
서버 성능은 더 느려요 (아마도?).
31.
Google Developers Group
#Incheon
기존PHP와 다른 패러다임의 프로젝트
- React PHP : Event Driven, Non Blocking
- Icicle PHP : Coroutine
- PocketMine-MP : Pthreads
<?php
use WanduFoundationApplication;
use WanduFoundationDefinitionsNeedInstallDefinition;
useWanduFoundationKernelsConsoleKernel;
require_once __DIR__ . '/vendor/autoload.php';
$definePath = getcwd() . '/.wandu.php';
$definition = require $definePath;
$app = new Application(new ConsoleKernel($definition));
$app->instance('base_path', __DIR__);
exit($app->execute());
index.php에서 한번!
41.
<?php
namespace WanduFoundationKernels;
use SymfonyComponentConsoleApplicationas SymfonyApplication;
use WanduConfigConfig;
use WanduConfigContractsConfigInterface;
use WanduConsoleDispatcher;
use WanduDIContainerInterface;
use WanduFoundationApplication;
use WanduFoundationContractsDefinitionInterface;
use WanduFoundationContractsKernelInterface;
class ConsoleKernel implements KernelInterface
{
/** @var WanduFoundationContractsDefinitionInterface */
protected $definition;
public function __construct(DefinitionInterface $definition)
{
$this->definition = $definition;
}
/**
* {@inheritdoc}
*/
public function boot(ContainerInterface $app)
{
$app->instance(Config::class, new Config($this->definition->configs()));
$app->alias(ConfigInterface::class, Config::class);
$app->alias('config', Config::class);
$this->definition->providers($app);
}
Google Developers Group
#Incheon
의존성주입 / Mocking
- “프로그래밍에서 구성요소간의 종속성을 소스코드에서 설정하
지 않고 외부의 설정파일 등을 통해 컴파일 시점이나 실행 시점
에 주입하도록 하는 디자인 패턴 중의 하나이다.”
- modernpug.github.io/php-the-right-way/#dependency_injection
Google Developers Group
#Incheon
Laravel주요 기능
- Active Record 방식의 ORM 제공.
- 가상 개발환경 Homestead 제공.
- Front End Build 도구인 Elixir 제공. (Sass, Babel …)
- Social Login 92개 제공. (Socialite)
- Storage 지원. (Amazon S3, Rackspace …)
- Queue 지원. (Beanstalkd, Amazon SQS, Redis …)
- Mail 지원. (Mailgun, Mandril, Amazon SES …)
Google Developers Group
#Incheon
더궁금하다면?
- Modern PHP User Group
- www.modernpug.org
- PHP : The Right Way 한글판
- modernpug.github.io/php-the-right-way
- Composer 한국어 메뉴얼
- xpressengine.github.io/Composer-korean-docs