background preloader

Angular+Firebase

Facebook Twitter

Firebase a AngularJS - Prskavčí blog. Dnešní většina aplikací v javascriptu má architekturu klient server. Pokud nechcete psát nějaký backend pro vaši aplikaci, můžete se tomu vyhnout pokud použijete nějaký druh úložiště (databáze), která vám k tomu přidá i funkce, které má nějaký backend napsaný např. v nodejs nebo php. Těmto řešením se věnuje web nobackend.org, kde se dají najít tyto řešení: Bohužel jsem neměl tolik času, abych podrobně prozkoumal všechny řešení. O Firebase jsem se dozvěděl z přednášky na meetupu: Z této přednášky jsem vycházel pro svoji přednášku na PragueJS. Firebase Zajímavé na tomto projektu je, že je to poměrně mladý projekt, ale který vznikl z projektu Envolve (2009), což je skupinový chat pro tisíce websites. AngularFire AngularFire je modul, který řeší vlastní authentikaci pomocí angularFireAuth.

Stačí mít includnuté tyto soubory pro práci s firebase. potom v controlleru se předá angularFireAuth přes dependency injection v šabloně potom máte vlastní přihlašování Firebase Open Source Závěr. AngularJS Fundamentals for Rapid HTML5 Development. AngularJS Fundamentals In 60-ish Minutes. An Introduction to AngularJS Forms Validation. Realtime Web Apps with AngularJS and Firebase.

Angular + Firebase is RAD. I believe that when developing an application feedback from the product owner is king. I try to optimize this feedback by delivering working features quickly and with as little ceremony as possible. Especially early on. This is one reason I have been so excited about rich client javascript frameworks such as Angular and Ember.

They allow me to deliver near complete features with out ever touching the server. For the most part I have been happy with this approach to rapid prototyping. This is why when I heard about Firebase I immediately had to investigate it. Firebase already has supported adapters for both Angular and Backbone. Getting Started Getting started is as simple as I can imagine. Building an App Not only does Firebase allow me to defer focusing on my backend. This means we can persist data bound to a $scope to Firebase. This worked out great for the app I wanted to build. AngularFire calls this form of binding “implicit binding”. It’s as simple as that. Firebase.