I am trying to incorporate RestKit into my iOS app but I have been unable to locate a beginner's guide to this API. I tried to follow the GitHub examples but they are not working for me.
Object Mapping is one of the prime reasons to use RestKit, you can read about it at https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md
An awful lot of the tutorials on the web refer to the older architecture, this document covers the latest stable build.
Related
I have a GraphQL service that I need to hit from an iOS app, and I'm trying to survey what my options are for client libraries geared towards this purpose. My initial impression is that there are not many good options out there, and I'm a little surprised by this since Facebook's mobile app is always cited among the motivational material for GraphQL itself.
What follows is my current understanding of my options. My questions is: what client library options am I overlooking? I'm also curious if you were to imagine the ideal GraphQL client library for iOS, what might it look like?
Just Alamofire, AFNetworking, or NSURLSession directly, passing in lovingly hand-crafted Query Documents and spelunking through a Dictionary representing the resulting JSON, or
Chester
GraphQLicious
Swift-GraphQL
This question was asked a long time ago - I think today the standard answer to this will be to use Apollo Client.
It uses a similar API as the Apollo Client on the web and has a couple of really nice features:
Static type generation based on GraphQL Queries & Mutations
Normalized cache
Query watching & automatic UI updates
Manual store updates
It has not yet reached 1.0 but overall is a super promising project!
Here are some resources that should help you get started:
Apollo iOS Quickstart
Apollo iOS on GitHub
Ray Wenderlich GraphQL Tutorial
Learn Apollo iOS Track
I would not build queries by hand, and I think both Chester and GraphQLicious would be fine for you.
If I had to imagine the perfect library, it should not only build queries but also parse the result into Swift objects. This, as you may know from JSON parsing libraries, is not a small task and that's why most of the GraphQL-Builder libraries don't do it.
Disclosure: I'm one of the guys behind GraphQLicious
Yep, subjective question. But here are a lot of such questions that got good answers. So now I have to try to develop some REST API with Erlang, as I got from google I have to install some webserver, such as Cowboy, Webmachine, Yaws, Mociweb. But all information I can find is too old and seems to be non-actual. So what server still keeps on developing and how can I choose one for me? Am I wrong at all at this way?
You can't go wrong with Cowboy. It is actively being developed, with a 2.0 pre-release just made available. The documentation is excellent, and handles REST very well.
See: http://ninenines.eu/docs/en/cowboy/1.0/guide/rest_handlers/ for the Cowboy REST support.
I'm just starting off with RestKit for iOS.
after figuring out some concepts and head-points for the RestKit, I've moved to start some practical training on RestKit. But what I've found is all the examples and the tutorials about RestKit are outdated and there is no example on the new version .
What i want is a small and simple example on how Restkit deal with JSON (Request and Response) and how to use ObjectMapping 2.0 (live example)
I've been reading through this web page since 3 days and i came over all of it's stuff and acquire a good amount of knowledge about it, but still with no benefit for what I want.
Thx in advance
You best place to start is download restKit from github and working through the examples that are built in.
https://github.com/RestKit/RestKit/tree/master/Examples
That is a good place to start and generally kept up to date.
Blake has written a great writeup at https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md I don't know if was update to handle the very recent release but it certainly worked on the previous one.
Basically, I would like to write a rails 3 app that
is embeddable in other rails 3 apps (basically some routes, a controller, and some views, no persisting models)
works standalone
can be bundled up into a gem and be launched from a command (this one is more a nice to have)
From what I have read, rails engines would totally solve my problem. The vast majority of what you get when you google it is either people complaining about a lack of documentation, or someone building a plugin, not really a pluggable app. Could anyone point me to better documentation/screencasts (even books if nessicary)
Thanks a bunch
Matt, I'm working on a rails forum engine and I had to figure a lot of this out so I extracted the foundation into a detailed example that covers a lot of common needs. It's generalized so you can easily adapt it. I don't have detailed documentation yet but I link to the sources that I used to figure this out, and I'm happy to answer questions about my source. Check it out:
http://keithschacht.com/creating-a-rails-3-engine-plugin-gem/
An Engine is really what you need and totally designed to meet your reuirements.
Engines actually work a lot better in Rails3.
A lot of the complaints from previous versions of Rails have been resolved in the latest version. I have used engines quite extensively in Rails 2.x and not found them to be all that bad to be honest.
Right now I program exclusively with Objective-C using the Cocoa frameworks to write applications for the Mac OS X and iPhone/iPad platforms. I'm fairly fluent using the Objective-C language as well as the Cocoa and Cocoa Touch frameworks. I also know just enough C to be able to understand ObjC.
One of my projects requires that I write a corresponding web application for use with my iPhone app. I've decided that the best path to go with is Ruby on Rails. What is the easiest transition path to go from Objective-C to Ruby on Rails? Any starter guides/docs/tutorials are appreciated!
Thanks
I think that learning Ruby without Rails first is a good idea. _why's Poignant Guide to Ruby is good for people coming from Objective-C because it doesn't go through how objects send "messages" to each other and all that stuff. After that, you should be able to use the Rails Guides to learn Rails. There are tutorials there. I don't know of any learning material that you have to pay for (like books), though. If that is what you want, I would try searching on Amazon.
I'm nearing the end of this tutorial myself, and I think it's a perfect resource for those who are already familiar with software development, particularly web application development in general. I come from a Java background, but have dabbled in PHP and Python (specifically, Django). This tutorial has given me tremendous exposure to Rails in a very friendly way.
I still have some unanswered questions, but less than I had when I tried learning from other books.
As a side note, the tutorial briefly discusses learning Ruby first then Rails vs learning Rails first then Ruby (it ultimately suggests Rails first).
I'm not sure if it was available back when this question was first asked, but I think http://railsforzombies.org/ is an excellent first tutorial. It introduces the framework in a way that's accessible, interactive and engaging, and it makes a great foundation for further study. I got a lot out of it.
How to make a rails application app as a versioned api in less than 10 minutes.
http://railscasts.com/episodes/350-rest-api-versioning
If you'd like to easily follow along executing code along with the video check out the ascii cast so you may copy and paste as you watch.
http://railscasts.com/episodes/350-rest-api-versioning?view=asciicast
You may want to have rvm installed and use the gem bundler. create new gemset for each project. This will save you hassle with different versions of ruby and gems required for different projects.