2015-11-17

Google Endpoints + Objectify + Scala + Scala JS + Auth0

Finally created a project with the following combination

  • Google Endpoints with Google App Engine
  • Objectify as abstract layer of the Datastore
  • Custom Auth0 authenticator for Google Endpoints
  • Scala backend
  • Scala JS to share logic between backend and frontend
You can find the project here:

2015-11-12

Objectify and Scala

Objectify and Scala

There are some learning steps to combine Objectify with Scala. One interesting piece of code is Objectify's:
ObjectifyService.ofy().loader().type(EntityClass.class);
It's not possible to type "type" or "class" in Scala. The first one needs to be escaped and the other have a predefined function:
ObjectifyService.ofy().loader.`type`(classOf[EntityClass])

Scala Example

You can find a complete example here:


2015-11-09

Google App Engine + Scala + ScalaJS + Objectify

Created a single Maven project combining Google App Engine, Scala, ScalaJS and Objectify.

Description

A Scala implementation of Filter using Objectify, a separate source directory for ScalaJS which is generating JavaScript with SBT.

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/