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
6
votes
2 answers

Django re-usable Marketplace app

I'm working on initial phases of a site which has a typical Freelance Marketplace model. It has buyers, sellers, transactions, payment gateway integration, ratings, dispute management etc. Rather than creating everything from scratch, I was…
sharjeel
  • 5,825
  • 7
  • 34
  • 49
6
votes
1 answer

How to reuse Areas, Controllers, Views, Models, Routes in multiple apps or websites

I have a test solution which only has one area called Admin. I would like to reuse Admin across a number of other web applications. I have a web application setup in IIS, I have then added a virtual application, /Admin coming from Areas\Admin. When…
6
votes
3 answers

Reusing multiple instances of react component with different props

So I have a child component that I want to render multiple instances of in a parent container component. Passing in different props to each so they display differently. What is happening is that they are both being rendered with the last instance…
graveltrunk
  • 75
  • 2
  • 6
6
votes
1 answer

Can an ASP.NET MVC3 Controller (and View?) be redistributed as a class library dll?

is it possible to add a single Controller and possibly a view or two, in a class library ... which could then be redistributed (ie. via NuGet) and reused in various applications? I'm thinking of providing a default view (or two) but allowing the…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
6
votes
6 answers

Algebraic structure and programming

May anyone give me an example how we can improve our code reusability using algebraic structures like groups, monoids and rings? (or how can i make use of these kind of structures in programming, knowing at least that i didn't learn all that theory…
flowerpower
  • 883
  • 9
  • 19
6
votes
4 answers

Qt QML: in-file definition of reusable objects

I have a Qml component that is reasonably large so that I want to make it a reusable component but it is too small/non-generic such that I want to avoid creating its own .qml file. It seems like Components are the right method to define reusable…
mattu
  • 944
  • 11
  • 24
6
votes
5 answers

How to reuse / reset an ZipInputStream?

I want to reset the ZipInputStream (ie back to the start position) in order to read certain files in order. How do I do that? I am so stucked... ZipEntry entry; ZipInputStream input = new…
JustToHelp
  • 87
  • 2
  • 10
6
votes
2 answers

How do you implement a reusable named pipe listener that runs asynchronously?

I can't find a good example of how to create a reusable named pipe listener that runs asynchronously. I can make a reusable listener: NamedPipeServerStream pipeServer = new NamedPipeServerStream("MyPipe", PipeDirection.InOut); while (true) …
Mike Pateras
  • 14,715
  • 30
  • 97
  • 137
6
votes
2 answers

Can I reuse ValueAnimator?

I have the following code (Android project in Scala): val animator = new ValueAnimator animator.setFloatValues(0f, 100f) animator.setDuration(20000L) animator.addUpdateListener(this) // prints current value to console animator.start override def…
src091
  • 2,807
  • 7
  • 44
  • 74
6
votes
3 answers

How do I add a reusable modal dialog in Angular?

I'm new to Angular and attempting to implement this solution into my project. It looks painfully easy, however, I'm trying to make this into a re-usable element so that I can call it from anywhere and just pass in the content to be shown (otherwise,…
Yevgeny Simkin
  • 27,946
  • 39
  • 137
  • 236
6
votes
3 answers

Table view with custom cell (programmatically)

So far, I used to create custom nibs to make my cell as I wanted but this time, the height of a cell will change from one to another so that I can't create a fixed-size cell's nib. So I decided to create it programmatically ... Is the way below the…
gotye
  • 958
  • 2
  • 14
  • 33
6
votes
2 answers

How can I reuse an AlertDialog for Yes/No on Android?

I'm trying to find the way to reuse a Dialog that shows customized titles, then send the Yes/No click to the function that has launched the Dialog. I have two buttoms, Save and Dismiss, and both call a Yes/No Dialog, one showing "Do you want to…
6
votes
1 answer

How can I not reuse cell BUT using a Prototype Cell Identifier

I know that I can not reuse cells by not calling this method: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SomeID"] Based on the description available here. But what if I'm using a Prototype cell? Because if I don't…
6
votes
2 answers

Maven reuse in poms

In our Maven project, we are trying the following directory structure (with about 80 projects total, only a few are shown so that you get the idea): myappli (pom) -- module1 (pom) --|-- utils (pom) --|-- ejb (pom) --|--|--…
KLE
  • 23,689
  • 4
  • 56
  • 62
6
votes
1 answer

Ajax-intensive page: reuse the same XMLHttpRequest object or create new one every time?

I'm working on some sort of online multiuser editor / coop interface, which will be doing a lot (as in, thousands) of ajax requests during one page lifetime. What would be best: ('best' in terms of stability, compatibility, avoiding trouble) Create…
Sheldon Pinkman
  • 1,086
  • 4
  • 15
  • 21