g3rv4/Traducir

Kill the react frontend

Closed this issue ยท 10 comments

g3rv4 commented

Maintaining two sets of code (.net + react) is fun.

But... it requires us to be proficient in two technologies. That wouldn't be so bad if this weren't my first react application. IT SHOWS.

I'd say for simplicity's sake, let's kill the SPA part of the application (aka Traducir.Web) and make it a regular MVC app.

We can also kill the Api endpoints.

g3rv4 commented

@topcatarg thoughts? I'm particularly interested in your thoughts since you've invested a non-nil amount of time working on traducir.vue

We could keep the API around, just wondering where you see it going ;)

Keeping the API would be nice as a playground. Remember that this was your first React app (mines too!!!) and it's my third VUE app.. But I don't think anyone will use it (The VUE Frontend).

The only problem I have with MVC is what happend if we lost the clear and fine looks the app has now. But I have no problem in trying it.. You know I love challenges and I think the app is nice the way is look now.. But it's... complicates (point for VUE, is the same code, with more order, and a store).

So... I didn't do anything in ASP front for years.. but we could try it (if you write too many js, I will kill you :P )

g3rv4 commented

We would for sure loose some responsive things we have now (like the url updating as you press a key). I'd probably write a debouncer so that you still don't need to press a submit button.

Since we wouldn't be using the API at all, I'm sure we're going to implement stuff and totally neglect updating it.

Killing the js SPA would make the build process waaaaay faster... and would be one less painpoint to update and keep updated. We would of course still have Typescript on the MVC app, but it would be saner.

Anyway, this is all in the ideas territory and I don't know when I'd have time to actually do this... just wanted to get early feedback ;)

Loosing responsive is a shoot in the heart for me ๐Ÿ˜ข

๐Ÿ˜›

I think we could live with it. but we have to be very careful

g3rv4 commented

oh, it's going to be responsive (in the sense of that it's going to adjust based on the screen size, as it is now)... what's going to be less responsive is the page load (since visiting a page is going to be a full page refresh)

"Let's throw everything and start over" is usually a, let's say, suboptimal idea. The application works as it is now and the code is not that terrible; also maintainers will need to be proficient in some frontend technology anyway (even if it's plain JavaScript/TypeScript).

So I'd say that focusing in improving the existing React code is the way to go. Just my 0.02โ‚ฌ. ๐Ÿ™‚

g3rv4 commented

@Konamiman ugh... the pain involved in keeping a JS app updated (and by that I mean only the dependencies) is way more than I'd like to suffer.

However, after spending a couple days with little to show for that investment (and not enjoying it particularly) I bailed. Also, kid doesn't let me as much free time as I used to have.

I'm still thinking though... what's the minimal amount of UX this needs? can we do without UX at all?

Mmm.. what about a free ux for desktop? That way, we only need an exposed api, and everyone can join the party.... I can start working on it. In fact there is a lot less api needed for this ๐Ÿ˜

g3rv4 commented

welp, it should probably be an electron app... and that's worse in a thousand different ways.

I'm thinking about having only a search text where you can do things like originalRegex:"^something" is-translated:false and have a parser.

That makes it easier on the UX for the search... but the ability to review things... that's a bit harder to figure out.

I'm not a fan of desktop apps... you need to keep them updated and suddenly we're going to have people reporting stuff like "it doesn't work on Windows Server 2016"... I don't want to test on Windows Server 2016 or CentOS Desktop.

g3rv4 commented

Better late than never... Thanks 3 tons, @Konamiman! I'm working on some final touches to use Azure Pipelines, bring impersonation back (in a way that I'm not scared of), changing how TS is compiled (so that in VS everything works just fine, not using grunt or node_modules at all).

But it wouldn't have been possible with your amazing work.

Gracias!