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
18
votes
5 answers

Angular2 doesn't work Custom Reuse Strategy with Lazy module loading

I tried to use custom reuse strategy in my angular2 project, but I found it doesn't work with lazy module loading. Anyone who know about this? My project is angular 2.6.4 reuse-strategy.ts import {RouteReuseStrategy, ActivatedRouteSnapshot,…
Seungwon
  • 276
  • 3
  • 10
18
votes
2 answers

How do you actually use a reusable django app in a project?

This question has been troubling me for some days now and I've tried asking in many places for advice, but it seems that nobody can answer it clearly or even provide a reference to an answer. I've also tried searching for tutorials, but I just…
Joe
  • 3,120
  • 3
  • 25
  • 30
18
votes
3 answers

Does CodeIgniter have plugins / extensions / modules?

I am looking at few PHP frameworks and noticed that they all offer re-usable, community-contributed code in various forms: -Symfony 2 (bundles): http://knpbundles.com/ -Zend Framework 2 (modules): http://modules.zendframework.com/ -CakePHP…
Max
  • 12,794
  • 30
  • 90
  • 142
17
votes
2 answers

Node.js and MongoDB, reusing the DB object

I'm new to both Node.js and MongoDB, but I've managed to put some parts together from SO and the documentation for mongo. Mongo documentetion gives the example: // Retrieve var MongoClient = require('mongodb').MongoClient; // Connect to the…
user2288749
  • 195
  • 1
  • 1
  • 6
16
votes
2 answers

Why are template mixins in C++ not more of a mainstay?

I use template mixins in C++ a lot, but I'm wondering why the technique isn't used more. It seems like the ultimate in reuse. This mix of power and efficiency is one of the reasons I really love C++ and can't see myself moving to a JIT…
Jesse Pepper
  • 3,225
  • 28
  • 48
16
votes
4 answers

Reusable constructors C++

One of the corner stones of OOP is reusing code instead of repeat it over and over. Thus, your projects shorten and get more readable. C++ gives you all the tools you need to reuse methods instead of repeating the code. Although when it comes to…
eversor
  • 3,031
  • 2
  • 26
  • 46
16
votes
1 answer

Is there a Python reusable component that is like the Blender node editor?

Blender has a powerful, fun-to-use, flexible node editor: Is there a Python library that will allow me to easily create a visual developing environment like this? In Blender, the node editor works with shaders, images, colors and the like, and I'd…
Phae7rae
  • 524
  • 2
  • 4
  • 14
16
votes
13 answers

No index path for table cell being reused

This started to happen out of the blue. Any ideas: Code: CUSTOMCLASSNAME (I have replaced the actual class name as it contains the name of the client.) Initialising my tableView: [self.tableView registerClass:[CUSTOMCLASSNAME class]…
CW0007007
  • 5,681
  • 4
  • 26
  • 31
16
votes
4 answers

"Many functions operating upon few abstractions" principle vs OOP

The creator of the Clojure language claims that "open, and large, set of functions operate upon an open, and small, set of extensible abstractions is the key to algorithmic reuse and library interoperability". Obviously it contradicts the typical…
Alexey
  • 9,197
  • 5
  • 64
  • 76
15
votes
4 answers

Connecting two UDP clients to one port (Send and Receive)

I tried the suggestion from this question with very little success. Please... any help will be greatly appreciated! Here is my code: static void Main(string[] args) { IPEndPoint localpt = new IPEndPoint(IPAddress.Any, 6000); UdpClient…
brooc
  • 448
  • 2
  • 6
  • 10
15
votes
2 answers

Should I share models across multiple microservices?

I'm in the analysis phase of a big project, that will be created with a micro services architecture. I am pretty confident that (at least for the next 3 years to come) the whole codebase will be written in TypeScript, and most of the models will be…
Caius
  • 2,084
  • 6
  • 31
  • 47
15
votes
3 answers

Fragment - should I reuse view in onCreateView and how should I do that?

Actually, I always reused my view in my fragments like the following: private View mView = null; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (mView == null) mView =…
prom85
  • 16,896
  • 17
  • 122
  • 242
15
votes
4 answers

define animations and triggers as reusable resource?

Is there a way to define an animation somewhere in xaml (eg. as a resource) once and then reuse it multiple times? I have a lot of independent brushes across differnt datatemplates that independently need to start the same kind of animation based on…
bitbonk
  • 48,890
  • 37
  • 186
  • 278
13
votes
3 answers

Fixtures in Golang testing

Coming from the python world, fixtures are very useful (Fixtures defines a Python contract for reusable state / support logic, primarily for unit testing). I was wondering if there's similar support in Golang which can allow me to run my tests with…
psbits
  • 1,787
  • 5
  • 19
  • 34
13
votes
2 answers

SaaS app with angularjs and nodejs, how do i organize different clients?

I’m trying to decide what to do I this scenario: I want to create a product that I want to sell in a SaaS business model, I already have the backend more or less thought out and some code in place in nodejs. It handles oAuth, sessions, and controls…
Toddy
  • 333
  • 1
  • 15
1
2
3
64 65