For educational purposes I want to create an application: a forum where participants can register, leave messages (so that messages are saved in the database). The application will be written in Java. Is it possible to do without using jsp, jsf, but only html and js? I would be very grateful to those who answered.
- oneQuite possible. Nothing prohibits you from accessing the backend through js, and building a page on the client side based on the data obtained. Here is an example of treatment. - GreyGoblin
- Thank you very much. - Lugovets
|
1 answer
Can. You’ll have a successful RESTfull architecture.
The client still communicates with the server using the http protocol, only now the server returns not ready html pages in the responses, and the states (data) of the resources you requested (URI) in json or less often xml. JS on the client parses these answers and builds the necessary pages.
Thus, there is no longer any connection between the client and the server, except for the clearly formalized Rest Api. Moreover, the client can be implemented on anything, HTML + JS is only a special case. This is not a new, but very popular approach now.
|