5 ms·
ASP.NET MVC 3 Release Candidate
- aymeric 16y agoWith this release, the .NET world is getting pretty close to the Ruby on Rails development experience: * dynamic keyword * NuGet <=> gems * MVC scaffold <=> rails g scaffold The only reason why I keep developing my personal projects in RoR is because of Heroku. Azure is still too expensive.
- latch 16y agoThe mvc team is a breath of fresh air, no question. But I'm surprised to hear someone who knows RoR say that they are "pretty close". There's more to dynamic programming than the dynamic keyword. I don't want to get into which is better, but to say that C# is even in the same league as Ruby for dynamic programming, because of the dynamic keyword, is wrong - if for no other reason that properties from anonymous types (which dynamics are built on top of) are internal. Read meta programming Ruby, or try doing extensive [tb]dd with both, and you'll see how different they are (hint, you don't need DI frameworks in Ruby). Ruby gems has a rich history, a strong community, and a proven track record. Every ruby developer has, and uses gems. Most packages are in known repositories. Gems has been extended to solve other problems (bundler). NuGet is a good and necessary start, but, again where you say "pretty close", I'd say "pretty far".
- contextfree 16y agoAre you sure C# dynamics are built on top of anonymous types? My understanding is that they are actually more like an untyped IQueryable, with syntactic sugar that turns dyn.Blah into the (rough) equivalent of dyn.Select(Blah).
- latch 16y agoSorry, you are right. What I was referring to was a dynamic referencing an anonymous type (which is the same as anything else referencing an anonymous type)...Which I still wouldn't write off, because its a fairly common scenario, and even more so when used with dynamics.
- lucisferre 16y agoYeah you could go on for quite a bit with the list of things the Rails experience has over .NET MVC. 1. Ease of deployment, Heroku compared to IIS 2. Scaffolding generation, not as easy to use, fast, or smart. Extremely hard (read impossible) to customize by comparison as well 3. Routing setup, not as clean and nice, harder to customize (though there are some routing projects out there that help) 4. No database migration story I could probably go on if I spent much time thinking about it and I'm a Rail noob compared to my .NET MVC experience.
- luffy 16y agoRoR is definitely more of a full web stack than ASP.NET MVC, which to me feels like a micro framework layered over top of whatever in the the world ASP.NET is. Personally, I like ASP.NET MVC's micro fx feel though. You hinted at Ruby not needing DI - for me, that's the biggest advantage when choosing a dynamic language (in my case Python) over C#. IMO, there's something about using DI that just feels wrong (don't mean to start a flame war over that). Anyway, that's why I use F# in .NET land: the type inference provides the best of all worlds. No need for DI, light syntax, and great runtime speed. F# sucks w/ ASP.NET MVC though.
- ronnier 16y agoHere's a interesting technical interview with Andrew Nurse who created the Razor View Engine for ASP.NET MVC 3. In the interview, he said Razor was his first project once starting at Microsoft. http://channel9.msdn.com/Shows/Going+Deep/Andrew-Nurse-Inside-Razor http://channel9.msdn.com/Shows/Going+Deep/Andrew-Nurse-Insid...
- clistctrl 16y agoThis is great, I've been really excited for the razor engine! Also i'm glad to learn about Output Caching :)
- fiveo 16y agoI've just started to scratch the surface of ASP.NET MVC 2.0 and they just release RC v3? Nuts.
- abrudtkuhl 16y agoI know! They iterate pretty fast. I love it but it's hard to keep up
- DougBTX 16y agoIf you've not read it, a classic Joel article: Fire And Motion http://www.joelonsoftware.com/articles/fog0000000339.html http://www.joelonsoftware.com/articles/fog0000000339.html
- sk5t 16y agoAn interesting article... applies very well to the LINQ2SQL / EMF / ADO.NET quagmire. Not so much to fairly mild iterations of MVC.
- fiveo 16y agoWhat about ASP.NET, ASP.NET 1.1, ASP.NET 2.0, ASP.NET AJAX, and now ASP.NET MVC + varieties of view engine? What about WinForms, WPF, Silverlight?
- icey 16y agoMVC3 + code-first from the EF4 CTP makes throwing together proof-of-concept apps very fast (and painless!). You don't have to do much besides design your models and you get a functioning site to start with.
- bsk 16y agoIt is fast, but I have a couple of problems: 1. A technical bug - EF often fails to update SQL Server DB on model change (RecreateDatabaseIfModelChanges). 2. More general - the generated UI is completely data centric, while even MS people advocate for business centric, task based UIs.
- icey 16y agoI agree with you completely regarding model changes; I hope it gets fixed in the next CTP (or beta if they're close enough). As to the generated UI, it's pretty similar to what you get with Rails scaffolding. I haven't spent a ton of time with it so you may know better than me, but it's nice having the default views generated while wiring everything together and then changing the generated views to build something a little more useful (the same way you'd do with scaffolded Rails objects).
- brunomlopes 16y agoAs for point 2., I think you can generate the UI from any model class, right? So you can create a model for each task and generate the scaffolding for that particular model.
- bsk 16y agoHmmm, interesting idea. Lets say I have a 'change product price' task. ASP MVC will generate controllers/views for CRUD operations and a list. Those don't look very useful.
- brunomlopes 16y agoActually, if your model has ProductID and NewPrice you can create just the Update controler/view for that. Put some validation on the model, and the scaffolding is done. Or you could write the form itself with the "EditorFor" helper methods, either for the whole class or for each field. It's not perfect, but good enough for a quick prototype or first version.
- nathanwdavis 16y agoSeems like not a big deal, but I think the session-less controller support is a nice touch. Good job!!
- Devilboy 16y agoAnyone here using MVC with F#?
- contextfree 16y agoI'm using an F# domain model assembly. A problem is that MVC's model binding infrastructure assumes model types with mutable properties (I had to write custom model binders to get around this).
- Devilboy 16y agoI wonder when Microsoft will start paying attention to these details, I mean F# is supposed to be a 'first class citizen' language in Visual Studio now.
- rbanffy 16y agoSimple question: when to use ASP.NET MVC 3 and not Rails, Django, Flask, Cake/PHP or some other MVC framework?
- tansey 16y agoI think you shouldn't over-think the question. If you already know C# but are new to Ruby/Django/PHP, it's probably better to go with ASP.NET. I personally go with ASP.NET for the intellisense and refactoring support of Visual Studio. The main drawbacks for me are that deployment is more difficult and expensive than other frameworks. If only I could just "azure push"...
- rbanffy 16y ago> If only I could just "azure push"... My bet is that it will be implemented as a button with the Azure logo on it.
- lucisferre 16y agoYeah my biggest pet-peve of being a .NET developer is deployment. It's as if we were never expected to actually ship something in .NET
- luffy 16y agoFor kicks, I deployed the same app on Ubuntu 10.04 and Windows 2008 R2 micro instances on AWS. I chose the plain Windows instance - with no software ( ie, IIS & .NET) pre installed. No database is used in this app. I had the mono/Ubuntu version up and running in about 30 minutes. The longest part of the install was that I chose to use Mono 2.6.7 which isn't officially supported, so you need to do some work to install it. The app was deployed using FastCGI and Nginx. It took about 90 minutes to get the Windows 2008 version running. Most of which time was spent waiting for the instance to start and waiting for the bloody Platform Installer (worst app ever!) to do whatever it does. The moral of this story: the Windows micro instances are unusable. But to scale vertically, use Windows. To scale horizontally, or if you are cheap||frugal, give mono/Ubuntu a shot. Can't wait to see what moving to LLVM is going to do to mono's performance.
- 16y ago
- jtdowney 16y agoWord of warning that I found and ScottGu confirmed in the comments of his blog post, if you have the Async CTP bits installed and you install MVC3 RC you will lose the ability to use the watch windows during debugging. Just a heads up to make sure you only have one or the other installed for right now.