26. SPA (Single Page Application)
26
- Wikipedia
A single-page application (SPA) is a web application or web site that fits
on a single web page with the goal of providing
a more fluid user experience akin to a desktop application
웹 어플리케이션
데스크탑 어플리케이션과 같은
사용자 경험을 제공
28. SPA (Single Page Application)
28
Lots of people use React as the V in
MVC. Since React makes no
assumptions about the rest of your
technology stack, it's easy to try it out
on a small feature in an existing
project.
JUST UI
React abstracts away the DOM from
you, giving a simpler programming
model and better performance. React
can also render on the server using
Node, and it can power native apps
using React Native.
Virtual DOM
React implements one-way reactive
data flow which reduces boilerplate
and is easier to reason about than
traditional data binding.
DATA FLOW
https://facebook.github.io/react/
43. Composer & Packagist
43
Composer is a brilliant dependency manager for PHP. List
your project’s dependencies in a composer.json file and,
with a few simple commands, Composer will automatically
download your project’s dependencies and setup
autoloading for you.
There are already a lot of PHP libraries that are compatible
with Composer, ready to be used in your project. These
“packages” are listed on Packagist, the official repository
for Composer-compatible PHP libraries.
composer require phpunit/phpunit
48. Event System with Queued Job
48
Laravel's events provides a simple observer implementation,
allowing you to subscribe and listen for events in your application
Events and Queues
49. <?php
class documentController extends document
{
function insertDocument()
{
// Insert data into the DB
$output = executeQuery('document.insertDocument', $obj);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
ModuleHandler::triggerCall('document.insertDocument', 'before', $obj);
}
Event System (XE 1 Trigger)
49
50.
class DocumentHandler
{
public function insertDocument($doc)
{
$this->insertDoc($doc);
Event::fire(new DocumentInserted($doc));
return $doc;
}
Event System (Laravel)
50
.
.
.
51. class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
ArticleWasDeleted::class => [
DeleteArticleUser::class,
RemoveFileFromStorage::class,
WebhookQueueSender::class,
DeleteArticleCodes::class,
DeleteArticleFiles::class,
DeleteArticleLinks::class,
DeleteArticleTags::class,
DeleteArticleVotes::class,
DeleteArticleChildren::class
],
Event System (Laravel)
51
웹훅도 날려야하고..
클라우드서버에서 파일도 삭제해야하고..
자식 댓글도 삭제해야하니..
Recursive하게 다시 파일을 삭제하고..
53. class DeleteArticleFiles implements ShouldQueue
{
use InteractsWithQueue;
/** @var Log */
private $log;
/** @var FileRepositoryInterface */
private $articleFiles;
Event System with Queued Job
53
ShouldQueue 인터페이스 상속만으로 비동기 작업 처리
.
.
.
55. Cloud File System
55
Filesystem / Cloud Storage
The Laravel Flysystem integration provides simple to use drivers for working with local
filesystems, Amazon S3, and Rackspace Cloud Storage.
73. XE3로 시작하는 웹서비스 장점
73
• 전세계 수 많은 사용자로부터 검증된 프레임워크 기반 오픈 소스 코드
• 개발 비용 최소화 (XE 패키지 활용, 서비스 개발 기간 단축)
• 서드 파티 모듈을 활용하여 서비스 자체 컨텐츠에 집중할 수 있다.
• 테스팅을 통한 안정적인 배포및 서비스 운영 가능하다.