5 ms·
The post only mentions .NET Core, but should actually be mostly talking about ASP.NET Core that runs on top of .NET Core. The features such as dependency inject
by PhilWright 8y ago
The post only mentions .NET Core, but should actually be mostly talking about ASP.NET Core that runs on top of .NET Core. The features such as dependency injection and Razor Pages are ASP.NET Core specific.
Microsoft have announced that they will be porting WinForms and WPF over to .NET Core so that they no longer need the heavyweight .NET Framework. However, this DOES NOT make WinForms/WPF cross-platform. They will still be restricted to Windows but will allow you the benefits of .NET Core, such as allowing side-by-side versioning.
- h3h3 8y agoMicrosoft.Extensions.DependencyInjection is developed as a ASP.NET Core extension but has no dependency on it. https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection https://www.nuget.org/packages/Microsoft.Extensions.Dependen...
- joshschreuder 8y agoIndeed. It's possible and quite easy to use it in a console app for example
- thejosh 8y agoYou can use the DI stuff without ASP.Net Core though?
- ahoka 8y agoYes, you can. If you don't need anything fancy (in that case you are better off with autofac), then you can just add the nuget to your console app and start using it with a few lines of code.
- merb 8y agoto be fair autofac is not really needed in most projects. you can even write a bunch of lines that will automatically register all your controller dependencies. (of course autofac makes this more simple). but I actually prefer explicit registration (i had the implicit variant on guice and as soon as the project was big, implicit is a mess).
- joshschreuder 8y agoThere's also Scrutor (https://github.com/khellang/Scrutor https://github.com/khellang/Scrutor) which makes assembly scanning and registering dependencies really easy too
- doesnt_know 8y ago> ASP.NET Core that runs on top of .NET Core Confusing, ASP.NET Core can actually also run on top of the Full .NET Framework right now, although it was announced this won't be a trend which will continue. > features such as dependency injection And DI isn't actually a feature limited to ASP.NET Core, .NET Core itself has DI "built-in".
- deleted 8y ago[deleted]
- giancarlostoro 8y ago> Microsoft have announced that they will be porting WinForms and WPF over to .NET Core so that they no longer need the heavyweight .NET Framework. However, this DOES NOT make WinForms/WPF cross-platform. They will still be restricted to Windows but will allow you the benefits of .NET Core, such as allowing side-by-side versioning. They've come back full circle to forking Java for Windows only usage. .NET is the closest competitor to Java as it gets in terms of similar ideas, a VM, a bytecode for your VM, a C-like language to be compiled to said bytecode, and so on. .NET IMHO is the only serious alternative to Java and a damn good one at that, and I would dare say vice versa though I will always prefer .NET personally, I wouldn't mind Java at least.
- mr_overalls 8y agoWhat in the world ever happened to Xamarin? Weren't they acquired by Microsoft two years ago? I felt sure we'd have a nice cross-platform desktop GUI by now. . . I'm feeling more fearful that they acquired Xamarin just to destroy it.
- giancarlostoro 8y agoThe only use I ever saw of it by others was to make mobile apps for both Android and iOS so I think it will stay there worse case.
- ivm 8y agoIt's actively developed but there's no mature cross-platform UI (Xamarin.Forms is mostly mobile and has many issues). Using something like MvvmCross combined with native UIs on each platform is the best option for now.