勉強日記

チラ裏

2019-09-01から1ヶ月間の記事一覧

PoEAA ch12 Foreign Key Mapping

martinfowler.com Foreign Key Mapping How It Works delete/insert back pointer 差分 循環参照について When to Use It 英語 Foreign Key Mapping Maps an association between objects to a foreign key reference between tables. オブジェクトの関連は…

PoEAA ch12 Identity Field

martinfowler.com Identity Field How It Works Choosing Your Key Representing the Identity Field in an Object Getting a New Key When to Use It 英語 Identity Field Saves a database ID field in an object to maintain identity between an in-memo…

A Philosophy of Software Design ch0 Preface

www.goodreads.com Preface 英語 Preface 人類が計算機でプログラムを書いて80年 あれこれ議論されてきた 開発手法 agileとか ツール デバッガ VCS テストカバレッジツール OOP/FP デザインパターン、アルゴリズム しかし、ソフトウェア設計についてはほとん…

PoEAA ch16 Coarse-Grained Lock

martinfowler.com Coarse-Grained Lock How It Works When to Use It Coarse-Grained Lock Locks a set of related objects with a single lock. オブジェクトはグループとして編集される 例: 顧客と住所 グループを構成する1要素を編集する際には、グループ…

PoEAA ch16 Implicit Lock

martinfowler.com Implicit Lock How It Works When to Use It 英語 Implicit Lock Allows framework or layer supertype code to acquire offline locks. Offline Lockは、1行忘れただけで全部台無しになる read lockの取得が漏れると、最新のセッションデ…

PoEAA ch16 Pessimistic Offline Lock

martinfowler.com Pessimistic Offline Lock How It Works When to Use It 英語 Pessimistic Offline Lock Prevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access data. ビジネスト…

laravel.shibuya #4 IRTまとめ

IRT1 -- Laravel Track フレームワーク規定のもの以外のモジュール構成(名前空間、クラス名)をどうするか レスポンス速度改善 IRT2 -- PHP Track 手が遅い。何をして手が早くなったり業務に対して自信を付けられたりしたか IRT3 -- PHP Track APIのメジャ…

PoEAA ch16 Optimistic Offline Lock

martinfowler.com 【補】用語 Optimistic Offline Lock How It Works When to Use It 英語 【補】用語 セッションとビジネストランザクションがほぼ同義扱い Optimistic Offline Lock Prevents conflicts between concurrent busines transactions by detect…

PoEAA ch11 Unit of Work

martinfowler.com Unit of Work How It Works When to Use It Unit of Work Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems. DBへの変更をともな…

PoEAA ch17 Database Session State

martinfowler.com Database Session State 【補】語彙 How It Works When to Use It 英語 Database Session State Stores session data as committed data in the database. 【補】語彙 レコードデータ ビジネストランザクション完了後の完全なデータ セッシ…

PoEAA ch17 Server Session State

martinfowler.com Server Session State How It Works Java Implementation .NET implementation When to Use It 英語 Server Session State Keeps the session state on a server system in a serialized form. How It Works 最も単純な形としては、アプリ…

PoEAA ch10 DataMapper

martinfowler.com Data Mapper How It Works Handling Finders Mapping Data To Domain Fields Metadata-Based Mappings When to Use It Example Data Mapper A layer of Mappers that moves data between objects and a database while keeping them indepe…

PoEAA ch17 Client Session State

martinfowler.com Client Session State How It Works When to Use It 英語 Client Session State Stores session state on the client. How It Works 大なり小なり使うことになる 最小 セッションIDを保持、セッション情報本体はサーバサイドで持つ 最大 Cl…

PoEAA ch15 Remote Facade

martinfowler.com Remote Facade How It Works Remote Facade and Session Facade Service Layer When to Use It Remote Facade Provides a coarse-grained facade on fine-grained objects to improve efficiency over a network. OOPにおいて、複雑なロジ…

PoEAA ch14 Application Controller

martinfowler.com Application Controller How It Works When to Use It Further Reading Application Controller A centralized point for handling screen navigation and the flow of an application 画面の出し分けに関して複雑なロジックがある場合 一…

【Emacs】intelephenseで変数名変更導入した

