S
S
Sans842018-03-21 15:59:25
Java
Sans84, 2018-03-21 15:59:25

How is the SPA application implemented? Which backend to choose between PHP and Java?

Below the questions is a little description of what it is for me.
We have:
The server gives an input page (for example spa-face.com). It is formed on the server and given to the client, and then ajax works with data loading (for example, in json format).
1. And here the first question arises - drawing the UI according to this data is done on the side. How is it implemented? In the received data, in addition to the data itself, is there still information about the drawing of components for display?
2. If the user initially fills in not the root of the site, but for example spa-face.com/posts, then what operations are performed by the server and which by the client? (the server must immediately give data to draw a specific page, or does it give the input, and then somehow another request is sent to receive posts?
An important point - I ask because. need to implement a web app. MPA is not an option because data will be taken from the backend via the REST API (not FULL). There are two backs, already written before me - one in PHP, the other in JAVA. We used it in mobile applications for tracking "body movements" (control). And now I need to slowly transfer all this to the web with the addition of logic and reporting.
As if I know Java Core, PHP, some JS, markup, styles. This is the base, so you need to learn something new. And here you can combine business with pleasure.
Began to rummage through the vastness of the web and downloaded the zoo of possible solutions. In the classic front, React+Redux or Angular are in vogue now. But in Java, it's hard to find the direction in which it is desirable to look - the second day I read the "battles" of adherents of different technologies. Basically, it's a monster of Spring, GWT, or, as it were, dead JSF. You can shoot yourself)))
In general, give pliz answers to two questions (in your own words, links, only to a minimum of text, preferably with examples).
And also tell me on what I should cut down the front. In principle, the picture is not important, so it is possible to pervert by washing down one direction on one technology, the other on another (there are two servers :-))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-03-21
@demon416nds

1 it is natural that all data for drawing is transmitted immediately
in the case of spa, this is usually an unchanged frame, css, and pieces of html as templates in js that is engaged in "rendering " download a mobile application can be made from SPA using cordova and minimal file modification

E
Elmo Sputterspark, 2018-03-21
@Sputterspark

Choose Java. Spring WebFlux is well suited for SPA, but you can also roll on JAX-RS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question