Coder Social home page Coder Social logo

rails_tutorialll's Introduction

Hi there 👋

rails_tutorialll's People

Contributors

mataku avatar rhythnn avatar

Watchers

 avatar  avatar

rails_tutorialll's Issues

進捗について

概要

  • その日やったことのふりかえりの場

よよが で ふりかえり

  • よかったこと
  • よくなかったこと
  • がんばるぞ

その他

  • 気になったこと

テンプレート

### 6/15
### よかったこと
### よくなかったこと
### 気になった点
### がんばるぞ
### その他

chapter1 メモ

ch1 (From zero to deploy)

  • rails -v: 4.2.2
  • ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

やったこと

  • Hello, world!の表示
    • config/routes.rb にてroot (indexページ) の設定

Gemfileの見方

  • :development: 開発環境用
  • :production: 本番環境用

MVC(Model-View-Controller)

Model

  • アプリケーションが扱う領域のデータと手続きを表現する要素
    • 手続き: ビジネスロジック(ショッピングの合計額や送料を計算するなど)

View

  • modelのデータを取り出してユーザーが見るのに適した形で表示する要素
    • UIへの出力
    • Web Applicationでは..?
      • HTML文章を生成して動的にデータを表示

Controller

  • ユーザーの入力(イベントとして通知される)に対して応答し、それを処理する要素

RailsのMVC

  1. ブラウザがリクエストを送る
  2. web serverが受け取り、Controllerへ渡す
  3. modelに何かをしてもらい、viewへ
  4. ブラウザにHTMLを返す
Hello, World!
  • render
    • 渡す、示す、ささげるなどのニュアンス
    • render text: "hello, world"
indexページにhello, worldを表示
  • app/controllers/application_controller.rb
    • デフォルトである
  • "hello, world!" をrenderingする関数helloを作る
def hello  
  render text: "Hello, world."
end
  • config/routes.rb
    • root 'application#hello' を追記
    • root(indexページ)がapplication_controller.rbのなかのhelloを見てくる
heroku
  • herokuにmaster以外のブランチをpushするところでつまる
git push heroku chapter1:master

すすめかた

前提

  • 内容(背景)の理解
    • 完走は二の次だけども、やる

進め方

  • chapter 2まではPRをmergeしない (そのままクローズ)
  • chapter 3からはPR => レビューをはさむ => merge

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.