简体   繁体   中英

play framework as an API. And can I use web-based application and native Android as Client side to directly interact with Play using Rest Api

I am new to this framework and also new to the server api development architecture.I wish to know how Play framework will work in the server side. I need my server code as an API using REST (CXF Framework) for web service connected to the Play Framework for the controlling which is ultimately connected to MYSql Database. In the front-end I need an Angular Framework for the website, also a native android application and maybe later ios app too. So I wish to know can I do this architecture with play framework and how to start with it.

It will be a great help if someone can explain this architecture and how this layering can be done and the calls can be handled.

From your question, I was able to understand that you need an understanding of how to utilize play framework to developer web service API for your mobile development and as well as web.

Firstly, integrating Apache CXF into play framework is as easy at you can expect, but I'll not recommend you use it, play framework provides you with better options and convenience library for consuming and provide web service API of either JAX-RS or JAX-WS. https://playframework.com/documentation/2.4.x/JavaJsonActions https://playframework.com/documentation/2.4.x/JavaXmlRequests

Play Framework gives you a full leverage over the HTTP Restful method, with this you can create your request as either GET or POST.

If you are concern about making your Web Service API secured, that depends on you choice as play does not stop you from implementing security features into your application. I will recommend JSON Web Token(JWT) for a more secured Web Service API. https://github.com/jasongoodwin/authentikat-jwt https://jwt.io

You can get your web service API running in a blink of an eye.

Play framework is amazing!

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