Sqlite implementation for console Dart application - dart

I'm wanting to test sqlite in dart, however the only implementation that I could find is by Sam McCall on Github, however it's out of date. While I could attempt to bring it up-to-date, I'm not very familiar with Dart yet.
I also read but haven't been able to confirm that sqlite access is provided in the VM, but only for non-html programs. The quote where I read that says "There may be additional problems, because the Dart executable now includes the sqlite library, as part of NSS (Network Security Services, from Mozilla), which is used to implement secure sockets in dart:io.". As I said, I'm not sure if this is correct.
I want to use sqlite with "dart:html", and "dart.io" can't be used with "dart.html", however using it in a console application would be a start.
While dart provides indexed_db, I don't see that as a replacement for sql. Also, while database access may be considered mainly a server-side requirement, there is obviously also the need on the client (eg. when offline etc.).
There would also be the possible problem of conversion to js, but that is not a concern of mine.
Any help with this would be much-appreciated.

As Ladislav mentions, you cannot use sqlite with dart:html, because browser-based apps can only access what the browser platform provides.
WebSQL is basically Sqlite. It still exists, is well supported on mobile, but the spec is dead. It should work fine if that's what you want.
For command-line Dart, you may want to check out SqlJocky, which is MySQL drivers for Dart command-line VM. Check it out here: https://github.com/jamesots/sqljocky
Hope that helps!

Related

Using JS Interop from Dart server

I am trying to create a Dart server that watches a Firebase path. There is a Firebase package in Pub, it is a wrapper for the Javascript library. The instructions for installing the library say:
The firebase.js library MUST be included for the wrapper to work:
I can see how this would work with a client-side Dart application, but how can I use the Firebase Javascript library from a Dart server?
The library you reference (firebase.dart) is purely for client-side usage. For server-side usage, Firebase offers a REST API. There are helper libraries for many languages, but not for Dart as far as I know. As it's REST, it seems to be very easy to interact with Firebase endpoints to get and put data.
You'll want to set up an HttpServer, of course, and then it's a matter of interacting with the Firebase endpoints using http.put and http.read.
Firebase's server-side streaming support via its REST API seems more involved. There doesn't seem to be many Dart folks using Firebase, certainly not the server-side stuff, and so you'll just have to work through getting your server to interact as the docs explain.
(If I get to that point myself, I'll report back and share my code, though all I care to do at the moment on the server is save some data from a Facebook authentication callback URL which my server reads in. Everything else Firebase is on the client side for me.)

How do I create a Dart Server database?

I know that it is possible to create a IndexedDb at client side, but I was wondering if it possible to create a key/value store server Side. In that case we could use that db as a cache server or even as an elasticSearch server, or maybe replace a SQL or NoSQL database
Unfortunately it is not possible to create an IndexedDb on the server in Dart. The implementation primarily leverages the APIs provided by the client-side navigator (eg. Chrome, Firefox, etc). IndexedDb is a developing web standard which will hopefully be implemented in all browsers in the future. In this way, Dart is basically using APIs to access a separate database (albeit a very simple one). It is not implemented in Dart itself.
That said, in addition to other serverside database APIs, there is also a Dart client interface for memcache which can be run on the sever to connect to a memcache instance
You can use any database on the server where a Dart driver is available (not so many yet, but in the future there will be support for most mainstream databases.
take a look at
https://pub.dartlang.org/packages/yomp_db
http://pub.dartlang.org/packages/mongo_dart
http://pub.dartlang.org/packages/sqljocky

Secure Persistant Caching in an iOS Static Framework

I am currently in the process of writing a static iOS framework that connects developers to my API and returns to them objectified information at their user's requests. However, in order for this framework to be worthwhile, one of the requirements is that this framework must be able to cache the information locally and return an offline copy when a network connection is unavailable. I am aware that I can store this information in NSUserDefaults but there may be a case where the information that is cached may be private and the local developer should not be able to have access by guessing the proper key. I believe that best approach will involve some sort of encryption but I wanted to see if there were any other storage options available to a static framework other than NSUserDefaults.
I would like to keep my data in an objectified format if possible. Two solutions I would be interested in exploring would be to save my offline data in either SQLite or CoreData. However, with both of these approaches I am concerned about how these files would be stored in the framework (I already have an embedded framework) and the security issues of having the schema for these files available in the bundle for the developer to see.
Another solution that I am looking into would be to see if iOS supports any tools such as gzip that could be used to password protect my files until they are used by the framework.
Has anyone successfully overcome any of these issues? Is there anything else I should be looking into besides the previously mentioned possible solutions? Any advice will be warmly welcomed.
Thanks.
P.S. Does anyone know of any resources I could go read relating to iOS Security or static frameworks? Either would be very helpful.

Sentry Rails Client

per the Sentry documentation:
...Sentry is not limited to Python. The primary implementation is in Python, but it contains a full API for sending events from any language, in any application.
There is a gem called 'sentry' however it is a encryption library having to with OpenSSH and totally unrelated.
Is there a Rails Client for hooking to Sentry already or some other comparable technology out there which can be used with Rails?
If not, +1 for a Rails Sentry Client
As I write this (last updated May 2015), the Sentry docs list clients for Java, JavaScript, Node.js, PHP, Python, and Ruby.
It is a bit hidden, but in the hosted version (dont know if its in the open source version too) you can find information about Ruby and RoR integration on this page:
https://app.getsentry.com/account/projects/PROJEKCT-SLUG/docs/
So it looks like they have Ruby support, but dont tell us on there webpage.
EDIT: I found this: https://github.com/coderanger/raven-ruby
When logged in, there is a reference to https://github.com/coderanger/raven-ruby in the docs.

Does IOS support Active Directory in any way?

I know this a pretty general question and I'm not looking for code or anything. Even a link or short explanation would be nice.. Specifically searching for a way to browse network based active directories from an internal IOS application. Using a cloud or email is not an option.. Possible?
There is a recent article on IBM developerWorks that explains how to use OpenLDAP client libraries in the iOS environment. You can use OpenLDAP client libraries to access LDAP sources, including Active Directory. Not all Active Directory operations are supported, but even basic queries should be sufficient for building a browsing application.
There is a recently released free solution called Centrify Express for Mobile that allows an iOS device (iPad/iPhone/iPod) to join Active Directory, so you can use AD to manage/secure the iOS device.

Resources