Coder Social home page Coder Social logo

symfony2_nyumon's Introduction

自己紹介 (Self-Introduction)

目次 (Contents)


👋🏻 はじめまして (About me)

長谷川広樹です。
( I'm Hiroki Hasegawa. )

大学院にて データサイエンス の分野で研究を行い、理学修士を習得しました。
( I studied Data Science at the graduate school, and obtained a Master of Science. )

その後、Webアプリケーションの SWE としてキャリアをスタートしました。
( After that, I started my career as a SWE in web applications. )

現在は、SRE として働いています。
( Currently, I'm working as a SRE. )


🎯 関心のある技術領域 (Area of interest)

Webアプリケーションのインフラ領域に軸足を置きつつ、バックエンド領域も好きです。
( I focus on web infrastructure, and also like backend. )

特に、拡張性保守性可読性 を高める技術に関心が強いです。
( I'm very interested in technologies that enhance extensibility, maintainability and readability. )


技術領域は...
( In technical area, ... )

  • Microservices Infrastructure (L4 ~ L7)
  • DDD

言語は...
( In programming language, ... )

github-metrics

lowlighter/metrics を使って全リポジトリの使用言語を解析

📚 知見 (Knowledge)

技術的な知識を体系的に整理するため、ノートにまとめています。
( In order to systematically organize technical knowledge, I often summarize it in my notebook. )

↪️ 技術ノート (in Japanese)

また、技術ノートから知見をピックアップし、不定期でブログに投稿しています。
( Also, I pick up some knowledge from that notebook, and post it irregularly on my blog. )

↪️ はてなブログ (in Japanese)

時々、イベントで知見を登壇発表しています。
( I sometimes present some knowledge at LT. )

↪️ Speaker Deck (in Japanese)


💼 経歴、職歴 (Career)

詳しくは、以下のサイトまでご訪問いただけると幸いです。
( For details, we would appreciate it if you could visit the following site. )

↪️ Wantedly (in Japanese)


🏭 練習用リポジトリ (Repositories)

アーキテクチャ関連の技術を人知れず練習しています。
( I practice architecture in the following repository. )

知見の共有になれば幸いです。
( I would be happy if I could share my knowledge. )

クリーンアーキテクチャ (Clean Architecture)

使用技術 リポジトリ(in Japanese)
Clean-Arch、Laravel、GitHub Actions、... ↪️ ddd-backend-with-laravel
Clean-Arch、Gin、... ↪️ ddd-backend-with-gin
Clean-Arch、Go、Serverless Framework、CircleCI、... ↪️ notify-slack-of-amplify-events

マイクロサービスアーキテクチャ (Microservices Architecture)

使用技術 リポジトリ(in Japanese)
Microservices-Arch、... ↪️ microservices-backend
K8s、Istio、ArgoCD、... ↪️ microservices-manifests

symfony2_nyumon's People

Contributors

hiroki-it avatar

symfony2_nyumon's Issues

第4章を学習

include() vs render()

include()

サイドバーは各ページのコントローラに含まれ、各ページと一緒にレンダリングされる
図4-1

render()

サイドバーのみで独立したコントローラが存在し、各ページで部分的にレンダリングされる。
図4-2

フォームの作成

Symfonyにおいて、フォームはオブジェクトであり、コントローラ/アクションで定義されてテンプレートに渡される。
図4-7

フォームの一例
公式ウェブ 図1-3

in-placeで構築する方法

(1)createFormBuilder()オブジェクトを取得
(2)indexAction()に、フォーム構築用のコートを記述
(3)form()関数によるフォームの簡易表示/フォームフィールドを個別に表示

◇ フォームタイプで構築する方法

(1)テーブルと連動するメンバー、セッター、ゲッターを含むエンティティを作成
(2)エンティティと紐づくフォームタイプを作成
(3)コントローラを作成
(4)form()関数によるフォームの簡易表示/フォームフィールドを個別に表示

◇ add()で設定できるフォームの項目の種類

フォーム項目の種類-1
フォーム項目の種類-2

Symfonyからの通知メールの設定

◇ SMTP vs POP3

SMTP(Simple Mail Transfer Protocol):メールを他のサーバーへ送信する仕組みのこと
POP3(Post Office Protocol):サーバーからメールを受信する仕組みのこと
メールサーバーの仕組み
引用リンク:NANISAMA.COM,http://www.nanisama.com/about_Mail/mail-server/index.html

◇ 送信方式の設定

%mailer_transport%とすることによって、パラメータファイルにおけるmailer_transport:を参照し、通知メールの送信方式を設定することが可能。
表4-2

◇ メール送信処理の実装

(1)Swift Mailerクラスを用いて、メールに関する情報(送信するメッセージの本文、送信先アドレス、件名など)のオブジェクトを作成
(2)メソッドチェーンで件名や送信元を順に指定
(3)テンプレートファイル名とフォーム入力値が格納された$data変数を引数に指定して、コントローラのrenderView()メソッドを呼び出す
(4)サービスコンテナからmailerサービスを取得し、send()にメールメッセージを渡す

第6章を学習

問い合わせフォームのバリデーション

◇ バリデーションの種類

サポートされている制約
サポートされている制約-2

◇ バリデーショングループ

ユーザの種類によってバリデーションを使い分けるために、バリデーションをグループ化。
表6-3

システム上での文字の扱い方

◇ 符号化文字集合

英語のアルファベットや日本語のひらがな、カタカナ等、どのような文字が使えるかを示した文字リストのこと。
(例)Unicode
文字集合
引用リンク:ウナのIT資格一問一答,http://una.soragoto.net/topics/9.html

◇ 文字符号化方式

任意の文字集合をどのようなビット列に変換(=エンコード)するかを定義した体系のこと。
(例)UTF-8 vs. UTF-16
文字コード
引用リンク:$shibayu36->blog;,https://blog.shibayu36.org/entry/2015/09/14/102100

◇ 『符号化文字集合』と『文字符号化方式』の対応関係(文字コード体系)一覧

(余談)Winのメモ帳での文字コードの選択ダイアログでは、 符号化文字集合と文字符号化方式の違いに混乱する言葉遣いをしている。
文字集合と符号化方式の対応関係
引用リンク:se-ikeda,http://se-ikeda.jp/techmemo/215

◇ 文字符号化方式を設定

◇ プロバイダを設定

◇ ファイアウォールを設定( vs ウェブアプリケーションファイアウォール)

ファイアウォール vs ウェブアプリケーションファイアウォール

第1章~第3章を学習

コントローラとレンダリングするページ構成の関係

コントローラとレンダリングするページ構成の関係

テンプレートエンジン

Symfony4_図3-1

サービスコンテナ

サービスコンテナはオブジェクトで表現され、サービスのオブジェクトを返すメソッドが定義されている。

<?php

namespace ContainerM9iq2wg;

use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;

/**
 * This class has been auto-generated
 * by the Symfony Dependency Injection Component.
 *
 * @final since Symfony 3.3
 */
class appDevDebugProjectContainer extends Container
{
    private $buildParameters;
    private $containerDir;
    private $parameters;
    private $targetDirs = [];

    public function __construct(array $buildParameters = [], $containerDir = __DIR__)
    {
        $this->methodMap = [
            'annotation_reader' => 'getAnnotationReaderService',
            'annotations.reader' => 'getAnnotations_ReaderService',
            'argument_metadata_factory' => 'getArgumentMetadataFactoryService',
            'assets.context' => 'getAssets_ContextService',
            'assets.packages' => 'getAssets_PackagesService',
            'cache.annotations' => 'getCache_AnnotationsService',
            'cache.app' => 'getCache_AppService',

第7章を学習

Doctrin Fixtures Bundle の導入

Fixtures:固定されて動かせない付属物
テストの実行時、データを自動で投入するシステムのこと。テストの状況ごとにデータベースのデータをYAMLのフィクスチャファイルとして用意しておくと開発がはかどる。

リクエストフォーマット機能

レスポンスのフォーマットを設定することが可能。
図7-2

API:Application Programming Interface

Web APIでは、各APIサービスにリクエスト(キーワードを絞り込むなど)を送ると、処理結果がXML形式やJSON形式、RSS形式などでレスポンスされる。

◇ Web APIの種類

  • Amazon API
  • 楽天商品検索API
  • Google Maps API
  • Yahoo API
  • Facebook API
  • Twitter API
    など

第5章を学習

phpMyAdminの事前準備

以下のファイルに、ユーザ名とパスワード入力すること

  • comfig.inc.php
  • parameters.yml
  • parameters.yml.dist

データベースへの情報登録の方法

(1)Entityクラスの作成

php bin/console doctrine:generate:entity
表5-2

(2)Entityクラスを基に、MySQLにデータベースを作成

php bin/console doctrine:schema:create
表5-3

(3)レコードを作成

persisit():レコードの作成と保存
flush():変更された情報をデータベースに反映
図5-4

(3)マイグレーション

(4)コントローラとテンプレートの作成

データベースからのレコード取得

図5-7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.