[hibernate-dev] [OGM][HSEARCH] Hibernate OGM and Hibernate Search samples

Flemming Harms flemming.harms at gmail.com
Fri Jul 29 07:31:58 EDT 2016


Hi Sanne & Davide

I didn’t mean to imply the integration test wasn’t good enough, and the
main purpose was not to use examples as test cover, but if we build a rich
collection of examples it might be a good source for testing as a extra
bonus in the future.

I think integration tests serves different purpose in my mind. Integrations
tests is used for testing a very specific use case or issues. They are part
of the source code and will require you to check out the hibernate source
code for running and understand how they works. IMHO not very end user
friendly.

An example serve the purpose of showing how you use the a specific feature
/ combination, eg “Mongodb with Hibernate OGM” or “Query data with
Hibernate OGM” from an end user point aka Developer. It’s a small isolated
Arquillian / Unit tests which is better documented and easy to run without
the need of check out all the Hibernate source code.

The reason I suggested a new examples/samples repository is because you
work around the dependency problem Sanne mention, and it becomes a joint
venture between the different Hibernate projects and the community. I also
believe it will be easier to get people to contribute examples if this is
separated from the hibernate source code.

Davide,  I only have one Hibernate OGM example(
https://github.com/fharms/java-examples/tree/upgrade_ogm_wildfly10) and
this is not well documented because it is explained in a blog post. But I
like how the JavaEE 7 -  https://github.com/javaee-samples/javaee7-samples
do it

But i’m willing to help creating more examples :-)

Thanks,
Flemming

2016-07-28 18:35 GMT+02:00 Davide D'Alto <daltodavide at gmail.com>:

> > Secondary aspect: let's assume we had good enough integration tests in
> > OGM. Should we advertise these more prominently in documentation?
>
> I don't think we should, an integration test is different from an example.
> I'm afraid will be harder for people to recognize what it is required
> and what it is part of the test.
> Also an example should have additional comments describing what's
> going on and what can be changed (IMHO).
>
> I think we need an additional module with proper examples with proper
> separation of project sources, configuration and tests.
>
> We should also consider working on the Stack Overflow documentation:
> http://stackoverflow.com/documentation/improvement-requests/view/907
>
> Flemming, if you have already some example project on your github we
> can have a look and think about the best way to integrate it.
>
> Thanks,
> Davide
>
>
> On Thu, Jul 28, 2016 at 4:38 PM, Sanne Grinovero <sanne at hibernate.org>
> wrote:
> > Hi Flemming,
> >
> > I agree on the importance to have some runnable examples, but I'm
> > afraid that the "demos" repository wouldn't be kept up to date with
> > every single release.
> > Introducing more tasks to perform during a release is not desirable,
> > as the release process is quite complex already.
> >
> > So I propose that such examples belong in the integration tests of the
> > projects; specifically, a JavaEE7 example using both Hibernate Search
> > and Hibernate OGM would need to be maintained by the OGM project (as
> > OGM depends on Search, we don't want to introduce a dependency from
> > Search to OGM).
> >
> > In fact there are some integration tests already, running on WildFly
> > for each single build of OGM:
> >  -
> https://github.com/hibernate/hibernate-ogm/blob/master/integrationtest/src/test/java/org/hibernate/ogm/test/integration/infinispan/SearchIntegrationIT.java
> >
> > I guess these are too simple for your needs? Happy to extend these,
> > especially if you have specific pointers or - even better - willing to
> > send PRs.
> >
> > Secondary aspect: let's assume we had good enough integration tests in
> > OGM. Should we advertise these more prominently in documentation?
> >
> > Thanks,
> > Sanne
> >
> >
> > On 27 July 2016 at 17:55, Flemming Harms <flemming.harms at gmail.com>
> wrote:
> >> Folks,
> >>
> >> Is there something similar to javaee7-samples for Hibernate OGM and
> HSEARCH
> >> today? I know the Hibernate Demo repo exist, but from what I can read
> this
> >> is demos you have created for various talk and presentations.
> >>
> >> If not I would suggest a new repository is created with samples showing
> how
> >> to use OGM, HSEARCH in various ways and configurations. The Hibernate
> Demo
> >> repo could be a good starting point, but I’m thinking a new repo where
> we
> >> divide into modules to make it easy to upgrade and maintain the samples
> >> from a parent configuration file etc.
> >>
> >> I personally learn much more from examples and then I can use the
> >> documentation as reference point. And this will also be good reference
> >> repository for testing against when releasing a new version.
> >>
> >> I would like to contribute with various samples to help build the
> repository
> >>
> >> What do you think?
> >>
> >> /Flemming
> >> _______________________________________________
> >> hibernate-dev mailing list
> >> hibernate-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>



-- 

Kind regards / Med Venlig Hilsen
Flemming Harms

   -

https://twitter.com/fnharms
https://dk.linkedin.com/in/fharms


More information about the hibernate-dev mailing list