MochiKit - スタイルガイド 翻訳 原文:StyleGuide - MochiKit - Trac MochiKitのコーディング規約の大部分はPythonのPEP8とPEP 7(この順に優先される)に従っている。しかし、JavaScript特有の点もいくつかある : ビルトイン・オブジェクト、およびそのプロトタイプを絶対に変更しない。(例えば、このようなことは行わない: Object.prototype.foo = REALLY_BAD! ) 代わりに関数の使用を志向する。 関数のようにtypeof演算子を使用する : typeof x ではなく typeof(x) コンストラクタを使用するときには引数を括弧に入れる : new Error, foo ではなく new wError("foo") 常に完全修飾子で他の関数を呼び出す。また利便性のための記号的なエイリアスも用いない
ここ最近、prototype.js や scriptaculous.js に話題が偏りがちでしたが、MochiKit という JavaScript ライブラリも注目されています。(別に無視していたわけではなく、単に追っかけきれていないだけです。そもそも公開されているライブラリやフレームワークの数が尋常じゃないので..。cf. Round-up of 50 AJAX Toolkits and Frameworks)prototype.js や scriptaculous.js が Ruby on Rails のフロントエンドをサポートしているなら、MochiKit は TurboGears という、Python ベースの Web アプリケーション開発フレームワークのフロントエンドを支えています。 ブックマークレットを利用したデバッガや、データを昇順・降順に並べ替えられるソータブルテーブル、キ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く