I am new to REST web services and am very used to RPC . I know the benefits of REST by reading a few posts, for example.
I am developing a server in django using the django-rest-framework.
Although you have this question (or questions):
I have this model:
class Poll(models.Model):
questionString = models.CharField(max_length=500, blank=True)
timeToAnswer = models.IntegerField(default=30)
startDate = models.DateTimeField(null=True, db_column='startDate', blank=True)
token = models.CharField(max_length=20, blank=True, unique=True)
class PollAggregator(models.Model):
name = models.CharField(max_length=135)
description = models.CharField(max_length=500, blank=True)
votersToken = models.CharField(max_length=20, null=True, blank=True)
class PollPollAggregatorRel(models.Model):
pollAggregator = models.ForeignKey(PollAggregator, null=True, db_column='pollAggregatorId', blank=True)
poll = models.ForeignKey(Poll, null=True, db_column='pollId', blank=True)
So, I can have one survey, or I can have a bunch of surveys aggregated in the survey aggregator (i.e. premises).
, : pollList, pollDetail, pollAggregatorList, pollAggregatorDetail. PollPollAgregatorRel.
, PollPollAgregatorRelList PollPollAgregatorRelDetail , , , . , REST, :
- , PollPollAgregator () get pollId
- , , pollAggregator
- , PollPollAgregator
- ?
RPC, -, - :
- pollAggregator get_or_create PollPollAggregatorRel. PollPollAggregatorRel.
, RPC, REST, 2 . RPC .
: REST RPC API?