Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
My boss asked me to develop an order system for our company's salesmen. Our company has almost 100,000 items to sale. In order to improve the performance, we will ask salesmen to download all data from sql server to iPhone local sqllite one time per week, and build index.
I'm a windows mobile developer, and it's very easy to use RDA to download data from sql server to local sqlce. The size in windows mobile device is about 20M.Now I need to do the same thing in iPhone.
I'm a newbie at iPhone development. Please give me some ideas about this project.Any input will be appreciated
Here is some information on using SQLite in iOS: iOS offline data storage tutorial
You'll probably need to export the DB as SQL and download it from the server, then import the SQL into SQLite.
As another answerer suggested, you could expose a REST interface on the server--assuming your server is setup to export the contents of the entire product database. Then there are any number of third party tools for importing JSON data (eg: via REST) into CoreData. Or if your REST data isn't too complicated it's not hard to parse it and directly add it to CoreData.
I personally recommend CoreData rather than using sqlite directly--iOS makes it very easy to do so. But it's also a matter of personal choice and I know lots of people prefer to use sqlite directly (especially if they want to build some cross-platform code, eg: to make an Android version which shares the same DB schema and logic).
There's probably many ways to do this, but I would go with build a rest api for the server data. Then on the iPhone side of things, make a network call to access the data.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm sorry since I'm new to this.. I'm currently working on my startup which basically like food delivery system and I used Flutter for my app. I learned Flutter using Firebase as a backend. However, there are many sources that recommend use MongoDB as a backend database which I have zero knowledge about it. But I think that MongoDB just only offer for database crud operation. So I think for the database crud operation my app should use MongoDB. However, I think MongoDB is quite complicated when it involves authentication. So, which is better approach for me? should I use Firebase for authentication and MongoDB as the database or is it better to use only one platform for the backend whether its a Firebase or MongoDB? If I mix these two, does it will affect the pricing? Is there any ways that can make me clear which to choose.
MongoDB is an open source NoSQL database management program, which is quite useful for working with large sets of distributed data. It is mostly useful for big data applications and other processing jobs involving data that doesn't fit well in a rigid relational model.
It is an absolutely right approach to use Firebase Auth for just login or signup and the rest on MongoDB. There are 2 ways you can implement the Firebase Auth:
1. Using the SDK provided by Firebase
2. Using the Admin Auth API
You may select any of the above two approaches to save your UID on your custom Backend which might be MongoDB.
Contrarily, Firebase can also be used as backend. It provides the back-end server, a great database and analytics solution, and useful integrations with other Google products. Its free to use, affordable subscription options, wisely designed backend solution guarantees project scalability and data security makes it a great choice for backend.
However, for the vast majority of apps and use-cases, Firebase is an excellent choice. You can start with its free tier and don’t need to worry about maintenance or scalability. It’s great for small to medium developers as it allows them to lower initial costs while focusing on providing the best user experience.
When working on a heavy real-time app like chat, or some other highly collaborative experience, Firebase is still an option, though it might be a bit pricey.
However, the recommendation is always to consider your budget, the required feature set, and how much maintenance you’re willing to do on your own before making a decision.
You might also refer to this documentation, which will guide you with the pros and cons of choosing Firebase as backend.
Flutter: can I mix Firebase Auth with Mongodb Databases?
Check this similar post. If you still have doubts, feel free to ask.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm currently using Firebase as a prototyping tool to showcase a front end design for a documentation tool. In the process we've come to really like the real-time power of Firebase, and are exploring the potential to use it for our production instance of an open source/community version.
The first challenge is version control. Our legacy project used Hibernate/Envers in a Java stack, and we were previously looking at Gitlab as a way to move into a more "familiar" git environment.
This way?
Is there a way to timestamp and version control the data being saved? And thoughts on how to best recall this data without redesigning the wheel (e.g. any open source modules?)?
The real-time aspect of something like Firepad is great for documentation, but we require the means to commit or otherwise distinctly timestamp the state or save of a document.
Or?
Or is it best to use Firebase only for the realtime functionality, and implement Gitlab to commit the instance to a non-realtime database. In other words abstracting the version control entirely out to a more traditional relationship to a db?
Thoughts?
Both options you offer are valid, and feasible. In general, I'd suggest you to use firebase only as your real-time stack (data sync). And connect it to your own backend (gitlib or custom-db).
I've went that path, and find the best solution is to integrate your own backend db with firebase on top. Depend on firebase exclusively for everything, and you'll hit walls sooner or later..
The best solution is to keep full control on your data structure, security and access models, and use firebase where needed to keep clients in sync (online and offline). The integration is simple.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm tasked with investigating for our firm a full-stack solution where we'll be using a NoSQL database backend. It'll most likely be fed from a data warehouse and/or operational data store of some type in near-realtime (hopefully :). It will be used mainly by our mobile and web applications via REST.
A few requirements/assumptions:
It will be read-only (in the near term) and consumed by clients in REST format
It has to be scalable
Fast response time
Enterprise support - or if lacking actual support, something industry proven if open-source (basically management wants to hold
someone accountable if something in the stack fails)
Minimal client data transformations - i.e: data should be stored in as close to ready-to-use format as possible
Service API Management of some sort will most likely be needed (eg: 3scale)
Services will be used internally, but solution shouldn't prevent us from exposing them externally as a longterm goal
Micro-services are preferable (provided sufficient API management is in place)
We have in-house expertise in Java and Grails for our mobile/portal solutions
Some of the options I was tossing around were:
CouchDB: inherently returns REST - no need for translation layer - as
long as clients speak REST, we're all good
MongoDB: need a REST layer in between client and DB - haven't found a widely used one based on my investigation (the ones on Mongo's site all seem in their infancy - i.e: RestHeart)
Some questions I have:
Do I need an appserver? Or any layer in between the client and DB
for performance/caching reasons? I was thinking a reverse-proxy like
nginx would be a good idea for this?
Why not use CouchDB in this solution if it supports REST out of the box?
I'm struggling with deciding between which NoSQL DB to use, whether or not I need a REST translation layer, appserver, etc. I've read the pros and cons of each and mostly they say go Mongo - but for what I'm trying to do the lack of a mature REST layer is concerning.
I'm just looking for some ideas, tips, lessons learned that anyone out there would be willing to share.
Thanks!
The problem with exposing the database directly to the client is that most databases do not support permission control which is as fine-grained as you want it to be. You often can not allow a client to view and edit its own data while also forbidding it from viewing and editing any data of other users or even worse from the server itself. At least not when you still want a sane database schema.
You will also often find yourself in the situation that you have a document with several fields of which only some are supposed to be under the control of the user and others are not. I can, for example, edit the content of this answer, but I can not edit the time it was posted, the name it was posted under or its voting score. So far I have never seen a database system which can handle permission for individual fields (when anyone has: feel free to post in the comments).
You might think about trying to handle this on the client and just don't offer any user interface for editing said fields. But that will only work in a trusted environment. When you have untrusted users, they could create a clone of your client-sided application which does expose this functionality. There is no way for you to tell the difference between the genuine client and a clone, especially not when you don't have a smart application server (and even then it is practically impossible).
For that reason it is almost always required to have an application server between clients and database which handles authentication and permission management of the clients and only forwards those requests to the persistence layer which are permitted.
I totally agree with the answer from #Philipp. In the case of using CouchDB you will minimum want to use a proxy server in front to enable SSL.
Almost all of your requirements can be fulfilled by CouchDB. Especially the upcoming v2 will give you the "datacenter-needs".
But it's simply very complex to answer what should be the right tool for you purpose. If you get some business model requirements on top like lets say: throttling - then you will definitely need an application server middleware like http://mcavage.me/node-restify/
Maybe it's a good idea to spend some money to professionals like
http://www.neighbourhood.ie/couchdb-support/ ? (I'm not involved)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a wordpress blog that's sort of a quote of the day type of a deal and I am looking to make a simple iPhone app that automatically downloads the blog content (think RSS—kind of). I want my readers to be able to save their favorite posts and I need to be able to show access to all archives (about 440 posts to date). I also need it to send a push notification when a new post is detected. Anyway, I have been looking at RSS feeds, but it looks like I can only show the last ten.
As far as iPhone programming experience, I'm by no means a noobie. However, I have mostly worked on game projects and I don't have very much experience with the internet side of programming (downloading, parsing, etc.).
Any ideas would be appreciated. I just need to be pointed in the right direction.
Here's what I would do, though I'm sure there are many solutions:
Get access to your WP blog as JSON instead of RSS (XML). In general, I've found the JSON libs to be much easier to work with than the XML libs in iOS. Here's the first plugin I came across, and it looks like it's an "API" instead of just a conversion of the feed. Hopefully this will give you more support for querying things like archives or specific posts or date ranges, etc.: http://wordpress.org/extend/plugins/json-api/
Decide if you want to load ALL content from each wp post, or just the titles. This kinda depends on how big each post is, how you're displaying them, etc. It might be quicker to just fetch + parse all the Post Titles and then make a subsequent query for a selected post's content.
Load the data with NSMutableURLRequest and NSURLConnection, etc. Use the json-framework to parse this data, once you get it into your app (I found it through the Stanford iOS dev lectures). Quite easily converts a json string into a NSDictionary: https://github.com/stig/json-framework/
As for loading all archives, ideally you can continually query for older posts with your wp json plugin, and maybe store the loaded post's timestamps on the device so that you don't need to fetch data more than once.
As for saving all this (including favorites), I'd look into using CoreData. http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html
Push notifications are another beast entirely! I suppose the best approach would be to store push tokens of all your 'subscribers' somewhere on your server, then write some kind of php script that triggered your APNS service on an interval, checked for new posts, and sent out notifications accordingly.
Best of luck!
TouchJSON has native XML parsing support for Wordpress Blog RSS format. Try it out. You should be up and running in about an hour.
You can get TouchJSON from here
https://github.com/TouchCode/TouchJSON
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am looking for Google Apps integration for Basecamp & Highrise. Is there anything out there that will integrate:
Google Contacts <-> Highrise Contacts
Google Docs <-> Writeboards
Google Docs <-> Files
Google Tasks <-> TO-DO's
Google Mail <-> Messages
Google Calendar <-> Calendar
I've seen...
http://www.google.com/enterprise/marketplace/viewListing?productListingId=6555+11590890867758873917
http://www.google.com/enterprise/marketplace/viewListing?productListingId=5260+12920783959265872258
...but nothing appears to be out there for the whole shebang.
With cloudHQ service, you can manage all your work documents in a single interface and keep files synched between Basecamp, Google Docs, Dropbox and SugarSync.
No need to download and attach files – just edit and save files directly on cloudHQ and keep your assets all in one place.
All your Basecamp project attachments can be in Google Docs so you can share them and collaborate on them directly from a Google Docs interface.
cloudHQ on Youtube
Good ol' integration. Always a pain.
Perhaps look into something that consolidates more of what you need into one system, and bypass the integration entirely. WORKetc integrates CRM, project management, collaboration tools, and billing into one system - and it integrates with Gmail among other google apps. Managing all operations through one system is much more efficient and saves a lot as well.
Highrise doesn't integrate with Google Docs, in the sense that, say, Wrike or Insightly do, by letting you attach a Google Doc to a task, project or contact. And 3rd party integrations like Zapier don't do the trick either.