This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Lupus590's profile picture

[Howl] multiple files vs single combined file distribution

Started by Lupus590, 14 September 2015 - 12:28 AM
Lupus590 #1
Posted 14 September 2015 - 02:28 AM
So I'm getting back into working on Hive some organisation tips have been suggested to me. At the moment I'm considering using Howl but already have a github installer and the code (is planned to) run as loose files.

Multiple files:
  • Advantage: In client/server systems, client computer doesn't carry useless server code (and opposite with the server)
Single combined file (created from multiple files using something like Howl):
  • Advantage: Single all-in-one file is more portable
  • Advantage: Howl has built-in minify (smaller end-user program/source) (We could just minify the loose files)
  • Advantage: Howl has built-in testing (we could also make our own testing framework)
(Or we could modify/set-up Howl to minify and test without combining)

Any other advantages/disadvantages I've missed?
Edited on 14 September 2015 - 12:33 AM
valithor #2
Posted 14 September 2015 - 02:46 AM
Another advantage for single file would be, downloading a single file is almost always faster than downloading multiple.

Nothing says you would have to put all the files into one big one (server and client files). You could make 3 downloads one for the client, one for the server, and both together.
Edited on 14 September 2015 - 12:47 AM
SquidDev #3
Posted 14 September 2015 - 04:18 PM
Creator of Howl here, so everything I'll say is going to be a bit biased.

It is possible to build multiple files with a shared code base (such as a client/server model). I use this in busted to build both an executable and an API. It wouldn't be hard for me to allow the combiner to depend on a combined file either - most of the dependency code is there already. The combiner can now depend on a any build artefact, such as another combined or minified file.

A key thing to note is that whilst Howl comes pre-packaged with a host of existing tasks, it isn't much of an issue to add your own. So if you need to do something special it is easy to add some a custom task and get all the other benefits of Howl (such as minification). This means if you want to use something like BombBloke's Package then you could minify the files and then have package them all within Howl.

On the disadvantage aspect, I guess it is more setup for developers, but apart from that I can't think of any. If you do choose to go the Howl route, and come across issues do PM me/put something on GitHub, I'm generally pretty fast with bug fixes.
Edited on 15 September 2015 - 07:30 PM