Questions tagged [libraries]

A library is a collection of resources providing data and/or services for developing independent software.

According to the FAQ, the subjects are accepted and may be tagged with the "library" tag:

  • Questions about the usage/complexity of a library in particular, or several libraries that provide more of the same features for a given language.
  • Questions about the process of designing a library

Also, the definition of a "library" is very close to the definition of a "framework". To help you choose between the two, please consider how Martin Fowler differentiates the two:

A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

Example: the Apache "Commons" libraries for Java.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.

Example: the Spring Framework providing an IOC container.

381 questions
223
votes
14 answers

Why aren't more desktop apps written with Qt?

As far as I know and have understood in my experience with Qt, it's a very good and easy to learn library. It has a very well designed API and is cross-platform, and these are just two of the many features that make it attractive. I'm interested to…
Dehumanizer
  • 1,381
  • 2
  • 12
  • 20
142
votes
2 answers

What is a "shaded" Java dependency?

JVM developer here. Lately I've seen banter on IRC chat rooms and even in my own office about so-called "shaded" Java libraries. The context of the use will be something like: "Such and so provides a "shaded" client for XYZ." Perfect example is…
smeeb
  • 4,820
  • 10
  • 30
  • 49
111
votes
13 answers

Exception vs empty result set when the inputs are technically valid, but unsatisfiable

I'm developing a library intended for public release. It contains various methods for operating on sets of objects - generating, inspecting, partitioning and projecting the sets into new forms. In case it's relevant, it's a C# class library…
anaximander
  • 2,285
  • 3
  • 19
  • 21
81
votes
9 answers

How do huge open source libraries get maintained while having code far from "clean code" practices?

I'm still inexperienced to write high quality code, so I read books addressing the issue such as Clean Code by Robert C. Martin, and keep checking code of well-known libraries to improve my skills. Although many open source libraries have been…
64
votes
3 answers

Are header-only libraries more efficient?

Assumptions One of the advantages of header-only libraries for C++ is that they do not need to be compiled separately. In C and C++ inline makes sense only if the function is defined in a header file*. Traditionally, in C, .c/.h layout has been…
Vorac
  • 7,073
  • 7
  • 38
  • 58
61
votes
3 answers

Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?

I wonder why frameworks/libraries have their own helpers although they exist natively already. Let's take jQuery and AngularJS. They have their own each iterator functions: jQuery.each() angular.forEach() But we have…
Cihad Turhan
  • 673
  • 5
  • 6
46
votes
16 answers

Are there concrete reasons not to use libraries and code snippets heavily?

Overall I'm in programming for about 8 years now and it seems to me that I'm relying more and more on open source libraries and snippets (damn you GitHub!) to "get the job done". I know that in time I could write me own implementation but I like to…
Henrik P. Hessel
  • 885
  • 1
  • 8
  • 13
45
votes
5 answers

What is the difference between a library and a dependency?

In this docker beginner video its explained, that different stacks may depend on different libraries and dependencies and that this can be handled with Docker. However, I don't get what the difference should be between a library and a dependency. As…
Adam
  • 577
  • 1
  • 4
  • 9
40
votes
7 answers

Why do library developers deliberately break existing code?

Today, I updated ZBateson\MailMimeParser the PHP e-mail parser library from 1.x to 2.x. Soon enough, my PHP error log started filling up with errors. Noting where it happened, I found out that it had to do with their ::parse(...) function:…
40
votes
5 answers

Is it considered an anti-pattern to read from STDIN from within a library?

While writing a library for a large project I'm working on at work, an issue came up which required a token to be sent to an email address, and then passed back into the code where it can then be used for further use. My colleague says to just read…
Paradoxis
  • 1,351
  • 1
  • 11
  • 10
34
votes
7 answers

Should you use a library when you can do the task without it?

I am in a situation where I can use an open source JavaScript plugin to fulfill a task. But when I tried to use it,I found myself I have to redesign lot of things of what I already have done,and it adds a certain complexity, in my humble opinion, to…
Billal Begueradj
  • 1,305
  • 5
  • 16
  • 31
34
votes
3 answers

Did C++11 address concerns passing std lib objects between dynamic/shared library boundaries? (ie dlls and so)?

One of my major complaints about C++ is how hard in practice it is to pass std library objects outside of dynamic library (ie dll/so) boundaries. The std library is often header-only. Which is great for doing some awesome optimizations. However,…
Doug T.
  • 11,642
  • 5
  • 43
  • 69
34
votes
14 answers

What benefits are there to native JavaScript development?

Given how much simpler jQuery development is, when compared to native JavaScript, what makes people forgo libraries like jQuery altogether? Is this because jQuery has limitations or it is slow? I mean, if jQuery is so easy compared to native…
Mike
  • 559
  • 2
  • 5
  • 8
32
votes
16 answers

Do you have your own 'misc utils' library? What part are you most proud of?

I know that many of us maintain our own little personal library with tools and utilities that we use often. I've had mine since I was 16 years old so it has grown to quite a considerable size. Some of the stuff I've written has since been added to…
Nobody
  • 2,613
  • 1
  • 22
  • 25
28
votes
6 answers

Why use an opaque "handle" that requires casting in a public API rather than a typesafe struct pointer?

I'm evaluating a library whose public API currently looks like this: libengine.h /* Handle, used for all APIs */ typedef size_t enh; /* Create new engine instance; result returned in handle */ int en_open(int mode, enh *handle); /* Start an…
Jonathon Reinhart
  • 397
  • 1
  • 3
  • 9
1
2 3
25 26