Transformational Software Engineering Lead your team into the future with unprecedented visibility. Details
![Blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/b47a94b850347e0f2c3df6222779d9c3e9856707/height=288;version=1;width=512/https%3A%2F%2Fdu10j5vfk4mbr.cloudfront.net%2F_1200x630_crop_center-center_82_none%2Fseo-general-ogimage.png%3Fmtime%3D1684273589)
てめえらのRailsはオブジェクト指向じゃねえ!まずはCallbackクラス、Validatorクラスを活用しろ!RubyRails ちょっと煽り気味のタイトルにしてみましたが、Railsで開発する時は意識的にOOPに寄せないとオブジェクトの力が活かせなくなるよってことと、Railsが提供しているクラスの責務を分割することを支援してくれる機能について話をします。 ActiveRecordの性質 Rails開発においては、モデル層にロジックを書いてコントローラーは薄くしろ、というのはしつこく言われているので、概ね浸透してきていると思います。 それに加えて、最近私が結構しつこく主張しておきたいのが、モデル = ActiveRecordでは無いよ、ということです。 ActiveRecordは成り立ちから言うと、ロジックとDBへの永続化をまとめてカプセル化するアーキテクチャパターンから来ています。
Update: We’ve written a complementary post that goes into more depth. Read this first and then check out Rails in Realtime, Part 2. LayerVault is built using the popular web framework, Ruby on Rails. The framework, at times known for its divisiveness, has allowed LayerVault to grow from a single box to a swarm of machines over the past year. Recently, there has been a wave of great JavaScript-base
WinユーザがRailsアプリをこれから公開しようと思った場合 Windowsで学習を開始するのは不可能なのでLinuxをいれる でもWindowsで進めようとしてmsysGitをいれたりするが結局半日無駄にする なぜかgemが最新じゃないと怒られる gemを単純に使っても後から困るのでrvmかrbenvが必要。使い方覚えないといけない やっとRails3.2導入。javascriptエンジンが入ってないので起動しない やっと起動 HTML書いてるのは情弱だけ => hamlを覚える js書いてるのは情弱だけ => coffee scriptを覚える css書いてるのは情弱だけ => scssを覚える テスト書いてないコードはレガシーコードっていわれる しかたないのでRspecいれる => Rspec覚える ユニットテストだけではしかたないといわれcapybaraもいれる => capyb
Rails 3.1 からパスワードの暗号化用のモジュールができたようです。ActiveModel::SecurePassword で定義されていて、ActiveRecord や Mondoid などの ActiveModel を利用しているモデルで使えるそうな。 User モデルに password_digest カラムが設定されている前提で class User < ActiveRecord::Base has_secure_password end とすると、下記のような効能が得られます。 attr_reader :password validates_confrmation_of :password validates_ppresence_of :password_digest password に何か代入すると自動で bcrypt-ruby でハッシュにされて password_d
Document Data Structure in MongoDB Express MongoDB lets you easily store structured and unstructured data in a flexible and dynamic database schema. It supports CRUD operations on complex data objects using JSON as the main data type. Its an open source solution so it may not be as robust or well supported as commercial management tools. However it is easy to deploy and works well for most use cas
Dismiss Octotip: You've activated the file finder by pressing t Start typing to filter the file list. Use ↑ and ↓ to navigate, enter to view files.
今回は、ここ数年非常に注目されている技術であるDI(Dependency Injection)コンテナをテーマに取り上げます。 DIコンテナはアプリケーションのオブジェクトを疎結合にし、柔軟性を与えるものです。その結果得られる代表的なメリットとして表1のようなものがあげられます。いずれも品質向上に寄与する重要な効果です。 モックオブジェクトによるテスタビリティ向上 単体テストにモックオブジェクトを導入でき、テスタビリティを向上させられる。 トランザクション指定の簡易化 トランザクションを簡易に指定できるようになり、障害時処理の高品質化が実現される。 しかし、そもそもRailsにはDIコンテナという考え方が取り入れられていません。そこで表1にあげたDIのメリットに関するRailsでの対応・非対応の状況を比較するという形で進めていきます。 なお、DIコンテナから得られるメリットはDIコンテナ上
The document contains a series of dates from 2011-6-22 repeated many times. Between some of the dates are short phrases such as "Don't Repeat Yourself" and "Convention over Configuration". The overall document does not appear to have a clear purpose and consists primarily of a date repeated with occasional unrelated text fragments.Read less
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaNurul Ferdous
As I promised at RailsConf, we’re finally good to go on the Rails 3.1: Release Candidate. This is a fantastically exciting release. We have three new star features and an even greater number of just awesome improvements. First the stars: The Asset Pipeline The star feature of 3.1 is the asset pipeline powered by Sprockets 2.0. It makes CSS and JavaScript first-class code citizens and enables prope
JavaScriptへコンパイルして実行することを前提としたスクリプト言語「CoffeeScript」がちょっとした注目を集めています。CoffeeScript自体は2009年末に登場し、その1年後の2010年12月にバージョン1.0がリリースされていますが、注目を集めたのは、数日前(2011年4月13日)にRuby on Railsの生みの親であるDHHが、次期バージョンのRails3.1でjQueryやSCSSと合わせて、CoffeeScriptをデフォルトとして採用するとTwitter上で発言して議論が巻き起こったからです。 Yes, it's true, Rails 3.1 is going to ship with CoffeeScript and SCSS in the box for use with the new asset pipeline. It's bad ass.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く