最近,Webエンジニアのまわりで注目されている技術に「Ajax」(エイジャックス)があります。従来のWebアプリケーションはインタラクティブな処理の際,ユーザーにページのリロード作業を強いることが多く,決して操作性が良いとは言えませんでした。しかしAjaxを利用すると,サーバーと非同期な通信ができるので,ページをリロードすることなくコンテンツを更新できます。このためデスクトップ・アプリケーションと同様な操作性を持つWebアプリケーションを作成できます。本連載では,実際にAjaxアプリケーションを開発しながら,Ajaxアプリケーションの動作の仕組みや,既存のWebアプリケーションとの違い,実装上の注意点などについて紹介していきます。 目次 第1回 古くて新しいアーキテクチャ 第2回 インクリメンタル検索を実現(クライアント編) 第3回 インクリメンタル検索を実現(サーバー編) 第4回 予測・
「Ajax を使った手書き文字認識」を見て。ここでは線を描くのに絶対配置の span 要素を大量生成しているけど、最近のブラウザってベクター描画エンジン付きのものが多いわけで。WinIE 5 以降の VML 、Opera 8 ・ Firefox 1.5 以降の SVG 、Safari 1.3 ・ Firefox 1.5 以降の canvas 要素といった具合に。 ということで各ブラウザでベクター描画エンジンが使えればそれを使い、なければ絶対配置の HTML 要素を大量生成することで、ブラウザ上でお絵かきできるというものを作ってみた。元に戻す / やり直すこともできる。線を描くだけで塗りつぶしはできないが。 その線を描くために作ったのが DrawingCanvas クラス。以下のようにすることで三角形が描ける。実際の描画部分には SVG Tiny 、HTML Canvas 、CSS Posi
Ajaxを活用して開発されたWebアプリケーションは、サーバとの通信をWebブラウザのページ読み込み処理とは異なる方法で(非同期で)行うため、基本的にWebブラウザのナビゲーションバーでは制御できない。つまり、Ajax機能を活用して再描画された内容は「戻る」ボタンでは戻れないということだ。 これは便利でもあり不便もである。特定の操作においては戻るボタンで戻れた方が扱いやすいこともある。Ajaxアプリケーションにおいてこうした戻るボタンとの関連付けを行うためのライブラリや実装方法はいくつかあるが、ここではAndrew Mattie氏によって公開されたdsHistoryを紹介しておきたい。 Andrew Mattie氏は15日(米国時間)、自身のブログにおいて「Presenting dsHistory: Another Way to Revisit the Past」と題したブログを公開。YU
Webアプリ開発で、動作確認メッセージが出力できない。そんなときは、Ajaxでブラウザの動作ログをサーバに出力してみよう。 現在、至るところでWebを利用したシステム開発が行われています。デバッグに使用しているテクニックの1つに、古くからの技法として変数や動作したことを示すメッセージ表示などの情報を出力するものがあります。残念ながらWebアプリケーションの開発の現場では、その技さえ使えない場合があります。 最近のWebアプリケーションの開発は、サーバ側のJSPやサーブレットの開発では統合開発環境を利用できるようになり、大幅に開発効率が向上しています。また、開発中の動作確認だけでなく、リリース後はサーバ側で動作するプログラムへメッセージを埋め込んでログとしてファイルに残すこともできます。 これらのログ機能は、IBM社のWebSphere、MS社のInternet Information Se
Javascript Toolkit Comparison - uPortal 3 - JA-SIG Wiki Javascriptフレームワーク比較チャート。 Prototype、Dojo、Mochikit、Yahoo UI Library、Google Web Toolkit 、jQueryというメジャーなフレームワークの比較図です。 Ajax、Drag&Drop、ビジュアルエフェクト、イベントハンドリング、Ajaxの戻るボタン対応など、機能が一発で比較できます。 →続きを見る 他にも、ドキュメントの豊富さや、開発コミュニティの充実度、ライセンスについても掲載されていて比較に便利。 自分の知らないフレームワークの特徴も大まかに分かるので参考にさせてもらいましょう。 関連エントリ 10個のPHPフレームワーク比較記事 Prototype.jsとjQueryのベンチマーク速度比較
エンタープライズをとりまく技術の流動は速い。加えて2008年はコンシューマや個人を中心に使われてきた技術が企業活動にも取り込まれていく年になるだろう。注目されている分野は実装系も多い。今後ますます関連技術の動向に注目する必要がありそうだ。本稿では関連技術を見渡し、どういった種類や実装があるのかをまとめておく。 Webコンテナ、アプリケーションサーバ 代表的なWebコンテナのひとつがApache Tomcatだ。TomcatはHTTPサーバであると同時にJSPやServletを実行するためのコンテナでもある。運用環境で使う場合はApache HTTPd Serverをエッジに設置し、コネクタでつないでWebコンテナを動作させるといったやり方をすることが多い。軽量実装にはJetty、PicoContainer、NanoContainerなどもある。 コンテナ以外にも多くの機能を搭載したサーバが
更新履歴 2008-06-20: 公開 js2-mode をおとなしくさせる js2-mode は Emacs で JavaScript を書くための major-mode です。 外部の JavaScript 処理系無しに (flymake のように) 文法上のエラーを表示するなど、 かなり意欲的な機能を備えています。 しかしその一方で、js2-mode のデフォルトの挙動はかなり独特です。 ここでは、それらの挙動を他の major-mode とそろえる方法を説明します。 インストール js2-mode はファイル単体で配布されていますので、それを load-path の通った場所に置きます。 % wget http://js2-mode.googlecode.com/files/js2-20080616a.el % mv js2-20080616a.el /PATH/TO/js2.el
最近ではAjaxの流行もあり,JavaScriptのライブラリがかなり充実していますね。これらのライブラリの関数を始めとしたJavaScriptの関数を,Flashムービーから呼ぶことができれば,Flashムービーだけでは実現が難しい処理も意外に簡単にできてしまうこともあります。 ムービーを表示しているHTMLドキュメントのURIを取得する あけましておめでとうございます。本年もよろしくお願いいたします。 さてさて,図1のムービーでは,ムービーを表示しているHTMLファイルのURI(URL)を表示しています。 図1:ムービーを表示しているHTMLファイルのURIを取得するムービー(クリックするとムービーを表示します) Flashムービーでは,ムービー自身のURIは「_urlプロパティ」を使って取得できますが,ムービーを表示しているHTMLファイルのURIまでは取得できません。では,図1のム
Yahoo! pipes 話題のサービスです。検索エンジンやRSSフィードなど、さまざまなソースのデータを足し合わせ、フィルタリングし、望みの情報だけを抽出したフィードを作り出すことができます。シンプルな分かりやすさと操作性の良さが特徴です。 Yahoo! pipesは、サーバ側で実行されRSSフィードを出力するサービスで、Ajaxとは直接関係がありません。にもかかわらず、今回のトップで紹介した理由は、パイプのデザインツールが非常によくできているからです。 画面左側のパレットから、必要な機能を選んで配置します。場所は自由にドラッグして決めることができます。そして、パーツ間を線でつなぐと、自動的に滑らかな線で結び付けられます。パーツの場所を移動しても線は追従します。さらに、個々のパーツ内部は入力フィールドになっていて、編集できます。これはAjaxの高度な使用例として見る価値があるでしょう。
Spket IDE Spket IDE is powerful toolkit for JavaScript and XML development. JavaScriptやFirefox拡張等に使われるXULの開発環境「Spket IDE」。 Aptana に続き、Eclipseベースの JavaScript エディタが公開されました。 JavaScript、XUL以外にも、Laszlo、SVG、Yahoo! Widget のコード補完に対応しているようです。 JavaScript開発環境としては、Aptana もすごいですが、Firefox拡張の開発に使われるXULのコード補完は嬉しいですね。 関連エントリ JavaScript開発用IDE:Aptana
それは何? prototype.js は Sam Stephenson によって書かれた JavaScript ライブラリです。 この熟考の上記述された標準に準拠したコードは、Web 2.0 において特徴となるリッチでインタラクティブなウェブページを制作する際の重荷を、あなたの肩から取り去ってくれるでしょう。 もしこのライブラリを使ったことがあるなら、充実したドキュメントがこのライブラリの売りではないことに気がついたはずです。 私は他の開発者と同様に、ソースコードを読み、試行錯誤しながら prototype.js を理解しました。 自分が学んでいる間にメモを取り、それを他の人たちと共有することは価値があるのでは、と考えたのです。 加えて、このライブラリによって提供されているオブジェクト、クラス、関数、拡張機能についての 非公式リファレンス も提供しています。 ここで提供する例とリファレンス
今回の趣旨 あまり JavaScript を書いたことのない人用に講義をしました。 内容 一つ一つ例を見せながら質問を聞き、参加者全員が JavaScript のオブジェクト指向を理解できるまでやりました。時間は当初 40 分の予定でしたが、結局 1.5 時間になりました。 成果 最終的にガイアックスのほとんどの開発者(マークアップエンジニアから、インフラの人まで)が JavaScript を読めるというレベルまでは、到達したのではないかと思います。 まあここからは、テクニックとバッドノウハウの世界ですが・・・。 資料 大切なことは言葉で話して、資料はほとんど例とかソースとかだけですが。教える手順とか参考になるところもあるかもしれないので公開します。 http://usrb.in/amachang/static/gaiax01/
2006-09-07T00:56:49+09:00 なにやら pre 要素に CSS でどういったスタイル定義をしているのか、また、pre 要素をどのようにマークアップしているのか、様々な意見がでている模様。 ブログにコードを貼り付ける方法で悩むの巻(i d e a * i d e a - Lifehacks by 100SHIKI.COM) pre要素へのスタイル指定(hail2u.net - Weblog) Re: i d e a * i d e a - ブログにコードを貼り付ける方法で悩むの巻(hxxk.jp) 情報共有と新たな発見を期待して、どのようにスタイル定義・マークアップしているのか公開することに。まずは注意しているポイントを挙げてみます。 Macintosh 版 Internet Explorer では、div 要素以外に値が visible (初期値) 以外の overf
■ フォームに入力を促すメッセージを出力する JavaScript input type="text" なフォームに最初から「ここに入力して下さい」みたいなメッセージを薄い色で表示させておいて入力を促すようなのありますよね。なんか、あれを、現実逃避気味に書いたので。 function inputDefault(elm, msg) { this.elm = elm; this.msg = msg; this.color = '#999999'; this.bgColor = '#F9FFF9'; } inputDefault.prototype.set = function() { this._cleared = false; this._defColor = this.elm.style.color; this._defBGColor = this.elm.style.background
IE でのメモリリーク ちょこちょこと紹介されているので知っている人も多いと思うが、IE には DOM ノードに絡んだメモリリークの問題がある。これに関しては Microsoft 自身の記事である「Understanding and Solving Internet Explorer Leak Patterns」に詳しいが、簡単にいえば DOM ノードオブジェクトに関する循環参照を作ると、IE を終了させるまでそのオブジェクトが解放されないというものだ。記事によればメモリリークには以下のようなパターンがあるという。 1. 単純な循環参照 ある DOM ノードオブジェクトのプロパティをたどっていくと自分自身に行き着く場合。以下のようなパターンが考えられる。 element.property == element element1.property1 == element2, element2
2005-08-21 遅いコードを貯蓄する 私は仕事柄, 書いたコードに実行速度を要求されることがある. 本当はいつも要求されていて, たまにそれに応えるという方が正しいかもしれない... とにかく, 権力者(上司, 顧客, 同僚)から "遅いので速くしろ" というお言葉を日常的に頂く. とはいえできる範囲の高速化は既に済んでいる. 無い袖は振れない. まわりからの圧力を前にすると, 高速化の余地あるコードがある種の資産に思えてくる. 高速化の "余地" にも色々ある. 直せは確実に速くなる性質の良いもの. 複雑さ故に速くなる "かもしれない" ように見える 不確実性の高い不良債権, まだプロファイルをとっていない未公開株のストックオプション, など. そこで, 優良な財をなす投資の方法 ... つまり遅くてかつ簡単に高速化できるコードを書く方法を, いくつか提案しておく. アクセサ変数を
SimpleJS SimpleJS is a javascript library simple and light proposing functions ready with the use to facilitate the exploitation of ajax. 超軽量JavaScriptフレームワーク「SimpleJS」。サイズはなんと14KB. 機能は次のような感じ。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く