IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
06/06/2011 開発 JavaScript Tweet もう一つYokohama.rb 第9回でやっていたことをシェアします。 Backbone.jsの勉強をするため、Sinatra + Backbone.jsで簡単なサンプルを作っていました。 ・・・しかもCoffeeScriptで。 Backbone.jsとは? ここを読んでいる方は、おそらくサーバーサイドをPHPなりRubyなりで書きつつも、クライアントサイドをjQueryなどを使ってバリバリ書いていることと思います。 すると、ある程度のところまではjQueryの力もあって楽々書けるのですが、だんだん機能が増えるにしたがってサーバーとのAjaxなやりとりや、データの変更に伴うDOM操作などがあちこちに散在し、コードにだんだん穢れが溜まっていってしまいます。 そこで今回のBackbone.jsです。これの力を借りてクライアント
最近CoffeeScript界隈のブロゴスフィア(死語)を賑わせていた「CoffeeScriptを使うべきか、使わざるべきか?」という話題についてまとめてみた。 以下の記事紹介は超訳かつ要約なので詳しく知りたい人は元記事を参照のこと。 ことの発端はこの記事。 SnackJSの作者がCoffeeScriptをディスる。 A Case Against Using CoffeeScript by Ryan Florence デバッグの問題 CoffeeScriptが生成するJavaScriptはきちんとしているけど、結局は自分が書いたコードじゃないため読みにくい。自分で直接書いたほうが見やすい。 それにCoffeeScriptをデバッグするワークフローは大変だ。 まず問題がJavaScript内のどこで発生したのかを突き止める(CoffeeScriptのコードと行単位で対応してないから大変だ)
何とか1年の間を空けずに更新することができました(笑 O'reillyから発売している洋本の"The Little book on CoffeeScript"は著者のAlex MacCawさんにより、OSSとしてgithub上に全文が公開されています。 The Little Book on CoffeeScript: The JavaScript Developer's Guide to Building Better Web Apps 作者: Alex MacCaw出版社/メーカー: O'Reilly Media発売日: 2012/02/03メディア: ペーパーバック購入: 2人 クリック: 98回この商品を含むブログ (1件) を見る こちらで全文公開中。 The Little Book on CoffeeScript タイトルが"CoffeeScriptの小さな本"である通り、この本
個人製作のシステムのjsをcoffeeに完全移行したのでその雑感を書きます。あくまでも個人的な感想です。感じ方は人それぞれです。 ちなみに僕は勉強を兼ねて手で移行させましたが、js2coffeeというツールを使うと自動で変換してくれるらしいです。 先に結論 coffeeの方がいいと思う。 よくある批判に「js書けばいいじゃん」というのがあるけど、極端な話、「アセンブラ書けばいいじゃん」と高級言語が出てきた頃に言ってた人と主張の方向性は似てると思う。極端すぎるけど。 jsには落とし穴がいっぱいある。慣れてもたまにはまる。varを忘れたり「関数の頭で全部のvarを列挙する」というプラクティスに従ってたら、冗長になって管理するコスト高くなったり。 coffeeを使うとそういう余計な問題を意識しなくてよくなるのはとても大きい。 しかもjsでできることの全てをcoffeeでできる。工夫が必要になる場
MVC Web Application Framework for NodeJS written in CoffeeScript CoreJS is an Open Source Web Application Framework, using the MVC Architecture written in CoffeeScript, allowing you to create Powerful Web Applications with ease, keeping your code clean & readable. Using an Object Oriented workflow, you can create, extend and reuse classes to be used within your applications. You can configure seve
CoffeeScript JavaScript require.js nikki Tweet JS の読込み順を征する者は なんか色々征する! with CoffeeScript ガツガツした JavaScript 案件をこなしていると、必ず直面するのが JavaSscript の読み込み順問題。 再利用性への考慮だったり、不必要なコードを読まないようにとモジュールを細分化した場合、 どうしてもその分 HTTP リクエストの回数が増えてしまいます。 ブラウザは読める物から読んでいくので、jQuery に依存しているのに先に読まれて jQuery がないと怒られるだとか、そういった経験は皆さんも一度はあるのではないでしょうか。 特に IE6 や IE7 などで、しょっちゅうそういった自体に遭遇するかと。 そのあたりをいい感じに解決するのが今回紹介する require.js です。
This document discusses using CoffeeScript, Backbone.js, and Jasmine BDD to build single page web applications. It begins by explaining why CoffeeScript is useful for cleaning up JavaScript code and avoiding errors. It then discusses how Backbone.js provides structure for single page apps by defining models, collections, views and routers. It notes that Backbone works well with CoffeeScript. Final
すでにCoffeeScriptについてはいろいろ調べていて、 書いてみたりしたこともあったのですが、 Node.js自体はほぼノータッチでした いろいろすばらしいことはわかっていたものの、 なかなか触る機会がなくて・・・(´-ω-) 皆さんご存じだと思いますが、 「Node.js」は話題のサーバサイドJSの一つです ちょうど同時期に二大雑誌が特集してます WEB+DB PRESS Vol.64 作者: 柏木泰幸,松野紘明,林聖高,杉義宏,飯塚直,高橋征義,徳永拓之,Tehu(張惺),中島聡,おにたま出版社/メーカー: 技術評論社発売日: 2011/08/24メディア: 大型本購入: 17人 クリック: 714回この商品を含むブログ (16件) を見る Software Design (ソフトウェア デザイン) 2011年 09月号 [雑誌] 出版社/メーカー: 技術評論社発売日: 2011
久々にTitaniumを触るにあたってCoffeeScriptのコンパイルをGuardにまかせることにしてみたメモ。 Guardはファイルの変更を監視して、変更があったタイミングで何らかの処理を実行できるツール。 これを利用するとCoffeeScriptを書いたそばから自動的にJavaScriptに変換するなんてことも簡単にできるわけで。 そしてそのものずばりのことを実現するGuard::CoffeeScriptなんてものがあったりします。 Guard::CoffeeScriptの導入 gem install guard-coffeescript これでGuard本体も入る。あ、要Rubyです。 追記 ファイルシステム監視のために以下のGemも必要だった。 gem install rb-fsevent 上記はMacの場合でLinuxとWindowsの場合は違うGemになるので詳しくはGua
20111011 追記 node.jsをインストールしないと.coffee内の日本語が.jsにコンパイルされた後に欠落する問題がありました。 brew install node.js で、node.jsをインストールすることをおすすめします。 Homebrewは https://github.com/mxcl/homebrew/wiki/installation を参考に簡単にインストールできます。 もう生JSは触れない Titaniumでロジックを書いていて生JSの非力さに絶望していたところ、CoffeeScriptのことを思い出して食わず嫌いで触ってなかったので試しにCoffeeScriptを触ってみたら壮絶良かったので、もうTitaniumもCoffeeScriptで書こうと思いました。 Guardで自動コンパイル CoffeeScriptはコンパイルすることでJavaScriptの
“PhoneGap”:http://www.phonegap.com/ is an HTML application platform that runs natively on iOS. After the initial project setup, PhoneGap allows you to pretend you are just writing a web application, meaning you spend your day in HTML, CSS and javascript instead of Objective-C. When I had the opportunity to write a PhoneGap application for a project demo, I decided to take the development process o
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く