Linux and .NET
I’m starting to get more questions about .NET with Linux, using ASP.NET with Apache, writing Web Services in C# with Mono, etc. I’m providing some excerpts and paraphrasing here of recent exchanges I’ve had with prospects and clients.
Please let me know if you think any of this is wrong or incomplete. Unless I’m getting paid for my time, I’m not going to provide solid HowTo solutions, and will only skim the surface of the possibilities. So if I mention something and then don’t go far enough into detail, it’s intentional. That said, for those of you who benefit from all of this free information – please don’t forget where it came from.
Question: We are using an MV database on a Linux server and the majority of our desktops are Linux Desktops running KDE. We have a few GUI apps that run on Win4Lin on our desktops but this is slowing down our systems. We also have a few thin-client (browser apps). We need to replace some old VB apps that integrate with Crystal Reports. I guess what I need is a productive development tool similar to Visual Studio that will give me the necessary library to connect to my MV database, a reporting tool, and also a deployment tool for Linux desktop. Is it possible and is it a good solution to develop an app using Visual Studio over Windows, and deploy the solution to Linux using Visual MainWin or Mono?
- As a C# developer I’m impressed with Mono but have not yet had the opportunity to develop a front-end for MV apps with it. Using Gtk# with Mono, a thick-client desktop front-end can be developed which will run in Linux and Windows.
- I’m also very impressed with what I’ve read about Visual MainWin, and would really like to write some C# code for deployment on Linux – but without a client asking me to do this I can’t spend the time to do this just to prove the concept. I trust that it works.
- It is possible to write an ASP.NET front-end and deploy via Mono or MainWin over Linux. ASP.NET does not hardcode the HTML at development time, it generates the code at runtime. So yes, you can write your code anywhere and deploy to Linux-based browsers.
- The best connection to any specific MV DBMS is dependent on many factors and can be worked out with each VAR or end-user. There are many tools available, it’s just a matter of understanding the environment and picking the right one.
- With a product like mv.NET, Visual Studio can be used to develop ASP.NET code which, as mentioned above, deploys to a Linux browser. In this case though, the web server and other middle-tier code need to run on a Windows system, even if the DBMS is in Linux. There is some cost involved in addition to the extra server, but this is all "standard" technology and does not rely on an assortment of projects with various Linux dependencies, and there is no custom connector required for various databases.
- Regarding deployment of mv.NET via Mono over Linux, I’ve recently spoken with BlueFinity about this and as can be expected, anticipated sales would drive such an initiative. If your company and others could commit to a purchase of some number of licenses upon completion of a port of mv.NET to Mono, then I’m sure they would seriously consider the effort. Note however that this is not a near-term solution. My approach, rather than waiting for development, would be to develop everything over Windows and make the transition when everything is ready and convenient.
- If you like Crystal Reports and VB then you will want to consider using Visual Studio (here is a tutorial on CR with VS). You can get VS2005 Express Editions entirely for free from Microsoft. VS2005 has basic built-in reporting tools, and with .NET there are many other reporting components available in the third-party market.
- If you want to do reporting with Java in Linux, there are open source reporting tools. See this link for examples:
- For attractive browser-based clients, I’ve been wanting to use "r.a.d. Controls" for a long time now. These controls add a lot to the interface, use Ajax for field-level processing, and work in Linux-based browsers too. I’m not sure if or how this would work with a Linux server (should be easy to find out), but assume for now that this will only deploy from VS/IIS/Windows. [ UPDATE 20-Feb-06: Telerik doesn’t have much demand for a Mono port but they are considering it. ] If you’d like to spend some time on their site, I’ve written a little guide to getting the best demo experience on their site and will post it here soon.
- If you have no experience with .NET then you have a learning curve ahead of you with Microsoft .NET or with Mono. Being familiar with Visual Basic is a small advantage for Microsoft .NET but doesn’t help with Mono and C#, so you’ll need to do some reading on .NET, C#, and Mono.
- Regarding components, spending less money means higher cost in assembling pieces and higher risks. Accepting some cost and a Windows box simplifies deployment and could ultimately lower deployment costs.
- If you do this on your own then you have an extensive learning curve with any of these solutions. If you contract out parts of the effort then your development costs are higher but delivery time is much shorter. In the end you need to balance budget, time, quality, knowledge as an internal asset, and other factors.
I think that covers the topics asked about. If you’d like to discuss any of this more in-depth contact me to schedule some consultation time. If you’d like assistance with development, we can provide various services – for most of our clients I’ll write an ASP.NET front-end and the client handles all of the back-end business rules, we meet in the middle through a well-defined API. mv.NET is the connectivity component of choice but I would be very interested in a project for all-Linux deployment. If you’d like to discuss mv.NET for your own internal development, just let me know.
In an upcoming post I’ll have more info about Visual MainWin and considerations for development, especially with MV.