• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Web and CRUD Methods  RSS feed

 
Matheus Miranda de Sousa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about the new topic. In University a few semesters ago I had to build a CRUD for a Java Application, that was my backend language at the time, in that situation I wrote a method for every CRUD that a column in my database required and repeated the process for every single column in the table and the same about their combination (the tables weren't a big deal, It took some time and work but we dit It), e.g: Suppose a Table in a database with the columns Name, Last Name, Birth Date and Social Security Number. I had built this code back then:

As you can see, even for a simple DataBase it will be a Tiring and long workflow. Now I have the task to do something like that in my job with a far more complex DataBase and I want to find out other methods to do this kind of things, my basic problem is to provide for the User of my application a variety of filters in search fields ou just flexibility to fetch data. I'm sorry if the topic is repeated, If someone thinks this is too easy could point me to help material or about some studying fonts to guide me through this. Thank you all ever since.
 
Pete Letkeman
Ranch Foreman
Posts: 917
26
Android Chrome IntelliJ IDE Java MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the CodeRanch Matheus.

I do understand what you would like to accomplish and this could a good candidate for using the Spring framework.
But you do not need to use Spring to complete this task.

Here is one of Spring's tutorials which does something similar to what you wish to do
https://spring.io/guides/gs/crud-with-vaadin/

There appears to be many guides for Spring as listed here
https://spring.io/guides
So many I wouldn't even be to sure where to start.
I guess you start with the first one in the top left of the page and go from there unless you have a specific Spring topic which interests you that is.

If you are looking for a book or a resource for learning Spring you may be able to find one here
https://coderanch.com/c/books

All that said, there are some people on this site who know Spring really well and how it fits together with Java and others who know Java really well.

Hope this helps out.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's really unusual to build a service to return each individual column. Usually the response would be a JSON representation of the whole record as an entity.
 
Matheus Miranda de Sousa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both for the replies, I had no idea Spring was this useful, unfortunaly it seems that I will have to learn maven ou gradle spite of have trouble with one of them in the past, but I'm really greateful.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!