Skip to content

Commit d17e789

Browse files
authored
Update hello_world.md
1 parent 845de12 commit d17e789

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

docs/get_started/hello_world.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,8 @@ outline: [2, 4]
33
---
44
# Hello World
55

6-
abap2UI5 follows a thin-frontend model: the browser only renders UI5 views, while all logic, state, and data handling stay in ABAP on the server. Three ideas to keep in mind before writing code:
7-
8-
- **One method, many calls.** The framework calls your app's `main` method on every roundtrip — on the initial start *and* after every user interaction (button press, input change, navigation).
9-
- **State lives in your class.** Public attributes of your app class hold data between roundtrips; abap2UI5 serializes and restores them for you, so you don't manage sessions manually.
10-
- **The `client` object is your only API.** Use it to display views, check which event fired, bind attributes to UI5 controls, and trigger navigation.
6+
Just copy the following class into your system:
117

12-
Every abap2UI5 app implements the `z2ui5_if_app` interface. It has a single method, `main`, with one parameter: `client` of type `z2ui5_if_client`:
13-
```abap
14-
INTERFACE z2ui5_if_app PUBLIC.
15-
METHODS main
16-
IMPORTING
17-
client TYPE REF TO z2ui5_if_client.
18-
ENDINTERFACE.
19-
```
20-
The `client` object is your only entry point into the framework. Use it to show views, handle events, share data, and navigate between apps.
21-
22-
*For a deeper look at the lifecycle and framework internals, see [How It All Works](/technical/how_it_all_works) and [Concept](/technical/concept).*
23-
24-
### Basic Example
258
Build a class:
269
```abap
2710
CLASS zcl_app_hello_world DEFINITION PUBLIC.
@@ -31,9 +14,7 @@ ENDCLASS.
3114
3215
CLASS zcl_app_hello_world IMPLEMENTATION.
3316
METHOD z2ui5_if_app~main.
34-
3517
client->message_box_display( `Hello World` ).
36-
3718
ENDMETHOD.
3819
ENDCLASS.
3920
```
@@ -43,6 +24,25 @@ Go back to the landing page in your browser and enter `ZCL_APP_HELLO_WORLD` to l
4324
While the HTTP handler has to distinguish between Standard ABAP and ABAP for Cloud, the apps themselves are independent. You're free to choose whether to build your apps with ABAP Cloud compatibility.
4425
:::
4526

27+
### Idea
28+
abap2UI5 follows a thin-frontend model: the browser only renders UI5 views, while all logic, state, and data handling stay in ABAP on the server. Three ideas to keep in mind before writing code:
29+
30+
- **One method, many calls.** The framework calls your app's `main` method on every roundtrip — on the initial start *and* after every user interaction (button press, input change, navigation).
31+
- **State lives in your class.** Public attributes of your app class hold data between roundtrips; abap2UI5 serializes and restores them for you, so you don't manage sessions manually.
32+
- **The `client` object is your only API.** Use it to display views, check which event fired, bind attributes to UI5 controls, and trigger navigation.
33+
34+
Every abap2UI5 app implements the `z2ui5_if_app` interface. It has a single method, `main`, with one parameter: `client` of type `z2ui5_if_client`:
35+
```abap
36+
INTERFACE z2ui5_if_app PUBLIC.
37+
METHODS main
38+
IMPORTING
39+
client TYPE REF TO z2ui5_if_client.
40+
ENDINTERFACE.
41+
```
42+
The `client` object is your only entry point into the framework. Use it to show views, handle events, share data, and navigate between apps.
43+
44+
*For a deeper look at the lifecycle and framework internals, see [How It All Works](/technical/how_it_all_works) and [Concept](/technical/concept).*
45+
4646
### View Display
4747
Let's add a view to show some text:
4848
```abap

0 commit comments

Comments
 (0)