Visar inlägg med etikett post. Visa alla inlägg
Visar inlägg med etikett post. Visa alla inlägg

2015-12-04

Scala JS with Angular and Google Endpoints

Finally done with a simple implementation with Scala JS of Angular and Google Endpoints.

Scala

All backend and frontend is done in Scala with shared logic. Made a simple validation of input which is used in frontend when trying to post, and in backend when it receives.

Google Endpoints

A Javascript is generated which mirrors all exposed methods. This is then used by Scala JS to make all requests to backend.

2015-11-08

Google Endpoints + Objectify

Created a small project combining Google Endpoints with Objectify. Added page with a simple JavaScript introduction.

Fabric

There is a small sample for creating some data and getting it.

Creating

As a sample, it's possible to create three different entities
  • EntityId, with POST, creates a new id
  • EntityData, with POST
  • EntityPrimitives, with POST
When posting an EntityId, the response will be its new id.
When posting an EntityData or EntityPrimitives, use the same id as EntityId.

Fetching

To get each type, there's a GET path like
/entityid/123
/entitydata/123
To get the EntityId and all children with the same id, it's possible to use
/entityid/123/entitydata+entityprimitives/