O'Reilly logo

Web Application Development with MEAN by Robert Onodi, Adrian Mejia, Amos Q. Haviv

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

The core Service Layer

Because our application will have different clients consuming business logic, we are going to add a Service Layer; it will coordinate operations for different use cases. So, we are going to move most of our business logic from controllers to services. Probably, it's too early to see the benefits of this, but as we progress with this chapter, it will make more sense.

One benefit would be that you can simply expose your Service Layer as a RESTful API, or add another client that will render on the server-side templates and display all the necessary information to the user. Regardless of the application's client implementation, you can test the business logic of your application.

The product catalog

The product catalog will contain ...

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