Editors and programmers have a lot in common.
In fact, editing text and writing clean code share the same goal. Readability is the driving force behind the clean ABAP best practices that youll find in this book, and also the focus of my day-to-day. When I edit technical guides like this one, its important to hone in on each sentence and ensure that concepts are conveyed clearly and effectively. Its not only grammatical accuracy; its also the strategic use of tools like lists, tables, text styles, paragraph breaks, headings, transitions, and more. How do you structure ideas logically, and what is the proper level of context to provide so that the reader can follow along?
Programmers writing clean code follow a similar path to a similar destination, although with an entirely different set of tools. Clean ABAP is all about making the most of the elements you use when writing code, from classes, interfaces, methods, and tables to variables, names, comments, and formatting. Youll find all these components and much more in this book, and the expert guidance you need to use them effectively to maximize the readability of your ABAP code.
What did you think about Clean ABAP: A Style Guide for Developers ? Your comments and suggestions are the most useful tools to help us make our books the best they can be. Please feel free to contact me and share any praise or criticism you may have.
Notes on Usage
This e-book is protected by copyright . By purchasing this e-book, you have agreed to accept and adhere to the copyrights. You are entitled to use this e-book for personal purposes. You may print and copy it, too, but also only for personal use. Sharing an electronic or printed copy with others, however, is not permitted, neither as a whole nor in parts. Of course, making them available on the Internet or in a company network is illegal as well.
For detailed and legally binding usage conditions, please refer to the section .
This e-book copy contains a digital watermark , a signature that indicates which person may use this copy:
Notes on the Screen Presentation
You are reading this e-book in a file format (EPUB or Mobi) that makes the book content adaptable to the display options of your reading device and to your personal needs. Thats a great thing; but unfortunately not every device displays the content in the same way and the rendering of features such as pictures and tables or hyphenation can lead to difficulties. This e-book was optimized for the presentation on as many common reading devices as possible.
If you want to zoom in on a figure (especially in iBooks on the iPad), tap the respective figure once. By tapping once again, you return to the previous screen. You can find more recommendations on the customization of the screen layout on the .
Preface
Clean code has been a staple of agile software development for many years. Code is more often read than its written, and so its critical that your code is easy to read and that it clearly conveys what its trying to achieve. With a relentless focus on readability and understandability, clean code ultimately has a huge impact on the maintainability and testability of a code base.
This book is a compendium of rules, guidelines, and recommendations for how to make your ABAP code clean: readable, understandable, maintainable, and testable. It discusses detailed code patterns and idioms, as well as more high-level design considerations. It also explores some processes and organizational concerns that have an impact on the implementation of clean code.
Who This Book Is For
This book is mainly written for ABAP developers and testers with a penchant for development. Youll find many code samples, as the book is very technical in nature.
Clean ABAP is for novice as well as senior programmers. Depending on your skill level, you may benefit from different topics, and you may feel drawn towards different centers of focus. However, the general ideas address all developers, independent of experience.
We also encourage architects to read this book and understand clean ABAP. Some topics in this book transgress in the architects realm of large-scale objects such as packages and object-oriented design. Even if you dont code at all, you should be able to connect to your team and understand at least the main ideas of clean ABAP.
In this book, we included topics that should help you to get started with clean ABAP at any time, in any kind of project, with any kind of team.
How This Book Is Organized
This book begins with an introduction to clean ABAP and a general discussion of the ABAP language in talks about how to learn and implement clean ABAP, whether thats at the individual, team, or organization level.
: How to Get Started with Clean ABAP, to get more specific guidance on which topics to pursue at which time. The last chapter is important for anyone willing to learn and implement clean ABAP at any level in an organization.
Lets look briefly at what is covered in each chapter:
: Introduction
This chapter introduces the clean ABAP concept, describes why its important to write clean code, and how to get started. Youll also learn about other style guides and learning resources that can be used to expand your understanding beyond this book.
: The ABAP Language
This chapter offers general guidance about using ABAP and sets up the context in which to apply clean ABAP practices. Youll learn about special considerations for legacy code and performance, and understand overarching methodologies for producing readable, functional code.
: Classes and Interfaces
Youll learn to apply clean ABAP concepts to classes and interfaces in this chapter. The chapter explores classes and interfaces from the perspective of object-oriented programming and teaches you how to use classes and interfaces appropriately to create clean code.