Last active
August 29, 2015 14:25
-
-
Save Yama-to/1f6f39eb73b828085a3a to your computer and use it in GitHub Desktop.
今さら人に聞けなくなってきた時のRailsのキホン ref: http://qiita.com/Yama-to/items/eddbf5be6faf857b2feb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
【予備知識:MVCとは】 | |
RailsのアプリケーションはMVCモデルに則る。 | |
◆ Model :ビジネスロジック | |
◆ View :ユーザーインターフェース | |
◆ Controller :全体の管理 | |
簡潔に言うと、 | |
◆ モデルはデータの保存や取り出し等の操作をし | |
◆ ビューは処理結果に応じて個別のページを描画し | |
◆ コントローラーはリクエストに応じてそれらを適切に管理する | |
という役割分担のなされた構造である。 | |
これによりデザイン面・ロジック面共同での開発も容易になる。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Action Dispatch | |
> リクエストをどこで処理するか決定するルーティング機能を提供。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- /controllers `コントローラクラス` | |
- /concerns | |
> コントローラ共通モジュール | |
- application_controller.rb | |
> アプリケーション共通のコントローラ | |
- /helpers `ビューヘルパー` | |
- application_helper.rb | |
> アプリケーション共通のビューヘルパー | |
- /mailers `Action Mailer実装クラス` | |
- /models `モデルクラス` | |
- /concerns | |
> モデル共通モジュール | |
- /views `ビュースクリプト` | |
- /layouts | |
> レイアウト | |
- application.html.erb | |
> アプリケーション共通のレイアウト |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment