On 02/13/2013 04:22 PM, adel alfar wrote:
> Thanks again Martin!
>
> The site link was helpful. My ultimate goal is to replace Ebean with
> (an eventual drop in) MyBatis plugin.
You probably can't use annotated ebean models, so it can't really be a
drop-in. Or am I missing
s.th.?
Yes, use cases my vary as far as
> best practices are concerned, but its good to know that you went through
> that already and did not see any resistance from the Play framework's
> play with MyBatis artifacts.
What just comes to my mind is build setup: you probably want to include
mapper xml files (located besides Mappers in the source folder) in the
classpath. To achieve this you have to adjust your Build.scala, for this
add this to play.Project(...).settings(
// Add app folder as resource directory so that mybatis mapper xml
files are visible
unmanagedResourceDirectories in Compile <+= baseDirectory( _ / "app" ),
// but filter out java and html files that would then also be copied
to the classpath
excludeFilter in Compile in unmanagedResources := "*.java" || "*.html",
...)
I would like to participate in an MyBatis
> module/plugin effort whenever that begins...and if that does not begin,
> then I will eventually start it.
If there's
s.th. that could really be useful I'd also contribute.
As it depends on the kind of integration / DI, probably for each DI
library a module/plugin would have to be provided. I need to think it a
bit so get a better idea how the plugin could look like / could be used.
Cheers,
Martin
>
>
> On Wednesday, February 13, 2013 3:10:03 AM UTC-6, Martin Grotzke wrote:
>
> On 02/12/2013 11:43 PM, adel alfar wrote:
> > I really dont have a particular question. I was thinking of some
> more
> > information/examples about Play/MyBatis integration which might
> include
> > MyBatis maps config/setup, ibator setup, service layer best practices
> > for Play's web apps, Caching, how the MyBatis session plays with
> Play!
> > 2.1 stateless nature, JSON, DAOs...
>
> I don't have further links to
s.th <
http://s.th>. specific to
> mybatis + play, but I
> also don't miss anything.
>
> Regarding MyBatis config / setup the MyBatis / MyBatis Guice docs are
> really helpful (
http://www.mybatis.org/guice/).
> Service layer best practices etc. are not different to general
> architectural rules (the same as in any other java app), so you can do
> what you want (layers, DDD etc.).
>
> MyBatis caching of course has to be used with care, this depends on the
> specific deployment scenario.
> When mentioning the mybatis session in combination with plays stateless
> nature, do you have anything special in mind?
>
> If you have an idea which specific topic should be further highlighted
> I'd be happy to help.
>
> Cheers,
> Martin
>
>
> >
> > On Tuesday, February 12, 2013 3:41:20 PM UTC-6, Martin Grotzke wrote:
> >
> > Great that it's working for you! I also pushed the code for
> the blog
> > post to github (referenced from the post now):
> >
https://github.com/inoio/play-mybatis-sample
> <
https://github.com/inoio/play-mybatis-sample>
> > <
https://github.com/inoio/play-mybatis-sample
> <
https://github.com/inoio/play-mybatis-sample>>
> >
> > Regarding extra info/links for examples, info, tutorials: Are you
> > looking for
s.th <
http://s.th> <
http://s.th>. in particular?