DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Cross-platform .NET - try it!

Cross-platform .NET - try it!

Denzel D. user avatar by
Denzel D.
·
Feb. 12, 12 · Interview
Like (0)
Save
Tweet
Share
8.05K Views

Join the DZone community and get the full member experience.

Join For Free

I was using the .NET platform since its early release. Since then, I worked primarily on a Windows machine and never had much interest in switching platforms - after all, .NET was mainly developed by Windows developers for Windows developers. Then came Mono. As I tried it, I realized that it still had a long way to go, although it was moving in the right direction. I switched back to my comfort zone and continued working solely with Visual Studio.

Recently, I started working on a project that involved heavy use of networking components, specifically those relying on sockets. As I was building the server component, I realized that it would be great if the end-user could easily use the existing code many platforms. The purpose of my server application was such that it is used in households where I have no idea what operating system is used, but I wanted to cover as much audience as possible. In particular, I am interested in major distributions of Linux, Windows and Mac - all of them supporting Mono (what a coincidence).

I am already using Ubuntu on one of my work machines for experiment purposes, so I quickly got MonoDevelop up and running and ported my socket code to a new Mono C#-based project. To my surprise, I noticed that it needed zero modifications to run. With some tuning to my network settings and making sure that my laptop was active on the same subnet as all the test clients, I managed to transform my *nix laptop in a .NET socket gateway.

I realize that in my case this is a very basic step, and here is why:

  • I used only stock .NET classes
  • No third-party DLLs were involved
  • No GUI is involved at all, so I didn't have to rewrite my code for Gtk#

That being said, I am particularly intrigued as to how much effort will it take me to rewrite an existing WPF client (a part of the same network project) under Gtk#. I expect more work to be done there, but it is already clear that the investment in Mono is well worth my time for the reasons listed below.

1. The more platforms you cover - the more potential users you can get

A different platform won't necessarily mean that you will get a large number of new users. It might be a long shot, depending on the type of the product you are developing. However, chances are there will be enough people willing to experiment with your product on emerging platforms 

2. You get more experience with a new platform

Although you are still applying your existing language knowledge (C#, VB .NET, or maybe none of these), you still learn a lot about what *nix is and how stuff works around a new environment. That is going to help you a lot in the long run (read: job applications). As I am looking for summer internships, a lot of Microsoft-based software shops consider cross-platform .NET experience a big plus, so keep that in mind.

3. You learn to think cross-platform

Yep, that is a way of thinking about code in such a way that it can run no matter where you are. The larger the applications, the more trade-offs you will have to face. Sometimes, specific classes or library references will not be available  and you will either have to implement your own wrappers, or eliminate them completely for the sake of *nix/Mac/Windows compatibility.

Does it need enormous time investments? It depends, but not really. Does it need large financial investments? No. Does this require you to use MonoDevelop on Windows instead of Visual Studio? No. Does it require dramatic changes to your workflow? No. Conclusion of the day: give cross-platform .NET a shot.

Cross platform

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • LazyPredict: A Utilitarian Python Library to Shortlist the Best ML Models for a Given Use Case
  • Metrics Part 2: The DORA Keys
  • Collaborative Development of New Features With Microservices
  • Strategies for Kubernetes Cluster Administrators: Understanding Pod Scheduling

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: