Live data from Hacker News

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

stackify.com

21–30 of 79 posts

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

#21
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.

> generate images on the fly

Isn't SVG or canvas more suitable for that on the web?

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

#22
post #16

Earlier quoted context omitted.

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.

I am sure there are other ways but I found using the native datavisualization library very useful and simple to use. I am one of these guys who do as little javascript as necessary.

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

#23
post #16

Earlier quoted context omitted.

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.

> generate images on the fly Isn't SVG or canvas more suitable for that on the web?

If you want to draw the chart from scratch perhaps but I use a library to generate the chart then send it as an image to the client. Very few lines of code required in .net, no javascript required.

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

#25
post #24

Stupid question. How do you share IPs if all the websites on a machine are running their own webserver? When running in IIS, IIS handles the virtual hosts. Unless we found a massive stach of IPv4 IPs?

You typically still use IIS but only as a reverse proxy

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

#26
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.

Indeed, but there's still a heavy focus on web applications.

I have written a few commercial cross-platform applications with Xamarin. They deal with images - and System.Drawing would not have been helpful to me. iOS has UIImage and Android has Bitmap.

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

#27

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.

I'm confused. Didn't Microsoft purchase Xamarin lately? There's http://www.mono-project.com/docs/gui/drawing/ and https://github.com/mono/mono/tree/master/mcs/class/System.Dr... all waiting to be integrated. But I guess, this won't happen.

So many people would embrace a truly cross platform framework will all bells and whistles. But instead we have this disturbing split between .NET, .NET Core and Mono.

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

#28
post #24

Stupid question. How do you share IPs if all the websites on a machine are running their own webserver? When running in IIS, IIS handles the virtual hosts. Unless we found a massive stach of IPv4 IPs?

You typically still use IIS but only as a reverse proxy

So you set up the self hosted webservers on some non routable local IPs / ports, and set up IIS to map these IPs / ports to the external IP / hostname?

Sounds complicated. You have two states to maintain and keep synced. The .net core servers and IIS.

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

#29
"As part of .NET Core, Microsoft (and the community) has created a whole new web server called Kestrel. The goal behind it has been to make it as lean, mean, and fast as possible. IIS is awesome but comes with a very dated pipeline model and carries a lot of bloat and weight with it. In some benchmarks, I have seen Kestrel handle up to 20x more requests per second. Yowzers!"

So the new Microsoft web server replacing IIS, Kestrel, is 20x faster in some circumstances? Wasn't IIS "state of the art"?

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

#30
post #28

Earlier quoted context omitted.

You typically still use IIS but only as a reverse proxy

So you set up the self hosted webservers on some non routable local IPs / ports, and set up IIS to map these IPs / ports to the external IP / hostname? Sounds complicated. You have two states to maintain and keep synced. The .net core servers and IIS.

Of course it's complicated, you stipulated that all websites are running their own web server.
Post reply on HN