7 ms·
I agree. For such a simple script, requiring all these tools (npm, bower, composer, grunt), it just doesn't seem practical. Is this how people develop and depl
by vld 12y ago
I agree. For such a simple script, requiring all these tools (npm, bower, composer, grunt), it just doesn't seem practical.
Is this how people develop and deploy PHP stuff nowadays?
- okatsu 12y agoAside from Composer (which is a good thing for managing dependencies), I'm not sure why you would think "this is how people develop and deploy PHP stuff nowadays". The author uses these tools out of choice, not convention. Just like some Ruby devs use Bower and others don't.
- bombtrack 12y agoI agree with the other reply -- this isn't so much of an indictment of PHP, as it is front-end development in general. Sure, to keep it simple you could download your JS and PHP deps once and bundle them all up in one nice zip. I think many apps provide a "dist" or "release" bundle (this one, in fact, does) in which you don't have to care about Composer, Bower or npm. However, to properly organize deps or define build processes for development, why not use some of the (frankly) common tools available? It's funny how HN could see a simple unzip-and-go app and scoff "amateur hour hobby project". But if someone takes a more formal approach to their hobby app it can flip and scoff "over-engineered bloated setup".
- xrstf 12y agoThings got more complicated when I decided not to just use CSS/JS from some CDN, but have it locally available. Then I needed to postprocess the CSS to remove @include rules. Most of the build process is meant to create small, versioned files, so users don't need to download full jQuery/Bootstrap stuff. I would feel bad for not optimizing my assets.
- bombtrack 12y agoOh, I fully agree with how you have everything set up and organized. It's clear you tried to be as formal as possible with organizing the app, it's dependencies and build processes, for _development_. People are just misunderstanding that bit or nitpicking. Like I said, it's damned if you do, damned if you don't.
- okatsu 12y agoDon't sweat it, people would've complained either way. Like you said earlier, it's a build requirement, not a runtime one, and there are advantages to using these tools.
- krapp 12y agoFor the life of me do not understand why anyone would require Node's package manager as a requirement for a PHP application. One of the few strengths of PHP is that there doesn't have to be a "build process." You don't even have to compile CSS and JS, really, but I guess people aren't comfortable with js or css which isn't machine generated. Fair enough - there are benefits to that, but as general practice, it's needless complexity.
- xrstf 12y agoIt's a build requirement, not a requirement to run the app. If you know a better way to install grunt-contribs, please tell me. I made it more obvious in the readme that you do not need build tools to run Hosty. Seems like that confused a lot of people.
- krapp 12y ago> If you know a better way to install grunt-contribs, please tell me. I would just not use grunt. I understand it's not required to run it, but even as a build dependency, unless you already have Node installed and running, it's a lot of overhead for relatively little benefit, I think.
- arenaninja 12y agoI'm on the fence on this one. On one hand, I'm fond of package managers. On the other, there's a TON of crap every time I run bower install... I've yet to figure out the best way of doing things. I'm thinking of using bower-installer, ship with a copy of the assets, and include bower.json, but not bower_components/. The other alternative is obviously CDNs, but then you're maintaining assets manually
- krapp 12y agoPHP already has a package manager though (Composer.) Granted, the amount of friction involved depends on personal preference, and whatever environment you're working in, but why require a package manager in another language (and, potentially, the language itself) when one exists for the language you're actually deploying in?
- bybjorn 12y agoIt's actually pretty pratical if you already have those tools installed.