The new Liferay REST API's. A true headless platform!

PortalDefenderCoder - Fady Hakim
PortalDefenderCoder - Fady Hakim
7 هزار بار بازدید - 6 سال پیش - More details from our Product
More details from our Product manager:
https://community.liferay.com/blogs/-...

Consumer Code:
https://drive.google.com/file/d/1CWbp...

Demo Code:
https://drive.google.com/file/d/1vOzs...

Why I believe APIO is really cool vs old JSON-WS:

1- Return several formats (not just JSON, can be XML…)

2- Easy versioning: following shared vocabularies makes supporting changes easier. Instead of returning JSON/XML with attributes tied to the names of the internal models, use standard vocabularies that are well thought out by standardization bodies (such as schema.org or IANA). Even if you have to create your own type because a standard doesn't exist, define it explicitly to be decoupled from any changes that you can make to the internal model.


3 - Easier pagination: API returns next, previous links instead of having to build it manually.

4 - Auto-documentation: the API returns everything you need to do the request, for example the operations block returning what you can do depending on your permissions).

5 - Public content is public by default: if you can access it through a website, you can access it through an API, JSON-WS currently doesn't do that.

6 - Sensible default, less parameters and no serviceContext or ThemeDisplay For example with the current API, to add a user, you need to fill 32 fields including “serviceContext “ which no front developer knows that. With APIO, you use the same API URL to get and add users, the difference is between making the call POST vs GET. ( my demo recording has that).

7 - And many more… :)
6 سال پیش در تاریخ 1397/10/28 منتشر شده است.
7,040 بـار بازدید شده
... بیشتر