Clean ABAP

A Style Guide for Developers
Langbeschreibung
ABAP developers, are you looking to clean up your code? Then pick up this official companion to the Clean ABAP GitHub repository. This book is brimming with best practices, straight from the experts, to help you write effective ABAP code. Start by learning when to apply each clean ABAP practice. Then, dive into detailed code examples and explanations for using classes, methods, names, variables, internal tables, and more. From writing code to troubleshooting and testing, this is your complete style guide!In this book, you'll learn about:a. Clean ABAP ConceptsWhat is clean ABAP and why is it important to write clean code? Understand clean ABAP concepts with insight from the experts, including special considerations for legacy code and performance.b. Best PracticesWalk through the what, why, and how behind clean ABAP best practices. Learn to improve your code, including using classes and interfaces appropriately, handling method design and control flow, designing and running unit tests, and much more. c. Practical Examples See clean ABAP practices in action! Improve your understanding of how to write effective code. Use detailed examples for each best practice that demonstrate the difference between clean and messy code.Highlights include:1) Classes and interfaces2) Methods3) Names4) Variables and literals5) Internal tables6) Control flow7) Comments8) Formatting9) Error handling10) Unit testing11) Packages
Hauptbeschreibung
Understand how to choose useful names, write strong comments, and format code correctly
Inhaltsverzeichnis
... Preface ... 17... Who This Book Is For ... 17... How This Book Is Organized ... 17... Acknowledgments ... 19... Conclusion ... 211 ... Introduction ... 231.1 ... What Is Clean ABAP? ... 231.2 ... How to Get Started with Clean ABAP ... 261.3 ... How to Handle Legacy Code ... 261.4 ... How to Check Code Automatically ... 281.5 ... How Does Clean ABAP Relate to Other Guides? ... 291.6 ... How to Engage with the Clean ABAP Community ... 301.7 ... Summary ... 312 ... The ABAP Language ... 332.1 ... Mind Legacy Code ... 332.2 ... Mind Performance ... 352.3 ... Prefer Object Orientation to Procedural Programming ... 372.4 ... Favor Functional Language Constructs over Procedural Language Constructs ... 432.5 ... Avoid Obsolete Language Elements ... 462.6 ... Use Design Patterns Wisely ... 482.7 ... Summary ... 503 ... Classes and Interfaces ... 513.1 ... Object Orientation ... 513.2 ... Scope and Visibility ... 763.3 ... Constructors ... 833.4 ... Summary ... 934 ... Methods ... 954.1 ... Object-Oriented Programming ... 954.2 ... Parameters ... 1024.3 ... Method Body ... 1154.4 ... Calling Methods ... 1254.5 ... Summary ... 1305 ... Names ... 1335.1 ... Good Naming ... 1335.2 ... ABAP Peculiarities ... 1385.3 ... Affixes: Prefixes, Suffixes, and Infixes ... 1405.4 ... Dealing with Legacy Code ... 1425.5 ... Summary ... 1436 ... Variables and Literals ... 1456.1 ... Variables ... 1456.2 ... Constants ... 1526.3 ... Strings ... 1606.4 ... Booleans ... 1616.5 ... Regular Expressions ... 1646.6 ... REDUCE ... 1666.7 ... Summary ... 1687 ... Internal Tables ... 1717.1 ... Using the Right Table Category ... 1717.2 ... Avoiding DEFAULT KEY ... 1737.3 ... INSERT INTO TABLE and APPEND TO ... 1747.4 ... Verifying the Existence of a Row ... 1767.5 ... Retrieving Table Contents ... 1777.6 ... LOOP AT WHERE and Nested IF ... 1797.7 ... Identifying Unnecessary Table Reads ... 1807.8 ... Block Processing of Table Rows and Single Row Operations ... 1817.9 ... DESCRIBE TABLE and Table Function LINES ... 1827.10 ... Summary ... 1838 ... Control Flow ... 1858.1 ... IFs ... 1858.2 ... Nesting Depth ... 1908.3 ... Conditions ... 1908.4 ... CASE ... 1968.5 ... Do 1 Times ... 2008.6 ... Summary ... 2039 ... Comments ... 2059.1 ... Express Yourself in Code ... 2059.2 ... Comment Placement and Usage ... 2079.3 ... Comments to Avoid ... 2089.4 ... FIXME, TODO, and XXX Comments ... 2119.5 ... Special Comments: ABAP Doc, Pragmas, and Pseudo Comments ... 2129.6 ... Summary ... 21410 ... Formatting ... 21510.1 ... Consistency in Coding Style ... 21610.2 ... Optimizing for Reading ... 21610.3 ... The Pretty Printer ... 21710.4 ... Number of Statements Per Line ... 21810.5 ... Line Length ... 21910.6 ... Condensing the Code ... 22010.7 ... Blank Lines ... 22010.8 ... Alignment of Assignment Statements ... 22110.9 ... Alignment of Variable Declarations ... 22210.10 ... Placement of Closing Brackets ... 22310.11 ... Formatting Method Parameters ... 22310.12 ... Summary ... 22711 ... Error Handling ... 22911.1 ... Messages ... 22911.2 ... Return Codes ... 23211.3 ... Exceptions ... 23611.4 ... Raising and Catching ... 24511.5 ... Summary ... 25212 ... Unit Testing ... 25312.1 ... Test Classes ... 25412.2 ... Test Methods ... 26212.3 ... Class under Test ... 26612.4 ... Naming ... 26712.5 ... Assertions ... 26912.6 ... Test Doubles ... 27912.7 ... Test Seams ... 28912.8 ... Principles ... 29112.9 ... Summary ... 29413 ... Packages ... 29713.1 ... General Package Concepts ... 29713.2 ... Package Concepts in ABAP ... 29913.3 ... Package Design Options ... 30413.4 ... Package Checks ... 30813.5 ... Consequences of Poor or No Package Strategy ... 31613.6 ... Summary ... 31614 ... How to Implement Clean ABAP ... 31914.1 ... Common Understanding among Team Members ... 31914.2 ... Collective Code Ownership ... 32014.3 ... Clean Code Developer Initiative ... 32214.4 ... Tackling the Broken Window Effect ... 32314.5 ... Code Review and Learning ... 32614.6 ... Clean Code Advisor ... 33014.7 ... Learning Techniques ... 33014.8 ... Continuous Learning in Cross-Functional Teams ... 33414.9 ... Summary ... 337... The Authors ... 339... Index ... 341
Klaus Haeuptle is a developer, trainer, and product owner for engineering topics. During his career at SAP, he has worked as a developer on several products based on various technologies. Additionally, he facilitates communities across SAP with the intention of sharing knowledge and improving practices and tools. He has influenced testing improvements for ABAP, SAP HANA, and SAPUI5. Together with Florian Hoffmann, he wrote an internal Clean ABAP guide, which was later published externally as an open-source project and serves as the foundation for this book.
ISBN-13:
9781493220267
Veröffentl:
2020
Erscheinungsdatum:
22.12.2020
Seiten:
351
Autor:
Klaus Haeuptle
Gewicht:
880 g
Format:
260x182x25 mm
Sprache:
Englisch

84,00 €*

Lieferzeit: Besorgungstitel - Lieferbar innerhalb von 10 Werktageni
Alle Preise inkl. MwSt. | zzgl. Versand