• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

An enterprise development adventure (and a big question)

 
Ranch Hand
Posts: 30
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,
I started studying enterprise development a lot of time ago and I finished up with using Spring Boot for the application and Thymeleaf + Boostrap for the html templates.
I also used the book Spring Boot in Action (that I found in this forum) to learn the basics. So far I developed an application with authentication, and a users management (CRUD operations) based on a MySql database.
According to the tutorial in the book, the controller handles the request returning the name of the html file to load (plus a model with one or more attributes that are the data to be displayed).
Then a big doubt came to my mind... In the beginning I wanted to develop a RESTful application, but when I replace the @Controller annotation with @RestController I realized that my application does not satisfy REST specification at all. I dove into Google immediately, trying to find an answer, and here's what I understood: a RESTful server application is developed to serve a client application rather than be accessed by a browser (which, for example, only supports the GET and POST methods, and has no PUT, PATCH, DELETE,...). When developing an enterprise applicatiom, it seems there are two completely different approaches: on one side we have a RESTful server application with a client application, on the other we have a so-called MVC web application, which rely on a view technology, and a standard browser (Chrome, Firefox,...).
This is confirmed by the fact that, for example, Thymeleaf use the model to get data and display them in a web page, while a RESTful application returns these data in a different format (e.g. json).
I'm sorry for the post length and also for my bad English, I would like to know your opinion about my ideas and get some suggestions, for example, is it possible to implement a RESTful application that can be used by a browser (which means, create html templates that understand and display data in REST format)?
Thank you
 
We noticed he had no friends. So we gave him this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic