Posted by & filed under Uncategorized.

A way to assess a framework is successful are code reuse metrics. They are show how much effort is saved by the framework in the application development, which is provided with well-tested, reliable code.

We have measured code reuse from Social Stream in the ViSH. Measures are at the level of the Rails engine, i.e controllers, models and views. There are two types of reuse:

  • Verbatim reuse, the component has been reused without any modification. This is the case of the ContactsController, which is not present in ViSH’s code, because it is provided by Social Stream. This is the optimum case, no extra amount of effort is required to obtain the desired functionality.


  • Leveraged reuse, the component has been reused with some modification. An example is DocumentsController, it is present both in Social Stream and the ViSH, through a better practice will be using decorators. This case is in the middle term, the framework provides with some functionality, but extra effort is still required.


Social Stream / ViSH code reuse


Results show that most of the code in ViSH in controllers and models is provided by Social Stream out-of-the-box. Leveraged code is also significant. That is not the case in the views, that is why we are now working on the Bootstrap + Sass version of  Social Stream.

It is worth to note that this is the highest level in code reusability. However, even more code reuse can be found at lower levels. As an example, the Excursion model is new in the ViSH, but it leverages the SocialStream::Models::Object module to integrate all the activity object features.


  1.  Roadmap for 2013 | Social Stream
  2.  Social Stream 1.0 released! | Social Stream - A core for building distributed social network websites

/// Leave a Reply

  • (will not be published)