Prototype JavaScript Framework
Prototype JavaScript Framework は、Sam Stephenson が開発したJavaScriptフレームワークであり、Ajaxフレームワークやその他のユーテ�…
この記事は更新が必要とされています。 (2015年12月) |
| 開発元 | Prototype Core Team |
|---|---|
| 最新版 |
Prototype 1.7.3
/ 2015年9月22日 |
| リポジトリ | |
| プログラミング 言語 | JavaScript |
| サポート状況 | 活発 |
| 種別 | JavaScriptツールキット |
| ライセンス | MITライセンス |
| 公式サイト | prototypejs.org |
Prototype JavaScript Framework は、Sam Stephenson が開発したJavaScriptフレームワークであり、Ajaxフレームワークやその他のユーティリティを提供する。prototype.js という名前の1つのJavaScriptファイルで実装されている。単独でも入手できるが、Ruby on Rails、script.aculo.us、Ricoなどのもっと大きなプロジェクトの一部にもなっている。ただし、Ruby on Railsは3.1のバージョンから、デフォルトのJavaScriptライブラリがPrototype JavaScript FrameworkからjQueryに変更されている[1]。
特徴
PrototypeはJavaScriptアプリケーション開発のための様々な機能を提供する。その機能は、プログラミング用ショートカットからXMLHttpRequestを扱う重要な関数まで様々である。
Prototypeはクラス群とクラスベースのオブジェクトのためのライブラリ関数も提供する[2]。これはJavaScript言語にはない部分である[3][4]。一般にJavaScriptでのオブジェクト生成はプロトタイプベースである。オブジェクト生成関数には prototype プロパティがあり、このプロパティを割り当てられたオブジェクトは、その関数で生成されるオブジェクトのプロトタイプとして使用される。
Prototypeの関数 Object.extend(dest, src) はパラメータに2つのオブジェクトをとり、2番目のオブジェクトのプロパティを1番目のオブジェクトにコピーすることで継承をシミュレートする。結合したオブジェクトもその関数の結果として返される。上の例のように1番目のパラメータはベースとなるオブジェクトを生成し、2番目のパラメータは無名オブジェクトとして単にプロパティを追加定義するのに使う。サブクラス宣言は全て、関数コールの括弧の中でなされる。
関連項目
脚注・出典
外部リンク
- Prototype Javascript Framework ホームページ
- Prototype API documentation
- Unofficial Prototype & Script.aculo.us wiki and FAQ - コミュニティメンバーが作成
- Nick Stakenburg's Prototip2 package - Prototype上で構築されている
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.