> >> Hi,
> >>
[quoted text clipped - 23 lines]
> I don't agree with your recommendation. I have had no problem using JDBC
> from an applet.
Well, I didn't say it's impossible.
> Your idea of using a specialized protocol between applet and server just
> adds a layer of complexity to an already obfusticated concept.
I don't know which of the concepts involved you call "obfuscated". Apart
from that, you forget to mention that an additional layer has indeed
benefits. Layering is a common technique in the area of software
engineering to separate concerns and keep things manageable. For example
it gives you more flexibility and control over communication which is
important for an applet that is used via a WAN as the internet (=
potentially slow and high latency). And you don't have to load driver
classes and you can easily use another persistent storage instead of JDBC.
...
> A properly
> designed application can operate quite well as a database client.
You have to keep in mind that you have no control at all about the way a
JDBC driver talks to the database. There might well be a lot of short
messages which can lead to a considerable slowdown of the applet's
operation of used via a WAN.
> As you obviously can't grasp,
How do you know?
> an applet is simply a class that can be
> executed from within a http: browser. It does have some restrictions that
> you have to
> deal with, but nothing that can't be handled (after some delving).
Again, I didn't say it's impossible; I just recommend to not use JDBC from
an applet because the drawbacks outweight the advantages.
robert
dar7yl - 12 Mar 2005 03:22 GMT
"Robert Klemme" wrote in message
>> > However, I recommend not to use JDBC from an applet. Better use a
>> > specialized protocol between applet and server (a simple solution
>> > could be to send serialized objects via HTTP).
> "dar7yl" schrieb im Newsbeitrag
>> I don't agree with your recommendation. I have had no problem using
>> JDBC from an applet.
> Well, I didn't say it's impossible.
>
[quoted text clipped - 17 lines]
> messages which can lead to a considerable slowdown of the applet's
> operation of used via a WAN.
IMHO, "Enterprise" is a term used when you split an application into two
parts so you can charge twice as much as the old one, and get half the
performance, in twice the time.
Yes, you could have dismal performance if you don't understand how
the jdbc driver is communicating with the database server. However,
it's been my experience that a modern database driver has excellent
performance over the net. When you get down to it, the information
you want to display is usually what you have scraped off the database.
If you compose your queries properly, and pay attention to the
capabilities of the database, the actual amount of data transferred can
be quite efficient. In my experience, most of the lag time I observe is
due to database processing; not transfer time. The response times
are quite acceptable in most cases.
Most modern drivers are quite good at transferring the data back and
forth between the client and the server. You are still going to get
database
latency no matter what level you are talking at. Also, with middleware, you
have to translate the data into another format, which can add bulk without
corresponding increases in functionality.
I have had good performance running applications in a variety of
environments.
Of course, best performance is running on the local machine, with LAN
running
a close second. Even running on a WAN using VPN over the internet is
quite acceptable (We regularly run between Vancouver (BC) and Prince Rupert
using SonicWall VPN over ADSL). The response is still comparable to the old
VB
program which used a local Access database. In some instances it has sped
up,
which I attribute to MySQL's better handling of complex joins.
regards,
Dar7yl
>>> Now everytime I start the applet the console throws the
>>> following message out:
[quoted text clipped - 5 lines]
>>the server they were downloaded from. If you want to do such things you
>>can sign the applet thus relaxing security restrictions.
That might be one reason for the error (though the error message one
would except in this would be a SecurityException).
Other common errors are that
- The SQL Server is not running
- The wrong IP/Port was used in the connection String or, most common
- The SQL Server does not accept TCP/IP connections because it is not
configured to do so (e.g. in an MSDE standard installation) or because
it is running on Windows Server 2003 without MS SQL Server SP 3 installed
>>However, I recommend not to use JDBC from an applet. Better use a
>>specialized protocol between applet and server (a simple solution could be
[quoted text clipped - 6 lines]
> adds a layer of complexity to an already obfusticated concept. A properly
> designed application can operate quite well as a database client.
I don't agree with your disagreement ;-)
In a well designed application that layer should not add any complexity
to the application in general.
But the main reason for *not* using JDBC from an applet is - apart from
the need to sign your applet, transmit the database user credentials to
the client in some form, hardly being able to encrypt traffic between
applet and database, transmitting information about the database
structure to the client, ... - the resulting infrastructure problem.
If you want to access the SQL Server from an applet, the SQL Server Port
must be open to the applet in order to accept incoming connections
(which is not a good thing, especially on the internet) and the applet
must be able to access the SQL Server directly.
Both creates problems because most Servers are protected by firewalls
and some firewalls on the client side block outgoing access to ports
other than the usual internet stuff. This is also true for many intranet
setups.
If you want to spare yourself that hassle, you *have* to stick to the
http connection your applet was served from, because this connection is
the only one you know to be working.
Regards
Daniel