TL;DR intelephense is 何 詳細 課金する ライセンス認証する intelephenseをアップグレードする LSP Serverを再起動する 使ってみて 若干詰まったのでメモ TL;DR 課金が必要 古い場合はアップグレードが必要 NTEmacsだと若干調子悪い Emacs on WSLを使おう …

PoEAA ch14 Template View

martinfowler.com Transform View How It Works When To Use It 英語 Transform View A view that processes domain data element by element and transforms it into HTML. MVCのVの責務をデータ変換と捉える 入力: DomainやData Sourceから取ってきたデー…

PoEAA ch14 Front Controller

martinfowler.com Front Controller How It Works Web handler Controller Hierarchy When to Use It Further Reading Example Front Controller A controller that handles all requests for a Web site. 複雑なWebサイトでは、リクエスト処理時に似たよう…

PoEAA ch14 Template View

martinfowler.com Template View How It Works Embedding the Markers Helper Object Conditional Display Iteration When to Process Using Scripts When to Use It Example 英語 Template View Renders information into HTML by embedding markers in an …

インスタおじさんプロジェクト振り返り

プロジェクト概要 what インスタおじさん向けサービス 登録しているインスタおじさんの投稿をスクレイピング 更新分をslack通知 最新30件を表示 when 2019/08/26 ~ 2019/09/12 why 行きつけのコワーキングスペースでの依頼 Webに転向したいおじさんの経験値…

PoEAA ch14 Two Step View

martinfowler.com Two Step View How It Works When to Use It Example: Two Stage XSLT (XSLT) Example: JSP and Custom Tags (Java) Two Step View Turns domain data into HTML in two steps: first by forming some kind of logical page, then renderin…

【WSL2】/mnt/を使わないことで高速化

テスト、Git等全然違った /mnt/は遅い Node.jsプロジェクト /mnt/c/ ~/ Laravelプロジェクト wip

【開発環境】Windows10で、Emacs上のシェルでDockerコンテナログインできるようになった話

モチベーション WSL2入れる Windows10のビルド確認 WSL有効化 Ubuntu18.04 LTS 入れる Emacs26入れる Docker環境揃える Docker Docker Compose eshell上でdockerコンテナログインできることを確認 X11Forwarding Ubuntu側 sshd Windows側 sshクライアント: P…

PoEAA ch14 Page Controller

martinfowler.com Page Controller How It Works When to Use It 英語 Page Controller An object that handles a request for a specific page or action on a Web site. Webエクスペリエンスのほとんどは静的ページ 1パス1ファイルの関連 動的ページになる…

【Laravel6】LazyCollection触った (素数の無限シーケンス)

書いたやつ sieve( $this->sequence() ->filter($this->gte…

【PHPUnit】dataProviderを複数指定すると直和集合になる

assertTrue(true); } public function dataProvider(): array { return [ [ 1 ],…

【Laravel6】PHPUnitのdataProviderの中でFacade等がそのまま使えるようになってた

テストコード Laravel PHPUnitのdataProviderでFacadeやfactory等のヘルパ関数を使う方法 - Qiita ↑より拝借、若干変更

gitでHEADのパーミッションエラーが出た話

Git

HEADのパーミッションエラーが出た .git/HEADをエディタで開いて上書き保存・閉じたら直った 詳細 現象 dockerコンテナ環境でLaravel開発 watchコマンドでPHPUnitを定期実行 別のターミナルでgit rebase -iするとリベースに失敗 git rebase abortするとHEAD…

【Laravel5.8】dataProviderでFacade等を使う/遅延評価でやってみる

背景 テストコード 実行結果 遅延評価じゃない方: ダメ 遅延評価: OK 背景 qiita.com Laravel フレームワークにて、PHPUnitのdataProvider内でFacadeやfactoryが使えないのはよく知られている通り parent::setUp()の中で$this->createApplication()される前…

Clean Architecture Part III ch11 DIP: The Dependency Inversion Principle

www.pearson.com Dependency Inversion Principle Stable Abstrations Factories Concrete Components Conclusion 英語 Dependency Inversion Principle 具象に依存するな 具象のモジュールって何 実際にコールされる関数が実装されているモジュール もちろ…