생애 첫 php 프레임워크 작업에서 Laavel이 아닌 Slim3을 선택한 이유

11028 단어 PHPSlim3

카탈로그


Slim3_PHP Advent Calendar 2018
여기서부터 순서대로 쫓아라.
  • 지난번
  • php 프레임워크 Slim3 가져오기 전에 Composier 가져오기
  • 다음
  • PHP의 Slim3로 Hello World를 빠르게 보여주세요.
  • 왜 슬림 3이야?


    ※ 이번 기사는 개인적인 소감이 많으니 탓하지 마세요.

    Less Is More


    이런 생각..
    슬림3은 매우 간단해서 경량 프레임이라고 불린다.
    그럼 실제 무게는 얼마일까요? 라벨과 비교해 보세요.

    실측


    XAMPP의 htdocs 디렉터리에 새로 만들기 slimlaravel 디렉터리 (다른 파일 이름은 무엇이든지) 를 각각 설치한 파일과 크기를 비교합니다.
    ##Slim 설치
    슬림 디렉토리Shift + 右クリック에서 Windows PowerShell을 시작하고 다음 명령으로 슬림을 설치합니다.
    composer require slim/slim
    
    ユーザー名MacBook:slim3 ユーザー名$ composer require slim/slim
    
    Using version ^3.11 for slim/slim
    ./composer.json has been created
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 6 installs, 0 updates, 0 removals
      - Installing psr/container (1.0.0): Loading from cache #1
      - Installing container-interop/container-interop (1.2.0): Loading from cache #2
      - Installing nikic/fast-route (v1.3.0): Loading from cache #3
      - Installing psr/http-message (1.0.1): Loading from cache #4
      - Installing pimple/pimple (v3.2.3): Loading from cache #5
      - Installing slim/slim (3.11.0): Loading from cache #6
    Writing lock file
    Generating autoload files
    
    6개 맞지, 슬림 이동을 위해 본체를 포함한 6개의 패키지를 장착했다.

    0.6MB.

    Laravel

    katouyuoMacBook:slim3 yuki$ cd ../laravel/
    katouyuoMacBook:laravel yuki$ composer require laravel/laravel
    Using version ^5.7 for laravel/laravel
    ./composer.json has been created
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 54 installs, 0 updates, 0 removals
      - Installing symfony/polyfill-php72 (v1.10.0): Loading from cache #1
      - Installing symfony/polyfill-mbstring (v1.10.0): Loading from cache #2
      - Installing symfony/var-dumper (v4.2.1): Loading from cache #3
      - Installing symfony/contracts (v1.0.2): Loading from cache #4
      - Installing symfony/console (v4.2.1): Loading from cache #5
      - Installing psr/log (1.1.0): Loading from cache #6
      - Installing symfony/debug (v4.2.1): Loading from cache #7
      - Installing nikic/php-parser (v4.1.0): Loading from cache #8
      - Installing jakub-onderka/php-console-color (v0.2): Loading from cache #9
      - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache #10
      - Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache #11
      - Installing psy/psysh (v0.9.9): Loading from cache #12
      - Installing vlucas/phpdotenv (v2.5.1): Loading from cache #13
      - Installing symfony/css-selector (v4.2.1): Loading from cache #14
      - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Loading from cache #15
      - Installing symfony/routing (v4.2.1): Loading from cache #16
      - Installing symfony/process (v4.2.1): Loading from cache #17
      - Installing symfony/polyfill-ctype (v1.10.0): Loading from cache #18
      - Installing symfony/http-foundation (v4.2.1): Loading from cache #19
      - Installing symfony/event-dispatcher (v4.2.1): Loading from cache #20
      - Installing symfony/http-kernel (v4.2.1): Loading from cache #21
      - Installing symfony/finder (v4.2.1): Loading from cache #22
      - Installing doctrine/lexer (v1.0.1): Loading from cache #23
      - Installing egulias/email-validator (2.1.7): Loading from cache #24
      - Installing swiftmailer/swiftmailer (v6.1.3): Loading from cache #25
      - Installing paragonie/random_compat (v9.99.99): Loading from cache #26
      - Installing ramsey/uuid (3.8.0): Loading from cache #27
      - Installing psr/simple-cache (1.0.1): Loading from cache #28
      - Installing psr/container (1.0.0): Loading from cache #29
      - Installing opis/closure (3.1.1): Loading from cache #30
      - Installing symfony/translation (v4.2.1): Loading from cache #31
      - Installing nesbot/carbon (1.36.1): Loading from cache #32
      - Installing monolog/monolog (1.24.0): Loading from cache #33
      - Installing league/flysystem (1.0.49): Loading from cache #34
      - Installing erusev/parsedown (1.7.1): Loading from cache #35
      - Installing dragonmantank/cron-expression (v2.2.0): Loading from cache #36
      - Installing doctrine/inflector (v1.3.0): Loading from cache #37
      - Installing guzzlehttp/promises (v1.3.1): Loading from cache #38
      - Installing ralouphie/getallheaders (2.0.5): Loading from cache #39
      - Installing psr/http-message (1.0.1): Loading from cache #40
      - Installing guzzlehttp/psr7 (1.5.2): Loading from cache #41
      - Installing guzzlehttp/guzzle (6.3.3): Loading from cache #42
      - Installing laravel/slack-notification-channel (v1.0.3): Loading from cache #43
      - Installing laravel/framework (v5.7.17): Loading from cache #44
      - Installing lcobucci/jwt (3.2.5): Loading from cache #45
      - Installing php-http/promise (v1.0.0): Loading from cache46 #
      - Installing php-http/httplug (v1.1.0): Loading from cache #47
      - Installing php-http/guzzle6-adapter (v1.1.1): Loading from cache #48
      - Installing zendframework/zend-diactoros (1.8.6): Loading from cache #49
      - Installing nexmo/client (1.5.2): Loading from cache #50
      - Installing laravel/nexmo-notification-channel (v1.0.1): Loading from cache #51
      - Installing laravel/tinker (v1.0.8): Loading from cache #52
      - Installing fideloper/proxy (4.0.0): Loading from cache #53
      - Installing laravel/laravel (v5.7.15): Loading from cache #54
    ##長すぎるのでダウンロード以外の処理は中略##
    Writing lock file
    Generating autoload files
    
    54개지, 라벨 이동을 위해 본체를 포함한 54개의 포장을 설치했다.
    많이.. 이거 능숙하게 쓸 수 있을 것 같지 않아요.
    앞으로 웹 애플리케이션을 만들고 싶은 이들에게는 애플리케이션을 만들기 위해 공부하는 데 많은 시간을 할애하고 주요 목적을 잊어버리는 게 일반적인 일이다.

    16.5MB
    대략 27배 정도 크다.

    총결산


    전문가, php와 함께 Laavel을 배우는 사람은 Laavel을 사용하는 것이 좋다
    만약에 php만 배우고 앞으로 어떤 웹 애플리케이션을 구축하고자 한다면 규모가 어떻든 학습 원가가 낮은 슬림을 사용하여 프레임워크에서 무엇을 할 수 있는지 확인하는 것이 좋습니다.

    좋은 웹페이지 즐겨찾기