What is the difference between Amazon dynamodbclient and dynamodb classes in their Java SDK?
I'm using Amazon's dynamodb Java SDK and want to know the difference between Amazon dynamodbclient and dynamodb classes I can't seem to find anything because there seem to be few documents Is there any reason why I should use one of them? Do they have any major advantages or disadvantages?
Solution
This is a good question It seems that dynamodb is the wrapper of Amazon dynamodb client, which provides different interfaces So this may be obvious, not the answer you're looking for, but let me describe some of the differences between them
The createtable method in Amazon dynamodbclient returns a createtableresult object, while the createtable method in dynamodb returns a table object You can then use this table object to execute crud on the table The table object starts to look like dynamodb's generic ORM object Therefore, it is not the real dynamodb class and Amazon dynamodbclient. It is more like dynamodb & table class and Amazon dynamodbclient
Amazon dynamodbclient is obviously older than the dynamodb class Dynamodb is very new, at 1.9 Appears in X But there is another class worth mentioning, dynamodbmapper Dynamodb mapper allows more operations similar to orm Allows developers to annotate their JavaBean data model so that they can easily crud dynamodb tables You can use objects directly, and dynamodb mapper will perform crud work on dynamodb database Dynamodbmapper is older than dynamodb class I think maybe some developers don't want to use dynamodb mapper (maybe not fans of OO or annotations?) And another example is needed, but I'm just assuming Therefore, dynamodb and table classes are created Using the table class, you can interact with tables more easily than Amazon dynamodbclient, but without the overhead of creating the JavaBean data model required by dynamodbmapper