Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [packages]

The tag has no usage guidance.

0
votes
1answer
25 views

Share some small bits of functionalities across packages

Suppose that: you invent a new coordinates system and you create a class to represent it you have two products which need to deal with this coordinates system but which, apart from that, are ...
0
votes
1answer
24 views

External source package - download it into the source directoy or the build directory?

I'm working on a software project, Foo, which uses the code of another project, Bar - through the use of CMake's ExternalProject mechanism. Now, if I build Foo out of its source location - should I ...
0
votes
1answer
59 views

Cross-cutting concerns in package-by-feature structure

What is your suggestion on where to put cross-cutting concerns in a package-by-feature structured app? This aspect seem to be missing from most of the pro package-by-feature articles I have read. ...
2
votes
1answer
74 views

What do you put in a “common” package? [duplicate]

I am trying to develop my package structure based on features rather than layers, but am struggling to find a package name for some of the classes. I have seen people use a package name of common for ...
0
votes
1answer
47 views

Creating data files inside a package

I'd like to deploy my code to a web server as a package. There Python is subprocessed and scripts are executed. These scripts use data files. But in case a file is needed and it doesn't exist, it ...
2
votes
0answers
48 views

Packages, a controller class, and coupling vs cohesion

So I'm building my first application, in Python, and some issues have cropped up because of the lack of interfaces (I.e. explicit type declaration) My design involves several homebrew packages, and I'...
66
votes
9answers
15k views

Why prefer a package manager over a library folder?

When I think about the pros and cons of a static library folder and a package manager I feel like the library folder is a better approach. Pros I see with a library folder: No need for an external ...
0
votes
0answers
36 views

Is it bad practice to not separate the class definition and constructor into separate files? (specifically in R package development)

I am developing an R package and for some reason all of the current packages I have looked at put the class definition and class constructor in separate files. Usually a myClass--class.R file and a ...
1
vote
2answers
425 views

Major version number as part of package name / namespace?

Background In a software ecosystem where different packages depend on different versions of other packages, sometimes dependency resolution ends in a version conflict. Example: Root package A ...
12
votes
3answers
595 views

How should one manage constants across multiple languages?

