Hey Carsten, That's a fair assessment. Thank you!
:) - Ray On Fri, Sep 6, 2019 at 4:09 AM Carsten Ziegeler <[email protected]> wrote: > Thanks Ray > > Am 05.09.2019 um 21:18 schrieb Raymond Auge: > > Looks cool! > > > > Couple points: > > - you could avoid `-exportcontents: ${packages;VERSIONED}` by using @ > > org.osgi.annotation.bundle.Export > ah right, we added that in R7 - the code was originally written for R6 > > > - you could avoid having to write your own @BeanPropertyTypes for Http > > Whiteboard properties by using this dependency: > > <dependency> > > <groupId>org.apache.aries.cdi</groupId> > > <artifactId>org.apache.aries.cdi.extra</artifactId> > > <version>1.0.2</version> > > </dependency> > > It contains clones of all the known ComponentPropertyTypes for use in > CDI. > > Might save you a some lines of code. > Cool, great > > > > > > Otherwise it looks really nice! :D > > > Thanks > > > Now tell me, how was your experience using CDI? (merely intended to get > > rational feedback ;) ) > > > I have the same demo app done with DS; getting started with DS is imho > way simpler and feels easier - but of course this might be a little bit > biased as I'm using DS for years. > > It took me some time to figure out which annotations to use to let bnd > know about my beans or which annotations to use to make the bean > configurable. It is somehow documented out there, but picking up the > pieces you need to know here and there was some effort. > And you need more annotations than you need for DS - at least at the > moment; with the cdi.extra project you mention above its already > slightly better. > > It was also hard to figure out why something didn't work at runtime; I > don't remember the exact problem, but my beans didn't work (because I > did something stupid with the annotations). This wasn't detected at > build time, but at runtime, it simply didn't work and the error message > was very general. Sorry that I don't have the details anymore > > But on the other hand this is the first version, so some road bumps here > and there are expected. And considering this, it works pretty well. > > Or in short: if I would be used to CDI I probably would consider this > approach. > > Regards > Carsten > -- > Carsten Ziegeler > Adobe Research Switzerland > [email protected] > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay)
