# Overall Design and Architecture

One of the main goals of our software architecture is to encapsulate each of the many hundreds of "building blocks" used by the application. In this context encapsulation means the ability to group code together to provide a service or functionality accessible through a well designed interface. Encapsulation hides the internal workings of each building block and streamlines code testing. By designing and validating in this way it allows us to define quality as a system requirement. It provides a higher degree of reliability and provides opportunities for code reuse. Take for example the request for a thermo physical property, say density, which is commonly used by all of the calculation methods. The density of a fluid is a function of phase state, pressure and temperature. At the most abstract level (i.e., the actual implementation of the encapsulated building blocks/objects is more detailed than described here) all we need to do is to make a call to a building block passing to the interface the phase state, pressure and temperature and the object passes back the density, and maybe an status/error condition. Once the building block has been written and validated it can be used without worry. Of course, the detail is more complex and we must also consider data flows, efficiency, what to do if an error is generated, etc. Designing in this way also makes the code more adaptable to changing technology and business needs. Encapsulation is critical to building large complex software that can be maintained and extended. Many studies have shown that as new features and functionality are added the risk of "breaking existing parts of the software" is minimised by having a well designed encapsulated product.