SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →Starting point

abap_gui_boilerplate

A template for ABAP applications with an HTML UI, built on GUI classes copied from abapGit into a contrib package of its own.

A template and framework for HTML based GUI applications like in abapGit, as the README puts it. lcl_gui_factory is the main class, meant as a single instance, instantiated with init and started with run; init takes an asset manager and either a router or a page, the page implementing the render method that returns the HTML, and the asset manager holding assets loaded from the MIME repository or given as a base64 string. Three example programs show it in use: a pure HTML UI of two pages with a router between them, one whose HTML is rendered by abap_mustache from a template saved as MIME binary, and one that shows an ALV first and opens an HTML page on double-click. The HTML UI classes sit in ZGUIBP_HTML_CONTRIB and are, in the maintainer's words, heavily based (90%) on abapGit code, however a bit unified; eliminating that package to base directly on abapGit classes is on the to-do list, as is making the code build into a single file with abapmerge. The README calls the state of it work in progress, all may change, however safe enough to try.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Demonstrates
UI written in ABAPABAPUI written in ABAPcapabilityProducing a web user interface from ABAP code, with the application’s backend language also defining what the user sees and how it behaves.
Optional
abap_mustacheabap_mustacheartifactThe mustache example program renders its HTML through it, and the README says it has to be installed for that program to compile.

Who is behind it

Alexander TsybulskyAlexander TsybulskyPersonMaintains this
In the atlas: maintains 5, contributes to 11
@sbcgua
maintainer

Before choosing this

Signals

RepositoryArchivedThe declared repository is archived

GitHub reports the repository as archived. The package may remain installable, but its source is no longer open for normal maintenance.

What it declares

Every artifact

Type
Sample
Origin
Independently maintained

As a sample

Form
A template or starter

Connections3

README

quoted from sbcgua/abap_gui_boilerplate under MIT, read
sbcgua/abap_gui_boilerplate/README.mdOn GitHub

Build Status

Boilerplate for ABAP applications with HTML UI and abapmerge

version: 0.1

Work in progress, all may change, however safe enough to try ;)

Main idea

A template/framework for HTML based GUI applications like in abapGit. Based on abapGit GUI classes.

The examples of usage are in:

  • ZGUIBP_EXAMPLE - pure HTML example, UI, 2 pages and the router to control navigation between them
  • ZGUIBP_EXAMPLE_MSTSH - HTML is rendered by abap_mustache library (needs to be installed to compile). Mustache template is saved as MIME binary.
  • ZGUIBP_EXAMPLE_ALV - combination of ALV and HTML UI, ALV is displayed first, double click open HTML page

The examples have some common components:

  • ZGUIBP_EXAMPLE_COMMON - implementation of asset manager that takes care of preloaded data
  • ZGUIBP_EXAMPLE_COMPONENT - implementation of simple HTML page for HTML UI

Also, ALV ! How could it be without ALV ?! ;)

  • ZGUIBP_ALV - implements a common base class for SALV with controllable toolbar (based on zevolving blogs). Well, may be of interest, though I guess everybody has ALV boilerplates of his own ...

Shortly the concept of HTML UI classes

The main class is lcl_gui_factory - supposed to be a single instance. Suppose to be instantiated with init and then run. init accepts instance of loaded zcl_abapgit_gui_asset_manager and instance of router (zif_abapgit_gui_event_handler) or page (zif_abapgit_gui_renderable) to render.

Asset manager (zcl_abapgit_gui_asset_manager) hold the assets. Asset can be loaded from MIME repository of be a base64 string.

Page (zif_abapgit_gui_renderable or zif_abapgit_gui_page) must implement render method which returns instance of zif_abapgit_html (supposed to be zcl_abapgit_html), which is a wrapper for convenient html construction.

lcl_page_hoc - a high order component to add HTML head, body and some other useful stuff. Can be reused for simple cases.

Quick pseudo code for implementation

  class lcl_my_page inheriting zif_abapgit_gui_renderable.
    method render.
      ro_html = new zcl_abapgit_html.
      ro_html->add( 'some html stuff, in-body only' ).
    endmethod.
  endclass.

  form main.
    data lo_assets type ref to zcl_abapgit_gui_asset_manager.
    lo_assets = new zcl_abapgit_gui_asset_manager.
    lo_assets->register_asset(
      iv_url       = 'css/common.css'
      iv_type      = 'text/css'
      iv_mime_name = 'ZMY_MIME_CSS_COMMON' ).
    
    data lo_page type ref to zif_abapgit_gui_renderable.
    lo_page = lcl_page_hoc=>wrap(
      iv_page_title = 'Page 2'
      ii_child      = new lcl_my_page ).

    lcl_gui_factory=>init(
      io_component = lo_page
      ii_asset_man = lo_assets ).
    lcl_gui_factory=>run( ).
  endform.

abapGit

The HTML UI classes reside in ZGUIBP_HTML_CONTRIB and are heavily based (90%) on abapGit code. However a bit unified. Maybe will be directly based on abapGit in future.

TODO

  • the code should be build-able with abapmerge into a working single file without dependencies
  • better docs
  • eliminate ZGUIBP_HTML_CONTRIB, base directly on abapGit classes (PR differences to abapGit)
MIT, read

Details

Sources3
Added by handdiscovered herechecked
github.com/sbcgua/abap_gui_boilerplatetree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainabap, ui-and-frontend-bridge
abaplint
issues under its own abaplint configuration45
lines2,716
statements1,599
objects19
files26
analysed, master
abaplint version2.120.84
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sbcgua-abap-gui-boilerplate
JSON
/artifacts/sbcgua-abap-gui-boilerplate.json
MCP
Connecting an agent