12 ms·
Mono 3.2.7 is out
- romanovcode 13y agoMVC5 still not working tho. Good thing we have Nancy. Edit: Seems like many do not know about Nancy, check it out, some even say it's better than MVC. The good side is that it's 100% compatible with Mono because they run tests against it too so you can host your C# websites on Linux. Github: https://github.com/NancyFx/Nancy https://github.com/NancyFx/Nancy
- rjzzleep 13y agodidn't know mvc5 was out. but i can tell you mvc4 with f# was nifty weeeee (as nifty as mvc can possibly be anyway)
- skrowl 13y agoFirst time I've heard of Nancy. Anyone got a URL since it's name is so terrible that you can't google it?
- Yuioup 13y agoI had the same problem. I googled "Mono Nancy" and eventually found this: https://github.com/NancyFx/Nancy https://github.com/NancyFx/Nancy EDIT: It seems to be a .NET clone of node.js
- skrowl 13y ago.NET clone of node.js would be nice, because I like the idea of node.js but not enough to ditch all my .NET stuff (especially entity framework).
- chadzawistowski 13y agoEdge.js might interest you. It's an interop library for .Net and node.js: http://tjanczuk.github.io/edge/#/ http://tjanczuk.github.io/edge/#/
- tracker1 13y agoI think that the LINQ integration with EF is nice.. but EF in and of itself isn't all that great imho... Most of what it does is generate types to correspond to your database tables. When you use a language with real variable types, it's less of an issue... If you really want it, you could shoehorn generators and other db platforms into the hyena[1] package. In general, I've found that using databases tend to be much more straight forward under node, and that using ORM tools are less necessary. [1] https://www.npmjs.org/package/hyena https://www.npmjs.org/package/hyena
- j_s 13y agoC# (.NET4+) has real variable types, and a library to use them for database access. Using Type dynamic - http://msdn.microsoft.com/en-us/library/dd264736.aspx http://msdn.microsoft.com/en-us/library/dd264736.aspx https://github.com/robconery/massive https://github.com/robconery/massive
- tracker1 13y agoWhen you use dynamic, you lose the biggest advantage of C# in general, intellisense in VS. Don't get me wrong, it can be great to use dynamic at times... I just feel you're losing the advantage that VS/C# give you when you do, so you may as well be using something else. (I like node.js)
- lucian1900 13y agoThere's nothing in node.js that you can't get with .NET/Mono except for JavaScript, and even if you must run JS for some reason there are some solutions (like IronJS).
- nbevans 13y agoEntity Framework is really not a good excuse. .NET has lots of great things going for it. Entity Framework is firmly on the "enterprise .NET" list of such items though. .NET has always been able to do what Node does anyway. It has had HttpListener since v1.0...
- mattmanser 13y agoThink you'll be getting a shock in a couple of years if you think the EF is enterprise. It's changed massively and coding without it is becoming a little like coding javqscript without jQuery. You can do it, but why bother writing all those crud operations yourself?? Even with complicated SQL you can hand roll it and then tell the EF which class you're.returning and it'll handle all the boring `rs.GetInt(rs.GetOrdinal("ID"))` crap.
- PallarelCoedr 13y agoOWIN will give some of what you are looking for.
- martydill 13y agoI started something along these lines a while ago. Haven't touched in quite some time though. https://github.com/martydill/node.fs https://github.com/martydill/node.fs
- JohnBooty 13y agoNo, it's a Sinatra-inspired framework for .NET ...and it's quite good! (Thus the name. Frank Sinatra's daughter is named Nancy Sinatra)
- rjzzleep 13y agono it's not. it's a .NET clone of sinatra. it's a web framework. it has little to nothing to do with node.js. although .net have pretty powerful multiprocessing and async routines, and can therefore be connected to node.js without too much effort.
- skrowl 13y agoHow does it compare to Web API?
- JohnBooty 13y agoNancy, like Sinatra, is a general-purpose web framework. You could implement an API in it, or you could implement a user-facing website. Nancy and Sinatra are typically used for smaller sites. They're based around routes, controllers, and views but they don't (for better or worse) lock you into an MVC project structure like ASP.Net MVC or Rails. Web API, by comparison, is pretty much "just for implementing a web-based API" and not something you'd want to use for a user-facing web application that serves up HTML pages.
- hhandoko 13y agoServiceStack [1] is a closer comparison to Web API. A lot easier to set up and runs in Mono, but not free (although it is open source [2]). [1] - http://servicestack.net http://servicestack.net [2] - https://github.com/ServiceStack/ServiceStack https://github.com/ServiceStack/ServiceStack
- brokenparser 13y agoIf you don't mind me asking, I'm stuck trying to get the project templates to work with Monodevelop 4. I'm using this repository to run the latest Mono and Monodevelop on Fedora: http://download.opensuse.org/repositories/home:/tpokorra:/mono/Fedora_20/ http://download.opensuse.org/repositories/home:/tpokorra:/mo... When I open the vsix file, all I get is a hexdump. I also tried installing it as an add-in, but it doesn't appear to accept vsix files. The goal is to get past step one of these instructions: https://github.com/NancyFx/Nancy/wiki/Introduction https://github.com/NancyFx/Nancy/wiki/Introduction How to make this work, pretty please?
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- Thieum22 13y agohttp://nancyfx.org/ http://nancyfx.org/
- deleted 13y ago[deleted]
- profquail 13y agoI haven't tried them yet, but here are some directions I found (on /r/dotnet) a few days ago for tweaking MVC5 so it runs correctly on Mono: http://curtis.schlak.com/2014/02/04/setup-asp-net-mvc-4-on-monodevelop-4.2.html http://curtis.schlak.com/2014/02/04/setup-asp-net-mvc-4-on-m...
- Xdes 13y agoWhat *nix needs is an OWIN compatible web server.
- oblio 13y agoFrom the FAQ: https://github.com/owin/owin/wiki/faq https://github.com/owin/owin/wiki/faq - OWIN is inspired by rack, WSGI and node.js. I'd say there are plenty of alternatives to OWIN (and the .Net stack) for *nix. That's probably why there's not much interest around Mono, too.
- jongalloway2 13y agoI've heard Nowin runs well on Mono (haven't tried it yet myself). https://github.com/Bobris/Nowin https://github.com/Bobris/Nowin
- wintersFright 13y agoMiguel tweeted this a week ago: NoWin, Nancy, SignalR & Lego on the raspberry pi: https://www.youtube.com/watch?v=s_ZQtiupyzE https://www.youtube.com/watch?v=s_ZQtiupyzE
- damianh 13y agoThere is also Fos (FastCgi Owin Server) https://github.com/mzabani/Fos https://github.com/mzabani/Fos
- brokenparser 13y agoNeat! It even almost works! http://i.imgur.com/f1HjoNW.png http://i.imgur.com/f1HjoNW.png SO close...
- voltagex_ 13y agoLooks like the Owin dependencies didn't come down - does NuGet run under MonoDevelop?
- manuletroll 13y agoNancy is indeed an excellent framework, I use it for practically every web project at my day job these days.
- yawgmoth 13y agoOn [1], what does the underscore mean? public SampleModule() { Get["/"] = _ => "Hello World!"; } [1] http://nancyfx.org/ http://nancyfx.org/
- ntnj 13y agoUnused parameter for lambda function.
- SideburnsOfDoom 13y agoThis is the most accurate reply. The expression Get["/"] = _ => "Hello World!"; is actually of the form a = b; Where "a", i.e. "Get["/"]" is an array-like property (http://msdn.microsoft.com/en-us/library/2549tw02.aspx http://msdn.microsoft.com/en-us/library/2549tw02.aspx ) and the "b" value assigned to it is an anonymous function with one parameter, i.e. _ => "Hello World!" In Nancy these handlers are of the type Func<dynamic, dynamic> ( http://msdn.microsoft.com/en-us/library/bb549151(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/bb549151(v=vs.110).a... ) The parameter could be given any legal name, but an underscore is a convention meaning "I am not using this param".
- damianh 13y agoIt's the 'Dynamic Dictionary' [0]. It's usually called 'parameters' but it's idiomatic in dotnet to name lambda input parameter '_' if don't use it in your expression. [0] https://github.com/NancyFx/Nancy/wiki/Taking-a-look-at-the-DynamicDictionary https://github.com/NancyFx/Nancy/wiki/Taking-a-look-at-the-D...
- romanovcode 13y agoIt's dynamic path element. public SampleModule() { Get["/{id:int}"] = _ => { int id = _.id; return "Parameter ID is: " + id.ToString(); }; }
- JohnBooty 13y agoAs others have said, it's idiomatic to name a lambda param "_" if you're not using it. To perhaps clarify a bit, here's what the Hello World example would look like if we added a second route that uses the lambda parameter, and a third route that does something else, and a fourth route that renders a view template. public SampleModule() { Get["/"] = _ => "Hello World!"; Get["/hello/{name}"] = p => ("Hello, " + p.name + "!"); Get["/something-complicated"] = _ => { // complicated stuff happens here return "OK... we're all done"; }; // A variety of template engines are supported Get["/my-resume"] = _ => View["resume.cshtml"]; }
- antihero 13y agoHow does Nancy stack up to ServiceStack?
- patja 13y agoWhat are some big poster-child success stories for running MVC on Mono in production?
- JL2010 13y agoRdio is probably one of the bigger success stories for Xamarin/Mono You can see a list here: https://xamarin.com/apps https://xamarin.com/apps
- coderguy123 13y agordio is using the xamarin tools for ios and android. mvc + mono website on linux success story - i haven't seen one.
- brokenparser 13y agoI'm trying to do that for a small community site but I find the documentation a bit lacking. I know I have to create a directory somewhere and write a web.config in XML but I'm still figuring out the rest. I may end up copying someones Github project and tearing it apart to see how things work in practice, or perhaps my RTFM skills are somewhat lacking lately. But if you'd ask me I'd say the widespread presumption all developers are running Visual Studio.NET with Nuget is part of why you haven't seen those success stories. On the bright side, I've heard good things coming out of ServiceStack. Apparently it shines in the backend web service department and works well with Mono. It's based on ASP.NET and since the requirements for my little project are fairly minimal, I think it's a bit overkill there. But it's still worth checking out for more demanding projects, IMHO.
- friism 13y agoI've created a Mono buildpack for Heroku that runs MVC amongst many other things: https://github.com/friism/heroku-buildpack-mono https://github.com/friism/heroku-buildpack-mono
- DrJokepu 13y agoI believe 7digital use MVC on Mono in production with success.
- skrowl 13y agoSTILL no Ubuntu packages. The official repos are back in 2.x.x land.
- profquail 13y agoYou can use this PPA to get updated packages for Ubuntu/Debian: https://launchpad.net/~directhex/+archive/monoxide https://launchpad.net/~directhex/+archive/monoxide
- romanovcode 13y agoWell compiling it from sources is not THAT hard. git clone git://github.com/mono/mono.git cd mono ./autogen.sh make sudo make install
- skrowl 13y agoThe idea of package management is more than "easy to install once". It's also "easy to keep up to date". For example, apt-get update; apt-get dist-upgrade and I just updated my packaged mono vs having to go find that there was a tagged update, then rebuild, etc.
- e12e 13y agoThat might be, but how do you then make a source-package of your program that compiles and installs successfully on the target distributions that don't have an up-to-date mono toolchain? Because while a developer might follow upstream, users shouldn't have to...
- e12e 13y agoIt's actually quite a bit worse than that. For instance, I successfully built and installed mono locally now, but am unable to run simple gtk-applications. git clone git://github.com/mono/mono.git mono.git cd mono.git ./autogen.sh --prefix=${HOME}/opt make get-monolite-latest # Need mono to compile mono make EXTERNAL_MCS="${PWD}/mcs/class/lib/monolite/gmcs.exe" make install export PKG_CONFIG_PATH=${HOME}/opt I can now successfully compile and run a command-line hello world, but a simple gtk-test (and winforms test) fail when attempting to run the examples. This probably has someting to do with linking and assemblies, but experimenting with PKG_CONFIG_PATH, GAC_PATH and MONO_PATH makes no apparent difference... cat <<eof > hello.cs using System; public class HelloWorld { static public void Main () { Console.WriteLine ("Hello Mono World!"); } } eof mcs hello.cs mono hello.exe > Hello Mono World! cat<<eof > hello-gtk.cs using Gtk; using System; class HelloWorld { static void Main () { Application.Init(); Window w = new Window("Hello Mono World!"); w.Show(); Application.Run(); }} eof mcs hello-gtk.cs -pkg:gtk-sharp-2.0 mono hello-gtk.exe > Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, (...)
- melling 13y ago"Performance under some benchmarks was improved by more than 20%." How is Mono's JIT performance compared to Microsoft's? Are they nearing parity?
- RyanZAG 13y agoThere doesn't seem to be many reliable benchmarks available. I'm not sure why. Here is an in depth benchmark showing Mono lagging very heavily behind Microsoft, but I have no idea if the gap has widened or shrunk since then. http://www.codeproject.com/Articles/212856/Head-to-head-benchmark-Csharp-vs-NET http://www.codeproject.com/Articles/212856/Head-to-head-benc...
- profquail 13y agoThat article is 2.5 years old; Mono has gotten significantly better since Xamarin spun off from Novell, and much progress has been made in the last 18 months or so. It would be interesting to re-run those benchmarks with the latest version of Mono though.
- RyanZAG 13y agoAFAIK Microsoft's .NET runtime has also made significant improvements in the last 2.5 years, so as I said, it's just a thumb-suck as to whether the gap has changed. Maybe this will get someone interested in doing some comprehensive benchmarking...
- TIHan 13y agohttps://github.com/fsharp/fsharp/issues/162#issuecomment-28072227 https://github.com/fsharp/fsharp/issues/162#issuecomment-280... I did a few benchmarks here. In recent experiences, .NET runtime is faster in most situations, but sometimes Mono can be faster than .NET. It all depends on what you are doing. In extreme cases, .NET is usually ahead. You also have to account for the JIT time. It's after the JIT that should matter.
- pjmlp 13y agoGreat work! Now if Unity would just update their runtime....
- TillE 13y agoThat situation is now verging on the comical. Is it really so hard to cut a new deal with Xamarin? Even if they can only offer the new Mono version for paid users in Unity Pro, they need to do something. If Unity go another major version still using Mono 2.6, they seriously risk losing ground among developers making CPU/memory-intensive games. Or even those concerned about optimizing for mobile platforms.
- muhmi 13y agoThe AOT improvements would be really helpfull on mobile.
- _random_ 13y ago"If Unity go another major version still using Mono 2.6, they seriously risk losing ground among developers making CPU/memory-intensive games. Or even those concerned about optimizing for mobile platforms." - that would be great! I feel they desperately need some competition.
- gamblor956 13y agoI recall reading somewhere that Unity wasn't going to upgrade its Mono framework until Mono 4.0. I can't find the link, so I'm hoping it was just a rumor.
- pjmlp 13y agoThere is already a 3.2.8 out, it seems. http://www.castlesoft.com.au/new-in-mono-328 http://www.castlesoft.com.au/new-in-mono-328
- romanovcode 13y agoWhen you compile from source it tells you it's 4.0.0
- pritambaral 13y agoIs that Mono 4.0.0 or .NET 4.0?
- romanovcode 13y agoMono. I think it's a bug or something. Mono JIT compiler version 4.0.0 (master/c198a39 Pk feb 21 22:02:35 EET 2014) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen
- skrowl 13y agoI JUST (today) build from source on github and got this: mono -V Mono JIT compiler version 3.4.0 (master/8f2d3ea Wed Feb 26 11:59:41 EST 2014) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen
- CoffeeDregs 13y agoThe lack of benchmarks comparing Mono to the CLR (C# VM) is very frustrating. Apparently, the lack of benchmarks is due to Microsoft's license forbidding the publication of benchmarks without Microsoft's permission (common practice among commercial vendors?). Fortunately, we have the Benchmarks Game and that shows Mono performing well [on synthetic benchmarks...] when compared to a variety of languages. vs Java: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=csharp&lang2=java&data=u64q http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t... vs Go: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=csharp&lang2=go&data=u64q http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t... vs Python: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=csharp&lang2=python3&data=u64q http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
- nswanberg 13y agoThanks. It took a little while to find, but if anyone is interested in comparing Mono to the CLR for themselves (and likely do some work to adapt the system to Windows), here's where to start: http://benchmarksgame.alioth.debian.org/play.php#languagex http://benchmarksgame.alioth.debian.org/play.php#languagex
- igouy 13y agoThe measurements scripts provided on the benchmarks game website are written in Python 2.5+ and worked fine on MS Vista using: - Python 2.5+ - Python Win32 Extensions (for win32 process monitoring) - GNU Make for Windows - GNU DiffUtils for Windows Download bencher.zip from: https://alioth.debian.org/frs/?group_id=100815&release_id=1876 https://alioth.debian.org/frs/?group_id=100815&release_id=18...
- mands 13y agoI think if you run a recent Mono, with the sgen GC using the LLVM backend and turn off array bounds-checking performance is supposed to be pretty impressive. (I recall Miguel saying within 10-20% of C++). Having said that, I've had no performance issues running 3.2 on Linux in general.
- 13y ago
- edwinnathaniel 13y agoI tried Mono a few months ago because I was thinking of writing cross-platform (ish) desktop GUI application. My dev platform is Ubuntu so I downloaded MonoDevelop and load the GtkSharp example (or maybe it was just the skeleton project template). Hit compile, bunch of errors showed up. Apparently I don't have the GTK libraries. Googled a bit, it looks like I had to download gtk-dev, compile, and do a bunch of things before I can run a "Hello, World" GTK sharp app. I wade through the net and the tutorials and documentations are either for older versions or just weren't there (for example, integrating with NuGet). It's a bit sad because I'm sure there are tons of engineering effort went into Mono but it just doesn't feel polished enough. It's open source but lately I felt that it's more of a teaser for Xamarin than anything else.
- curveship 13y agoThat sounds like the kind of growing pains experienced when you set up any new largish development environment. If we're up and running with ecosystem X, we forget how much work it took to get there, because it was amortized over time. When we start out with a new ecosystem Y, we spend a lot of time in the steep part of the learning curve before reaching Hello World. Java is, IMHO, the worst for this. Just curious, I've never installed Mono, but my first thought would have been to look for a PPA. Are there none out there? Let someone else figure out the dependencies and configs for you.
- jongalloway2 13y agoLooks like maybe this one - latest Monodevelop PPA, last built 13 hours ago: https://launchpad.net/~keks9n/+archive/monodevelop-latest https://launchpad.net/~keks9n/+archive/monodevelop-latest
- alkonaut 13y agoAn IDE should aim to pass a simple UX test which is: after installing the IDE with no prerequisites and no further configuration (no I don't want to create an env var, specify where I keep my compiler or ...), a hello world program should be possible to run straight away.
- baldfat 13y agoI am still so frustrated that Mono got lambasted for being a M$ trap. It was the biggest FUD I have ever read. Hope to see mono return to use in Linux community again.
- nbevans 13y agoRoslyn and the MS/Xamarin partnership suggest Mono will be benefiting in some big ways in the coming year.
- Guillaume86 13y agoI'm a lot less optimist, I think it will just focus Mono development on the mobile platforms (Xamarin on Android/iOS) but will do nothing good for desktop or server use.
- forgotAgain 13y agoHow is that a reasonable conclusion? Microsoft has a new CEO. It's an unpredictable situation where anything could happen. Betting your business on perceived, not even openly stated, marketing suggestions at this time seems overly risky.
- nbevans 13y agoSo baking in Xamarin as a compile target in Visual Studio. Conciously changing their licensing terms of various BCL NuGet packages to allow their unrestricted use on Xamarin/Mono platforms... yeah, there's clearly no hints at all as to what they're up to. Read between the lines man.
- rbanffy 13y agoWhy? The nix world never suffered from lack of decent languages, compilers, development tools, ecosystems and runtimes. The only benefit Mono gives nix users is to write software that's easy to run on Windows and that barely registers on most priority lists. It's been, IIRC, 6 years since I last wrote a "real" desktop app. I did it in C#, but Mono couldn't run it because it relied on Windows-only GUI components. Happily, it was never intended to be deployed on non-Windows environments and everyone was happy. If I needed to write a desktop application (that's so 90's) that runs identically on both Windows and Linux, I'll just write it in Java.