Table of Contents
The service layer, also referred to as the business layer, encapsulates the course-grained functionality of the application being built. The web layer is the primary consumer of the service layer, and the artifacts for defining the service layer in Skyway Builder are the Services, Operations, Actions, and Steps.
The logic found in a typical web application is associated with either (a) the behaviour of the application or (b) the business logic. While a Controller and associated Actions can be used to implement the both the behavior and business logic, the MVC pattern prescribes that the controller layer should be focussed on implementing the behaviour of the application, and the service layer focusses on implementing the business logic.
The Service layer represents the core functionality of the application being built, and the functionality represented by this layer is accessed in an API type manner using structured inputs and outputs. A Skyway Service is an artifact that defines a set of functions. Functions are application logic that use structured inputs and outputs for exchanging data. In Skyway development the functions are defined as Operations, and the logic is implemented using Actions.
HOW IT WORKS
Skyway Builder has adopted the SOAP lexicon (services and operations) for describing and implementing the Service layer of an application. This doesn't mean that web services are being used for invocation. Skyway will use java invocation by default. However Skyway Services can also be exposed as web services by configuration, in which case the Skyway Service concepts map exactly to the equivalent web service concepts.
Steps for creating a Service:
Right click on a Model Package, and select New-->Service.
From the New Skyway Service Wizard, enter a common name for the service. The common name is used to reference the service from other artifacts.
When done, click Finish to open the Service Editor.