O'Reilly logo

AngularJS Services by Jim Lavin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining your service's interface

When I start to write a service, I use a set of best practices to guide me on its construction. I've gathered these over my years of writing libraries, frameworks, and services, and they never fail to provide the proper guidance as I write my code.

Focus on the developer, not yourself

When you start to define a service, think about the consumer of your service and what their skill levels are; are they experienced developers, are they new to the framework, or are they in-between? Does your service require knowledge of higher-level concepts to comprehend? Or, is it very basic to comprehend? These are all things you should think about, because the harder it is for the developer to consume your service, the more painful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required