Mono support

Nov 18, 2009 at 3:31 PM

I've managed to set up mod_mono on a Linux host I have and have the ASP.NET MVC sample application working flawlessly. I'd love to plug OpenForum into it, so I ran the 0.8 DLL through MoMA and found that there are 6 calls to methods that would throw NotImplementedException and 6 calls to methods decorated with [MonoTodo]. The throwing ones are:

  • void EnsureDatabaseExists (string) -> void DataContext.CreateDatabase ()
  • void EnsureDatabaseExists (string) -> int DataContext.ExecuteCommand (string, Object[])
  • void EnsureDatabaseExists (string) -> int DataContext.ExecuteCommand (string, Object[])
  • void SubmitChanges () -> void DataContext.SubmitChanges ()
  • void .ctor (string) -> void DataContext..ctor (string)
  • void .ctor (string) -> void DataContext.set_LoadOptions (DataLoadOptions)

The method calls that may fail due to [MonoTodo] are:

  • void EnsureDatabaseExists (string) -> void DataContext.CreateDatabase ()
  • void EnsureDatabaseExists (string) -> int DataContext.ExecuteCommand (string, Object[])
  • void EnsureDatabaseExists (string) -> int DataContext.ExecuteCommand (string, Object[])
  • void SubmitChanges () -> void DataContext.SubmitChanges ()
  • void .ctor (string) -> void DataContext..ctor (string)
  • void .ctor (string) -> void DataContext.set_LoadOptions (DataLoadOptions)

What are the chances of these problems being fixed in OpenForum? 12 problems in total isn't that much and should be possible to overcome one way or the other. Simply by submitting the MoMA report to Novell, it should help them focus on the problems found so they might be solved in the next release.

Could for example NHibernate be of any help in making the database creation stuff more cross-platform? I understand it if making OpenForum Mono compatible isn't a priority, but I'd love to help any way I can to make it so.

Coordinator
Nov 20, 2009 at 2:03 PM

Hey asbjornu,

It would be really cool to see OpenForum running on linux!

It looks like the NotImplemented methods are the same as the MonoTodo items, so I think there are really only 6 issues. Of those 6, the first three are used to automatically generate the sql .mdf file if it doesn't already exist. This is really just a nice "helper" utility, but is by no means required in order to use OpenForum. It could easily be removed with some #ifdef logic.

The other three are a bigger problem. It looks like Mono doesn't support LinqToSql yet. NHibernate (or equivalent) could potentially be used instead, but it would require a moderate amount of work. Unfortunatly, I don't have any time at the moment to make that change,but you are certainly more then welcome to take a stab at it.

If you would like to submit the list of issues to Novell, that would be great!

Please let me know how this ends up. I think OpenForum running on linux would be awsome.

Nov 20, 2009 at 2:41 PM
Edited Nov 20, 2009 at 2:43 PM

According to the Mono Roadmap, version 2.6 (slated for this month) should have full LinqToSql support. If the 3 top methods could be #ifdef-ed away, OpenForum can be fully supported on Mono/Linux in a month or so. That would be totally awesome! :)

PS: I already submitted the report to Novell.