Felipe Gaúcho works as senior software engineer at Netcetera AG in Switzerland. He is a well known Brazilian JUG leader and open-source evangelist. Felipe works with Java since its early versions and has plans to keep that Java tradition as it is. When he is not coding, he prefers to listen reggae and travel around with his lovely wife Alena and his son Rodrigo. Felipe is a DZone MVB and is not an employee of DZone and has posted 29 posts at DZone. View Full User Profile

A REST Project With Glassfish

09.07.2009
| 6740 views |
  • submit to reddit
I am working out a new pet project, an online system to support PUJ Competitions. It is still a work under progress and I plan to start to blog some technical results here, but until that glorious free time I would give you a glimpse about what is keeping my blog so quiet :)

So, PUJ is an academic competition where undergraduate student submit their homeworks for the evaluation of Senior Professionals. It is a nice competition planned to happen in some JUGs in Brazil - and I hope to see it adopted in several other JUGs around the world.

I am producing basically a RESTfull web-service, based on Jersey and EJB 3.0. It is part of the self-education on Glassfish technologies I've started few years ago. I have so far:

  • Server: a EJB 3.0 backend + JPA/TopLink
  • Middleware: a Jersey RESTfull interface + JMS features like sending notification by email, twitter, etc
  • Frontend: an HTTP client - a DWR GUI...

The code and the application design is all under progress nowadays, noisy and smoking a bit ... but there are already some goodies for the eagers by novelties, so you can taste a bit of my REST-API on these HTTP Resources:

Observations about the above API:

  • JSON - to receive the responses in the json format, the client should include the HTTP Header Accept=application/json
  • It will support HATEOAS asap, I am still dealing with the design requirements  for implementing it on Java with Jersey. If you have an idea on how to implement it elegantly, please share this information with us. Basically I plan to include a link on every element returned from the server, so spiders or htt client can extract the next step from the resource itself instead of having a previous knowledge about where to find what.
  • Most of the data comes directly from the database, serialized by JAXB and filtered onthe Jersey layer.
  • Pagination works fine - managed by the the persistence layer, and using Jersey @DefaultValues in case no parameter is suplied by the client.
  • File upload is coming soon.
  • Security is also enabled using web.xml configurations. It is just disabled for testing purposes.

It is a lot of fun, I am learning a lot and missing a lot some people to produce GUIs to consume my service. We have a brave frontend developer (Sombriks) and some other students flerting with the chance to collaborate. You have your opportunity, just get your preferred HTTP enabled technology and start to consume my RESTful service.. and be my guest to ask anything about it.

Interested? So here are the links to know more about it:

That's it, I hope to find time to publish more detailed information about the project in the next few weeks, but for now this is the best I can offer ..

From http://weblogs.java.net/blog/felipegaucho

Published at DZone with permission of Felipe Gaúcho, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Odero Kennedy replied on Wed, 2009/09/09 - 4:34am

Hi Felipe. Am interested in creating a front-end for the PUJ System.

Whats the period of time like? Put another way, how much time do i have? :D

 Thanx en keep up with the good work!

Felipe Gaúcho replied on Wed, 2009/09/09 - 7:50am in response to: Odero Kennedy

kodero83,

 your help is very and always welcome :)

 We have 1 prototype: http://fgaucho.dyndns.org:8080/arena-dwr/

It is a student effort to create a GUI with DWR.

 

The good point of our project is: it is built by Maven, so we can create a new module to accomodate your preferred technololy. So, if you like Ruby or JSF, JavaFx or any other frontend technology, we just include a Maven module for you... and then you are free to take decisions about this module.. :)

The PUJ competitions will run at the end of the year in Brazil, but this is a continuous effort to provide an online system to PUJ - you can start anytime and it will be done when it is done :) The main goal of this project are:

- to have a real world example of Jersey service. With real people consuming the service.

- to learn a lot and to have fun while doing that.

if you like the idea, please register yourself in the Kenai project and checkout all src code .. and the, please start ;)

 

Odero Kennedy replied on Thu, 2009/09/10 - 2:47am in response to: Felipe Gaúcho

Thanks Felipe.

Is the Kenai Project only open to student? I tried signing up but i couldn't since am not a student (atleast not now ;-) ). What do u advice?

Felipe Gaúcho replied on Thu, 2009/09/10 - 6:16am

Kenai and the PUJ project are open for everyone... you should be able to register yourself at Kenai and do request an Observer role in the project.

 You should start here: https://kenai.com/people/signup

 * if you already have a kenai login and you are  having problems to join the project, you can send me a private email to fgaucho @ gmail and I will check what is the problem...

john green green replied on Tue, 2009/11/03 - 2:20am

The GlassFish v3 Technology Preview 2 Ugg shoes Application Server product greatly simplifies the task of creating and administering web applications. The application server does more than webapplications, should we emphasize on web applications ?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.