Skip to content

Refactor code style: naming conventions and string literals#588

Merged
oblomov-dev merged 14 commits intostandardfrom
claude/update-claude-hungarian-notation-Jxf8r
Mar 15, 2026
Merged

Refactor code style: naming conventions and string literals#588
oblomov-dev merged 14 commits intostandardfrom
claude/update-claude-hungarian-notation-Jxf8r

Conversation

@oblomov-dev
Copy link
Copy Markdown
Member

Summary

This PR refactors the codebase to align with updated coding standards, focusing on consistent naming conventions for variables and structures, and standardizing string literal syntax.

Key Changes

Naming Convention Updates:

  • Renamed structure variables to use s_ prefix: screens_screen
  • Renamed table variables to use t_ prefix: suggestionst_suggestions, combot_combo
  • Updated all references throughout the codebase to use the new variable names
  • Updated CLAUDE.md guidelines to clarify that type prefixes should only be used for tables (t_) and structures (s_), not for scalar variables or object references

String Literal Standardization:

  • Converted all single-quoted string literals to backtick syntax (e.g., 'completed'`completed`)
  • Applied consistently across all string values in VALUE constructors and method parameters

Code Style Improvements:

  • Removed unnecessary blank lines for better code density
  • Standardized class name casing: Z2UI5_CL_DEMO_APP_003z2ui5_cl_demo_app_003
  • Refactored event handling in demo_app_003: replaced CASE statement with check_on_event() method call for cleaner control flow
  • Fixed alignment of method parameters for improved readability

Notable Details

  • All functional behavior remains unchanged; this is purely a style and naming refactor
  • The event handling refactor in demo_app_003 demonstrates the preferred pattern of using check_on_event() over CASE statements
  • Changes maintain backward compatibility while improving code consistency across the project

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB

claude added 14 commits March 15, 2026 13:58
Replace the no-Hungarian-notation rule with a mandatory Hungarian notation
convention. Update all code examples throughout the document to use the
correct prefixes (mo_, mv_, mt_, ms_, lo_, lv_, lt_, ls_).

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
Add t_ prefix to table attributes (t_suggestions, t_combo) and s_ prefix
to structure attributes (s_screen) in app 002. Update CLAUDE.md to reflect
the narrowed convention: only tables and structures get type prefixes.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
- Lowercase class name in IMPLEMENTATION block
- Replace all single quotes with backticks
- Fix shownavbutton indentation alignment
- Replace separate CASE block with ELSEIF chain
- Fix blank lines: class definition, between blocks, inside method

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
Update CLAUDE.md: structure types use ty_s_ prefix, table types use ty_t_,
and no blank line between a TYPES definition and its DATA declaration.
Rename ty_row to ty_s_row, add ty_t_tab type, and update DATA declaration
in app 003 accordingly.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
Update rule in CLAUDE.md and simplify app 003: since t_tab is used only
once, replace the ty_t_tab type definition with an inline STANDARD TABLE OF
declaration directly on the DATA attribute.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
…E.md

Replace && with string template |...{ }...| in app 003 message call.
Add rule to CLAUDE.md: always prefer string templates over && operator.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
- Remove mv_ prefix: mv_view_main -> view_main
- Remove lv_ prefix: lv_dummy -> dummy
- Replace all single quotes with backticks
- Fix blank lines: class definition, between blocks, inside methods
- Replace IF/RETURN/ENDIF + CASE with proper ELSEIF chain
- Fix simple_form parameters onto separate lines
- Fix shownavbutton alignment in both view methods
- Fix indentation of grid/content/simple_form chain

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
…AUDE.md

Add rule: DATA client always comes first in PROTECTED SECTION, before any
METHODS declarations. Fix app 004 accordingly.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
Replace the client-specific rule with a general ordering rule that applies
to all sections: TYPES declarations first, then DATA, then METHODS.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
When logic no longer fits in main, always extract on_init and on_event
first — never use other method names for this purpose.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
Extract on_init and on_event from main, making main a pure dispatcher.
Rename z2ui5_view_main_display/z2ui5_view_second_display to
view_main_display/view_second_display.

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
- Back Navigation example: fix view->page() to use shell()->page() chain
  with parameters split across lines per multi-parameter rule
- Canonical template: add missing blank line between DATA client and
  METHODS group in PROTECTED SECTION

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
- Rename ty_row to ty_s_row, mv_key to key
- Move refresh_data and new methods to PROTECTED SECTION
- Add DATA client to PROTECTED SECTION
- Extract on_init, on_event, view_display from main
- Replace IF/ENDIF + CASE with ELSEIF dispatcher in main
- Replace DO loop with functional VALUE #( FOR ... ) in refresh_data
- Replace all single quotes with backticks
- Fix scroll_container and items/cells chain indentation and parameter formatting

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
- Fix blank lines in class definition and between blocks
- Replace IF/ENDIF + CASE with ELSEIF chain (single event)
- Replace all single quotes with backticks
- Fix shownavbutton alignment
- Split simple_form parameters onto separate lines
- Fix grid->content chain indentation

https://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB
@oblomov-dev oblomov-dev merged commit 68dbd7e into standard Mar 15, 2026
6 checks passed
@oblomov-dev oblomov-dev deleted the claude/update-claude-hungarian-notation-Jxf8r branch March 15, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants