Can i use breeze.js with SQLite or local database? - breeze

I am using HotTowel for developing for an offline online scenario for application i am working with .
I would like to know if I can use existing HotTowel stack along with Breeze for querying my offline database.
Please let us know if anyone has such exposure if I can combine both offline and online scenario with breeze and implement scenario effectively.

To help you implement offline/online solution with breeze you should use MetadataStore's export facility to export your entities as string, store your entities in your offline database and then import them back to MetadataStore. More on this topic please read export and import entities

Related

Firebase chat backup/export like whatsapp in SWIFT

i implemented a chat app in swift using firebase real time db, there user can send images, emojis and Text.Now i have a requirement of export chat or get the conversation's backup with media and text as per whatsApp.help me to solving it out.
While Firebase offers a backup for the Realtime Database, this doesn't fit your needs here, since you'll want a per-user export of the data.
Since this is specific to your application, you will have to code it yourself, just like the good folks at WhatsApp have probably done. It should be a matter of iterating over all data sources for the user, getting the data through the relevant API (that you're already using to display that data), and then writing to a local file). You can do this either client-side in your Swift code, or server-side on a server you already may have, or using Cloud Functions.
If you're looking for some inspiration for the latter, there is a sample repository that shows how to clean up a user's data, based on a set of wipe-out rules. You'll need to significantly modify this example though, so I'm not convinced this will be less work than rolling your own from scratch.

How would I go about building and hosting my own backend for an iOS application?

As a preface: I want to do this as a learning exercise. I'm not trying to produce a commercially viable app.
What are the layers/abstractions of an iOS application that is connected to a custom, self hosted backend? What technologies are needed to build this stack?
This post has helped my understanding a bit. I'm currently using Firebase as my backend but have found its NoSQL structure wrong for my app. The data I'm storing is relational, so I think an SQL database storing JSON would work better. The data is modeling Vehicles shared between Users.
From my research, the Realm Platform looks like a good choice. Am I understanding the technologies correctly here? Does this sentence make sense?
General functionality:
Sign Up and Login of users
Upload/download vehicle data
Some server side logic
Pushing data updates to users in real time
So would the stack look like the following?
User Front End: iOS app written in Swift
Database: Realm Database (SQL)
Server: Realm Object Server
I'm really looking for an overview of the general architecture. I don't know anything about that, so I'm sure I have failed to provide many details that are necessary for a thorough answer.
I apologize if this question is redundant; most answers I've seen for similar questions typically end with "just use AWS, Firebase, etc".
Thanks!
For a start you want to build your own backend and you should create your own API's that your IOS application will connect to. in short this is called REST api
https://www.sitepoint.com/developers-rest-api/
you will need to use many more technologies more than just a server like Apache
once you create your backend API you will need to connect it to the IOS app which can be done using NSURLSession builtin framework form Apple or Alamofire which is based on NSURLSession but its easer to use if you are learning
you will need to learn how to do an http/https request to understand how the request is made
check this
https://medium.com/#MuraliKathir/build-a-simple-api-search-with-alamofire-and-swiftyjson-80286e833315
Now to Realm. Realm is a local database that will be inside of your IOS app which helps you save data downloaded online or even user generated
https://realm.io/docs/swift/latest/#queries

Example query to load OpenPhacts data into a graph database

OpenPhacts is a wonderful source of a number of RDFs related to drug discovery (https://www.openphacts.org/). The data is freely available (https://data.openphacts.org/commercial/2.1/)
Unfortunately there is no example of how to load it into a graph database such as neo4j or arangodb (http://support.openphacts.org/support/solutions/articles/168752-can-i-install-open-phacts-locally-)
Could someone provide a basic example on how to import one of the dozen RDFs into a graph database for a novice graph database user?
Thanks
Iain
Check out this post & tool by my colleague
https://jesusbarrasa.wordpress.com/2016/06/07/importing-rdf-data-into-neo4j/
It uses some sensible mapping and provides a Neo4j user defined procedure to do the hard work.

Sharing a Realm Database between a user's devices

Is there a formal way for a Realm Database to be shared between a users iPhone and iPad? Clearly that will need some kind of server that a database can be pushed and pulled from. Is there a solution for this, like is there a way to use iCloud?
If not does anyone one have any ideas for a path of least resistance for implementing this myself?
Found this chat on the Realm's GitHub page
https://github.com/realm/realm-cocoa/issues/913
I am still hoping someone here has got around this issue?
Realm hasn't provided sync feature yet. We are actively working on sync building feature, but we don't have no ETA at the moment.
Easy ways are sharing Realm data file with iCloud or other services. e.g. DropBox API.
https://www.dropbox.com/developers
Or this library might help you...? https://github.com/BellAppLab/RealmCloudKit
Second, using serverside database to sync with local database. Like Parse.com.
https://parse.com/

iPad app designing: sync with Excel file

I'm designing a new app for iPad for a small company. This app will use Core Data to store a local database and a database of products and prices. The last database needs to be always up to date since the prices can change.
This company, has a Excel file to keep this database of prices. So they don't have a SQL db to which I can interact from my app.
One option could be to export the Excel file in CVS and put that file in their server (accessible by internet). Then my app should parse the file.
I don't like very much this idea, though.
Do you have any suggestion?
I had a very similar problem to you. I recently got into a project where the client wanted to import information from an Excel file into an app. I know a lot of people say, just transform it into a CSV and parse it that way, but I really didn't want the client to go through yet another step and introduce a different file format - as simple as that may be.
I also really don't like having the information in the cloud, especially Google. Privacy is something that's important to most companies and I'd doubt they'd approve of you using Google to parse the info.
In order to parse the file, I created QZXLSReader. It's a drag-and-drop solution so it's a lot easier to use. I don't think it's as feature complete, but it worked for me.
It's basically a library that can open XLS files and parse them into Obj-C classes. Once you have the classes, it's very easy to send them to Core Data or a dictionary or what have you.
I hope it helps!
Here are a couple of options for you:
Use Google Doc as the intermediary. When the pricing Excel is updated by someone, simply upload the updated Excel to Google Docs. From your iPad app, you can read the latest data via the Goole API. If the company is up for it, they can move to Google Doc altogether and just modify the online Google Spreadsheet directly.
Use services like StackMob as the intermediary. You will have to write a tool to sync the pricing Excel with SrackMob but you can easily access the data via StackMob's iOS SDK.

Resources