DEV Community

blackshade91
blackshade91

Posted on • Updated on

Be a code reusability guy!

What is code re-use?

Code reusability is the use of existing code to build new software applications.

The existing code may be reused to perform the same function or may be re-purposed to do a similar but somewhat different function providing for efficiencies, cost savings, adherence to standards and improved overall quality.
The availability of web APIs, web components, microservices and other technologies assume and allow for reusability. However, for a web or mobile application developer to best make use to the available technologies a mindset of architecting the web or mobile application up front is important.

These are five considerations to optimize code re-usability:

  • Selection of the appropriate front-end web component architecture - Component-based frontend architecture is a new fashion in web development. React does it, Angular, VUE.JS use this approach as to other trending frameworks.
    External link

  • Use of an object-oriented approach – while object-oriented programming has a long history, the approach and design aspects are relevant for planning a web or mobile application with elements to be used for similar tasks. A good discussion of the currency of the concepts:
    External link

  • Designing with modular logic – each code module should be granular for a singular responsibility. This is the idea of structured programming at a component level. With the full application design, the consideration of the smallest task – that is merely a tool or component and independent as an entity. A primer on considerations can be found here.

  • Using code templates vs. copying, pasting and then modifying code. There are open source options and products that are certified that offer options. Templates offer efficiencies. One should take into consideration: capabilities; certification; ownership of / customization of the template results. Templates vary from API list generations to code generators with varying features, and limitations.

  • Planning the documentation first – facilitating a structured and modular approach to the application code. A good overview of how to create good documentation can be found here.

These are just the highlights of some considerations. Skaffolder https://www.skaffolder.com is a code generator for web and mobile applications. Using Skaffolder, developers can optimize code-reuse, implement company standards and save up to 40% of the development time and expense involved in designing and creating web or mobile applications.

To learn more about Skaffolder and sign up for our newsletter and be updated on our next launch on Product Hunt https://skaffolder.com/landing.html#/producthunt

Top comments (0)