I’m working on a big project that needs to handle lots of users. My server uses Spring and JPA (Hibernate) with about 80 API methods. I’m trying to figure out how to connect it to different clients:
- GWT web app
- Mobile apps (iOS, Android, Windows)
- Desktop app (maybe Eclipse RCP)
I’ve thought about these options:
-
SOAP Web Services
- Might be slow
- Android doesn’t really like it
-
RESTful Web Services
- Faster than SOAP
- Works well with mobile
- Might be tricky for desktop apps
-
Mix of REST and GWT Request Factory
- Request Factory could be good for the web app
What do you think would work best? Has anyone done something like this before? I’d love to hear your thoughts on what’s fastest and easiest for developers to use. Thanks!
Based on your requirements, I recommend going with RESTful Web Services. It’s a robust and widely adopted approach that offers excellent compatibility across different platforms. REST APIs are performant, scalable, and well-suited for mobile development.
For your GWT web app, you can utilize libraries like RestyGWT or GWT-RPC to communicate with your REST endpoints. Mobile apps can easily consume REST APIs using native HTTP clients or popular networking libraries.
To streamline development, consider implementing API versioning and using Swagger for documentation. This will make it easier for your team to maintain and evolve the API as your project grows.
For authentication and security, look into implementing OAuth 2.0 or JWT. These standards work well with REST and provide secure access across different client types.
have u considered using GraphQL? it’s super flexible for different clients and can be more efficient than REST. Plus, it’s got great tooling support. what’s ur experience with it? i’m curious how it might fit ur use case, especially with all those API methods. thoughts on schema design for ur various clients?
yo, REST is prob ur best bet. its versatile and works great w/ mobile. for GWT, u can use RestyGWT for REST calls. desktop apps can use HTTP clients. keep it simple and scalable. GraphQL’s cool but might be overkill, REST’s solid in my experience.