Programming with MAF (and MEF) on Mono - mono

I am currently working as an internship in a company who wants to make software for the linux platform. Since they are a .Net minded company, they want me to look into mono.
I kinda have to look if it is stable for their applications and server apps.
I am now studying the MEF and MAF ( Managed AddIn Framework ) frameworks in mono.
Does anyone have some experience in building applications with the MEF and MAF framework in MONO? Did you experience some problems on mono etc? (and solutions are welcome (: )
I tested some easy tutorial code of MEF and that worked fine with mono (although I didn't use all functions they give me).
About MAF I didn't find that much that could help me. Any links that could help me?
To be more specific, I wonder if there exists some posts about MONO & MAF if it works or not.
I already thank you for reading my question,
Benjamin

MEF works on Mono, once you apply 2 patches so that it works on case-sensitive file systems. Mono 2.8 will ship with MEF in the next few weeks: http://mono-project.com/Release_Notes_Mono_2.8.
I use MEF for Pinta on .Net and Mono: http://github.com/jpobst/Pinta. My usage is trivial, but it works great.
I do not know anything about MAF.

I am pretty sure MAF is not and will not be available on Mono.
The source code to MEF was released with a license that allowed it to be incorporated into Mono. The source code to MAF has not been released at all as far as I know, and I don't think there is any interest in rewriting it for Mono.

The equivalent of MAF in Mono is Mono.Addins. I think it's not quite the same API as MAF, but it provides the same functionality.

An open source implementation of MAF can be found here System.AddIn Its not 100% feature complete but can be used on Linux, with mono, running addins in separate processes.

Related

Wanted: user experiences with C# (mono) on MacOS and Linux

I have a friend who is was a serious Linux developer but now he's working with C# on Windows and is really loving it. I'm attracted to C# because, like Java, I should be able to compile on one system and run anywhere.
If you are developing on Windows with C#, you're using dot-Net. On Linux and MacOS, you're using Mono.
Other people have posted that Mono is pretty good, no longer a science project, and that most of the core Microsoft functionality is present. But that's not really getting at the questions that I have. I'm wondering:
How does performance of Mono on Linux/MacOS rate against Java? If I want to run fast on all three platforms with the same object code, what's my best choice?
Is it easy/possible/reasonable to use Mono with makefiles and do my development with emacs?
Is there support for code factoring in MacOS and Linux, or am I better off just biting the bullet and doing all of my development in Windows?
How well does Mono work with Subversion and the rest of the open source development stack? How about autoconf? Or is this a completely different way of doing things?
Thanks
I have been using Mono on Linux for about three years and lately have been using it on OS X. Some of the Linux stuff was pretty extensive but the OS X stuff has just been some simple ASP.NET MVC2 apps so far.
1) Performance of Mono has never been an issue for me. That is not to say that performance has not been important, it is just that the performance of Mono itself has never been an issue. A lot of what I have done is web based so I/O and database memory use have hit me before Mono has.
Historically, the biggest deficiency with Mono has been the Garbage Collector (GC). I would say that Java is better tuned in this regard. The most recent versions of Mono have made huge strides in this area but I do not have any hard numbers for you in terms of comparisons.
I am sure Mono is faster sometimes and Java sometimes but I would say that Java is faster overall.
2) You can certainly do Mono development with makefiles. Certainly the Mono team itself does. Also you can certainly use Emacs and there is a C# mode for it.
I tend to use MonoDevelop and xbuild (Mono version of msbuild) myself and do not have any experience doing C# work in Emacs. MonoDevelop is great because it is exactly the same on all platforms. Also, although I rarely use it anymore, it is nice that the project format is the same as Visual Studio and SharpDevelop.
3) MonoDevelop has pretty decent code factoring support. It is the same on Windows, Linux, and Mac. You do not need to use Windows for development (though you certainly can) but I believe you will be happier using an IDE like MonoDevelop. Even things like Intellisense become hard to live without once you are used to them. But integrated debugging, being able to drill-down into the framework, database integration, unit testing, SCM integration, and other nice tooling support all in one place is just the way to go (for me at least).
4) Mono itself does not care about version control of course. Your source files are just text and you could use anything to manage them.
That said, MonoDevelop has fantastic Subversion support built right into the IDE. I have used it extensively and it is one of the reasons I have trouble moving off MonoDevelop even on Windows. The latest version of MonoDevelop (2.6 beta) includes Git support as well.
You did not mention unit testing but MonoDevelop also has NUnit support built into the IDE. I use that on every project as well and it works excellently. The version in MonoDevelop is 2.4.8 (if memory serves) so it is not quite current but it works great.
In a nutshell, Mono works really well with Open Source tooling in general. It has always played really well for me.
Autoconf is of course used by the Mono project itself but, as a Mono developer, I have never seen a need for it. I strive to only use managed code in my projects. As such, all I need on the target platform is Mono (or .NET). Not having to worry about all that stuff is one of the primary benefits of a managed environment like Mono or Java. The runtime itself (the CLR) ensures that my app has everything it needs to function properly.
I know that MonoDevelop will build autoconf/autorun files for C/C++ projects (non-Mono) but I have not done much with it myself.
As to a previous comment, the Mono JIT is obviously tuned to the target platform. That is where platform specific performance tuning happens.
Just as a comment, I find that Mono is best viewed as a development environment in it's own right rather than a compatibility layer for Microsoft stuff. The Mono team has extended .NET in many interesting ways. Anything you develop for Mono will run on .NET but there are some .NET features not available for Mono. For example, Mono does not support Windows Presentation Foundation (WPF). You have to use Windows Forms or GTK# for cross-platform GUI work. You can also use something like Cocoa# or MonoMac on the Mac, MonoTouch on iPhone, or MonoDroid for Android. You can use Moonlight instead of Silverlight as well although I have not played with it much.
One more thing since you asked about Java. I have found a few times that the Java world had libraries that I could not find equivalents for in the .NET world. In these cases, I have had amazing luck using IKVM.NET to integrate this into my Mono apps. IKVM.NET also works on .NET but Mono and IKVM.NET are very cozy and even share some code.
So there you go, one real answer for you at least.

