Structure of Business Applications
Business applications, like mySAP components can be divided into different layers. The following figure shows the generic, technology independent view of a business application:

User interaction comprises the user interface (UI) and a system process (workflow) representing execution steps. The user interface is based on UI elements with different complexity.
● Basic UI elements, like text and input fields
● Element groups, like patterns or building blocks
● Entire screens/screen sequences, like Dynpro screens in ABAP
The user interface presents data to the user, therefore this layer is also called presentation layer, and also requests data from the user. The UI contains no business logic.
User interaction can also include a local process/workflow-like functionality representing execution steps.
Example for a process/workflow:

Technologies provided by SAP NetWeaver for user interfaces include Web Dynpro for ABAP and Java, HTML Business for Java (HTMLB), ABAP Dynpro and ABAP Business Server Pages (BSP). Technologies provided by SAP NetWeaver for workflow include Guided Procedures (GP) and WebFlow.
Business logic defines the main functionality of the application. Based on specific aspects, like company rules and laws, it contains formulas, defines relations between the persisted data or objects, and controls process sequences, for example, follow-on document processing for an account settlement: sales document – credit memo – stock posting
Technologies provided by SAP NetWeaver for implementing business logic are ABAP and Enterprise Java Beans (EJB).
State management is the persistence layer of the application. It contains the database layout and maps the database structure between persistent storage and runtime. It provides lifecycle management of data (recording every time the data is accessed), caching, and event functionality. State management uses transactions. Transactions are sets of complex operations and control the state.
Technologies provided by SAP NetWeaver for state management are ABAP and OpenSQL
Services make implemented business logic available to other applications. A service can be used by local APIs, remote calls and/or Web service technology.
Technologies provided by SAP NetWeaver for services are Web services and Business Application Programming Interfaces (BAPI).
With connectivity, applications can access existing business logic by using local APIs, remote calls and/or Web service technology.
Technologies provided by SAP NetWeaver for connectivity are Web services, RFC and BAPIs.