WebAPI::DBICWebAPI::DBIC
RESTful ToolKitRESTful ToolKit A Series of useful Moo::Roles Each providing a specific part of the whole Handling for Sets and Items Built with DBIx::Class
Strong foundationsStrong foundations Web::Machine - HTTP State Engine Plack - Light, extensible HTTP Server Path::Router - Reversible uri handling
Incomprehensive ImageIncomprehensive Image WebAPI::DBIC::WebAPP WebAPI::DBIC:: Resource::Item WebAPI::DBIC:: Resource::Set DBIx::Class::ResultSource Plack
Auto ConfigurationAuto Configuration Sensible defaults Exposes all DBIX ResultSources Provides HTTP Verb support Range of Data Serializers based on Accept: headers Handles HTTP State automagically
Example 1Example 1 ChinookChinook
Structure OldStructure Old Controller - Handles Routing, HTTP validation, Domain model setup, handles View Model - Handles business logic, data View - Handles data serialization
Structure NewStructure New Router - Handles the paths to each resource Resource - Handles the actual Request DBIC ResultSource - Handles business logic, data
MyApp - Controllers - Auth - Note - Healthcheck - Model - Note - Exception - Schema - Result - Note MyApp - Resource - Note - Notes - Schema - Result - Note
package MyApp::Resource::Note; use Moo; extends 'WebAPI::DBIC::Resource::GenericItem'; sub forbidden { my ($self) = @_; my $headers = $self->request->headers; return 1 unless $headers->authorization_basic; my ($username, $password) = $headers->authorization_basic; return 1 unless # Some check for userpass auth return 0; # Is Authorized }
Example 2Example 2 Candidate::WebService::NoteCandidate::WebService::Note
ConclusionConclusion Under Rapid Development (Alpha) Aimed for easy of customization Provides sensible out of the box defaults Follows REST best practices (as far as they exist)

WebAPI::DBIC - Automated RESTful API's