I am thinking of developing a website using the ASP.Net MVC framework on Linux. I would like to know:
what are the best practises for developing such a site (are they any different for mono/ Windows)? any gotchas I should be aware of any (material diffeences) - eg missing/proprietary libraries/componenst between Mono and .Net are there any special directives, modules required to run Mono with Apache? Are there any performance differences between a site hosted on Windows/IIS and Linux/Apache? I intend to do most of my development using VS Studio - can the site be developed using VS and then deployed on Linux? I am aware that this question has been asked several times here on SO. However, most of the questions date back to 2008 or 2009 - which is a very long time in internet time. Things may have moved on since those answers - so those answers may no longer be relevant.
I have to state that I am NOT interested in hosting the site on a Windows server - so I am only interested in what works for a Linux server deployment.
I'am currently working on a MVC 4 app and we are using Mono. If you are just planning to have a basic website, you should go for it. But for more complex flows, honestly, I think you should do a little bit of research first, to see if the features you want to implement are supported in Mono. Things you should consider:
only a set of restricted libraries are supported on mono ( for example, right now we are having some issues due to the fact that the mono libraries (Novell and DirectorySearcher) for LDAP do not support pagination) the developing environment will be different than your server env ( I am using Visual Studio, we managed to pass this limitation by adding a lot of logs) we do our publish using FTP, so yes, you can deploy it from VS, using a publish profile set up for FTP it's free, but it will take a lot of time to research & do special thinks just for the sake of Mono not a lot of documentation available, because not a lot of people use it, so if you have a specific problem, it will be more difficult to solve
My experience is from 2011, but I am pretty sure you will have to experiment to see works and what doesn't - that's my experience with Mono.
Most of your questions are extremely broad and I think your question will be soon closed.
As for your last question this was the way I did it and it worked (develop in VS->deploy to Linux), but you must be aware that:
just because your code will work in the VS debugger it doesn't mean it will work when deployed; there is no one-to-one mapping between Mono and .Net. Even when things work it doesn't mean they will work the same way. For example the implementation of the encryption code used for http cookies was very different between mono and .net.
链接地址:
http://www.djcxy.com/p/90054.html
上一篇:
基于Mono可伸缩性的ASP.NET
下一篇:
Linux / Mono上的ASP.Net MVC