Solution for web designer using an OSX to develop an ASP.NET MVC project? - asp.net-mvc

The project is developed using ASP.NET MVC framework and heavily relies on .NET 3.5.
What would be the best solution to allow a web designer, who is using OSX, to develop the site's UI? Basically he would just need to edit the aspx, css and js files, but also run the web application locally.
I've thought of some possibilites:
Install parallels/vmware/bootcamp and set up everything as you would for windows. Bad: it would be slow, OSX user doesn't like working in windows
Set up Mono and run the webapp on that. Use whatever tool you want for editing the front end files. Bad: does mono support MVC framework, .NET 3.5 and database connections? Unfamiliar platform, so possibly a lot of work setting it up, if it even will work.
Run the site on a separate server, and edit the front end files via network drive. Bad: our development server is so slow that seeing the changes takes too long...
Do you have other ideas or comments for these options?
Thanks!

You could try using a virtual machine. VirtualBox is a free one and is quite simple to setup. The only downside is that you need your own copy of Windows...

What you really need to do is have your web designer mock up the pages in static HTML, CSS, and JavaScript first (in their environment of preference.) Once that's done, adapting the markup to the ASP.NET project should be easily doable by yourself or the designer on a Windows machine (or virtual machine, your preference).

The MVC framework is part of Mono. Ares Technica has an article about the MVC framework and running it on Mono.
While it seems that some people were able to hack the framework to work on Mono back in March and April of this year, Microsoft has since released the MVCframework as open source and it is now fully supported by Mono as of the 2.4.2 release.
Here is a link to the most recent Mono releases along with Virtual Machine images that already been pre-configured to give you the best development experience.
Good luck with your project and hope this helps some.

Related

How far is Mono with MVC3 and EF Support?

