Live data from Hacker News

Lessons Learned while Converting from ASP.NET to .NET Core

stackify.com

11–20 of 79 posts

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#11

Earlier quoted context omitted.

It's only "wed to GDI+" because the current implementation is. Nothing's preventing them from implementing a cross-platform System.Drawing. There's no magic involved in what it does that requires GDI+. I find it unbelievable that they would even consider releasing this without System.Drawing or equivalent being available.

I've been working on a solution to that. github.com/JimBobSquarePants/ImageProcessor

That's great, but it belongs in the framework. I'm incredibly disappointed by that decision.

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#12

Earlier quoted context omitted.

I've been working on a solution to that. github.com/JimBobSquarePants/ImageProcessor

That's great, but it belongs in the framework. I'm incredibly disappointed by that decision.

I do agree. When I spoke to one of the guys there a while back though they said they simply had too much on their plate at the time and were hoping the community would kick in and help.

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#13

Earlier quoted context omitted.

System.Drawing is wed to GDI+ so not cross platform. There are third party libraries that work just fine. https://github.com/imazen/Graphics-vNext If you don't care about .NET Core but you do care about ASP.NET Core you can always run ASP.NET Core on Windows and use System.Drawing.

It's only "wed to GDI+" because the current implementation is. Nothing's preventing them from implementing a cross-platform System.Drawing. There's no magic involved in what it does that requires GDI+. I find it unbelievable that they would even consider releasing this without System.Drawing or equivalent being available.

.NET Core has neither WinForms nor WPF. It's very much focused on web applications. System.Drawing might be useful for ... one in ten? web applications. And they have released it, and it's getting plenty of traction.

Take a quick scroll through here: http://referencesource.microsoft.com/#System.Drawing/commonu...

To re-use System.Drawing Microsoft would need to re-implement all those methods in a cross-platform, bug-compatible way. And there's a lot of code behind those methods.

In my opinion they made a reasonable decision to leave it out of v1.

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#14
>We ended up using the JsonProperty attribute on some things to force their casing how we needed them.

That's a weird choice. It's a one-line modification to change back to the legacy naming scheme [1]. (Which is completely non-standard and doesn't follow what basically the entire rest of the web accepts as the standard method of naming js object keys. But hey, .NET people are really beholden to some strange things.)

[1]: https://github.com/aspnet/Mvc/issues/4842

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#16

Earlier quoted context omitted.

It's only "wed to GDI+" because the current implementation is. Nothing's preventing them from implementing a cross-platform System.Drawing. There's no magic involved in what it does that requires GDI+. I find it unbelievable that they would even consider releasing this without System.Drawing or equivalent being available.

.NET Core has neither WinForms nor WPF. It's very much focused on web applications. System.Drawing might be useful for ... one in ten? web applications. And they have released it, and it's getting plenty of traction. Take a quick scroll through here: http://referencesource.microsoft.com/#System.Drawing/commonu... To re-use System.Drawing Microsoft would need to re-implement all those methods in a cross-platform, bug-…

No, my understanding of .Net core is that this is also the way they want to get back on devices. I think Xamarin will ultimately be based on .net Core. And for a mobile app, you bet you need a way to manipulate images.

Even for websites, depends on what sort of websites you do, but I often need to display charts, so being able to generate images on the fly.

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#17

Earlier quoted context omitted.

That's great, but it belongs in the framework. I'm incredibly disappointed by that decision.

I do agree. When I spoke to one of the guys there a while back though they said they simply had too much on their plate at the time and were hoping the community would kick in and help.

Yes, I'm hugely impressed by how much the teams at Microsoft have accomplished in the time, and how they have managed to change the direction of the platform without making a big mess. .NET Core could never be feature-complete on version 1, and I think that the folks involved have been very candid about the fact that it may take a while longer before it is able to support everything that many real-world projects need.

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#18
post #15

For a website, not being able to manipulate files (no System.IO.File) or images (no System.Drawing) is a bit of a problem unless all you are doing is serve a database.

Using System.Drawing from ASP.Net was never supported anyway (although much of it did work). From https://msdn.microsoft.com/en-us/library/system.drawing.aspx

"Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. For a supported alternative, see Windows Imaging Components."

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#19

Earlier quoted context omitted.

I've been working on a solution to that. github.com/JimBobSquarePants/ImageProcessor

That's great, but it belongs in the framework. I'm incredibly disappointed by that decision.

I disagree, there is too much in the framework which ends up stuck there for ever, bloating the whole system.

System.Drawing is a good example, if you read the msdn docs it is clearly not supported on ASP.Net or from a Windows Service.

Libraries like imaging should be a nuget package.

Re: Lessons Learned while Converting from ASP.NET to .NET Core

#20
post #16

Earlier quoted context omitted.

.NET Core has neither WinForms nor WPF. It's very much focused on web applications. System.Drawing might be useful for ... one in ten? web applications. And they have released it, and it's getting plenty of traction. Take a quick scroll through here: http://referencesource.microsoft.com/#System.Drawing/commonu... To re-use System.Drawing Microsoft would need to re-implement all those methods in a cross-platform, bug-…

No, my understanding of .Net core is that this is also the way they want to get back on devices. I think Xamarin will ultimately be based on .net Core. And for a mobile app, you bet you need a way to manipulate images. Even for websites, depends on what sort of websites you do, but I often need to display charts, so being able to generate images on the fly.

Why are you generating images on the fly to display a chart? Why not send the data points and render a chart clientside using JavaScript? There are plenty of libraries for that.
Post reply on HN