简体   繁体   中英

cloud based App as Restful Services with backend in Java and frontend in Android

The goal is to build a complete mobile app with REST API and a powerful backend (in java) running in the cloud(amazon).I know the basics of all involved technologies in project like jEE,Gradle,Android,Amazon,Sprint MVC and Tomcat. I have learned all these technologies individually.What I do not know, how all these technologies work together? What should be my first Step towards developing?

so, you want to develop an app supported by a restfull api in backend. Although it can be done in different order depending on one's perspective. But i would recommend to follow these steps:-

  1. Start with writing Restfull api. To write restfull api you must know Jax-rs along with (Jersey or RESTEasy) and JPA (in case data persistence is required).

  2. As you said in your question you want to use AWS, so get an account on AWS and deploy your api on the server.

  3. If you want some additional server side functionality you can do that using servlet. If you gonna use servlet then you will have to use tomcat as a container or you can use any other of your choice.

  4. After coming that far, now you just have to develop your android app. Call the api you wrote from the android application to pass data inbetween server and android application.

To develop an android application backed up by a REST api don't require all the components you mentioned. A JEE supportable server, tools required to write REST api and android development are good enough to provide basic functionality you want.

(Disclaimer: Opinionated based on my experience)To start with choose an effective architecture pattern, Domain Driven Design will do a world of good in the long run during maintenance. Do a lot of ground work on design.

Next up is choice of development framework and other tools involved, from your previous comment you seem to use gradle, not much reservation for me on that part and seems to be good choice.

  1. Base Development framework: Spring Boot of course,just go for it, you may not regret.
  2. Web Framework: Spring MVC is good enough for almost all cases, and if you don't see it support any of your requirements, it provides extension points for you to customise (you may miss the JAXRS standard annotations out of the box though)
  3. All you domain logic as POJOs in whatever architecture pattern you end up choosing.
  4. Persistence: start with RDBMS if you are new, cause everything else tends to solve the loopholes of it. postgres if you may be looking for ANSI SQL compliance, else anything else free and open source is as good as any other with some distinguished features. For ORM Spring Data JPA with QueryDSL will let you build some easily maintenable persistence tier.
  5. Unit testing: Junit4 should be good enough and with Spring integration will be the optimum choice for a spring based application.
  6. If you end up using messaging somehow, go for AMQP with Rabbit or Active MQ
  7. Spring boot comes with embedded container so you can choose the flavour tomcat or jetty and worry less
  8. Use Spring integration or Apache camel for your integration needs.
  9. Since you mentioned cloud, try using Spring cloud and try implementing as cloud native, following 12 factor app recommendation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM