juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament" <johndam...@apache.org>
Subject Re: More/Simpler Examples
Date Mon, 09 Jan 2017 15:42:36 GMT
On Mon, Jan 9, 2017 at 9:30 AM James Bognar <james.bognar@salesforce.com>
wrote:

> Hi John,
>
> This is great!  Some notes...
>
> There's an existing juneau-samples project.  But it's more targeted towards
> REST examples.  Maybe have the following two projects...
>
>    - juneau-examples-rest
>    - juneau-examples-core
>
>
Yes, that was my intention.  I didn't touch the microservice one yet for a
couple of reasons.  I wanted to start with a simple example, a little more
explanatory than what was on the homepage, but showing off a good set of
features (e.g. without digging into javadocs, its hard to figure out what
the right annotations are).


> While we're at it, maybe rename the following projects to highlight that
> they're REST apis?...
>
>    - juneau-server -> juneau.rest
>    - juneau.client -> juneau.rest.client
>
>
I think that would be better, and help clear things up.  But I also suspect
there's some other changes that could go in.  For instance, adding RDF
support requires me to bring in jena manually.  I would expect that if we
had a juneau-core-rdf module it would bring in jena automatically.


>
> Your example uses constructor arguments for setting bean properties instead
> of setters.  While this works fine, setters are generally faster.  With
> setters, the bean can be instantiated immediately and properties set as we
> find them in the input.  But with constructor args, we have to cache the
> property values temporarily before we call the constructor.  So there's an
> additional HashMap being created.  Just something to keep in mind.
>
>
Its an interesting tradeoff.  That could be optimized though to only lazily
parse the JSON as you're hitting parameters on the constructor.


>
> On Sun, Jan 8, 2017 at 10:07 PM, John D. Ament <johndament@apache.org>
> wrote:
>
> > Hey
> >
> > So starting to try out Juneau.  There's a steep learning curve from what
> I
> > can tell with using Juneau.  Its powerful, but not clear which classes
> > should/should not be used.
> >
> > I started putting together some simple examples based on core with simple
> > use cases - I have a POJO that I want to convert to JSON to RDF.  It'll
> be
> > good to add more content types and robust examples for how core works
> soon,
> > but one step at a time.
> >
> > https://github.com/apache/incubator-juneau/commit/
> > 2c690b6416740bb03646540dfcd765e23f63ac47
> >
> > It's sitting on a branch as I wanted to make sure this was wanted and
> could
> > be helpful in getting people using Juneau.  I went with straight forward
> > code samples that are commented to explain how they work.
> >
> > John
> >
>
>
>
> --
> James Bognar
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message