I have a really neat NAS box from QNAP (http://www.qnap.com) and I was just wondering if I can get my MVC3 apps working on it.
I see from the QNAP forums that the latest version will run on a QNAP box (assuming I can figure out the linux commands) but my question is more specific to mono ...
According to http://www.mono-project.com/Compatibility there is no support for EF ... do they mean that any code using EF (already compiled) will not run?
This will likely mean my apps wont work on Mono (shame).
There is also no mention of MVC3 on that page which implies they either forgot about it or are saying that the full support for C# 4.0 and ASP.Net 4.0 covers this.
If anyone has any experience with running MVC apps on a linux box can you let me know if any of this possible to get running / workaround please?
MVC 3 works but they don't ship it by default:
ASP.NET MVC3 Support
Currently code that uses Entity Framework will not run under Mono. However, Microsoft recently open-sourced Entity Framework and there is now a drive to get it working on Mono. Hopefully it will be done soon:
Mono 2.11.3 is out

upgrading asp.net mvc apps

Upgrading MVC apps done with VS 2010 has been the biggest issue for me. I have an application that I use to run various websites and I maintain and develop this application separetely then upgrade the sites based on it. A lot of things might change during development of a new version - new Views, new Controllers, stuff added into JS files, updated stylesheets etc.
I've searched around the web but nothing useful came up besides this Haack's article but no source code is available.
I also tried making a Nuget package for the entire MVC app and while this works, it doesn't package up the resource files (an issue within Nuget itself) and my apps rely on those so until this is fixed I cannot use this method.
I checked how others do it and this pretty much summarizes Umbraco's way and it's the same painful way of a dozen of steps like I do it now.
Do you have any good advice on it?
You don't specify the target OS, but I create native packages, i.e. .deb for Ubuntu servers.
However this still means you need to specify all files, manage configuration, upgrade database schemes. But if you test this on a CI server it becomes more reliable, and you can do it iteratively. This is all part of good deployment practice. I can recommend the Continuous Delivery book.

How to easily include common code across multiple ASP.NET MVC sites

At work we have about 30 legacy sites which run from a common set of code, currently these sites are in cold fusion. For this common code we have one project, then in IIS we set up a virtual directory to include the common code into each site. This works great, as changes to core logic can be made in one place, and its replicated through all the sites. And as all of our sites are hosted on the same servers, we can also just deploy the common code and all the live sites are updated, we don't need to release every site.
However we are in the process of re-writing our sites and core code into c# and asp.net MVC 3. Its going well, except when we update the core code, we are currently copying the dlls into each site, recompiling, then releasing each site.
This is fine while we only have a couple of sites re-built with the core code, but is going to be very painful when all 30 of our sites have been re-built in .net.
Does anyone have any ideas of how to easily use and delpoy common code without having to copy the dlls to every site?
So far we've tried:
- using a virtual directory of the dlls (doesn't work as site code needs to be re-compiled, and IIS doesn't seem to like it on .net sites anyway)
- deploying our common dlls to the GAC - this is an issue as the third party libraries (eg nHibernate) aren't signed, so can't add them to the GAC too.
Thanks
Saan
The easiest way is to automate your update procedure.
But if you want to rid of copying at all then you can try thing named "codebase".
Here is description of "How the Runtime Locates Assemblies" and details of "Locating the Assembly through Codebases or Probing" http://msdn.microsoft.com/en-us/library/15hyw9x3(v=vs.71).aspx
Interesting.
I also saw in the next .net relase they have http://www.asp.net/vnext/whats-new#_Toc_perf_3 “Sharing Common Assemblies”
This will give us a couple of options to investigate thanks.

Creating a standalone ASP.NET MVC application for Windows XP

Is there a way to create an installable (ideally XCopy installable) version of an ASP.NET MVC application that will run in a standalone fashion on a Windows XP machine?
I don't mind installing SQL Server Express for this purpose, so I guess the question boils down to this: Can the Cassini web server that comes with Visual Studio 2008 be bundled with the application? Or are there other options?
NOTE: The installation is for demo purposes only, so there are no licensing problems. Also, I am suggesting Cassini because I don't know of a way to install IIS7 on Windows XP. I can't do major hackage on the registry to get this to work.
Not sure if it'll help, but you could definitely check out the UltiDev Cassini Web Server, which can be bundled with your app and should support what you need.
You can package, embed, bend fold and spindle CassiniDev with my blessings.
I have been told that it suits this purpose admirably.
I think this is a bit old, but check out http://msdn.microsoft.com/en-us/magazine/cc188791.aspx.
Also, the ComponentArt demos run on Cassini.
My company makes a product for this purpose called the Neokernel Web Server which includes several features that are missing from cassini like SSL support, logging, multi-threaded request processing, and the ability to start/stop/configure the server from your own process.
A free 30 day evaluation license is available for testing and evaluation purposes.
http://www.neokernel.com

ASP.NET MVC 1 and 2 on Mono 2.4 with Fluent NHibernate

I'd like to create an application using ASP.NET MVC, that should run under mono 2.4 (compiling will be done on a Windows box). Has anyone getting luck with this? Here is what I've already tried:
ASP.NET MVC on mono without any persistence model support, and using nhaml as the view engine
S#aml architecture, which is a quite good framework imho, but it depends too much on stuff, that are not working good under mono (like windsor)
The first part worked fine, I didn't encounter any major problems. But I couldn't get the second part working. It seems it's dependency on Castle.Windsor breaks the whole mono support (but there might be other parts too).
Therefore I decided to create an alternative framework, that borrows some of the ideas of s#arp-architecture, but designed to be working under mono (and if I'm able to do this I'll release it for the community of course). The controller and view part is working fine (not much magic here though, they have been always working), but I have some questions before I start job on the persistence part:
What NHibernate versions are working under mono? I've heard 1.2 is working fine. Does 2.0.1/2.1 beta work under mono?
Does Fluent.NHibernate and NHibernate.Linq work under mono? (for the latter it seems it needs some dependcies that aren't avaialable in mono)
Are there any good alternatives for persistence support to NHibernate under mono?
Alternative questions:
Are there any frameworks that have mono+persistence+asp.net mvc support already or am I the first one to think about this?
If you have already done this: what are your opinions on stability/usability?
Thanks for the answers
EDIT: Updated the framework to support ASP.NET MVC 2: http://shaml.sztupy.hu/
I am using mono 2.4 to run a asp.net mvc app + windows service.
Compatibility is very good. There are some bugs and differences than with windows but once you learn what they are it gets easier (there can be pain at the start!)
I am using NHibernate (2.1) FluentNhibernate, StructureMap, NBehave, Moq and open id lib and they all just seem to work as expected.
As for stability, since I have ironed out the major bugs in my code I haven't had any problems.
Usability, well it is a completely different platform so you need to come to it with an open mind and be prepared to leave behind the windows way.. the good news is that once you do that things get easier. Apache is a lot nicer than IIS and configuring and managing a linux box is just easier than windows.
I am pretty glad I choose mono.. sorry this is starting to sound like a PR drive - but I am just really happy with it!!
Okay. I started on a new project that incorporates the best from S#arp Architecture with stuff, that work on mono. Instead of T4Toolkit it uses a ruby script to do the generation job, just as with rails or merb.
To use install the shaml gem from github:
gem install shaml
Then create a new application:
shaml generate app AppName
And create resources:
shaml generate resource NewRes "name:string;date:DateTime"
S#aml Architecture project homepage: http://shaml.sztupy.hu/
GitHub project: http://github.com/sztupy/shaml/tree/master

Resources