Androidアプリ開発(に限った話ではないですが)でTDDしたいと思ったときに、テスト対象クラスのフィールドをモックで差し替えたい、と思うことがしばしばあります。依存するクラスの振る舞いを固定化することで、テスト対象オブジェクトの振る舞いだけに着目したテストケースを書くことができるからです。 そんな時に、DIコンテナ上でコードを書いていると便利です。以前、少しだけSeasar2+EasyMockでテストを書いていたことがあったのですが、作成したモックオブジェクトの差し替えを、ほぼ全てSeasar2がやってくれたのでものすごく便利でした。 Android開発でもSeasar2+EasyMockくらい簡単にテストを書きたい! ということで、 Android Mockでモックオブジェクトとその振る舞いを定義 RoboGuiceでモックオブジェクトをテスト対象クラスにインジェクト ということをや
Interested in learning about the latest advancements in Android, App Engine, Chrome, Google Web Toolkit, OpenSocial, and more? Register to attend Google I/O, May 27-28 at Moscone West in San Francisco. Two years ago, Bob Lee and Kevin Bourrillion open sourced Google Guice 1.0, a lightweight Java dependency injection framework. Guice takes the pain out of writing and maintaining Java applications b
Web Beans(JSR299)に対抗して、Guice, Spring連合が新しいDIの仕様を出してますね。 http://google-code-updates.blogspot.com/2009/05/javaxinjectinject.html 超ざっくばらんに言うと、まぁGuiceですな。 なぜ、この時期に、Web Beansとかぶるような仕様を出してきたかというと、Web Beans(Gavin)の政治的な動きに対して、Guice(Bob Lee)も政治的な動きで対抗したというところでしょう。あくまでも私見ですが。 これに対して、Gavinが反論を書いていて、それに対して、Bob Leeがさらに答え、子供の喧嘩みたいになっています。 http://in.relation.to/Bloggers/CommentsOnAnnotationsForDependencyInjectio
Never been to DZone Snippets before? Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world // An experiment with Scala an Guice /* * Main.scala * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package scalaapplication1 import
(See a more recent posting on this subject.) I have a body of code that already benefits from Guice dependency injection, and I want to migrate it from a servlet-based architecture to Restlet without losing those benefits. I've had some success, and I figured I'd report on it. I don't mean that I wanted to use Guice to wire up an object graph of Restlets (Components, VirtualHosts, Applications, et
warp-persitのついでに見つけたWebアプリ用フレームワーク.曰く, Warp is a RESTful, lightweight analog to Apache Tapestry and is powered by Guice. なんだそうな.Tapestryがどう気に喰わないかは,こちらに書いてる(読んでないけど). →warptapestrycompare - www どこまでできるのか,まだ不明な点が多いが,記述するコードは結構シンプルで好感が持てる.でも,独特だよなぁ(ちょっと,Stapler入ってる感じ?). 「マスタリングJavaEE5(asin:479811281X)」を一通り読んだが,JSFの印象を好転することはできなかったなぁ。正直,よほど出来のいいIDEでも無い限り,近寄りたくない。:-D しかしなんだ。思い切ってJSPを捨てた*1WicketやClick,
Pivoting your developer career into AI? Here's what to know Want to pivot your software development career and focus on AI? Here's how to pick from several paths, hone specific skills and evaluate potential AI roles and organizations. Jira story vs. epic: What's the difference? Anyone who has opened a Scrum board in Jira knows projects are organized into stories and epics. But what exactly is the
Wicket-Guiceが出来ましたね。 まあ、詳しくは矢野さんの記事読んでください。 ここのまとめでも書かれているように、GuiceはWicketのようにJavaの利点を最大限に活用したDIコンテナなので、Wicketとの相性はとてもいいはずです。 ってことで、標準ガチガチ準拠のWebアプリを作成しなければいけない場合以外は、もう、Wicket-Guiceで僕の中では確定です。 言語がJavaである場合は、ですが(笑) で、こうなると、パーシステンス層をどうしましょ?ってことになりますよね。 S2Wicket-Seasar2ならばS2Daoで確定でいいし、Wicket-SpringならSpringとの連携がしやすいもの(例えばHibernate)でいいでしょうし、Wicket-javaeeならJPA準拠のORMならなんでもいいでしょう。 しかし、せっかくWicketとGuiceというX
正式名称がこれであっているのかよくわからないのですが、GuiceとHibernateを組み合わせたものみたいです(今後はJPAもサポートするらしいです)。 http://www.wideplay.com/guicewebextensions2 Guice WebExtensions Persistの一機能であるDynamic Findersを使うとインタフェースとアノテーションだけでDAOが作れるらしいです。(検索のメソッドはDAOだけでなくエンティティにも持たせられます。これをDDDとか言っていますが、ちょっと違うような。) http://www.wideplay.com/dynamicfinders 機能は多くないです。ざっとこんな感じ。 アノテーションでクエリをかける(パラメータもアノテーションで指定) アノテーションで名前つきクエリを指定できる アノテーションでページングを指定でき
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く