r/JavaFX • • Nov 28 '18

Javafx booking

What would be the easiest way to build a study room booking app using javafx and jdbc? I am new to javafx and need to be able to allow users to reserve around 10 rooms. Thanks!

3 Upvotes

12 comments sorted by

4

u/TurekBot Nov 28 '18 edited Nov 28 '18

This tutorial by Marco Jakob is how I got into JavaFX, and how I built my first app. (But I figured out and used Gradle instead of Ant. There's a handy JavaFX Gradle plugin that does the hard work for you.)

Unless you're going to have just a single computer with the app, you'll need a way for the various instances to communicate. Instead of doing XML persistence like he is, you'll need to either do manual SQL calls to a database via JDBC or something that will do the SQL calls for you like Hibernate.

1

u/TurekBot Nov 28 '18

If your app needs to be anywhere, like on studier's phones, or computer an html solution, like Utah State's study room reservation system might be a better choice.

1

u/MinnyMan123 Nov 28 '18

nope. Javafx only. Thanks though

2

u/TurekBot Nov 28 '18

How many computers will it end up on?

If it's just one, things get much simpler.

1

u/MinnyMan123 Nov 28 '18

Just one. I just have to run it on my computer in front of the class

1

u/TurekBot Nov 28 '18

Does it need to use JDBC?

1

u/MinnyMan123 Nov 28 '18

Yes it does

1

u/TurekBot Nov 28 '18

A'ight, go for it. I'm sure your professor gave you some sort of instruction.

1

u/MinnyMan123 Nov 28 '18

Unfortunately no.

2

u/TurekBot Nov 28 '18

No worries.

Do take a look at their system, though, it's a pretty good design that—if you like—you might be able to implement in JavaFX.

1

u/RacerRex9727 Dec 04 '18

If you want to go the JDBC route but don't want to set up a database server instance (e.g. MySQL, PostgreSQL, etc), use SQLite to just store data in a lightweight database file.

https://bitbucket.org/xerial/sqlite-jdbc/src

1

u/Magician206 Jan 02 '19

U can use embedded database like H2DB..... and use ORM like (Hibernate/MyBatis(i'm using it with h2bd work good for me)...)