Re: Swing ,client and server
Sunday, May 21, 2006 01:11 PM
Unless you know you might have additional requirements in the future, the easy way is probably to just directly hit the database server itself via JDBC calls. On the other hand, your question is so general that you'll get a variety of answers. Case in point: writing direct JDBC calls into your code makes it then depend too much on your data being available in that form. Adding another "tier" to abstract where/how the data comes from can be a good thing, as you can change the code in that tier (on the server side) and not change the client-side application code. (Always a good thing.) How *that* happens, again, depends on environmental factors and familiarity with tools at your disposal. I personally might recommend delivering an XML stream via well-established HTTP request/response. (To wit, servlets for implementation; set content type to "text/xml".) XML as a container/medium for your actual data is flexible enough you can change it as needed (though some intelligence is needed to not break the client app too much) and you can apply XSLT to transform it programmatically; just about every language can process XML via a rather cross-language-consistent API. Like I said, that's just one random opinion to a fairly open-ended question.