Cross platform software development (Mac, Window) language suggestion

I need to develop a software which works for both windows and Mac OS.
The requirement are follows:
User can view flash file, make the selection and software print out the user selected flash file list.
I have experience in .net and windows platform but no experience in Mac OS. What is best development language and tool for my current situation.
I may be a bit biased on this, but you should use Qt because it will make your code portable on Windows, Mac OS X, Linux and even some mobile platforms. I don't really understand your requirement but Qt is pretty much the all-round cross-platform solution. It's C++ based, but easy as such (no memory management hassle, Qt takes care of it all).
On one hand you could use Java, it's fully compatible with Windows, Mac and Linux, also the language is similar to C# so you could adapt without too much trouble, if you used .net with C#.
On the other hand you could use your knowledge in .net and use Mono. It's an open source library for running .net code in other platforms, It's not equal to .net (doesn't include all the libraries) but could solve your problem.
Hope my answer helps you.
Xojo is pretty easy to use and lets you make native Windows and Mac apps from a single source project so you might want to take a look at it.

DNP3 with VB.Net

I am looking for a good DNP3 library for .NET/VB applications.
Any recommendations?
Thanks,
The open-dnp3 project has recently added .NET bindings:
code.google.com/p/dnp3
Automatak maintains a fork of the opendnp3 library with .NET bindings:
http://automatak.com/opendnp3/
We have heard from users that opendnp3 significantly outperforms the TMW library for large master integrations.
Opendnp3 is Apache-licensed (free-to-use), but commercial support is available if you get stuck.
All I could find with a Google search was Trianble MicroWorks' .NET Protocol Components.
It looks like they're not exactly on top of the latest technology (it lists itself as .NET framework 2.0 compatible), but I wasn't able to find anything else that looked terribly promising.
I've managed to build the Automatak version of this library:
https://github.com/automatak/dnp3
and use the .NET bindings with C#, though they would work equally well with VB.
OpenDNP3 from automak is available in Nuget, but you should install 32bit openssl application to able to load it.It installs two required .dll files.

Is the Reactive Framework (RX) available for use in Mono yet?

Been searching but the only thing I found was http://evain.net/blog/articles/2009/07/30/rebasing-system-reactive-to-the-net-clr which I got to work, but it feels like there should be a simpler way, specially since rx was first release back in mid 09.
You can now download it for .NET 3.5SP1 and .NET 4, so I wouldn't be at al surprised if it just worked against recent releases of Mono - no Silverlight doohickies required at all.
Having said that, I haven't tried it at all against Mono :)
Last time I tried, it did not work since one of the assemblies referenced either a native win32 dll or some framework dll not implemented by mono. However, there has been at least one release of Rx since I tried.
Yes, although I haven't tried it myself.
You can find mono-reactive at https://github.com/atsushieno/mono-reactive.
I've been playing around with it for a while and I've found that the .NET 3.5 SP1 binaries from Microsoft work on Mono 2.6.x. However, as of yet I haven't been able to get the .NET 4 binaries to work. It seems they expect IObserver/IObservable (possibly other stuff?) to be present in mscorlib.dll, which is not the case in Mono 2.6.x. Unfortunately this means no covariant/contravariant versions of IObservable/IObserver under 2.6.x.
Haven't yet dug through Mono's svn to see if I could get it working that way.
If you'll look at .gitmodules of mono repository you'll find reference to external RX repository which I expect will be the part of future mono distributions (Mono 3.0.1 doesn't contain it yet).

Are XmlMtomReader and XmlMtomWriter fully implemented in Mono project?

I'm working on a cross-platform solution currently. The solution uses XmlMtomReader and XmlMtomWriter from .NET framework 3.0.
Now i need to know if these two classes (and all the nessasary infrastructure around them) are fully supported in Mono project from the porting-it-to-linux point of view. :)
You can check it on the mono status:
http://go-mono.com/status/
You can also check your code using the mono migration analyser
http://www.mono-project.com/MoMA
I checked they are currently not implemented
The APIs are available on the current Mono 2.6 preview, but they are not available on the 2.4 release (the current official release).