13 ms·
I used .NET Core for a backend API relatively recently (3.1) with no background in .NET prior (mostly javascript/typescript, php, and ruby). I found it incredib
by lucidone 5y ago
I used .NET Core for a backend API relatively recently (3.1) with no background in .NET prior (mostly javascript/typescript, php, and ruby). I found it incredibly productive and to be an enjoyable developer experience. Entity framework is one of the best ORMs I've ever worked with. Solutions and projects took some getting used to but I like it in retrospect. I now use IntelliJ products as a consequence of having used Rider for that project (developing on a mac) and enjoying the experience. C# as a language is now one of my favourites. I find it hard to convince colleagues and peers to give it a chance (mostly ruby and javascript devs) which is a shame.
- manigandham 5y ago> "incredibly productive" That's the best summary of the .NET stack, unfortunately it requires first-hand experience to figure it out.
- oneplane 5y agoSame goes for Elixir and Scala, it's mostly because from an outside-in view it really hasn't changed much (when 'looking' at the language and framework in question). Technical changes are relatively easy, cultural changes.. not so much.
- dnndev 5y agoIt depends what your trying to do and anything worth using has some learning curve. Hardly something I would say is a downside of .net
- juniordevv 5y agoIn rails I can drop into console and play with APIs in repl. What’s the .net equivalent?
- detaro 5y ago.NET languages have REPLs too.
- juniordevv 5y agoOh, so you can do things like User.where(name: “Bill”).pluck &:id In the repl? I have no experience with .net and it looks like these repls are new
- detaro 5y agoI think at least some of the REPLs came about with the new compiler architecture, yes. That isn't exactly new anymore, but new compared to the overall age of .NET.
- juniordevv 5y agoIt’s intriguing, thanks
- javcasas 5y agoSome time ago I had the misfortune to direct a C#/ASP.net web project, and that project turned out to be the first web project where the backend was singnificantly later than the frontend. Even though the backend had 2 senior developers and the frontend only 1 junior developer doing React. Since then I am not able to take seriously the saying of .net to be "incredibly productive".
- mkr-hn 5y agoThis comment could benefit from development. For example: how do you know .NET was the cause? Anecadata can be useful in aggregate, but not with such sparse details.
- deleted 5y ago[deleted]
- manigandham 5y agoWhat do you mean by direct? Were you doing the coding? And the backend was larger in what way? And is that a problem? And was the frontend a SPA? Was asp.net just used to make a JSON API? What were the actual issues and what would've made it more productive? That's much more useful for discussion here.
- javcasas 5y agoI initially directed (as organise stories, unblock people, do some devops & code review), but eventually I had to jump into the backend, because, as the most senior developer, I'm expected to jump into whatever part is having trouble. The backend had to receive events from a webhook and accumulate statistics on those events, then serve these statistics via REST API Frontend was plain old React reaching the REST API. Issues: * The database (MS SQL Server, as recommended by Microsoft) would randomly lock up for days. Bear in mind this was a 1GB of RAM (the minimum amount that Microsoft accepts as enough to run a SQL Server instance) RDS serving around 600 MB of data. * The introduction of the Repository Pattern (as recommended by the ASP.net documentation) introduced a lot of complexity (including incompleted/non-defined operations) that slowed down significantly the development. * LINQ supports interleaving DB operations with not-db operations, quickly becoming a O(n^m) footguns. If you make `row => row.x > 5` a method, LINQ will happily download all the rows and run the comparison in program instead of in the DB. Bear in mind I can't construct these footguns with django ORM, or make them typecheck with any Haskell data access framework. * The test runner UI would pretend no tests existed if the code didn't compile for any reason. Trying to debug something by running a specific failing test? If you miss a semicolon now you have to go find your test again. * The logger would log the message and the affected class in different lines. Do you want to grep for an error? You better know the obscure grep syntax for "previous line". Want to change the logging format? Good luck finding the code that adds the newline in order to find how to influence it. If you ask the IDE to find the implementation of the logging function it will show you the interface, nothing more. * You better not do some type of async stuff in LINQ, because the system is going to spawn a process for each entry, obliterating your production instance by creating thousands of processes, using a bunch of MB for each process. There were more issues, I didn't make an exhaustive list of them because, you know, I don't need to make exhaustive lists of malfunctions and bad design ideas for other programming languages.
- andi999 5y agoDo you mean net for desktop applications or asp net?
- manigandham 5y agoBoth. Definitely one of the best options for (windows) desktop apps. And asp.net is fantastic for webapps, especially now that Blazor has become so capable. The upcoming MAUI framework is also encouraging and should make cross platform native UI development much nicer.
- hestefisk 5y agoCan you comment on how Blazor has become capable? It seems like a cool tech, but when I tried the wasm runtime about 6 months back it was still quite slow. I would like to use it for web app development but speed still seems to be holding it back.
- Semaphor 5y agoIn typical MS tradition, there is a naming issue. Blazor can mean client-side (via WASM) or server-side.
- unsignedint 5y agoI can see why this is named this way, considering both variants share a lot in common, aside from some platform specific considerations (parallelism, and file system, etc.) moving from one platform to other is fairly simple. In fact back when Blazor WASM didn't provide decent stack trace on a browser console, I was doing development on Blazor Server and then ported it over to WASM.
- DeathArrow 5y agoStill, it is not Angular level slow while being easier to use.
- 5y ago
- christophilus 5y agoI left .NET around 10 years ago, and have yet to be as productive in any other ecosystem.
- dnndev 5y agoJavaScript is productive once you stop listening to all the high level abstracts and complications. Vanilla JavaScript is beautiful and highly productive. Right up there with c# for server side ops.
- mkr-hn 5y agoThere does seem to be some cultural inertia from the gap between when people made all the new frameworks and extensions to make JavaScript keep up with the advance of the web and when JavaScript got most of that functionality built in. CSS has the same issue where people don't realize it does most of what frameworks were made for originally like grids and changes based on medium/resolution/etc.
- SketchySeaBeast 5y agoI think it's the curse of web development. It's so hard to keep up with all the brand new technology changes, so once you know the basics well enough you rarely take much time to look back at them. And Googling "how to create a grid" feels kind of redundant if you've already found a reasonable effective way to do it.
- lodovic 5y agoAll these new features are nice, but not all users are using the latest browsers, so we have to keep falling back on these frameworks
- mkr-hn 5y agoThe only scenarios I can think of where someone hasn't been on an auto-updating browser for 10+ years is embedded systems and locked down intranets where no one expects the latest and greatest, and people in circumstances where a minimal page not top-heavy with scripts and frameworks is best.
- dnndev 5y agoI stopped trying to convince others, once they saw the productivity and solid apps we were shipping they cloned our repos and are now .net devs. Push they’re buttons all the time calling them Microsoft fanboys… that will get them going. Secretly they like it.
- adanto6840 5y agoExtremely similar background here, similar feelings after working with .NET / modern C#. I even, semi- subconsciously perhaps, wanted to dislike it -- because I thought it was MS-ish, and ASP-ish. But really, it's a first class citizen and especially so the last few years as it's become very fast & received a ton of cross-platform support. Once over the [quite low IMO] initial 'hurdle', it's easily amongst the most productive & best-supported "platforms" I've ever worked within.
- rootw0rm 5y agoI'm using ASP.Net Core for a couple personal projects for the first time, and it's pretty decent. I'm using nginx as a proxy, and I'm able to develop and test everything on Windows, and publish directly to a Linux test server. I have a lot to learn, especially for handling some web requests at a lower level, but I've been pretty impressed so far.
- 9wzYQbTYsAIc 5y agoCheck out YARP - Yet Another Reverse Proxy Edit: thanks :)
- dnndev 5y agoI recently used kestrel as a public facing server and it feels goods.
- rootw0rm 5y agoI'm not against it, I just happened to also need lots of nginx functionality...but a cursory glance does suggest YARP provides at least most of what I need.
- zogomoox 5y agoCan you explain this a bit? I'm trying to figure out what the appeal is of YARP, so far the only thing that makes sense is the load balancing.
- 9wzYQbTYsAIc 5y ago
- tehlike 5y agoEntity Framework owes a lot to nhibernate - but linq is the best thing that ever happened in ORM world.
- runevault 5y agoMaybe full on EF/EFCore is better, but I know with basic Linq to Sql I often needed to check the generated SQL because sometimes it was non-intuitive how to get it to generate the simplest form possible (my biggest example was to do a 3 part join I had to list the tables backwards from the way I expected, doing the other way lead to a weird bunch of subselects, though note this is also in Framework so maybe they simply fixed the SQL compiler in Core).
- setr 5y agoI’ve been working with efcore lately and it has so far almost always produced what I’d expect, at least for my arbitrarily complex joins and left joins, both join calls and Include calls (and include simplifies a ridiculous amount of cases) They also removed the intermixing between server logic and db logic, which greatly reduces nonsense occurring
- zsims 5y agoLINQ is very hard to debug, especially depending on the provider. With anything remotely complicated it becomes write-once (like Perl :p)
- acmecorps 5y agoInteresting. I’m a rails developer, and to me one of the core strength of rails is active record (altho some might disagree). How would you compare it with rails active record, and which part do you say it’s much better? Btw, I know this is superfluous and very shallow, but for some reason, I can’t get over the C# syntax because of how enterprisey it is. I much prefer ruby, but I guess it’s a matter of preferences and taste
- johnny22 5y agoi really liked the way ROM worked in ruby before i switched away from rails. I never got a chance to give it a good try.
- metaltyphoon 5y agoWhat the hell does enterprisey even mean .
- ncmncm 5y agoEnterprisey usually means high-overhead, tuned to require many developers to achieve what would be done by one on a less enterprisey system. This quality is attractive to managers who benefit by increased headcount, and prefer to have their "reports" or "resources" less generally capable, and more easily replaced or shuffled. Total cost is much higher, but individuals' salaries are lower, which makes managers look good. Java and .Net are both very enterprisey platforms.
- metaltyphoon 5y ago> high-overhead You understand that all the things done in Java and .NET’s “enterprisy” way can be done is most languages right? This is a programmer problem not a programming language one. Today you have to write less in C# than GoLang, to do the same tasks. Does that mean GoLang is enterprisey now, just because you have to write more?
- ncmncm 5y ago
- EnKopVand 5y agoInteresting! I’ve recently made a switch from C# to TypeScript and I’ve found prisma to be such a relief from working with entity framework. Not that entity is bad in any way, it’s just not as productive. Which is sort of how I have it with most of the journey into TypeScript. It’s just a really great environment especially in Azure Function apps, and a massive cadeau to Microsoft for making the node in docker such a first class citizen in their Azure environment! In many ways I feel like TypeScript is a mix of the best of Python and C# and that’s just wonderful, for me. But writing things like Odata APIs in .Net sure has some benefits from the massive work Microsoft has done with the .net and C# environment since moving core into the main .net or however you describe it. So now I’m not sure where I am going with this, I’m probably just very appreciative of the work Microsoft has done for us enterprise developers in non-tech enterprise in the past few years.
- CharlieDigital 5y agoPrisma's query syntax feels quite verbose to construct and reminds me of CAML from my SharePoint days (except JSON vs XML). It's also lacking support for a lot of data types on PG. It's crazy that EF Core has providers for everything from SQL Server to CosmosDB to Google Spanner to in memory DBs. LINQ and expression trees are probably one of the best features of .NET.
- pinetlk 5y ago>Entity framework is one of the best ORMs Yes, I think it is the best ORM in terms of productivity, but it is very, very slow. This is usually not a concern for internal enterprise applications that only have a few people using them at a time though. I guess the other issue is just an issue with ORMs in general - you lose a lot of the in-built features of your sql database, which as projects progress, can ultimately result in you writing the same amount of code as if you didn't use the ORM. You also can't switch programming languages without rewriting the entire database section. Personally, I stopped using ORMs altogether because I find that they make easy things a little easier, and hard things harder, which isn't a very good value proposition overall. They don't really save me time anymore.
- orthoxerox 5y agoEF Core is not slow at all, especially if you disable change tracking, which you don't want in many cases anyway.
- pinetlk 5y agoNo it is definitely very slow. Stackoverflow did a test once, and switched to their light-weight ORM. The thing is, you mention disabling change tracking, and then there are things like having to make sure you aren't accessing a field that is outside of the included fields to prevent multiple queries, etc, etc. When I write SQL, I just write it once, and then it lives forever going very fast. When I look back on the projects written in EF/Linq, they are still going year after year, still using up lots of resources. I could have just written them in SQL. Maybe it would have taken an hour more over the entire project (internal enterprise thing), but it would still be running to this day, quickly and efficiently.
- register 5y agoI am returning to Java ( Spring Boot, Spring Cloud and IntellJ ) after a long period with C# and .NET core. What a step backward it is! Really the .NET platform is leaps and bounds better than anything offered by Java today (at least when speaking about Spring).
- CharlieDigital 5y ago.NET and C# as a platform are evolving extremely fast compared to many other runtimes and languages. In fact, it's kind of been converging with JavaScript and TypeScript. I have a small repo here that highlights this: https://github.com/CharlieDigital/js-ts-csharp https://github.com/CharlieDigital/js-ts-csharp If you stopped working with .NET and C# around version 4, the language itself has transformed. Local functions, pattern matching, records, and more!
- hackerfromthefu 5y agoAnd to be fair, it was always ahead of Java as a language. Reified generics in 2005, LINQ in 2008, Async, language servers etc etc.
- _old_dude_ 5y agoIf you can, you can give a try to Quarkus, while the doc is not up to the level of Spring, in term of ergonomics, configuration, hot reload, test containers, this is closer to what .NET does, by example annotations are optional and are resolved at compilation not at the execution.
- qiskit 5y ago> Entity framework is one of the best ORMs I've ever worked with. It is good, but it's just better to learn TSQL/SQL Server if you are on a windows stack. Shouldn't use it as a crutch especially if you working on the back-end side. Entity framework was created to make data access easier for the front-end people.