Kevin
Kevin

Reputation: 1569

Symfony Form vs. Serializer for RESTful API

Should I use Form component or Serializer component to bind request data to domain object for a RESTful API project?

I feel that Form is difficult to customize and not naturally fit with RESTful.

Some guys use Serializer for object binding instead of Form. Eg: http://www.slideshare.net/dlondero/rest-in-practiceenglish

Upvotes: 4

Views: 1341

Answers (1)

Kevin
Kevin

Reputation: 1569

After over a year, I suggest anyone working with RESTful Web Services in Symfony should use Serialize Component instead of Form Component because of customization and simplicity.

With Serializer Component you can easily customize request format, error message...

Upvotes: 4

Related Questions