Welcome!

Microsoft Cloud Authors: Janakiram MSV, Yeshim Deniz, David H Deans, Andreas Grabner, Stackify Blog

Related Topics: Microsoft Cloud

Microsoft Cloud: Article

Cross-Platform .NET Development

Using Mono, Portable.NET, and Microsoft .NET

What is required for true cross platform development using .NET? On one hand, not much; on the other hand, a great deal. Because Rotor, Pnet, Mono and (the Microsoft implementation of) .NET, are all based on the ECMA standard, getting a basic C# program running on all four platforms is typically just a matter of copying the .exe file to the machine and executing it (assuming a .NET framework is already on the machine). But what about remoting, serializing and deserializing classes, interoperability, using native code, and non-ECMA classes such as System.Data and System.Windows.Forms (SWF)? This book covers those questions in detail with good practical advice; but that is not the best part of this book. In order to fully understand how cross platform .NET works and does not work, you need to understand the architecture and implementation of the different .NET frameworks; that is where this book really shines. It is full of block diagrams, UML diagrams, and class and code hierarchies. There are some good books on the .NET architecture, but most of these books are too academic and heavy in details for many programmers. This book covers architecture and implantation details from the point of making programs work in different environments, putting it in a nice middle ground; it is an easy to read book, but one that will leave most with a much deeper understanding of .NET interworkings.

The book starts with a brief overview of .NET (including a comparison with Java and the JVM), and a description of how they set up their laboratory for cross-platform testing, then in "Cross-Platform Pitfalls," it covers differences in the intermediate code generated by the three main .NET platforms, Microsoft, Mono, and Pnet. Due to Rotor's license, and its lack of support for anything other than the barest for the .NET framework classes, Rotor is not generally discussed in this book. Chapter 4 looks at the .NET framework classes from the point of what will likely be compatible across the .NET implementations, what will have limitations, and what is just not likely to work. It does this by looking at what operating system calls are made by each namespace in the .NET framework.

In chapter 5 the book looks at making GUI applications cross-platform; this is the area where the most programs are likely to run into cross-platform troubles. This chapter looks at how Microsoft, Mono, and PNET implement System.Drawing and SWF. The book does a good job of describing how Mono implements System.Drawing using gdiplus on windows, and cario on other platforms. This book has been out for a while, so its description of how SWF was implanted using GTK# and WINE are no longer applicable, but is still worth reading for educational purposes. The good news is that SWF is now implemented the same way as System.Drawing, so simply applying that section to SWF brings the book up to date on this issue. This chapter also covers several GUI toolkits (SWF, GTK#, QT#, TickleSharp, #WT, wx.NET) that can be used to build cross-platform applications, compares their capabilities, and finally shows a way to write GUI toolkit independent code using the Model-View-Controller (MVC) pattern. When reading this chapter, one also needs to consider that when this book was written, the implementation of SWF was just starting; it is now nearing completion.

Chapter 6 starts to cover distributed applications by showing how to access the different backend databases available. It goes on to create an application that can run under application servers such as IIS, Mono's own XSP server, or as a mod_mono module under Apache, and closes with a overview of Web services.

Chapter 7 covers the ins and outs of calling native code on different OSs including security, path resolution, marshaling, calling conventions, and invoking C++ code from .NET using the Simplified Wrapper and interface Generator tool, SWIG.

Chapter 8 opens with a discussion of interoperability between 24 different .NET languages, including how to run Java programs under .NET using IKVM, an open source Java Virtual Machine written in .NET that runs under both the Mono and Microsoft runtimes. It then covers the remoting architecture and channels including a cross-platform logging application. It finishes with a long section on interoperating with CORBA and cross-platform COM.

The book closes with cross-platform building using NAnt, and cross-platform testing using NUnit; it also looks at the future (some of which is now) including .NET 2.0, VS2005, and Longhorn, and tries to peer into the future of Mono and PNet.

This book is one of my favorites, and I think every .NET developer should have a copy of this book, even if they are not interested in cross platform development. Its approachable discussion of what .NET is, and how it works, is unique in all the .NET books I have read.

SIDEBAR

Title: Cross-Platform .NET Development
Author: M.J. Easton and Jason King
Publisher: Apress
ISBN #: 1-59059-330-8
Price: US $49.99

More Stories By Dennis Hayes

Dennis Hayes is a programmer at Georgia Tech in Atlanta Georgia where he writes software for the Adult Cognition Lab in the Psychology Department. He has been involved with the Mono project for over six years, and has been writing the Monkey Business column for over five years.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, will discuss how data centers of the future will be managed, how th...
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
SYS-CON Events announced today that Mobile Create USA will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Mobile Create USA Inc. is an MVNO-based business model that uses portable communication devices and cellular-based infrastructure in the development, sales, operation and mobile communications systems incorporating GPS capabi...
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
SYS-CON Events announced today that Keisoku Research Consultant Co. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Keisoku Research Consultant, Co. offers research and consulting in a wide range of civil engineering-related fields from information construction to preservation of cultural properties. For more information, vi...
SYS-CON Events announced today that Interface Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Interface Corporation is a company developing, manufacturing and marketing high quality and wide variety of industrial computers and interface modules such as PCIs and PCI express. For more information, visit http://www.i...
SYS-CON Events announced today that Fusic will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Fusic Co. provides mocks as virtual IoT devices. You can customize mocks, and get any amount of data at any time in your test. For more information, visit https://fusic.co.jp/english/.
SYS-CON Events announced today that TMC has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo and Big Data at Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Global buyers rely on TMC’s content-driven marketplaces to make purchase decisions and navigate markets. Learn how we can help you reach your marketing goals.
SYS-CON Events announced today that Enroute Lab will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Enroute Lab is an industrial design, research and development company of unmanned robotic vehicle system. For more information, please visit http://elab.co.jp/.
There is huge complexity in implementing a successful digital business that requires efficient on-premise and cloud back-end infrastructure, IT and Internet of Things (IoT) data, analytics, Machine Learning, Artificial Intelligence (AI) and Digital Applications. In the data center alone, there are physical and virtual infrastructures, multiple operating systems, multiple applications and new and emerging business and technological paradigms such as cloud computing and XaaS. And then there are pe...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Daiya Industry specializes in orthotic support systems and assistive devices with pneumatic artificial muscles in order to contribute to an extended healthy life expectancy. For more information, please visit https://www.daiyak...
Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...
In his session at @ThingsExpo, Greg Gorman is the Director, IoT Developer Ecosystem, Watson IoT, will provide a short tutorial on Node-RED, a Node.js-based programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using a wide range of nodes in the palette that can be deployed to its runtime in a single-click. There is a large library of contributed nodes that help so...
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
SYS-CON Events announced today that App2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct. 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. App2Cloud is an online Platform, specializing in migrating legacy applications to any Cloud Providers (AWS, Azure, Google Cloud).
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, will introduce two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a mu...
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...