
Ask HN: What steps to take to rebuild an existing application? - ladybro
I&#x27;ve been tasked with rebuilding a successful desktop application into a web application. A few relevant points:<p>- The app is in the scheduling realm and involves some semi-complicated algorithms<p>- I did not contribute in any way to the desktop app and it&#x27;s written in an old language that I don&#x27;t know at all<p>- I plan to build the new app in Ruby on Rails, which I am experienced with<p>- We&#x27;ve identified ~75% of the current functionality that needs to be included in the first version of the web app<p>- The desktop app has had strong acquisition interest in the past and the best case scenario for all parties would to be acquired in the next 2 years<p>What steps would you suggest I take to make the process as successful and pain-free as possible?
======
PaulHoule
(1) If you can recycle the old "semi-complicated algorithms" in some way you
should. For instance if these are written in FORTRAN or C it is not that hard
to write wrapper code to access them in a more complex language on the back
end, it also may be able to compile them to webassembly.

(2) If you can't do that, or even if you can, you should build a test suite
that works on both the old and the new code so your reimplementation is
correct. This will save you so much suffering.

(3) If you want to make an app that has the same sensibility as a desktop app
in 2020 I would look to React, Vue, Svelte or something like that.

------
jolmg
If you want it as pain-free as possible, optimize for the transition once it's
ready, and so avoid making improvements over the UI. Leave UI improvements
until after people are using it.

I've been working on rebuilding a legacy system for the last "few" years, and
now that it's mostly ready, we have a nightmare in figuring out how to
transition the users as seamlessly as possible. They can do everything,
simpler, but it's different, and will require training. Improvements would
have been a lot better to do piecemeal after they've started using the new
codebase. After discussing it a few months ago, we came to the agreement that
we really should have done a port that resembled the original as closely as
possible to ease the transition.

Too late to back out of it now, though.

------
matijash
As others already mentioned, the best thing would be if it is possible to
reuse the non-UI code (so logic & algorithms) and put it on a server behind an
API.

On the other hand, if the code is not written in the modular fashion and
things are tightly coupled, it might be harder than writing everything from
scratch (of course, that depends a lot on the volume of the code).

As PaulHole suggested, writing a test suite would also be very important to
make sure your code works as expected - that will save you a lot of trouble in
the long run.

RoR seems like a good and stable choice for the backend, do you plan to use
something like React/Vue/Angular on the frontend?

On the side note, I am working on a project that would hopefully make app dev
easier and more sustainable in the long run, but unfortunately it is still in
the very early stage of development. Would appreciate your feedback though!
[https://wasp-lang.dev/](https://wasp-lang.dev/)

~~~
PaulHoule
I think systems like WASP will proliferate. React, Vue, Svelte and similar
frameworks have gotten people used to code generation, transpiling, etc.
Technically, people are ready for something that blurs the front-end/back-end
distinction.

~~~
matijash
Thank you very much for your feedback PaulHoule! Feedback like this motivates
us to keep going :)

------
thedevindevops
Dump the desktop applications logic layer into a Web Api and build the Web
Application off of that, basically just re-implement the UI