I have a situation where I support what is functionally the same library in multiple languages. There are often constants that need to be shared between these (for example, json field name keys or ...
1
vote
1answer
578 views

If I package by feature, but have many homogeneous classes, what is preferable?

I am wondering whether this is the correct way to handle my situation when packaging-by-feature. Use the following project structure as an example: com.foobar.web.Bootstrap.java com.foobar.web....
1
vote
2answers
320 views

Private or default visibility for “file-private” members?

I have a class like this public final class Outer { static final class Inner { /* Used in the package. */ void f() {...} /* Used in Outer. */ WHATEVER void g() {.....
1
vote
1answer
972 views

Breaking a Large Python Project into Multiple Packages

I have a medium sized Python program (12 KLOC) organized as a single Python package with multiple subpackages: proj/ setup.py proj/ __init__.py projfile1.py subproj1/ ...
1
vote
1answer
112 views

Isn't it redunant to declare package in the class file? Can't it be inferred from the build path?

I have class Foo, its first line reads package com.bar.something.baz. Its file is in /com/bar/something/baz/. Why do I have to declare the package in the class file and then put the file in the same ...
0
votes
0answers
29 views

Placement of Debian Files

I'm starting a Debian package for a project of mine. When I did this in the past, I put the files in a debian/ directory within the project's git repository. I figured it would be a good place to put ...
0
votes
1answer
461 views

Interface design of Java library with interdependent yet decoupled packages

I plan to write a library in Java, consisting of packages A, B, C and so on. Every package encapsulates a part of the big picture. B relies on A, C on B and so on. For this purpose every package ...
4
votes
1answer
186 views

How do package managers generally deal with squatters?

How do package managers deal with packages that use a package name but then abandon it or from rogue package names that are similar that host malware in the hope that an unsuspecting developer will ...
3
votes
1answer
370 views

Package-by-feature confusion for libraries

As I understand it, it's generally recommended to package by feature rather than by layer. This promotes higher levels of abstraction and modularity between classes. I can understand how this works ...
5
votes
4answers
324 views

Distributing Java code into packages using a clustering approach

Theory is, that classes which strongly know and use each other should be in the same package (using package visibility for functions that are not used by the rest of the application), thus forming a ...
0
votes
2answers
62 views

Is changing the PATH in C comparable to `source` a virtualenv in Python?

Virtualenv appends its own path to $PATH, effectively overwriting the Python to the one picked when the virtualenv is created. Would changing the $PATH work equivalently as virtualenv in a compiled ...
3
votes
1answer
406 views

How can I be sure that an unofficially uploaded NuGet package is genuine?

I've come across a few cases lately where a package on NuGet has a name that starts with "Microsoft" but is actually uploaded by someone else. Take Microsoft.TestApi for example. Ostensibly this is a ...
45
votes
3answers
8k views

Folder-by-type or Folder-by-feature

I make use of an AngularJS style guide. Within this guide there is a style called folder-by-feature, instead of folder-by-type, and I'm actually curious what's the best approach (in this example for ...
2
votes
3answers
150 views

Automatic package distribution system Windows [closed]

I have built a Windows-only desktop application which is composed of two main executables and various configuration files. The two applications are developed in different languages (JS and C++, ...
1
vote
1answer
90 views

Overtake the maintenance of a software package

Recently I am using a software package which seems pretty useful, but which I don't understand how it works internally. This package contains software generated by several PhD students and lecturers ...
3
votes
1answer
899 views

What are common Java dependency management strategies?

I am currently preparing a presentation for my software engineering class, in which I want to present the idea of package dependency management in Java on the example of "radial encapsulation" (http://...
7
votes
2answers
2k views

How to encapsulate internal classes in an API written in Java?

We have to write a library. Naturally, it should only have a very small API (as broad as needed as small as possible). The internals of the library are somewhat complex. Therefore, they need ...
11
votes
3answers
2k views

package and version strategies in a multi repository environment

We are a small-ish firm with multiple teams who manage their own git repositories. This is a web platform and each team's artifacts are deployed at the end of the day for nightly tests. We are trying ...
1
vote
3answers
110 views

Store Nuget\NPM packages in VCS with source or not?

Is it good practice to store Nuget or NPM (or other) packages in the source control with the source, or to keep them in some other place? My gut says they belong with the source, however a package ...
3
votes
1answer
1k views

Where do you put the “main function” of a Python app?

Suppose you are developing a Python standalone application (not a library). Would you make it a Python package? Or just files next to each other? If you would make it a package, what would be the "...
7
votes
1answer
5k views

Naming convention for test packages

We're actually naming our test packages just like their to-test counterparts. So we end up with this structure: src/main/java com.hello.world helloWorld.java src/test/java com.hello....
2
votes
2answers
148 views

Is it good practice to use a free website as a package

Is it good practice to use a free website as package identifier if I do not have a real website? EG com.weebly.vikarjramun.myapp.myactivity Just wondering...
0
votes
1answer
134 views

What would be the best way to structure packages to avoid duplicate package names when a sub-package is repeated?

Sorry for the long somewhat unclear title, couldn't think how to word the problem I'm having. So basically I have a package structure with two reasonable alternatives (as far as I can see) but both ...
-1
votes
1answer
530 views

What to name package and their facade classes?

I'm using a some C++ Facade classes like this: http://www.apwebco.com/images/Facade.png Suppose that there is package named "SubSystem" with a lot of classes inside, like in the picture above. I ...
4
votes
3answers
4k views

Same class and namespace name

I have a problem how to go about naming my namespaces and classes. I already figured they shouldn't both have the same name, as it causes all kinds of problems. Most notable problem for me is that I ...
17
votes
2answers
6k views

Why packages and modules are separate concepts in Java 9?

Java 9 will have modules in addition to packages. Usually languages have one or the other. And most programmers perceive two terms as synonyms. Modules are built on top of packages, treating them as ...
1
vote
1answer
75 views

Package Interfaces - Coupling & Re-Usability

Intent Packages should be designed to perform a single function well. Ideally this means that they should be highly modular and different packages should be able to be 'plugged-in' simply by ...
3
votes
3answers
1k views

Should I include scripts inside a Python package?

In my Python application, I can distinguish between entry points (scripts) and what I think of as library code. My instinct is to put the library code inside a package, and the scripts elsewhere ...
0
votes
1answer
75 views

Packages : opposing forces of reusability and developability

In choosing the classes to group together into packages, we must consider the opposing forces involved in reusability and developability. Balancing these forces with the needs of the application ...
5
votes
3answers
449 views

Writing R packages to replace .R scripts?

In our company we have a handful of R users who have collectively written some ~30 .R scripts over the last year. The scripts are mostly 100 lines or less, defining useful and reusable functions. ...
5
votes
0answers
476 views

Keeping a permanent git fork updated [closed]

Please consider the following scenario: There is an npm package named some-package. There are a couple dozen known dependent npm packages that all depend on some-package. I forked some-package and ...
10
votes
1answer
3k views

What does `Resolving` mean in programing? [closed]

I see in many places where the word Resolve is used, in Dependency Injection (resolve an implementation to an interface), Package Managers (ex: Resolve packages dependencies), Web (ex: Resolve a ...
0
votes
2answers
1k views

Relationship of Package names and file structure

I'm currently refreshing my Java knowledge and came across a question I couldn't answer yet: How does the Java compiler know where the (possibly custom) packages are located on disk? I'd assume that ...
2
votes
1answer
56 views

Should a class go inside the package which pertains to it?

<?= $vars['title'] ?> For example, if we were writing a library from scratch, and we had File, FileHandle, DirHandle, and FileSystem classes, would each of these go inside a package/namespace ...
1
vote
1answer
155 views

Should I share test code between different repositories [closed]

Suppose I have a Repo A that imports a Repo B. I maintain both of them. Currently, I have some convenience functions that are useful for testing of both repos. They live in Repo B's test directory. ...
6
votes
1answer
367 views

Why aren't Java Collections put in a dedicated package

Why do they just reside in java.util and not somewhere more specialized like java.collections or java.util.collections? It could contribute to mess up with different unrelated code. Couldn't it? Was ...
0
votes
1answer
84 views

In *nix, is there a practice for storing static libraries?

Lets say you are building an application that staticly links against libraries that you provide it. Where should you store these static libraries? Should you make a directory in the parent directory ...
12
votes
2answers
1k views

Packaging structure of Java collections (java.util) - why does Iterable sit in java.lang?

As per the below diagram, except for interface Iterable, all the remaining constructs (interface / class / abstract class) sit in same package java.util   Why does Iterable sit in java....
2
votes
1answer
876 views

Is a class representing a JSON response a DTO, a domain object, or something else?

Consider a restful service in Spring MVC. I am wondering how to package my response classes, i.e. how to name the containing package. First I thought of them as being domain objects. But they are ...
16
votes
4answers
3k views

Semantically more appropriate package name than `util` for the following things?

As a strawman consider the package java.util it is a dumping ground for various classes that in most cases do not share anything in common other than the person that put them there was lazy or ...
3
votes
2answers
2k views

best practices for packaging in Scala projects?

Scala runs on the JVM, but that doesn't mean we have to write it like Java. Eclipse discourages use of the default package. What are some considerations (e.g. size of project) that determine how ...