0

Both of these classes may be used to access a DynamoDB. In what cases would I use one over the other, when using the iOS SDK?

1 Answer 1

3

In two lines :

AWSDynamoDB is a DynamoDB API client class.
AWSDynamoDBObjectMapper is a higher level object, a database persistence framework.

AWSDynamoDB

This class wraps the DynamoDB API. You provide methods of this class with a DynamoDBRequest object that describes the operation you want to perform, and it will return a Response object that describe s the result of your request or an error, if any. This low level and mostly match the DynamoDB HTTP API

AWSDynamoDBObjectMapper

When using AWSDynamoDBObjectMapper, you create a class that represent the item you want to store / retrieve from the database. Then you pass instances of this class to higher level methods such as save(), delete() etc...

This is a much higher level of abstraction. Similar in philosophy to Object Relational frameworks such as Hibernate for example.

More details and code sample in Objective C are available here : http://docs.aws.amazon.com/mobile/sdkforios/developerguide/dynamodb_om.html

I also posted a Swift code sample when answering this question : Best way to make Amazon AWS DynamoDB queries using Swift?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.