cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel Nennker <ignisvul...@gmail.com>
Subject Re: storage
Date Sun, 05 Jan 2014 16:34:53 GMT
Thanks for helping with the current project. But I am still not convinced.
The current implementation stuffs the images (data urls) into the websql
db. So we have no extra handling for them. The images are data like the
other fields too.
I do not want to implement a database using file because I think  that
databases are there for a reason.

Regardless of the actual problem with my project: I still think that
Cordova would profit big time from an indexeddb plugin that provides a
database API for all platforms.

-Axel



2014/1/5 Brian LeRoux <b@brian.io>

> Ok, thats easier for me to reason about! (Easier to explain your problem
> space in the form of a use case rather than presenting us with the solution
> you arrived at b/c we do not have your context.)
>
> Anyhow, given you are reading/writing blobs (images) I'd say the File API
> is absolutely the way to go. Unfortunately, FxOS Honestly, I'd write a
> wrapper specific to your case and swap an adapter for the platform you are
> running on. (Something like Lawnchair but modernized.)
>
> Another path would be to implement our File API on top of one of the FxOS
> options. That would be a pull request we would welcome and maintain in
> core.
>
>
>
>
> On Sat, Jan 4, 2014 at 3:34 PM, Axel Nennker <ignisvulpis@gmail.com>
> wrote:
>
> > Hi Brian,
> > we are building an applications that imports some data and stores that
> data
> > in a database.
> > Each imported data is between 2k and 50k but can be bigger. It is a set
> of
> > images in different sizes and resolutions and some text, integer fields.
> > We expect the total amount of data to exceed the limits of local storage.
> > We display the images and other fields based/filtered on some of fields
> > chosen by the user.
> > We decided to go for websql because it is supported on IOS and Android.
> Now
> > we want to support FirefoxOS and have to face the fact that we have to
> > invest many days to switch to another storage solution. Or to have
> > different code bases on different platforms. Which we hoped to avoid by
> > using Cordfova.
> > I am not sure whether indexeddb is the right choice for this project. But
> > websql is deprecated and not available on FirefoxOS.
> > We could go the other way too: Find a websql/sqlite extension for FFOS...
> >
> > I think we will give indexeddb a shot.
> >
> > Best
> > Axel
> >  On Jan 4, 2014 9:59 PM, "Brian LeRoux" <b@brian.io> wrote:
> >
> > > Well, I am not here to argue semantics but I am curious about your use
> > > case. Right now im hearing a feature request for an API with no
> tangible
> > > story for us to rally behind.
> > >
> > > What are you writing (persisting)? How large? Does the write have to be
> > > transactional? Asynchronous?
> > >
> > > The API is important but indexeddb is no different than opening a file
> > > really.
> > > On Jan 4, 2014 12:46 PM, "Axel Nennker" <ignisvulpis@gmail.com> wrote:
> > >
> > > > File API could probably be used to implement all databases. So the
> > answer
> > > > is yes anyway,  right?
> > > > I think that indexeddb is the currently best API for developers using
> > > > cordova and it is not good that they have no storage API that works
> on
> > > all
> > > > platforms that Cordova supports.
> > > >
> > > > -Axel
> > > >  Am 04.01.2014 20:48 schrieb "Brian LeRoux" <b@brian.io>:
> > > >
> > > > > File API does not satisfy your use case?
> > > > > On Jan 4, 2014 4:36 AM, "Axel Nennker" <ignisvulpis@gmail.com>
> > wrote:
> > > > >
> > > > > > I looked at the Aerogear Datamanger. Looks good but I am looking
> > for
> > > a
> > > > > > really simple solution where developers don't have to strip
away
> > the
> > > > > > Aerogear part.
> > > > > > Something like: cordova plugin add indexeddb
> > > > > >
> > > > > >
> > > > > > 2014/1/3 Lucas Holmquist <lholmqui@redhat.com>
> > > > > >
> > > > > > > you should checkout the Datamanager stuff that we've been
> working
> > > on,
> > > > > on
> > > > > > > the aerogear project
> > > > > https://github.com/aerogear/aerogear-js#datamanager
> > > > > > >
> > > > > > > It is designed to fallback to whatever is available on
your
> > > platform
> > > > > > >
> > > > > > > On Jan 3, 2014, at 8:30 AM, Axel Nennker <
> ignisvulpis@gmail.com>
> > > > > wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I was wondering about the cross-platform experience
of
> Storage.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://cordova.apache.org/docs/en/3.3.0/cordova_storage_storage.md.html#Storage
> > > > > > > >
> > > > > > > > It seems that there is no cross platform solution
in Cordova,
> > > > right?
> > > > > > > >
> > > > > > > > There are indexeddb shims that implement indexeddb
on "all"
> > > > > platforms.
> > > > > > > > Shouldn't storage be indexeddb only? websql is deprecated.
> > > > > > > >
> > > > > > > > My team is currently facing the problem that we implemented
a
> > > > project
> > > > > > > with
> > > > > > > > Cordova's websql on Android and IOS but it is not
supported
> on
> > > > > > FirefoxOS.
> > > > > > > > Now I wish we had started with indexeddb and used
a shim on
> > IOS.
> > > > > Argh.
> > > > > > > >
> > > > > > > > I think the text on cross platform storage in
> > > > > > cordova_storage_storage.mdis
> > > > > > > > not really helping developers.
> > > > > > > >
> > > > > > > > Advice?
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > > Axel
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message