Can a JavaFX program run in JWS and access a database? [message #1726849] |
Wed, 16 March 2016 21:27  |
Eclipse User |
|
|
|
I am starting to design an application that ideally would have its GUI written in JavaFX, would run in a JWS (Java Web Start) environment and read and write from a relational database, either DB2 or MySQL.
Before I spend a lot of time on the design, I'd just like to verify that this combination is possible.
If anyone has a simple program with all or most of those features that they'd be willing to share for me to use as a starting point, I'd really appreciate it. Otherwise, I'll do that myself. If I write a program that uses JavaFX to display a button on a stage and pressing the button executes a trivial query, like "what is the current date?" on a DB2 or MySQL database, that should prove that the concept is viable. If the prototype can also write a trivial record to a database, such as a single row to an empty table, that would be even better.
|
|
|
|
Re: Can a JavaFX program run in JWS and access a database? [message #1726885 is a reply to message #1726849] |
Thu, 17 March 2016 05:39   |
Eclipse User |
|
|
|
a) it should be possible
b) I would not implement it this way because then your user has a
physical db connection and could issue DELETE FROM tbl, ... .
Tom
On 17.03.16 02:27, Reinhardt Christiansen wrote:
> I am starting to design an application that ideally would have its GUI
> written in JavaFX, would run in a JWS (Java Web Start) environment and
> read and write from a relational database, either DB2 or MySQL.
> Before I spend a lot of time on the design, I'd just like to verify that
> this combination is possible.
> If anyone has a simple program with all or most of those features that
> they'd be willing to share for me to use as a starting point, I'd really
> appreciate it. Otherwise, I'll do that myself. If I write a program that
> uses JavaFX to display a button on a stage and pressing the button
> executes a trivial query, like "what is the current date?" on a DB2 or
> MySQL database, that should prove that the concept is viable. If the
> prototype can also write a trivial record to a database, such as a
> single row to an empty table, that would be even better.
|
|
|
Re: Can a JavaFX program run in JWS and access a database? [message #1726887 is a reply to message #1726885] |
Thu, 17 March 2016 05:42   |
Eclipse User |
|
|
|
One more note: Oracle suggest to use the java-packager and ship a
private JRE with it!
Tom
On 17.03.16 10:39, Tom Schindl wrote:
> a) it should be possible
> b) I would not implement it this way because then your user has a
> physical db connection and could issue DELETE FROM tbl, ... .
>
> Tom
>
> On 17.03.16 02:27, Reinhardt Christiansen wrote:
>> I am starting to design an application that ideally would have its GUI
>> written in JavaFX, would run in a JWS (Java Web Start) environment and
>> read and write from a relational database, either DB2 or MySQL.
>> Before I spend a lot of time on the design, I'd just like to verify that
>> this combination is possible.
>> If anyone has a simple program with all or most of those features that
>> they'd be willing to share for me to use as a starting point, I'd really
>> appreciate it. Otherwise, I'll do that myself. If I write a program that
>> uses JavaFX to display a button on a stage and pressing the button
>> executes a trivial query, like "what is the current date?" on a DB2 or
>> MySQL database, that should prove that the concept is viable. If the
>> prototype can also write a trivial record to a database, such as a
>> single row to an empty table, that would be even better.
>
|
|
|
|
|
Re: Can a JavaFX program run in JWS and access a database? [message #1726978 is a reply to message #1726972] |
Thu, 17 March 2016 18:44  |
Eclipse User |
|
|
|
You have a physical DB-connection which one can intercept and execute
any SQL statement he/she wants, and naturally your DB-Server needs to
allow connections from any host on earth, any sense DB-Admin will not
allow that.
So its just bad application design in 2016 to make your client app
directly writing to your DB, you better provide a REST-API on the server
and your client talks to that.
Tom
On 17.03.16 21:59, Reinhardt Christiansen wrote:
> How could they do a "Delete from <table>" if I have coded the SQL right
> in the code? I'm not going to give them a command prompt so that they
> can write any SQL they want.
> Does JavaFX/JWS provide an opportunity for SQL injection that I don't
> know about?
|
|
|
Powered by
FUDForum. Page generated in 0.05217 seconds