Questions tagged [reusability]

Reusability is the likelihood and potential for a piece of source code to be reused in other projects

In computer science and software engineering, reusability is the likelihood a segment of source code that can be used again to add new functionalities with slight or no modification. Reusable modules and classes reduce implementation time, increase the likelihood that prior testing and use has eliminated bugs and localizes code modifications when a change in implementation is required.

See: http://en.wikipedia.org/wiki/Reusability

974 questions
5
votes
1 answer

NSScrollView infinite / endless scroll | subview reuse

I'm searching for a way to implement something like reusable cells for UI/NSTableView but for NSScrollView. Basically I want the same like the WWDC 2011 video "Session 104 - Advanced Scroll View Techniques" but for Mac. I have several problems…
5
votes
3 answers

Referencing another layout.xml file without duplicating it

I need to provide the same layout.xml file for an Activity for several different qualifiers. I know that there's a way to just reference one existing layout.xml instead of really copying it and having a duplicate one. But how? Can't find it in the…
Zordid
  • 10,451
  • 11
  • 42
  • 58
5
votes
1 answer

Defining webapp styles in central maven project

Is there a possibility to place a web-app style (CSS files and images) in a reusable maven project? To use this "style-projects" with other WAR projects. Best regards Stefan
Dangermouse
  • 290
  • 1
  • 3
  • 11
5
votes
6 answers

How to reuse and override inherited javascript function

I have a class for mouse events. I'm using dojo b/c I like its OO approach dojo.declare("MouseObject", null, { constructor: function(){}, onclick : function(){...}, _onClick : function(){...} }); _onClick() listens for window generated mouse…
puk
  • 16,318
  • 29
  • 119
  • 199
5
votes
2 answers

In Elixir, is there any way to make _real_ constants?

I find it a little misleading and confusing that while Elixir boasts immutability, that immutability is buried between layers of mutable abstractions. For example, if I have the code: foo = {:cat, "Puff"} bar = foo foo = {:cat, "Pepper"} I can…
Brian Kessler
  • 2,187
  • 6
  • 28
  • 58
5
votes
2 answers

MVVM - Share/Reuse ViewModels between Silverlight and WPF

Is it possible to share viewmodels across platforms - WPF/Silverlight? I started down the path of putting my VMs in a separate assembly and soon came to ICommand - which then led me to ask this question? Is this possible, and if so is it good to do…
5
votes
1 answer

How to compose react-textarea-autosize with react-mentions

It's now clear to me that mixins and inheritance are generally considered bad and composition is the way to go, this…
Lorenzo Peña
  • 2,225
  • 19
  • 35
5
votes
2 answers

Theme/style Angular 2 reusable component libraries

General problem I want to style reusable Angular components to match the style of the specific client project. I maintain the reusable components in a separate project and generate an npm package out of it. That package is published to a private NPM…
mvermand
  • 5,829
  • 7
  • 48
  • 74
5
votes
1 answer

How to write a reusable component/module?

I'm writing currently two new websites. Both share a lot of functionality. Is it possible with angular to write little components/modules and to reuse them in other apps? What would be the project structure for it or can I use the structure of the…
5
votes
1 answer

How to write reusable business logic in MVC models?

my problem is that we try to use a MVC (PHP) framework. After discussing a lot think that MVC is very good, but I'm missing the possibility to write reusable model-(application)logic. So, I'm not sure if we have the right approach to implement our…
sven
  • 51
  • 2
5
votes
1 answer

Hooking into component

I’m trying to create a chart reusable component, but I can’t wrap my brain around it. The idea is to reuse the following SVG using react (let’s call it “Axes”), together with some functionality and state like width and height, data→coordinate…
flying sheep
  • 8,475
  • 5
  • 56
  • 73
5
votes
2 answers

Reusing Arrays in C#

So I'm optimizing a C# program which uses byte arrays very very frequently, I wrote a kind of recycle pool thing to reuse arrays which had to be collected by GC. Like that: public class ArrayPool { private readonly ConcurrentDictionary
Chris
  • 339
  • 4
  • 17
5
votes
3 answers

Re-use previous activities?

I have activities that are create and launched from menu options. However Ive noticed that this may mean that sometimes there are two or more copies of the same activity. So Im wondering if there's a way to see if another activity is already…
Eno
  • 10,730
  • 18
  • 53
  • 86
5
votes
4 answers

Factors that improve code reusability

Which principles, code qualities, practices, aproaches, language or framework features help you to reuse effectively functions, classes etc in wider range of cases. All of the situations are interesting: either you can modify both implementation and…
Alexey
  • 9,197
  • 5
  • 64
  • 76
5
votes
3 answers

Are RESTful Web services right way for re-using infrastructure?

There is one controversy I see in using Web APIs (RESTful service) to access remote infrastracture. I would be grateful, if you could comment it. The recommendation coming from the article "RESTful Web Services vs. "Big" Web Services: Making the…
dzieciou
  • 4,049
  • 8
  • 41
  • 85