Contenu connexe Similaire à Firebase_not_really_yohoho Similaire à Firebase_not_really_yohoho (20) Firebase_not_really_yohoho2. Questions
1. Dive into Real Time Cloud Database
2. CRUD and Data Retrieving
3. Authentication and Security
4. Special Features you would like to use
5. Modules
3. Break Points
1. Main Goals
2. Firebase as Service Provider
3. Get it Working
4. Play Around
5. Something special
6. Pros and Cons
7. What are we waiting for?
8. Conclusion
4. Main Goals
- provide with short review of technologie
- play around and show examples
- provide with directions of using Firebase
- conclude everything
5. Firebase as Service Provider
Main Information
Firebase 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
6. Firebase as Service Provider
Services:
- Real Time Database Provider
- Hosting
- Simple Login
7. Firebase as Service Provider
Real Time Database Provider
Firebase 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
8. Firebase as Service Provider
Languages:
- Java Script
- Android
- iOS
- Node.js
- Java
- Objective-C
Frameworks:
- Angular
- Ember
- Backbone
- React
9. Get it Working: Data
Data Storage:
- JSON-structed
- relative-oriented
How it works:
- pub/sub server
- web-sockets
10. Get it Working: Start
Installation:
- <script
src="https://cdn.firebase.com/js/client/2.2.4/firebase.js">
</script>
- bower install firebase
- npm install firebase
11. Get it Working: Create DB
1. Sign Up: https://www.firebase.com/
2. Create Database
15. Play Around: CRUD
CRUD in Firebase:
- flexible (as many ways as you can imagine)
- one method and a lot of results
22. Play Around: Create
push();
- adds new object
- assigns unique Id
set();
- replace referenced data by incoming
object
- doesn’t assign unique Id
24. Play Around: Data View
Data View:
- data snapshot
- val();
- exists()
- child();
- parent();
- hasChild();
- hasChildren();
- isNumbers();
- isString();
- isBoolean();
- isNumber();
- getPriority();
25. Play Around: Read
Read:
- on.(‘value’);
- on.(child_added’);
- on.(child_removed’);
- on.(‘child_changed’);
- on.(‘child_moved’);
33. Play Around: Search
Search 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()
38. Play Around: Auth
Pretty-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)
43. Play Around: Security
Access Permissions:
- .read
- .write
- .validate
- .indexOn
Variables:
- auth
- $location
- now
- root
- data
- new Data
Methods:
- val()
- child()
- parent()
- isNumber()
- isString()
- matches(regex)
Operators:
- +,-,*,/,%
- ===, !==, &&, ||, >, <
49. Play Around: Security
- not flexible security rules
- breaks search ability
- complicated in configuration
- force to duplicate data
51. Pros and Cons
Pros:
- 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
52. Pros and Cons
Free 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
54. What are we waiting for?
- map reduce
- url handling
-
55. Links: no porn :(
https://www.firebase.com/
https://www.firebase.com/blog/
https://github.com/firebase/