DEV Community

Discussion on: What programming language should I learn next?

Collapse
 
jankapunkt profile image
Jan Küster

From my knowledge C# ist basically locking you to the .Net platform, right?

Regarding Delphi, lazy me to search again what this was again but I knew I associated IT with the term legacy. Sry. I think was still correct with that regarding Pascal.

Collapse
 
slavius profile image
Slavius

Basically, you can write .Net Core code on Windows (Visual Studio, VS Code, Rider), Mac (Visual Studio for Mac, VS Code, Rider) or Linux (VS Code, Rider) and it runs on Windows, Mac and Linux on x86, x64, arm32 and arm64 desktop or server (headless).
You can write console applications (.Net Core), backend APIs (.Net Core REST API), web applications (ASP.Net Core + Razor), reactive front-end applications (Blazor - plain HTML + C#, no javascript/typescript required unless you need to access advanced browser features like sensors, etc.), IoT applications (.Net Core IoT), Machine Learning applications (ML.Net), desktop applications (WinForms and WPF) or mobile applications (Xamarin). All with just .Net Core.
You can compile and pack applications as single-file multi-platform executable (with .Net Core framework embedded).
All as open-source. .Net has progressed quite a lot over the years.
Yes, you lock yourself to Microsoft but not to Azure as it can run anywhere. But the same can be said about Java, Rust or Golang.

Thread Thread
 
harounhajem profile image
Haroun Hajem • Edited

C#, the best upcoming news is Blazor. C# -> WebAssembly -> then run in minified Webrowser(Electron). That will give C# the ability to run anywhere. The ProofOfConcept is already done, now they are looking into how much they can minify the webbrowser. Current size is a couple of MB, but the dev-team at MS wants to shrink that to KB. =)

Thread Thread
 
slavius profile image
Slavius

Even the server-side Blazor over WebSockets is nuts.

Thread Thread
 
jankapunkt profile image
Jan Küster • Edited

I don't understand. Can you please elaborate?

Thread Thread
 
slavius profile image
Slavius

Can you please be more specific what you don't understand and would like to get explained? I'd be glad to help.

Thread Thread
 
jankapunkt profile image
Jan Küster

Even the server-side Blazor over WebSockets is nuts.

I totally don't get the meaning of the sentence, since I rarely know Blazor nor it's relation to Websockets.

Thread Thread
 
slavius profile image
Slavius • Edited

Ah, I see. Basically while Blazor is front-end framework for building reactive applications (similar to React, Vue or Angular) it has in contrast 2 modes of operation. Client side rendering (similar to other frameworks based on Javascript or Typescript) where the code runs on the client. For this, of course since it is based on C# .Net you download minified version of .Net framework at very first run which technically is running as WebAssembly and AFAIK is currently based mostly on Mono (Open source .Net compatible framework for *nix systems that existed prior to multi-platform .Net Core).
The second mode of operation is Blazor server-side rendering using WebSockets. How this works is that your browser instead of downloading whole front-end application downlaods minimal WebSockets client that connects to the server, bootstraps your app and every request you do is handled and rendered at the server over this WebSockets connection where your browser downloads only resulting HTML and displays it by replacing the appropriate DOM elements.
The latter way was introduced in .Net Core 3.1 the former (client side) was until .Net Core 5.0 experimental but is getting wider adoption now.
Both have advantages and disadvantages, e.g. server side does not expose business logic but cannot work in offline scenarios (however supports automatic reconnection to the server) and updating it is easier and faster as all the code is on the server. Client side needs to load so far several megabytes of client binary (WebAssembly .Net Framework) at first run that is cached in the browser.
Hope that helped.

 
harounhajem profile image
Haroun Hajem • Edited

Did anyone say WebSockets?! =D Have you seen the draft for the upcoming replacement for WebSocket? It's called WebTransports and it will/can run through the Quic protocol instead of HTTP1/2. Which makes it blazing fast as a streaming protocol. I suspect that Microsoft will integrate it into Blazor as well. Here is the link for the draft: WebTransport

Collapse
 
shaijut profile image
Shaiju T • Edited

Free. Cross-platform. Open source. Supported.

C#.NET is free. There are no fees or licensing costs, including for commercial use.

C#.NET is open-source and cross-platform, with free development tools for Windows, Linux, and macOS.

dotnet.microsoft.com/download

Thread Thread
 
jankapunkt profile image
Jan Küster

So Apps can now also Run on MacOs and webapps can also Run on Linux Servers?

Thread Thread
 
shaijut profile image
Shaiju T • Edited

Yes exactly , You can write in C# and run anywhere.

For Mobile you can use Xamarin and write in C# and Deploy your apps in Android, IOS. All in one go.

This will help you ship your products faster with only one language.

dotnet.microsoft.com/apps/xamarin

Thread Thread
 
jankapunkt profile image
Jan Küster

It seems that xamarin itself is not provided for Linux based distrubutions, so I can only develop with C# and .net core on linux, right?

Thread Thread
 
shaijut profile image
Shaiju T

By the way if you are looking to learn to get a Job, Currently both Java and C# will help you get Job in MNC companies. Also Go language is coming up, i heard many startups are using it for making cloud native apps.

Java and C# has some common syntax style , so you can switch over each other easily.
I feel C# gives developer happiness and makes developer life easy because its easily maintainable for large projects and by providing tools like Visual Studio and VS Code its easy to code faster.

Don't be confused of choosing the best language, Just choose one after your research and start learning, if you don't like you can switch over other easily.

Hope this helps.

Thread Thread
 
shaijut profile image
Shaiju T • Edited

If you are talking about to develop Mobile apps using Xamarin in Linux. I think Its currently not possible. But only possible on Mac OS and Windows.

As you are learning, I suggest learn C# first then start learning building Web App using Asp.NET Core , as of now Web Apps has more Job opportunities.

2 Ways to build Web Apps:

  1. Develop Web App using Asp.Net Core Only - Both UI and Backend

youtube.com/watch?v=C5cnZ-gZy2I

  1. Develop Asp.Net Core Web API and Consume it using JS frameworks like Angular or React
  • Asp.Net Core Web API - For Backend

  • Angular or React - For UI

youtube.com/watch?v=fom80TujpYQ
youtube.com/watch?v=NemyDIUcC64

Thats Just basic CRUD based tutorials, Advanced projects based tutorials like a Ecommerce shop etc you can search online to learn more.