I'm going to assume it's a decent modern language now, but what's the argument for using it instead of another mature dynamic language like Ruby or Python?
I'm going to assume it's a decent modern language now, but what's the argument for using it instead of another mature dynamic language like Ruby or Python?
Thirdly of course the shared hosting providers (by what I've seen in the past) usually support PHP almost always - this is not the case for either Ruby or Python.
I would argue with that.
Part of my job is writing a lot of PHP currently (Hack actually, but they are very similar). Sometimes it's OK, but sometimes early PHP design decision to make code always appear working correctly and avoid raising user-visible errors really make me wish I was coding in another language. One of latest examples: when converting string to floating point number, sometimes you get 0.0 in case of parsing error, sometimes part of string is ignored.
> There's no consideration of what we call technical correctness, only business value, and on the whole that is a good thing.
That's called technical debt. Taking some on may not always be a bad decision, but if there's a short-term gain (and I'm skeptical PHP provides one), it may come at a cost of future development slowdowns, downtime, a full rewrite, or a data breach.
Building the world to throw it away on every request is..compounded by the sheer size of the stack between the PHP runtime and a response (laravel is a particular problem here out the box).
You can do sorts of interesting things to get around this but there is no free lunch, they add complexity (caching, shared state, connection pooling) or change the execution model in ways you don't expect.
For all that modern PHP isn't a bad language, it's not C# (my favourite pragmatic language) but it's also not as bad as 5 was and certainly not 4.
It's biggest 'issue' on a wide scale is the massive disparity in skill levels covered by "PHP programmer" and how hard that makes hiring.
My advice is if you are building a small system or one that is tightly constrained then Laravel isn't bad but if you are building a big system or one that will grow over time, go with Symfony, it's more work up front (though not a huge amount) but in every other way future you will thank you.
"Shared nothing" architecture has positive benefits too.
It's just the size of the world varies widely and sometimes 80ms to build a world is simply too much.
A massive body of existing code that you can leverage.
I keep putting off picking up PHP, but when you look at the number of off-the-shelf easily-extensible solutions for CMSs, CRMs, and e-commerce platforms, there's no contest. PHP wins.
If anyone can point me at a Python e-commerce solution that will let you deliver an MVP in an afternoon, and your first original feature within a week, that would make my month.
I'd be surprised, however if there aren't solutions written in other languages that provide that same 90% in most cases. None of them are as famous, but that shouldn't hinder someone working as a consultant to help small businesses get online.
In both cases, the merits of the extension language are almost irrelevant; people use them because they're the extension language for a popular platform.
Django CMS looks nice from what I've seen, I'll give you that.
I hadn't encountered satchmo before. Their website seems to be down now, which is not encouraging.
> Those satisfied the MVP in an afternoon criterion for a developer already familiar with them.
Which is completely missing the point. I got WordPress up in under an hour on my first attempt. How many Python solutions can claim that kind of learning curve?
Oscar, from what I've seen, is very difficult to get started with. The code and documentation are rather hostile to newcomers. I was left with the impression that the documentation is designed to funnel you into associated consulting services, rather than help you get started on your own. I would love to be wrong about that.
None if the other e-commerce solutions on Django packages seem to have a sizeable developer community around them. I would be hesitant to use them for anything business critical, unless I had the resources to maintain everything in house.
The other advantage over ruby (python too?) is the server models bootstrap and trash everything on each request, meaning way less weird memory issues and more predictable behavior.
Nowadays nobody’s gonna run a php server ad hoc, so it will be wrapped in a container anyway, but IMO it’s still easier to manage than ruby/puma.
Last but not least, it’s very subjective but I think php has better enterprisy trade-offs than ruby: you’re not free to rewrite the whole language but have a decent degree of freedom in writing code with few boilerplate. Ruby gives way more freedom which is not always an advantage depending on the work culture.
I say that having left php for ruby.