8 ms·
.NET definitely has a messy past but someone arriving today probably has the easiest time ever getting started because so much has changed to become a single st
by manigandham 6y ago
.NET definitely has a messy past but someone arriving today probably has the easiest time ever getting started because so much has changed to become a single streamlined product. All these opinions are weighed down by the very history that beginners don't have.
The expansive standard library, web/desktop/mobile/gaming output, Visual Studio (Code) IDEs, fantastic in-depth guides and documentation [1], dev evangelists like Scott Hanselman [2], and constant stream of content from MS team and community [3] makes it not only easy to get started but also continue until you're an expert.
I find it strange to complain about a 12 year old stackoverflow answer when other environments like nodejs are a nightmare once you get past the toy project stage. Anyone can write a simple tutorial for a to-do app, but it's how well you can grow that to a real complex system that determines how well-designed and productive an environment really is. And I've yet to find anything better.
1. https://dotnet.microsoft.com/ https://dotnet.microsoft.com/ 2. https://www.hanselman.com/ https://www.hanselman.com/ 3. https://dotnet.microsoft.com/platform/community https://dotnet.microsoft.com/platform/community
- imgabe 6y agoI'm currently trying to write a windows app and coming from web development (Python/Django and React) it is bewildering. Part of the problem is with web development, complicated as it is, the tutorials at least get you to a complete, working example. The windows tutorials seem to be very piecemeal where you start with a mostly complete app and fill in a couple things, but never get the whole picture. And like in your first link, click on "Desktop". Ok, I want to make a desktop app. Now there are four options WPF, WinForms, UWP and Xamarin. Ok...Why are there four options? What are the differences? Are one or more of them about to be deprecated? What do I need to consider in order to choose one over the others? I could go on. The windows developer website did point to some helpful C# tutorials and the language is actually pretty nice to work with, but figuring out how to do basic things like -- how do I store state in the application, has been very confusing.
- mikewarot 6y agoI have the opposite problem. On a PC, you can always store data, the graphics display exactly how you want, the feedback is instant, and you always know the state of things. You don't ever get disconnected from the user, nor have more than one at a time. My favorite platform is Lazarus/Free Pascal. The documentation is a bit sketchy, but the IDE and the applications it outputs seem solid. I'd prefer Delphi, but they priced themselves out of my world 20 years ago.
- lostcolony 6y agoWow. I knew Delphi was priced high, but I just went and looked...$1600 + $400 a year every year thereafter. And they have a community edition...but if you make $5k or more as a consultant, -even if it's not using Delphi-, you can't use it.
- munchbunny 6y ago> how do I store state in the application I can’t speak for all of the challenges you might be dealing with, but this one in particular seems like something specific to native development. You have a wealth of options, and at the same time because of that fact there is are fewer defaults compared to web dev and you have to do more work to make the decision. Personally I default to two options unless performance requires otherwise: SQLite or JSON stored in files.
- jiggawatts 6y ago> Are one or more of them about to be deprecated? All of them are. Not officially, of course, but practically speaking all of them are dead-ends. MAUI is the "new hotness", which means that it'll only become obvious that it is also a dead end in about a year and a half. I wish I was joking.
- andi999 6y agoAt least until last year, I think the community used mostly winforms if it is for Windows operating system. MS is not too happy about that.
- Traubenfuchs 6y agoBecause winforms is an incredibly easy and solid technology. It's a joy to work with.
- kaba0 6y agoCPU rendering should not be a thing in 2021
- t-writescode 6y agoCPU rendering is an implementation detail for the majority of WinForms. Unless you're running the paint component command yourself, that could be offloaded elsewhere.
- kaba0 6y agoIt is an implementation detail, but we are talking about a concrete framework with one implementation, not an open spec API. And as far as I know it visibly flickers on any window that has like more than 3 input forms.
- jiggawatts 6y agoWhen WPF was first released, toy applications would make both my CPU and GPU fan spin up to gas turbine levels. Now only WPF applications that try to show more than a dozen controls at a time make the GPU fan spin up, a huge improvement. I suppose this explains the new "flat" style with huge amounts of white space. It's not about elegance, or style -- it's the only way to keep fan speeds tolerable.
- manigandham 6y agoDesktop UI is very different from web, and most languages have multiple choices. WPF is the latest Windows-only, Windows Forms is legacy (from Windows XP era), Xamarin is cross-platform. These is in the descriptions on the page, or you can click on the documentation and follow the breadcrumbs to the main topic for the Desktop Guide: https://docs.microsoft.com/en-us/dotnet/desktop/?view=netdesktop-5.0 https://docs.microsoft.com/en-us/dotnet/desktop/?view=netdes... However you can just use Electron if you want to reuse web UI skills on desktop (although HN hates that). Likewise you can solve the state problem the same as a web backend. Use an external database, or a local database, write to a file, just keep it in memory, or use any of the OS-specific options. I recommend starting with EntityFramework (an ORM) and using the Sqlite provider: https://docs.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli https://docs.microsoft.com/en-us/ef/core/get-started/overvie...
- tonyedgecombe 6y ago>WPF is the latest Windows-only No it isn't. WinRT, UWP and WinUI are all later than WPF.
- nizmow 6y agoThis is probably more of a Windows problem than a .NET/C# problem, but it's a very real problem.
- mrweasel 6y ago> Now there are four options WPF, WinForms, UWP and Xamarin. Ok...Why are there four options? What are the differences? Are one or more of them about to be deprecated? You're most likely best of picking WinForms. It's old school, but it seems like it's going to be the one Microsoft will have the hardest time killing. WPF, UWP and Xamarin fine frameworks, but for the 0.9X developer who just want a window, with a few input and some buttons, you can't beat WinForms in ease of use. My reasoning is that most of the developers who saw WPF and jumped on that, are the same who will more easily jump to UWP, and from there to what ever comes next. The WinForms developer aren't moving.
- brtkdotse 6y ago> 0.9X developer That's pretty fantastic. Stealing this!
- mr_overalls 6y agoMeh, everybody is a 0.9X developer in many areas outside of their specialty. I'm a data engineer who specializes in security. I only need to generate a GUI or CRUD webapp once in a blue moon. So a stack that makes sane choices for me and holds my hand a bit is greatly appreciated.
- Gibbon1 6y agoVS + WinForms is like the Playschool Windows GUI development kit. That sounds like talking it down, but I'm not actually. Good for things like the sales guy wants something that pulls data out of a company database and sticks it in a excel file. And wants it tomorrow.
- andi999 6y agoGetting the job done is an important aspect of a toolchain.
- jiggawatts 6y agoAs a casual programmer, I've used WinForms successfully to write both trivial and somewhat complex GUI tools. I've never been able to use WPF to write anything useful, I just couldn't scrape together the patience required to adapt to it.
- andix 6y agoNative UI development is a mess. On any platform. It's super complicated. You will always be unhappy with any choice of UI framework, on any platform :)
- turtlebits 6y agoI've tried to get started with F# on Mac twice, once a few months ago, and 18 months before that. Could not get it working. When the official getting started guides don't work, that is a very bad sign. I will be staying away.
- pianoben 6y agoIt's regrettable, but F# has never seen anything like the kind of support C# and VB.NET have. It was and remains something of a "hobby" product, albeit one that sees lots of use in some specialized industries. Although F#-the-language is top-notch, the surrounding bits - editor experience, documentation, libraries, tooling - just don't get the investment they need to be on par with the sibling languages. What I mean to say is, don't judge .NET just by your experience with F#. C# is the happy path.
- paranoidrobot 6y agoWhen people talk about .NET, they're mostly always talking about C#. Sure, there's a bunch of other languages that run on the CLR - but for the most part, the broadest, most well tested, path is doing stuff in C#.
- manigandham 6y agoWhat was the error? Also like the others say, F# on dotnet is like Groovy for the JVM. It's nowhere near the popularity. Any reason you didn't try C# instead?
- xbar 6y agoIt seems like you understand the story for both of them. Any reason why F# is not a valid starting point language on Mac?
- oblio 6y agoBecause it's a community language. Microsoft doesn't officially support it fully. So you have 20-30 or however many volunteer devs (probably fewer) working on it in their spare time. If you're just getting used to the platform, you're shooting yourself in the foot by going with niche setups. Try C# first to figure out your way around the platform and then branch out, not the other way around.
- VadimPR 6y agoGave it a serious go but it still lives inside the Windows + Visual Studio bubble. Trying to use .NET on Linux with Visual Studio Code is pain: .NET developers expect you to learn APIs through intellisense and don't publish API docs, Windows tutorials assume you're running Visual Studio, and a lot of MS's own API docs are bewildering with .NET jargon that you won't understand.
- net_greybeard 6y ago> Gave it a serious go but it still lives inside the Windows + Visual Studio bubble. I work in a small shop and most of the developers use Visual Studio with Linux or a Mac. Most of the developers that don't bother with anything outside of Windows won't be open sourcing their libs or documenting their stuff anyways. This may have been true back in 2016/7 when .NET Core first turned up but it just isn't true anymore. > Trying to use .NET on Linux with Visual Studio Code is pain: .NET developers expect you to learn APIs through intellisense and don't publish API docs, I've used VS Code for small projects fine on my Mac. However I can see it being a pain on larger projects and you will need a large IDE. However the same could be said for a large Java project. > Windows tutorials assume you're running Visual Studio, and a lot of MS's own API docs are bewildering with .NET jargon that you won't understand. I don't want to sound like a dick, but yes the Windows tutorials will expect you to use Visual Studio as that is the IDE that primary IDE of people using Windows. As for complaints about jargon. As a C# developer that now transitioning to Python. The Python docs having lot of Python Jargon you won't understand (at first). Every language has its own jargon.
- VadimPR 6y agoJava projects publish Javadoc which is good - you can sit down and understand an API. It's not the same story on .NET. > Windows tutorials will expect you to use Visual Studio as that is the IDE that primary IDE of people using Windows. Yep, hence the bubble. Python doesn't have this problem, for example.
- net_greybeard 6y ago
- goto11 6y ago> a single streamlined product. Problem is, the past will remain with us in every book, code example or stackoverflow answer. As a beginner you need to understand the difference between .net framework and .net core because any blog post or tutorial will reference one or the other. Now people start calling it .net 5 or .net 6 instead of core, but you have to understand that this is incompatible with ".net framework" or ".net 4".
- manigandham 6y agoThis is a problem for every language stack. .NET has been around for 20 years, there's no way to have the rest of the web constantly update everything. The official documentation helps by being very thorough and gets you pretty far without needing other research.
- ethbr0 6y ago> because any blog post or tutorial will reference one or the other Or neither, if it was written before Core (in which case it's Framework).