Developing a web app with Mono (opensource .NET) any examples?
Asked Answered
C

2

7

I am a Java, Scala, Python web app Linux guy. I want to play around with Mono (particularly F#) for web development.

I am just looking for an example web application written in Mono perhaps in Github (any CLI language is fine). I have tried googling and cannot find a good starting point (or if its even possible).

From what I gather I could sort of combine:

  • Fast CGI (nginx, lighttpd)
  • Mono
  • Spring framework .NET (I can't even tell if it will work on Mono)

Advanced apologies if there is a glaringly obvious resource (web site) that I missed.

(useful site: http://www.tryfsharp.org/Resources/GetMono.aspx)

Chinfest answered 24/4, 2012 at 16:11 Comment(3)
Not a Linux guy, but have you considered WebSharper? It seems to be the preferred choice for F# web development. Alternatively, you could put the logic in an F# lib and reference that from a C# ASP.NET/MVC project.Neogaea
I did see that a while ago when it was younger. I need to check if it works on mono. F# is totally bad ass. I like it better than Scala.Chinfest
afaik there are some issues with spring.net for mono; see the bug tracker, with an issue "add mono support".Tameika
C
5

To get F# dev environment for Mac/Linux setup:

For Ubuntu 12.04 specifically:

To Get Fsharp to work with MonoDevelop 2.6 or greater you have to use one of forks of:

Nancy looks like a good URL routing option which is all I really need:

And for F# Mono stuff for Nancy including Djano templating:

You can use the command line NuGet install tool (which is basically like Javascripts npm or Java's maven):

Once I install the Fsharp Powerpack I should have in theory LINQ to use for persistence.

And If Nancy does not work out there appears to be a standard called OWIN (it appears to be analogous to Python's WSGI).

Other OWIN compliant projects: http://owin.org/#projects

UPDATE

Looks like ServiceStack has some good stuff also and seems to be gaining some traction. In terms of Mono you mainly want to look at daemon doc.

Chinfest answered 30/4, 2012 at 14:48 Comment(0)
F
3

Check out XSP (about halfway down this page)

Mono & ASP.NET

And besides WebSharper which Daniel mentioned there's also Bistro.

Hope that helps.

Fly answered 24/4, 2012 at 16:49 Comment(2)
That does help. I feel dumb for not finding that page on the Mono site.Chinfest
I may have to just roll my own with XSP. Maybe I can get Spring.NET to had some persistence support.Chinfest

© 2022 - 2024 — McMap. All rights reserved.