SB1 and PouchDB

Hi Zebra Launchpad's members,

 

I wanted to have a try of PouchDB, the JavaScript Database that Syncs! on the Smart Badge SB1.

Unfortunately it seems it is not supported by the embedded browser of SB1.

The JavaScript code below in a HTML page

 

var db = new PouchDB('inventory');

 

generates the following lines in SB1's Log.txt file.

 

http://127.0.0.1:83/UserDrive/apps/inventory/js/pouchdb-5.2.1.min.js, line 8: TypeError: 'undefined' is not a function (evaluating 'Mr[t].bind(Mr)')

0 2015-12-10 18:56:46

ERROR: Engine e: PouchDB

http://127.0.0.1:83/UserDrive/apps/inventory/index.html, line 14: ReferenceError: Can't find variable: PouchDB

 

No such problem on Zebra Android or Windows CE devices with Enterprise Browser.

 

That would be great if the next firmware make support of PouchDB possible on SB1.

 

 

Khai-Van PHU

Pietro Francesc...
Hi Kay,the key point here is

Hi Kay,

the key point here is that the rendering engine in our SB1 is built on top of RhoElements v2.x that uses a version of Webkit more or less in line with iOS 6. PouchDB list as a minimum requirement iOS v7.1.

Have you done any test using the es5-shim library they talk about on PouchDB website?, this should help supporting older browser.

Regarding including newer RhoElements version on the SB1, is a fine balance between new features and available resources on the device.

Ciao

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Khai-Van Phu
Hi Pietro,Thank you for your

Hi Pietro,

Thank you for your attention to this question and pointing me to the es5-shim library which could potentially make SB1 compatible with PouchDB.

I had a try by including the es5 javascript libraries in the HTML page.

But definitely SB1's browser still generate an error when it sees code var db = new PouchDB('inventory');

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Khai-Van,What is the use

Hi Khai-Van,

What is the use case here?

Updating the SB1 to a new browser engine is not an easy task, just from a compatibility point of view. With an high risk that the device memory is too limited for something like PouchDB.

If you think that there’s a business case, you can do some test with the latest EB version (that you can connect to the Chrome Dev Tools on your PC) and evaluate the memory impact/speed on something like the MC2180.

Then contact Zebra Regional Product Managers and SB1 Product Manager.

I really like the SB1. I’ve seen nice project using it in surprising ways, and more projects are coming into production in different vertical market.

The key in this cases is to understand the device limits and design a solution with them in mind.

Ciao

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments