Fanbatis is a Fantom wrapper for mybatis and also the default ORM that ships with tales(as of v0.3). On the java world, I think mybatis perfectly hits the sweet middle-ground by providing just as much abstraction as required and no more. I extracted Fanbatis out of tales into its own project for better maintenance and for it be useful outside of tales (or when using slan or spectre web frameworks)
class BlogSqlMap : SqlMap{
@Select
Blog[] getBlogsByAuthor(Int authorId, Int limit){`
list(sql<|
select * from blog
where author_id = #{authorId}
limit 0, #{limit}
|>)
}
}
kaushik Thu 5 May 2011
Fanbatis is a Fantom wrapper for mybatis and also the default ORM that ships with tales(as of v0.3). On the java world, I think mybatis perfectly hits the sweet middle-ground by providing just as much abstraction as required and no more. I extracted Fanbatis out of tales into its own project for better maintenance and for it be useful outside of tales (or when using slan or spectre web frameworks)
Here's the link to the screen-cast and documentation: http://www.talesframework.org/fanbatis/
Here are a few examples of using Fanbatis:
Query using Sql Maps
.. then
Query Using Short-hand Syntax
Ad-hoc Queries
Thanks!
andy Thu 5 May 2011
Looks sweet Kaushik!