+ All Categories
Home > Software > Firebase not really_yohoho

Firebase not really_yohoho

Date post: 15-Jul-2015
Category:
Upload: da-14
View: 90 times
Download: 0 times
Share this document with a friend
Popular Tags:
58
Firebase Not really yohoho, but Yarr “one strange pirate notes”
Transcript

FirebaseNot really yohoho, but Yarr“one strange pirate notes”

Questions

1. Dive into Real Time Cloud Database2. CRUD and Data Retrieving3. Authentication and Security4. Special Features you would like to use5. Modules

Break Points1. Main Goals2. Firebase as Service Provider3. Get it Working4. Play Around5. Something special6. Pros and Cons7. What are we waiting for?8. Conclusion

Main Goals- provide with short review of technologie- play around and show examples- provide with directions of using Firebase- conclude everything

Firebase as Service ProviderMain InformationFirebase is a cloud services provider and backend as a service company based in San Francisco, California. The company makes a number of products for software developers building mobile or web applications. Firebase was founded in 2011 by Andrew Lee and James Tamplin and launched with a real time cloud database in April 2012. © Wikipedia

Firebase as Service ProviderServices:- Real Time Database Provider- Hosting- Simple Login

Firebase as Service ProviderReal Time Database ProviderFirebase provides a realtime database and backend as a service. The service provides application developers an API that allows application data to be synchronized across clients and stored on Firebase's cloud. © Wikipedia

Firebase as Service ProviderLanguages:- Java Script- Android- iOS- Node.js- Java- Objective-C

Frameworks:- Angular- Ember- Backbone- React

Get it Working: DataData Storage:- JSON-structed- relative-oriented

How it works:- pub/sub server- web-sockets

Get it Working: StartInstallation:- <script

src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>

- bower install firebase- npm install firebase

Get it Working: Create DB1. Sign Up: https://www.firebase.com/2. Create Database

Get it Working: ConnectEstablish Database Connection:

let’s code, Yarr!

Play Around: CRUD

Create

Read

Update

Delete

Play Around: CRUDCRUD in Firebase:- flexible (as many ways as you can imagine)- one method and a lot of results

Play Around: CreateCreate:- push();- set();

Play Around: Createpush();

- soft insert: just adds a new object

Play Around: Createbefore push(); after push();

Play Around: Create

unique ids

Play Around: Createset();

- strong: replace all the existing data

Play Around: Createbefore set(); after set();

Play Around: Createpush();

- adds new object- assigns unique Id

set();- replace referenced data by incoming

object- doesn’t assign unique Id

Play Around: EventsEvents:

- on/once ‘value’- on/once ‘child_added’- on/once ‘child_removed’- on/once ‘child_moved’

Play Around: Data ViewData View:

- data snapshot- val();- exists()- child();- parent();- hasChild();- hasChildren();- isNumbers();- isString();- isBoolean();- isNumber();- getPriority();

Play Around: ReadRead:- on.(‘value’);- on.(child_added’);- on.(child_removed’);- on.(‘child_changed’);- on.(‘child_moved’);

Play Around: Readon.(‘value’)

Play Around: Readon.(‘value’)

Play Around: Readon.(‘child_added’)

<= show object key

Play Around: UpdateUpdate:- update();- set();

Play Around: Updateupdate();

new field

Play Around: DeleteDelete:- remove();

Play Around: Deleteremove();

Play Around: SearchSearch Process:

- no strong search queries- no real search engine

Search Methods:- on/once(‘value’)- orderByChild(), orderByKey(), orderByValue(), orderByPriority()- startAt(), endAt(), equalTo()- limit(), limitToLast(), limitToFirst()- ref()

Play Around: SearchSource Database:

Play Around: SearchorderByChild(); startAt(); endAt();

Play Around: SearchlimitToFirst(); equalTo();

Play Around: SearchequalTo();

Play Around: AuthPretty-looking and Easy:

- automatic user creation- service-side authentication- multiple authentication methods

Authentication Methods:- email and password (using pre-registered email and password)- social network-based (Facebook, Google, Twitter, GitHub)- anonymous (new session = new identifier) - custom (using pre-generated token)

Play Around: AuthAuth Settings:

Play Around: AuthCreate New User:

Play Around: AuthUser List:

Play Around: AuthAuthentication:

Play Around: SecurityAccess Permissions:

- .read - .write- .validate- .indexOn

Variables:- auth- $location- now- root- data- new Data

Methods:- val()- child()- parent()- isNumber()- isString()- matches(regex)

Operators:- +,-,*,/,%- ===, !==, &&, ||, >, <

Play Around: Security

Play Around: SecuritySecurity Rules:

Play Around: SecuritySecurity Rules & Authentication:

- not authenticated user

Play Around: SecuritySecurity Rules & Authentication:

- authenticated user- read soldiers record

Play Around: SecuritySecurity Rules & Authentication:

- authenticated user- write soldiers record

Play Around: Security- not flexible security rules- breaks search ability- complicated in configuration - force to duplicate data

Something SpecialonDisconnect():

- set();- update();- remove();- cancel();

ServerValue:- TIMESTAMP

databaseReference.child(‘.info’)- authenticated- connected- serverTimeOffset

Pros and ConsPros:

- fast- auto-scalable - service-side process handling - events-oriented- build-in graphic editor- easy to jump in- user-friendly- understandable API

Cons:- poor search engine- no map reduce implemented- no reference or join functionality- not counted amount of

connections

Pros and ConsFree Trial Plan:

- 50 connections- 5 GB Data Transfer- 100 MB Data Storage- 1 GB Hosting Storage- 100 GB Hosting Transfer

Paid Plans:https://www.firebase.com/pricing.html

ModulesModule List:https://github.com/firebase/geofire-jshttps://github.com/firebase/vulcanhttps://github.com/firebase/angularfire

More:https://github.com/firebase

What are we waiting for?- map reduce- url handling

Links: no porn :( https://www.firebase.com/https://www.firebase.com/blog/https://github.com/firebase/

Conclusionvar databaseReference = new Firebase(‘https://thanks.for.listening/’);

databaseReference.set({conclusion: ‘think on your own’

});

Put Something Herevar presentation = {

author: {name: ‘Roman Sachenko’,email: ‘[email protected]’,

skype: ‘roman.sachenko’,statusMessage: ‘there is no way, but the hard way’

},subject: ‘Firebase: not really yohoho, but

yarr’, date: new Date(‘2015/04/30’),

};

DA-14 2015 Roman Sachenko


Recommended