Note that there are some explanatory texts on larger screens.

plurals
  1. POComposer suggested approach for internal packages
    primarykey
    data
    text
    <p><strong>Some background first</strong></p> <p>Our company, a small startup with only four developers, is starting the refactoring of our products into reusable modules to simplify the development process, increase productivity and, along the way, we would like to introduce unit tests where fits.</p> <p>As usual on a small startup, we can't afford wasting too much development time but, as we see, this is extremely important for the success of our business on a medium and long term.</p> <p>Currently, we have two end-user products. Both are Laravel (PHP) applications built on top of our own internal business layer, mainly composed of webservices, restful apis and a huge database. </p> <p>This business layer provides most of the data for these products, but each of them makes completely different use of it. We plan to build other products on the near future besides maintaining and improving those two that are almost finished.</p> <p>For that to happen, we intend to abstract the common logic of those (and the future) products into reusable and decoupled modules. The obvious choice seems to be Composer, even with our little knowledge about it.</p> <p><strong>Now to the real question</strong></p> <p>I would like to ask other opinions on how to develop internal packages on a test driven fashion. Should each module be a composer package with it's own unit tests and requiring it's dependencies, or should we build a single package with each module namespaced?</p> <p>To clarify a bit, we would like to have, for instance, a CurlWrapper module and that would be required on our InternalWebserviceAPI module (and a few others).</p> <p>I personally like the idea of having completely separate packages for each module and declaring dependencies on composer.json, which would mentally enforce decoupling and would allow us to publish some of those packages as opensource someday. It also may simplify breaking changes on those modules because we could freeze it's version on the dependents that will need to be updated.</p> <p>Although, I also think this separation may add a lot of complexity and may be harder to maintain and test, since each module would need to be a project on it's own and we don't have all that man power to keep track of so many small projects.</p> <p>Is really Composer the ideal solution for our problem? If so, which would recommend: single package or multiple packages?</p> <p><strong>Edit 1:</strong></p> <p>I would like to point out that most of these modules are going to be:</p> <ul> <li>Libraries (ie obtaining an ID from an youtube URL or converting dates to "x seconds ago")</li> <li>Wrappers (like a chainable CURL wrapper)</li> <li>Facades (of our multiple webservices, those require the other two kinds)</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload