npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ui5-firebase-model

v0.1.1

Published

Experimental: An OpenUI5 model which uses a firebase realtime database as its backend

Downloads

13

Readme

UI5-firebase-model

An *UI5 model backed by a Firebase realtime database from Google.

Basic demo video

Why?

The Firebase realtime database is awesome. It allows painless realtime updates between all clients using the same database. Creating a solid UI5 model backed by a firebase DB provides some nice capabilities to UI5 apps:

  • Easy prototyping for UI5 apps. We all know how hard it is to have a read-write backend for an UI5 app. MockServer/OData servers are a pain to setup.
  • Easy realtime updates. Even if you have an app that uses mostly OData you can still embed a FirebaseModel and have a section of the data synced automatically.

Status

This project is VERY early stage. The basic demo works as you see in the video but there's a lot more to be done. Namely:

  • Write unit tests - that pass :)
  • Dynamically dealing with firebase authentication. (maybe create a few methods on the model for this).
  • Exposing more capabilities of firebase
  • Make it work for the tree bindings.
  • Coordinate with the UI5 community to make this easily accessible through package managers (ui5lab.io ?)

Getting started

  1. Install node.js (get it from nodejs.org).
  • If working behind a proxy, you need to configure it properly (HTTP_PROXY / HTTPS_PROXY / NO_PROXY environment variables)
  1. Clone the repository and navigate into it
git clone https://github.com/jumpifzero/ui5-firebase-model
cd ui5-firebase-model
  1. Install all npm dependencies (also installs all bower dependencies)
npm install
  1. Run npm start to lint, build and run a local server (have a look into Gruntfile.js to see all the tasks).
npm start
  1. Open a test page in your browser: http://localhost:8080/test-resources/openui5/community/model/firebase/index.html

  2. You will see some errors in the browser console PERMISSION_DENIED. This is because the firebase db being used is not active.

More help

You can see a sample app that uses this model at https://github.com/jumpifzero/ui5-firebase-model-samples

Technicals

In the current implementation FirebaseModel is an extension of the JSONModel. Check files under test/ on how to use.

Testing this for yourself / developing

If you fire up the index.html on any local server it will not work because I've disabled the updates to the firebase DB. To create your own, do the following:

  • Go into https://console.firebase.google.com with your Google login.
  • Create a project
  • Press Add firebase to your web app. This will provide you with a brand new set of tokens (apiKey, senderId, databaseURL, etc.) needed to interact with a database.
  • Replace these values in the test/.../index.html (or your firebase initialization code)
  • Go into Authentication > Sign-in method and Enable Anonymous

How to use this in your app

Check project https://github.com/jumpifzero/ui5-firebase-model-samples

PRs welcomed!