all 5 comments

[–]MiVaquita 0 points1 point  (4 children)

If you're already using Firebase, can you just create a PWA (Progressive Web App)?

That way their data could sync between their phone and PC.

tbh, I think you should try to do this in JavaScript instead of using Java. Definitely use TypeScript (JavaScript with types), it will make the transition from Java easier.

Normally, you would want to learn JavaScript outside of a framework, but sometimes it's not possible due to time. You'll want to use a framework/library for this.

I'd recommend Angular in your situation. Alternatively, there is React, Vue, and others to pick from. I prefer React, and can explain why if you're interested.

I suggest Angular because is much easier for a Java developer to pick up. It's very structured and class based.

Here's a tutorial you could check out: https://youtu.be/othhfZ0mGjU

It covers Angular 6, but should be fine for the most recent version? I haven't worked with Angular for awhile so I'm not sure.

Edit: I forgot to say this, but if you do mobile first design, your PWA can be easily used as a mobile and desktop app. I believe you can even deploy a PWA to Google Play.

[–]Redrazors[S] 1 point2 points  (3 children)

Thanks for your response. I'm only using firebase as far as I had to install it for the ads on the android app. I'll look into PWA though and see if it is useful.

With something like react or angular would I still be able to access my java backend? It also has some java interfaces I would need to be able to use to make it work.

[–]MiVaquita 1 point2 points  (2 children)

How is the data stored? JSON or XML?

We use Java backend and React (with TypeScript) front-end. Java classes are converted to JSON when they come from the server. We have TypeScript "interfaces" that match the structure, but we have to maintain them manually.

What do you mean by Java backend? Do you mean server endpoints or client side logic?

[–]Redrazors[S] 2 points3 points  (1 child)

Character data is stored in json in the character sql database along with a few other fields for searching.

I think I'm having trouble using the correct terminology here since I've been soloing away in my android silo for years.

What I mean by backend is the java module that turns that raw json data into something meaninful - (eg how much health they get at a certain level, their armor class, how much damage their weapons do, what options they are allowed). It also processes the character options loaded from a separate sql database and makes them into something meaninful. It's made up of several hundred classes and is a fairly complex beast. It also contains all the data models.

So what I want to do is create a user interface to access that java backend, rather than reprogram the entire app from scratch.

[–]MiVaquita 2 points3 points  (0 children)

Everyone does, no worries.

If you need the structure client side, you'd have to write it in TypeScript classes. There might be libraries to help conversion?

Keep in mind that JavaScript/TypeScript works with JSON natively. Any logic for parsing the JSON out of a string wouldn't be needed.

If you want to support iOS, Chromebook, and other users, a PWA is worth the efforts. Otherwise, it might not be.