JavaScriptコードを圧縮・最適化・難読化する「Closure Compiler」のJavaScript版をGoogleが公開。Node.jsもしくはWebブラウザ上で実行可能JavaScriptのコードを実際のアプリケーションとしてデプロイする場合には、コード内のコメントやタブ、スペース、改行などの余計な要素を削除し、変数名を短くしたりコードの冗長性を排除するといった最適化を行うことで、ロード時間を短縮しコードを高速に実行できるようになります。また、コードの中身を簡単に読めないよう、難読化を行うことも多いでしょう。 こうしたJavaScriptコードの圧縮や最適化、そして難読化を行ってくれる代表的なツールの1つが、Googleがオープンソースで公開しているClosure Compilerです。 Closure Compilerはコードの単純な圧縮や最適化だけでなく、JavaScr
目次 2019年追記 はじめに クラス実現のために必要なJavaScript の言語仕様 function this call new 演算子 prototype チェーン プロパティ: prototypeGoogle Closure 流のクラスの実現方法の概要 クラスの宣言とコンストラクタの定義 メンバ変数 (インスタンス変数) メソッド定義と呼び出し private, protected 継承 プロトタイプチェーンを利用してメソッドを親クラスから引き継ぐ 親クラスのコンストラクタの呼び出し メソッドオーバーライドと親クラスのメソッドの呼び出し 多重継承 abstract, interface inherits の実際のコード 良くないクラス実現方法 ES6 のクラス 2019年追記 この記事ではclassが導入されたES6以前のJavaScriptでどのようにクラスに相当するものを
JsTemplateはGoogleが開発したJavaScript製のテンプレートエンジンです。 Webアプリケーションがさらに開発されていくために必要なのが高機能なJavaScriptテンプレートエンジンの存在です。幾つか出てきていますが今回紹介するのはかなり有力です。なぜならGoogleが開発したテンプレートエンジンだからです。それがJsTemplateです。 デモです。左上がテンプレート、右上がJSONの元データになります。 そして左下が実際に生成されたHTMLで、右下がレンダリング結果になります。 idを使ってテンプレート名を定義しています。 こういう風にデータがない場合のチェックもできます。 実際のコードです。jsdisplayのところに検証が入っているのが分かります。 データがある場合はもちろん繰り返し表示します。 実際のコードです。 JsTemplateは再帰処理ができたりev
Google Closure Compiler is a tool for makingJavaScript download and run faster.It is a true compiler forJavaScript. Instead of compiling from a source language tomachine code,it compiles fromJavaScript to betterJavaScript.It parses yourJavaScript, analyzesit, removes dead code and rewrites and minimizes what’s left.It also checks syntax, variable references, and types, and warns about c
What is O3D? O3D is an open-source webAPI forcreating rich, interactive 3D applications in the browser. ThisAPI is shared at anearly stage as part of a conversation with the broader developer community about establishing an open web standard for 3D graphics. Get involved Download the plug-in (Windows andMac) and explore the samples to see O3D's capabilities.Linux users, see these instruction
We are here to help youcreate innovative Apps for Mobile devices. Our expertise focus on Location BasedTechnology. You have an idea, a concept, and you need the expertise and human capital to realize your vision. Our seasoned engineers can quickly turn your idea from concept to reality. Monetization is first and foremost on our mind too! Every step we take with you is knowing we have your back i
Stay organized with collections Save and categorize content based on your preferences. TheGoogle Hosted Libraries is a stable, reliable, high-speed, globally available content distributionnetwork for the most popular, open-sourceJavaScript libraries.Google works directly with the key stakeholders for each library effort and accepts the latest versions as they are released. Libraries To load a
Japanese / EnglishJavaScriptで入力補完を手軽に行うためのライブラリです。 (【お知らせ】ver2.0からprototype.jsを必要としなくなりました) 下記のような機能を持っています。 入力内容をもとに検索を行い、補完候補を表示します。(Google Suggestぽく) Ajaxでは無く、初回画面表示時のみデータの読み込みを行い、それ以降は、クライアント側で対象データから検索します。したがって、入力内容に変化があってもサーバ側にアクセスすることはありません。 検索は、前方一致/部分一致、大文字と小文字の区別あり/なしといったように、オプションで簡単に指定できます。また、その他にも様々なオプションが指定可能です。 検索結果の表示上限を指定できます。(デフォルト上限20件) 補完候補はキーボードの上下と、マウスにて選択できます。また、キーボードで選択中にES
AJAXSLT is an implementation of XSL-T inJavaScript, intended for use in fat web pages, which are nowadays referred to as AJAX applications. Because XSL-T usesXPath,it is also an implementation ofXPath that can be used independently of XSL-T. Overview XSL-T stands for XSL Transformations. XSL stands for eXtensible Stylesheet Language XSL-T is a language for transforming XML documents from one l
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く