ERRest Boot Camp

Last modified by Pascal Robert on 2012/05/16 19:16

  • What is REST
    • Consistent URLs
      • The goal is to have URLs that you can guess.
      • GitHub is a good case (http vs git protocols, paths, etc.)
    • Stateless
      • You can use sessions, but almost all client frameworks are stateless
    • Using HTTP protocol to full extend (methods, cache, status codes, headers, redirections)
      • Status codes
      • Verbs
      • Headers
    • Multiple representations of same object, but only one URL for object
    • HATEOAS mention
      • Google Docs, CMIS, Atom Publishing examples
  • Basic ERRest concepts
    • routes
      • URLs
    • controllers
    • delegates
    • key filters
      • filter what going's in and out
  • Using an existing model and explaining how it works
    • BlogEntry
      • title
      • content
      • dateInserted
      • dateModified
      • author
    • BlogAuthor
      • firstName
      • lastName
      • password
      • email
      • entries
    • BlogCategory
      • entries
      • name
  • Basic REST routes (JSON)
    • adding a migration to create the admin user
    • adding a BlogAuthor user
    • adding a BlogEntry
    • getting a BlogEntry
    • modifying a BlogEntry
    • deleting a blogEntry
    • viewing a author and its posts (in XML)
  • HTML REST routes
    • explain how URL are differents
    • automatic HTML routing vs manual
    • listing blog posts
    • listing authors
    • batching and sorting
  • Better names: entity and attribute alias
  • Having a fake primary key in a REST context (moving from ID to unique title)
  • Handling status codes
    • 200&201
    • 404&410
      • Returning 410 for entries that were deleted
    • 405
    • 50x
    • 401&403
      • when trying to create blog entry without logged user
  • Redirections
    • How to do them, codes 301 and 302 differences
  • Adding headers to response
  • Adding caching to the blog
  • Adding non-EO support
  • Adding keys for non-model attributes ("fullName")
  • Date formats
    • er.rest.dateFormat
    • er.rest.timestampFormat
    • er.rest.rfcDateFormat
  • JSON Schema

Talking about the problem of objectOfEntityWithID and ERXDatabaseContextDelegate.ObjectNotAvailableException

RestContext
 Properties
 Adding new format
 Security
 strictMode
 Workflow