Refactor code style: naming conventions and string literals#588
Merged
oblomov-dev merged 14 commits intostandardfrom Mar 15, 2026
Merged
Refactor code style: naming conventions and string literals#588oblomov-dev merged 14 commits intostandardfrom
oblomov-dev merged 14 commits intostandardfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
s_prefix:screen→s_screent_prefix:suggestions→t_suggestions,combo→t_combot_) and structures (s_), not for scalar variables or object referencesString Literal Standardization:
'completed'→`completed`)Code Style Improvements:
Z2UI5_CL_DEMO_APP_003→z2ui5_cl_demo_app_003check_on_event()method call for cleaner control flowNotable Details
check_on_event()over CASE statementshttps://claude.ai/code/session_01GVUQCR1XcJbdSPwHfUzoZB