Code Archive Skip to content Google About Google Privacy Terms
Write your templates in pure HTML Clean of any inline logic or special tags CSS selectors are used to bridge the HTML with Javascript actions Providing a radical separation between the representation and the logic Here we explain why we did pure.js back in 2008 And you can ask your questions to the user group Download pure.js on Github We have been happily using pure.js since 2008 for our own web
I’ve had a little utility that I’ve been kicking around for some time now that I’ve found to be quite useful in my JavaScript application-building endeavors. It’s a super-simple templating function that is fast, caches quickly, and is easy to use. I have a couple tricks that I use to make it real fun to mess with. Here’s the source code to the templating function (a more-refined version of this co
JSmartyにはテンプレート関係のAPI(assignやdisplay)以外にも色々なオブジェクトを用意しているのですがその中のPluginオブジェクトの紹介。テンプレートエンジンとしての機能を利用しなくても以下のように活用できます。 便利な使い方 JavaScriptでsprintfしたい!あとグローバル領域を汚したくないし…っていうときに使えます。JSmarty.jsをコールするとグローバル領域は基本的にJSmartyしか増えません。 <script src="JSmarty.js"></script> (function() { // 注意:初回呼出はSAJAXで呼出すので時間がかかる。 // 2回目以降はキャッシュ呼び出しています。 var sprintf = JSmarty.Plugin.getFunction('php.sprintf'); alert(sprintf("%0
Ajaxでぐりぐりやっていると、どうしてもJavaScriptからhtmlを生成する場面が多くなります。一つ一つdocument.createElementして気が狂いそうになったり、script.aculo.usのBuildler.nodeでDOM構築してみたはいいけど、面倒な部分をinnerHTMLで書いたらhtmlがエスケープされてもにょった、なんてことになりがちです。このままだと開発効率も保守性もひどいことになってしまいます。IEでJavaScriptがうまく動かなくて何とか修正した、と思ったらCSSのバグにブチ当たってDOM構成変更、なんてことをやっていると動いた頃には二度と見返したくないソースの出来上がり。JavaScriptコーディングとCSSの分業なんて夢のまた夢です。 そんな状況を打破するためにJemplateやJSmartyといったJavaScriptのテンプレートエン
Ever since Smarty rocked my world, I have been on the lookout for template engines in each and every aspect of development. The most recent stumbling block is with JavaScript — HTML formatted strings are ugly but functional while actually creating the elements is just plain horrible. Apparently, client side code is screaming for a template engine, but what is currently available and is any of it p
CJTK - JSONPとJavaScriptを使ったテンプレートキット作った JSONPなどでデータを取得して、HTML中の任意なAttributeにマクロを埋むタイプのテンプレートキットを作りました。 別にJSONPじゃなくても、staticもデータ構造を定義する事も出来るし、Ajaxサポート書けばAjax経由でデータを取得できます。 マクロ展開はDOM探索で色々処理をしています。 Model = JSONP 、 View = DOM って感じかも。 他にもJKL.Hinaや、JSmartyなどがあります、大きな違いは専用構文を利用しないでテンプレート展開が出来たりと、かなりシンプルです。 他の特徴は ・DOM操作のみでテンプレート展開 ・JSONP対応 ・テンプレート用のデータ領域を用意する事無く、HTMLに直接テンプレートを記入出来る ・データ展開先を設定不要。class要素などか
amix.dk : RND - fast and simple JS template system As web applications get more dynamic and complex, it's crucial to know what's the fastest way to render content. I have done some research and I am gladly sharing it with you. 高速&シンプルなJavascriptテンプレートシステム『RND』の紹介。 Ajaxなどを駆使して動的にWebアプリケーションのHTMLを書き換える手法は、最近のWebアプリのトレンドとなっています。 動的にWebアプリケーションのHTMLを書き換える方法としては次があります。 これらの方法のそれぞれのベンチマークを取ると、 document.
テンプレート関連 JavaScript 最終更新 2008/9/23 日本野望の会−Yabooo.org » Javascript でHTML::Template | Matthias Georgi - Patroon - a Javascript Template Engine google-jstemplate - Google Code Ajaxian » Django Template Language in JavaScript EJS - Embedded JavaScript at Edward Benson JsonML (JSON Markup Language) IT戦記 - JsonML を使う高速テンプレートエンジン「JsonML.Template」 JSLT javascript-based XSLT alternative ZParse - Advanced J
Thousand Years - JSmartyとは? JSmartyはJavaScriptで動くテンプレートエンジンです。PHPにSmartyっていうテンプレートエンジンがあります。それのぶっちゃけいってクローン(完全ではないですが…)になります。なので利用するメソッドやプロパティととかもそんままでSmartyのテンプレートがそんまま利用できます(たぶん)あと当然ながらプラグインとかも対応しています。 JavaScriptで動くテンプレートエンジン、JSmarty。 次のような使い方で、Smartyとほぼ同様に動作するそうです。 ■テンプレート'foo.tpl' {$foo} ■コード var render = new JSmarty; render.assign('foo','Hello World!!'); render.display('foo.tpl'); ■結果 Hello W
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く