Well that depends, but in many cases it's far more than what you really need...
Continuing from my earlier post about building an AJAX / SOAP App in 15 minutes, the only way to build an app this fast is KISS. If you're worrying about EJBs, Relational DBMS, or file storage, you've gone too far.
Here's a screenshot of the completed app (you can try a sample of the app yourself here):
For Sticky Notes, the only way to KISS was to stay entirely in the Object domain; that meant keeping a strict eye for only what was necessary, and not a bit more. Thus for the Server side, I chose Terracotta because:
- I can code plain POJOs without having to worry about another code layer
- With the Terracotta server in persistence-mode I get to stay in the Object domain, and persist my objects naturally.
- It exposes SOAP services from simple POJOs - no work required.
- It's a cinch to run standalone without a container (it uses Jetty)
- interfaces with SOAP
If you saw my Notes service version 1.0, it needed a few tweaks to implement the full app. I've updated the Notes project which is now at version 1.1.
In particular, I had to
- add a "getNotes()" service, which just returns an array of integer ids representing the notes that are stored.
- add a "deleteNote(int id)" service. This deletes a note given the input id.
- beefed up the "setNote()" service. I added x, y, width, and height parameters. (Of course I had to add a Note object to store all of these values as well.)
- beefed up the "getNote()" service. Obviously this now has to return x, y, width and height in addition to the msg.
NOTE THE CODE LINKED TO BELOW IS DEPRECATED! Terracotta is now Open Source, the code below will work fine but has not been updated to the recent versions of Terracotta. There is also a full Terracotta Forge available for projects.
The full source code is available at the Terracotta Project Site. In addition you can view a simple version of the app (which has all of the SOAP removed, so you can see it in action, but no persistence takes place) here.