• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Seating Plan Requirements  RSS feed

 
Gus Hayes
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have undertaken a project to improve my Java skills and knowledge. I want to create a website that allows users to login and select specific seats in a seating plan. The selected seats should then be rendered locked or taken.

I have been learning Java for a couple of months now and want to use this project to cement my knowledge. I have UML diagrams developed for this project but my main problem is not actually knowing what technology to use. I want to use MySql/Java for the DB and JavaFX/Swing for GUI. I need some help with where server side technology fits in or do I need XML/SOAP. Any help would be much appreciated.

Thanks and regards, Gus
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you know you need a database? How do you know you need SOAP or XML? Why are you thinking of a GUI before you have got the logic to work?
 
Gus Hayes
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Campbell for the reply,
I think I will need a DB to hold user info for logging in etc. I only wanted an overall picture of the project so I can see where I am going. I know about getting logic working before jumping into GUI. If you read the question I had said that I had done UML diagrams for the project, does that sound like I wanted to jump 7 steps ahead into a GUI. I thought this forum was to help people with less experience and not be condesending to them.
Thanks again,
Gus
 
Paul Clapham
Sheriff
Posts: 22831
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gus Hayes wrote:... does that sound like I wanted to jump 7 steps ahead into a GUI...


Well, since in your original post you said

Gus Hayes wrote:I want to use MySql/Java for the DB and JavaFX/Swing for GUI.


I have to say that does sound like you're jumping ahead. Since you are planning to create a website, the usual way to do that would be to access it via a web application (which does the server-side stuff like updating the database). And the user interaction would usually be done via HTML forms. Using JavaFX or Swing for user interaction would be unusual, and -- more importantly -- harder to do.

The web application could be written in Java using servlets, along with JSP to generate the HTML. That way you don't need XML and SOAP and client-side Java GUI code. Probably that would improve your Java skills -- if you've only been working in Java for a couple of months then I think it would be quite likely to do that.

If you decided to write the client side in Java, you'd still need some server-side code to accept and process requests from the client side. It would be different code in that it wouldn't generate HTML, but instead generate some kind of response data. In theory you could use SOAP for those requests and response but if you have no experience with SOAP then I'd advise not diving into that cesspool. It's just going to distract you from working on Java.
 
Gus Hayes
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Paul for the reply,
I didnt mean for it to come across that I was putting the cart before the horse. I did some research for this project and found so many different technologies that I got bogged down. I just wanted some direction so I didnt waste valuable time barking up the wrong tree. After planning the site/app and getting the logic to work, would it be wise to use something like Spring MVC or am I totally off the mark.
Regards,
Gus
 
Paul Clapham
Sheriff
Posts: 22831
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gus Hayes wrote:I did some research for this project and found so many different technologies that I got bogged down.


No kidding, the proliferation of technologies is a nightmare even for people working in the field.

As for Spring MVC: No matter what you choose, you're going to have to spend some time learning how web applications work (assuming that you don't already have that experience). I don't want to promote any particular web app technology, mostly because I don't have any experience with the vast majority of them, but I'd suggest choosing one which is simple to use and doesn't require a big learning curve.
 
Gus Hayes
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks again Paul,
Time to pick a technology and dive in.
Regards,
Gus
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gus Hayes wrote:Time to pick a technology and dive in.

Or possibly, NOT pick one and dive in.

Think about it: What's your primary goal here? If it was me, I think I'd want to be writing the best "seat allocator" I can (a very fun exercise, BTW - I've done it), so that's what I'd be concentrating on.

My advice: Forget about databases and webpages and logins and GUIs and mice and pretty seat icons - and focus on THAT.

Write a program that allows you to define a seating plan and bash it out to the console. Then make it accept commands you type in to reserve particular seats.
Believe me, there's plenty of scope for variety in that alone - especially if you allow "parties" or families that want to sit together.

All the other stuff is just boilerplate, and can almost always be added later. Concentrate on the problem.

HIH

Winston
 
Gus Hayes
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Winston,
I had planned to do a non GUI version first and then add the visual stuff. I wanted an idea of where I was going for the bigger picture. Would you use arrays etc to hold the seat allocations.
Regards,
Gus
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right to get the non‑GUI version working first.
Why do you think arrays would be a good thing to use?
 
Gus Hayes
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Campbell,
Thanks for the reply. I thought a 2D array of strings could be used to hold the information about the seating arrangements .
Regards,
Gus
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There ain't no such thing as a 2D array; there are arrays of arrays however.
Yes, you can, but why Strings? Why don't you create a Seat class and a Row class? How are you going to persist those data? Are you going to serialise the data to a file, or are we going back to the database?

I did not query the plan because I thought it was wrong, but because you just came out with all sorts of names and you didn't explain why you wanted to use them. You need to think about your design first. “I don't know how to do XYZ,” is a good reason for avoiding it … and a good reason for learning about XYZ.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!