If you have programmed in other languages, you have probably heard of (and maybe have used) object-oriented programming (OOP) techniques in some of your previous applications. This appendix assumes you are somewhat familiar with concepts of object-oriented programming, and that you have mastered the basics of LabVIEW. If not, much of the material here will probably confuse you. Don't feel badOOP is a very big and advanced topic. Learn about OOP and learn LabVIEW, though, and you will have some very good programming skills to work with. OOP is a (really) big subject, and there are a lot of good resources for learning OOP. We encourage you to spend some time learning about OOP, in order to better understand LabVIEW object-oriented programming techniques. You can find a lot of good references simply by googling "object-oriented programming." Object-Oriented Programming ConceptsThe following concepts are central to OOP:
Programming languages that support all of these concepts, in the editor and compiler, are referred to as object-oriented languages. Many programming languages support some of these concepts, including LabVIEW. And, LabVIEW continues to become more of an object-oriented language, even as this book is being written. The objective (no pun intended) of OOP is to design systems that can evolve with as little (human) effort as possible. OOP strives to minimize the amount of work required to make incremental changes and improvements to the system. This is generally achieved through loose couplingavoiding unnecessary dependencies that prevent software components from being modular, maintainable, and reusable. One word of caution about object-oriented programmingit's not the best tool for every problem. Do use OOP to implement an object-oriented model of your system. Don't use OOP to solve every programming task. Object-Oriented Analysis and DesignBefore we discuss more about LabVIEW OOP, it is important to discuss object-oriented analysis (OOA) and object-oriented design (OOD). OOP is simply a tool that allows you to implement models that are developed using object-oriented design techniques. Without a good design, OOP is no better than any programming tool applied to a poorly designed system. And, models should be designed such that they reflect real-world systems (because we are trying to automate the real world). The process of analyzing real-world systems in order to create object-oriented designs is referred to as object-oriented analysis. There are some very good (and standardized) methodologies and techniques for doing object-oriented analysis and design. Again, you can find some of these by googling "object-oriented analysis" and "object-oriented design." |