C
C
Cyril2020-04-19 17:26:38
Ruby on Rails
Cyril, 2020-04-19 17:26:38

What is the most efficient way to gradually migrate a Ruby site (on a templating engine) to React SPA?

There is some ruby ​​site that uses a standard template engine (slim) to display content. The site is a large application, with authorization, roles and many subsystems. Many pages have a lot of jQuery code.

There was a need to gradually transfer the site to React SPA with server rendering. Moreover, it is required to leave the backing the same (Ruby on Rails), only supplementing it with pre-rendering mechanisms (ssr).

PS: Gradually - this means to make first subsystem A in React, then subsystem B, etc. Let's say first authorization, then an interface for working with files, then a blog, etc. Between each "transition" there will be a certain time of testing by users, let's say a month.

Please advise the most efficient approaches for this task? Who faced and how did you start the transition? What should be done first and what can be left for later? Where to begin?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Sviridov, 2020-04-19
@dimuska139

Ideally, first write acceptance texts for the current pages of the site, so that after moving to SPA with SSR, you can be sure that nothing is missing, does not fall off and works as it did.
After that, you make the necessary APIs right in your Ruby backend. In parallel with this, you create a new repository for the frontend and, in fact, do it. React itself and such a thing for it as NextJS will help you here.
When you're done, run the acceptance tests and make sure all functionality works as before.

I
Ivan Shumov, 2020-04-19
@inoise

Moving from MPA to SPA, especially when you have several systems, is not a small architectural task and you need to understand exactly what you have, in detail, what terms, how many hands and stuff like that. There are no Best Practices here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question