added middleware view to allow developers of specific resource types to reuse generic resource creation code