Questions tagged [packages]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
97 views

Doubt about package-by-feature and circular dependencies

I am implementing a library that: Takes some input data (I put data structures and classes in the parsing package) Stores the data in a structure (I put data structures and classes in the storage ...
0
votes
0answers
31 views

Packaging for distribution: include CI config and other files the end user doesn't need in the package?

(Disclaimers: I have checked on Google and this site. I have read this answer, which is the only related one I could find here. Additionally, that answer is from 2017, and I wonder if things have ...
1
vote
1answer
33 views

modular system (packages) with dependencies?

I am building few sites for my company's client. The sites are mostly the same but could have some customisations. so we decided to create duplicate sites instead of multi-tennant and we decided to ...
1
vote
1answer
38 views

Is it reasonable for an R package to import another package just for coding convenience?

I am writing my first R package, converting my existing scripts into a bona fide package. I frequently use the magrittr pipe operator %>% in my code because I find it makes code more intuitively ...
3
votes
2answers
102 views

Build pipeline, dependency on unreleased package

My team is currently making some changes to our solution structure. Before the change we basically had a single solution file with about 40 different projects. Most of these projects are libraries ...
0
votes
1answer
47 views

Should libraries be packaged together based on similar traits?

I just started a new job and one of my first tasks is to create local nuget packages from the existing libraries, to help with versioning, maintenance, etc. This task had already been started by ...
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
50 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
110 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
90 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
52 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
86 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'...
67
votes
9answers
16k 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 ...
1
vote
2answers
686 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 ...
13
votes
3answers
984 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
850 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
490 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
2k 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
114 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
1answer
733 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
192 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 ...
2
votes
1answer
445 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
353 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
66 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
440 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 ...
53
votes
3answers
11k 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
157 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
96 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
1k 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://...
9
votes
2answers
3k 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 ...
13
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
131 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 ...
4
votes
1answer
2k 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 "...
9
votes
1answer
7k 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
151 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
183 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
644 views

What to name package and their facade classes?

I'm using a some C++ Facade classes like this: Suppose that there is package named "SubSystem" with a lot of classes inside, like in the picture above. I cannot name the package of the facade ...
4
votes
3answers
7k 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 ...
18
votes
2answers
8k 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
86 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
2k 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
93 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
4answers
617 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
482 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 ...
11
votes
1answer
5k 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
57 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
160 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
369 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
93 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 ...