users@jersey.java.net

[Jersey] Question: Best practices related to Eclipse project structure

From: Andrew Feller <afelle1_at_lsu.edu>
Date: Thu, 05 Feb 2009 07:52:59 -0600

Thank you Farrukh for your response!

I am familiar with Maven and can relate to some of your own earlier
experiences with it, however my employer doesn't have any plans to switching
to Maven at this time.

Could you elaborate on how Maven helps you structure your Jersey REST
services? In particular, what kind of package layout do you use?

In the past when we developed Struts 1/2 based applications, we would
typically organize classes based upon functionality: POJOs, Actions, DAOs,
etc. With the Jersey REST services we are trying to architect, the knee
jerk thoughts we have come up with off the bat are: Resources (classes where
REST requests are made to) and POJOs.

I suppose another way to look at this question is: When developing a
typical, complete Jersey REST service, what are all of the different
elements that are required and what options for project layouts are
available?

Regards,
Andrew


> Date: Wed, 04 Feb 2009 16:44:32 -0500
> From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
> Content-type: text/plain; charset=ISO-8859-1; format=flowed
> Subject: [Jersey] Question: Best practices related to Eclipse project
> structure
>
>
> This may not be quite what you are looking for but....
>
> I have found maven2 to be the best practice for project structure, build
> tooling, dependency management, and oh yes IDE integration.
> With a maven2 based project you can expect the same project structure to
> work "as is" with NetBeans 6.5, Eclipse 3.4, IDEA... Each IDE requires a
> plugin to support maven but once you install that your project structure
> is completely portable across IDEs. And you get all the benefits of maven:
>
> <http://farrukhnajmi.blogspot.com/2008/02/why-maven-rocks-in-beginning-there-w
> as.html>
>
> BTW Maven has its own structure for project layout which I have begin to
> appreciate very much over time.
>
> Andrew Feller wrote:
>> QUESTION: Have any best practices been cited for creating Jersey REST
>> services with emphasis on using Eclipse and package/class layout?
>> ENVIRONMENT: jersey-bundle-1.0.1-SNAPSHOT, jersey-multipart, jaxb-api,
>> jab-impl, stax-api, jsr311-api-1.0
>> CONTEXT
>>
>> For our normal web application development, we have a standard
>> skeleton project that is preconfigured with necessary project
>> dependencies, common Spring configuration files, and whatever is
>> needed. We are trying to determine a similar skeleton for our Jersey
>> REST services. This raises several key questions:
>>
>> 1. Is there a particular package layout that is best suited to Jersey
>> REST services?
>> 2. When should REST services be split up into multiple classes versus
>> aggregated resources?
>> 3. Should a REST service that consumes and produces XML have a single
>> XSD that covers both request and response XML data or separate XSDs?
>>
>> I appreciate any assistance and insights!
>>
>> Sincerely,
>> Andrew
>>
>
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com







-- 
Andrew Feller, Analyst
LSU University Information Services
200 Frey Computing Services Center
Baton Rouge, LA 70803
Office: 225.578.3737
Fax: 225.578.6400