siny: authorization & ajax

42
Curriculum: Authorization & AJAX Winter 2017

Upload: matthew-gerrior

Post on 22-Jan-2018

54 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: SINY: Authorization & AJAX

Curriculum: Authorization & AJAX

Winter 2017

Page 2: SINY: Authorization & AJAX

Authorization & AJAX - Immersive1.) Authorization (~ 60 minutes)2.) AJAX (~ 60 minutes)3.) Pairing (~30 minutes)Authorization & AJAX - Debrief4.) Authorization (~ 20 minutes)5.) AJAX (~ 20 minutes)6.) Pairing (~ 80 minutes)

Agenda

Page 3: SINY: Authorization & AJAX

Immersive

Page 4: SINY: Authorization & AJAX

Authorization

Page 5: SINY: Authorization & AJAX

AuthorizationAuthentication verifies who you are.Authorization verifies what you are authorized to do.

Page 6: SINY: Authorization & AJAX

Authentication

Page 7: SINY: Authorization & AJAX

Authentication

Page 8: SINY: Authorization & AJAX

Authorization

Page 9: SINY: Authorization & AJAX

Authorization

Page 10: SINY: Authorization & AJAX

CanCanCan

Page 11: SINY: Authorization & AJAX

CanCanCan

Page 12: SINY: Authorization & AJAX

Pundit

Page 13: SINY: Authorization & AJAX

Pundit

Page 14: SINY: Authorization & AJAX

has_many :through

Page 15: SINY: Authorization & AJAX

belongs_toA belongs_to association sets up a one-to-one connection with another model, such that each instance of the declaring model "belongs to" one instance of the other model.

Page 16: SINY: Authorization & AJAX

belongs_to

Page 17: SINY: Authorization & AJAX

belongs_to

Page 18: SINY: Authorization & AJAX

A has_one association also sets up a one-to-one connection with another model, but with somewhat different semantics (and consequences).

has_one

Page 19: SINY: Authorization & AJAX

has_one

Page 20: SINY: Authorization & AJAX

has_one

Page 21: SINY: Authorization & AJAX

A has_many association indicates a one-to-many connection with another model. You'll often find this association on the "other side" of a belongs_to association.

has_many

Page 22: SINY: Authorization & AJAX

has_many

Page 23: SINY: Authorization & AJAX

has_many

Page 24: SINY: Authorization & AJAX

A has_many :through association is often used to set up a many-to-many connection with another model. This association indicates that the declaring model can be matched with zero or more instances of another model by proceeding through a third model.

has_many :through

Page 25: SINY: Authorization & AJAX

has_many :through

Page 26: SINY: Authorization & AJAX

has_many :through

Page 27: SINY: Authorization & AJAX

AJAX

Page 28: SINY: Authorization & AJAX

AJAXAsynchronous Javascript And XML

AJAX allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Page 29: SINY: Authorization & AJAX

AJAX

Page 30: SINY: Authorization & AJAX

AJAX

Page 31: SINY: Authorization & AJAX

AJAX

Page 32: SINY: Authorization & AJAX

AJAX in Rails (forms)

Page 33: SINY: Authorization & AJAX

AJAX in Rails (forms)

Page 34: SINY: Authorization & AJAX

AJAX in Rails (forms)

Page 35: SINY: Authorization & AJAX

AJAX in Rails (links)

Page 36: SINY: Authorization & AJAX

AJAX in Rails (links)

Page 37: SINY: Authorization & AJAX

AJAX in Rails (buttons)

Page 38: SINY: Authorization & AJAX

AJAX in Rails (buttons)

Page 40: SINY: Authorization & AJAX

Debrief

Page 41: SINY: Authorization & AJAX

Authorization- What is a authorization?- How is authorization different than

authentication?- What is role-based authorization?- How can our role-based authorization be

extended to support multiple roles at once (i.e. a owner that can be a regional manager)?

Page 42: SINY: Authorization & AJAX

- What is AJAX?- What is a has_many :through association in

Rails, is it the only many to many association?- How is AJAX different than websockets?

AJAX