Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

An enterprise development adventure (and a big question)

 
Ranch Hand
Posts: 30
Android Spring Java
  • Mark post as helpful
  • send pies
  • 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
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic