« - »

Look-up Tables: Refactoring the servlets

7 February 2009

Now that we have completed the modifications to the core project and rebuilt (finally!) the project web site, it’s time to move on to the core web project, and make the corresponding changes there to accomodate the new context concept.

The first things we’ll need to do is refactor all of the serlvets. To start with, we’ll need to come up with a new strategy for all of the URLs. When we first introduced the idea of the Look-up Tables, we envisioned the following URL structure:

http://<serverName>/<contextRoot>/tbl/<tableId>

http://<serverName>/<contextRoot>/tbl/<tableId>/<entryId>

The eventual structure that we ended up with turned out to be relatively close to that with some minor improvements:

All tables:

http://<serverName>/<contextRoot>/table

One table:

http://<serverName>/<contextRoot>/table/<tableId>

All entries for a table:

http://<serverName>/<contextRoot>/entry/<tableId>

One table entry:

http://<serverName>/<contextRoot>/entry/<tableId>/<entryId>

Now that we’ve added the context, we’re going to have to work that into the URL structure as well:

All tables:

http://<serverName>/<contextRoot>/table

All tables in a specific context:

http://<serverName>/<contextRoot>/table/<context>

One table:

http://<serverName>/<contextRoot>/table/<context>/<tableId>

All entries for a table:

http://<serverName>/<contextRoot>/entry/<context>/<tableId>

One table entry:

http://<serverName>/<contextRoot>/entry/<context>/<tableId>/<entryId>

… which means that we have some changes to make to all of the servlets in the Look-up Table subsystem. Time to get back to work!


http://blog.restafarian.org/2009/02/look-up-tables-refactoring-the-servlets/

Leave a reply

You must be logged in to post a comment.