In software development, creating code you can reuse has many benefits to a company and development team. Reusable code helps you bring products to market faster since you don't need to redo work you have already done. This also helps in maintaining quality across all of your applications as the same code exists throughout, making maintenance and upkeep an easier task. It can help different developers on the same team provide a consistent implementation and allows you to transfer code between developers much easier. Finally it reduces the number of software defects since fixing a bug in one place fixes code in multiple places. All of these benefits can directly lead to great cost savings for a company throughout multiple development projects.
In the following documents we talk about some best practices for developing reusable code in LabVIEW.
Using a scalable architecture for an application can help you easily expand your application and reuse your own development efforts when you want to add new features. Once you create a good scalable architecture for your company, you can create templates that you and others can reuse for future projects.
When making use of reusable code, it’s very important that all developers stay on the same version or have the power to move between versions. You can also increase efficiency by making the reusable code libraries easily available for use whenever they are needed. A great tool for doing this is VI Package Manager, built in LabVIEW by JKI.
Managing and maintaining your code is highly important. You want to be able to keep track of changes, particularly if development is shared across developers. Source Code Control is a powerful and useful way to do this and is built into LabVIEW.
The material for these documents were inspired by the Creating and Maintaining Reusable Code presentation from NI Developer Education Days 2012. This presentation can be found on the User Group Resource Center