3 ms·
Speaking as a C# dev, IME most people are working off of severely outdated views of the .Net ecosystem. .Net has had first class support for Mac and Linux for a
by Merad 4y ago
Speaking as a C# dev, IME most people are working off of severely outdated views of the .Net ecosystem. .Net has had first class support for Mac and Linux for a good 6-7 years now. Postgres support is every bit as good as SQL Server, and plenty of other db‘s can be used as well. All of the new projects I’ve started in the past 5 years have used Postgres db’s and deployed on Linux. If you don’t like boilerplate then I have good news, nowadays you can make a fully functional Asp.Net API with about 20 LOC.
- culi 4y agoSo what is it then? Is there a quick-start for Asp.Net projects? Is there a canonical "make a blog"-type tutorial project? If I wanted to try making and deploying a couple tiny asp.net apps in order to learn the framework, is there a service that can easily host them like Heroku used to do?
- Merad 4y agoWell bear in mind that Asp.Net is a large framework. The minimal approach I mentioned is for creating APIs [0] which you can use with whatever JS front end you please. If you don't want a JS front end Asp.Net has four different options for building web front ends [1]. The hosting question has me a little confused I guess. You don't need anything special to deploy or run modern .Net code? You can run your app anywhere that the Asp.Net Core runtime is supported [2]. Or bake your app into a container and run it anywhere that understands containers. MS has tutorials for deploying to Azure [3], but I honestly know nothing about it (Azure). Every place I've worked at that had cloud infrastructure has used AWS, and I've never needed to deploy a hobby app. 0: https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-7.0&tabs=visual-studio https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-... 1: https://learn.microsoft.com/en-us/aspnet/core/tutorials/choose-web-ui?view=aspnetcore-7.0 https://learn.microsoft.com/en-us/aspnet/core/tutorials/choo... 2: https://dotnet.microsoft.com/en-us/download/dotnet/7.0 https://dotnet.microsoft.com/en-us/download/dotnet/7.0 3: https://learn.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net60&pivots=development-environment-vs https://learn.microsoft.com/en-us/azure/app-service/quicksta...
- culi 4y ago> The hosting question has me a little confused I guess. I'm not sure how much you've played with Node, Ruby, etc BE ecosystems but there are plenty of "just `git push` and watch you app automatically deploy" services out there that makes it really easy to get started playing around with the actual framework and not get bogged down in docker files or AWS configuration.. Maybe I'm spoiled, but I'm also... busy. And I'd like to be able to try out a framework first before I decide if I wanna invest a lot of time working on a full-fledged project with it and these sorts of tools are perfect for that Thanks for the links
- Merad 4y agoDo you not run your code locally when testing and evaluating things? I guess in my mind where and how an app is hosted is largely orthogonal to the choice language or framework. Edit: Assuming a modern framework that can run basically anywhere. Something like old school .Net Framework that is essentially restricted to Windows and IIS would be a different story.
- pjmlp 4y agoKind of true, however I still mostly work on .NET Framework, because of third party stuff that might never be migrated to .NET Core. When it does get migrating, surprising as it may be, many companies are more willing to move to another platform than keep it on .NET, as full rewrite is almost required anyway. Dependencies on missing APIs, COM wrappers and such. It is quite different to use an ecosystem born and raised on UNIX, and one that only in the last 5 years kind of matured into UNIX. Additionally there is the whole issue with politics in VS4Mac/VSCode versus VS for tooling, which makes anyone outside of Windows to shell out for Rider if we want the same level of tooling.
- rvdginste 4y agoCompletely agree with you. Btw, regarding Postgres support: the guy maintaining the Postgres .NET drivers works for Microsoft on Entity Framework Core. Regarding the boilerplate and the minimal hosting model and the minimal api… it starts to look like a nodejs express setup. Personally I think boilerplate was not that bad to begin with and saving a couple of lines of code (sometimes at the cost of legibility) is not worth it for me in a decent sized project.