| I have to disagree with pretty much everything you've written, because it seems like you're running into issues of a paradigm shift. If I'm going to consume a web service, I am going to write the models in C# and let a JSON deserializer like Newtonsoft.JSON map everything. To me, there's nothing better than having a fully modeled web service. I learn a bit about how the service works when writing the models. I know what the data looks like before I start working with it in my own application. Regarding your web.config note, I guess I don't understand what you're trying to get at. .NET projects tend to throw configuration items into, well, a configuration file. Again to me this is far superior to doing the PHP-industry-standard of having a config.php and chucking a bunch of global variables into it. Putting configuration items behind a parser in a document that you expect the user to edit is good practice. Development feels natural, every file can be a single class if you want and there are plenty of highly matured frameworks available. Maybe this is a note more for the NodeJS space, but a single file per class is the general guideline for C#/.NET. Additionally, I've generally found that the .NET framework and libraries written against it tend to be of much higher quality, are more secure, and are more production ready than most I've worked with in PHP land. On top of that, Visual Studio is a wonderful IDE and is pretty much the gold standard of our industry. I've not had a better experience as a developer than being able to create a .NET Core MVC web application and hit the ground running. I've written anything from 5 line Azure Functions to working with 100k+ line web applications and I'm not sure I could have done it without the excellent debugger available and the very context-aware Intellisense typeahead. In contrast, other than PhpStorm, I find PHP environments to be extremely messy and a bit of a hack to get working properly. If I didn't have some sysadmin background I'm not sure I'd move outside of "debugging" using var_dump(). I was a PHP dev primarily from ~2009-2017 and have been working almost exclusively in C# since. |
We do have config files too - global variables in some config.php was already frowned upon 10 years ago, much more so today. In times of autowired DI, you have a parsable, user-editable config file just like any other project. Had you used PHP since like 2013 or newer, you'd be aware of at least Symfony, which does this since forever.
I don't know a single reason why you would put multiple classes in a single file, especially in times of PSR-4 autoloading. Nobody does this since years, much rather decades, ago.
I also really don't know which libraries you use, but the composer ecosystem is one of the most mature, best maintained out there. There are countless projects of excellent quality out there, used in production on millions of servers every day.
Speaking of IDEs: you mention PHPStorm but still claim there's practically no good IDE for PHP. That doesn't make any sense: PHPStorm is a top-notch IDE, it has virtually anything you have in VS.
And lastly, why would anyone still bother with setting up an environment on their box if we have Docker? It's 2020, there's really no more reason not to.