Hello World, Getting TS + Domain Model + JSP to support Updates

Setup Tomcat and Eclipse:

Start where you left off with your solution from the TDD previous tutorial

Start Eclipse:

eclipse_luna

Use your previous project:

Server should already be set up:

Ids and Versions:

  1. Right now your database table, RDG and xml does not know or care about ids and version
  2. add id and version everywhere
  3. Consider that delete should take an id and version
  4. This means the link to delete should take an id and version
  5. find should take an id, not first name
  6. How will you get new ids for adding people? Just do something for now.
    1. You could make a service utility that is static/synchronized, scan the table the first time and store the max id
    2. All additional calls would just increment this max id and not touch the db again till the server got reset.

Creating TDG/Mapper/Pojo

  1. Convert your RDG into TDG/Mapper/Pojo
  2. Make sure everything is still used properly (the JSPs)
  3. Look at the examples and the thesis for guidance.

Updates and Optimistic Offline Lock

  1. If you get here, good for you.
  2. Have your mapper check for zero rows being updated and throw a Lost Update Exception
  3. Notify the user somehow.
  4. What should the xml return, should there be a status? Should it fail for Lost Update?
  5. Note:

    You still need that ssh tunnel or a local database. The databse table is the same as from the previous tutorial

    Solutions:

    RDG With Versions
    TDG, Mapper and POJO
    TDG, Mapper and POJO but using OOL