mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 23:06:30 +08:00
Developing UI5 Apps Purely in ABAP
![]() * Added Component and Session Stateful (#1433) - Added Component support (TODO refactoring sap.z2ui5 and view handling -> instead of .placeAt use mainView of component manifest) - Added Session Stateful support *add the following lines to your REST handler in order to support stateful session handling* '''abap if attributes-stateful-switched = abap_true. server->set_session_stateful( stateful = attributes-stateful-active ). endif. ''' And here is an ABAP example class for testing session handling '''abap "! <p class="shorttext synchronized" lang="en">Session Demo</p> class z2ui5_cl_demo_app_session definition public create public. public section. interfaces z2ui5_if_app. data instance_counter type i read-only. data check_initialized type abap_bool read-only. data session_is_stateful type abap_bool read-only. data session_text type string read-only. protected section. private section. methods initialize_view importing client type ref to z2ui5_if_client. methods on_event importing client type ref to z2ui5_if_client. methods set_session_stateful importing client type ref to z2ui5_if_client stateful type abap_bool. endclass. class z2ui5_cl_demo_app_session implementation. method z2ui5_if_app~main. if check_initialized = abap_false. check_initialized = abap_true. initialize_view( client ). endif. on_event( client ). endmethod. method initialize_view. set_session_stateful( client = client stateful = abap_true ). data(view) = z2ui5_cl_xml_view=>factory( ). data(page) = view->shell( )->page( title = `abap2UI5 - Sample: Sticky Session` navbuttonpress = client->_event( 'BACK' ) shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack is not initial ) ). data(vbox) = page->vbox( ). vbox->info_label( text = client->_bind( session_text ) ). data(hbox) = vbox->hbox( alignitems = 'Center' ). hbox->label( text = 'press button to increment counter in backend session' class = 'sapUiTinyMarginEnd' ). hbox->button( text = client->_bind( instance_counter ) press = client->_event( 'INCREMENT' ) type = 'Emphasized' ). hbox = vbox->hbox( ). hbox->button( text = 'End session' press = client->_event( 'END_SESSION' ) ). hbox->button( text = 'Start session again' press = client->_event( 'START_SESSION' ) ). client->view_display( view->stringify( ) ). endmethod. method on_event. case client->get( )-event. when 'BACK'. client->nav_app_leave( ). when 'INCREMENT'. instance_counter = lcl_static_container=>increment( ). client->view_model_update( ). when 'END_SESSION'. set_session_stateful( client = client stateful = abap_false ). when 'START_SESSION'. set_session_stateful( client = client stateful = abap_true ). endcase. endmethod. method set_session_stateful. client->set_session_stateful( stateful ). session_is_stateful = stateful. if stateful = abap_true. session_text = 'Session ON (stateful)'. else. session_text = 'Session OFF (stateless)'. endif. client->view_model_update( ). endmethod. endclass. ''' * Update z2ui5_cl_core_http_get.clas.abap (#1434) updated to reflect latest changes (sorry some local changes were los) * lint fix * lint fix * xml fix --------- Co-authored-by: Michael Zinnöcker <29286643+mzinnoecker@users.noreply.github.com> |
||
---|---|---|
.github/workflows | ||
ci | ||
src | ||
.abapgit.xml | ||
abaplint-app.json | ||
changelog.txt | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md |
...offers a pure ABAP approach for developing UI5 apps - entirely without JavaScript, OData or RAP. Just like in the past, when a few lines of ABAP were enough to display input forms and tables using Selection Screens & ALVs. Designed with a minimal system footprint, it works in both on-premise and cloud environments.
Key Features
- 100% ABAP: Developing purely in ABAP (no JavaScript, DDL, EML or Customizing)
- User-Friendly: Implement a single interface to create a standalone UI5 application
- Minimal System Footprint: Uses a simple HTTP handler (no BSP, OData, CDS or RAP)
- Cloud & On-Premise Ready: Supports both ABAP Cloud and Standard ABAP
- Broad System Compatibility: Runs on all ABAP releases (from NW 7.02 to ABAP Cloud)
- Easy Installation: Install via abapGit, no additional app deployment required
Compatibility
- BTP ABAP Environment (ABAP for Cloud)
- S/4 Public Cloud (ABAP for Cloud)
- S/4 Private Cloud or On-Premise (ABAP for Cloud, Standard ABAP)
- R/3 NetWeaver AS ABAP 7.50 or higher (Standard ABAP)
- R/3 NetWeaver AS ABAP 7.02 to 7.42: Use the downported repositories
References
- Find abap2UI5 on ABAP Open Source Projects (dotabap.org)
- Featured on SAP Developer News (youtube - 26.01.2023)
- Highlighted in the Boring Enterprise Nerdletter (newsletter - 08.03.2023)
- Part of the SAP Developer Code Challenge (SCN - 17.05.2023)
- Showcased at SAP TechEd 2023 (youtube - 02.11.2023)
- Join the Advent of Code 2023 with abap2UI5 (SCN - 27.11.2023)
- Featured on SAP Developer News (youtube - 15.12.2023)
- Highlighted in the Boring Enterprise Nerdcast (youtube - 29.01.2024)
- Running abap2UI5 Backend in Browser (LinkedIn - 02.04.2024)
- Check out Cust&Code Videos with abap2UI5 (youtube - 20.05.2024)
- Featured on SAP Developer News (youtube - 14.06.2024)
Credits
This project greatly benefits from its contributors and supporting tools:
- Code versioning & distribution via abapGit (authors)
- Code analysis & testing via abaplint & open-abap (larshp)
- JSON handling through ajson (sbcgua)
- Runtime serialization using S-RTTI (sandrarossi)
- ABAP Cloud & Standard ABAP compatibility through Steampunkification (authors)
- Syntax downporting via the downport repositories by abaplint (larshp)
- Namespace renaming via the mirror repository by abaplint (larshp)
- Browser testing with Playwright & web-abap2UI5 (larshp)
- Live demos running via web-abap2ui5-samples (larshp)
- Developed on an ABAP Cloud Dev Trial 2022 (hosted by Nuve Platform)
What's Next?
- Quickstart – Install and get started with your first abap2UI5 app
- Samples – Learn through hands-on examples and start building your own apps
- Blogs - Dive into abap2UI5 blogs for in-depth insights
- Addons – Expand abap2UI5’s capabilities to fit your needs
- Connectors – Seamlessly access your apps from anywhere
- Apps – Discover and try out abap2UI5 apps
- Links – Explore other projects using abap2UI5
Get Involved
- Questions, feedback or bugs? Check out the documentation, FAQ or create an issue.
- Want to help out? Review our contribution guidelines to get started.
- Stay updated! Follow us on LinkedIn.
We welcome all contributions! Share your knowledge, hunt for or fix bugs, submit a PR, write a comment, give us a like, or simply tell your friends how much you love abap2UI5. This project thrives on your support! 🚀