Is there a perfect code generation tool to generate MVC Storefront? - asp.net-mvc

Does anybody know a good code generation tool (other than Subsonic because it doesn't support IQueryable in current version) to generate repository and other projects in a way Rob Conery worked in MVC Storefront?

Rob Conery has put out a Visual Studio plug-in that generates MVC code, using repositories that use IQueryable, although I believe the model is generated using Linq to SQL classes in visual studio, which wasn't the case in MVC Storefront.
You can find it here.

S#arp Architecture may be overkill, but if you haven't checked it out already, I would recommend. It has a very nice tutorial as part of the download as well as a working Northwind sample.

Is T4 the answer for your needs?

Related

Is there an official page for ASP.NET MVC Futures?

I am planning to integrate Mvc.Futures in my project, but am unable to find any official documentation for this library.
Official project page on nuget.org points to old asp.net project page on codeplex and even there is not so clear where information about Futures can be found.
I might be missing something, but would appreciate if anyone can give me pointers to the right place.
Thanks.
This is follow up on my own question:
I haven't found anything else related to Mvc.Futures after i posted this question, so i ended up using T4MVC which seem to get more love from MSFT than the Futures itself (lead developer of this template is MSFT employee David Ebbo).
We are using it quite successfully so far (more than 8 months) and i am pleased with the results.
For better integration with Visual Studio i am using AutoT4MVC extensions which runs the T4 templates on each change in the sections of the MVC app that require rebuild (such as Controllers, Content*, Views etc..)
To sum up - i would suggest that you stay out of Mvc.Futures for now and use T4MVC instead.

Code generation for .Net MVC 4.5?

I really hope that this isn't a duplicate post somewhere else on SO but I've searched long and hard and I'm coming up blank.
In PHP if you used a framework like CakePHP you could "bake" your project which would generate the code for your models, views and controllers using your MySQL database ERD (see here http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html). This saves tons of time and has become a requirement for me these days.
That said. I can't seem to find any information if a similar function exists either in Visual Studio 2012 or the MVC 4.5 framework. Does anyone know if I can "bake" a .Net MVC 4.5 project from my DB schema?
Thanks in advance for any help.
It is called Scaffolding. You can read a nice tutorial on codeproject: Database First Development with ASP.NET MVC Scaffolding and Entity Framework

Entity Framework 4.0 - Code only Reference

I am trying to learn EF 4 and its code only features. I tried the following great articles and was able to make a sample application.
http://blogs.taiga.nl/martijn/2009/11/22/entity-framework-4-0-a-fresh-start-with-demo-application/#reply
http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx
But I am looking for a good reference library / website on Code only feature. I tried searching MSDN but couldn't find it.
Please help.
Thanks a lot.
There might not be many of them yet. Code only is still in beta-stage and was not released with Visual Studio 2010 RTM. If you plan to use it in a productive environment you should consider using fluent nhibernate or waiting to the final release.
http://blogs.msdn.com/efdesign/archive/2009/06/10/code-only.aspx
http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx
Here is a blog article with fully working sample code in ASP.NET MVC 2 in a tutorial form that shows how to use both EF 4.0 Code First and in conjunction with ASP.NET MVC 2. It discusses advanced features of EF 4.0 Code First such as mapping to existing databases and customizing the standard conventions in EF 4 Code First.
The link: http://theminimalistdeveloper.com/how-to-map-to-existing-databases-in-entity-fr

Migrating Project from ASP.NET MVC1 to ASP.NET MVC2

I am currently using ASP.NET MVC1 in my project but now i am planing to move on ASP.NET MVC2.
What are the changes i need to do in my project to change MVC version? just need to change System.Web.MVC dll with MVC 2 dll or any other changes i required?
This is the release post on Scott Gu's Blog: http://weblogs.asp.net/scottgu/archive/2010/03/11/asp-net-mvc-2-released.aspx
This tool performs all the re-referencing for you:
http://weblogs.asp.net/leftslipper/archive/2010/03/10/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2-rtm.aspx
You might also want to grab the release notes off there MSDN download page: http://www.microsoft.com/downloads/details.aspx?FamilyID=c9ba1fe1-3ba8-439a-9e21-def90a8615a9&displaylang=en
There are a couple of breaking changes to watch out for.
The easiest is to follow instructions from here http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/ If this doesn't work for whatever reason, describe the problem here...

Are there add-on libraries or tools available for ASP.NET MVC development?

My first experience with ASP.NET MVC and the Entity Framework has raised my interest in this framework and I would like to implement some basic applications, covering the basic requirements of real-world web applications. So far the support given by VS 2008 is already impressive.
For some areas however, it might be a time saver to use existing add-ons or libraries of all kind. Are there already commercial or open solutions which I should take a look at?
Some of them:
S#arp architecture
MVCContrib
MVC Project Awesome
Be sure to check out example projects.
Telerik has made some UI stuff too (haven't checked out yet).
You might be interested to check out other view engines like:
Spark (this one kicks a$$)
NHaml
Haack recently posted about .less - might be worth checking out for managing css
T4MVC by David Ebbo library is a nice solution how to make your asp.net mvc app more strongly typed.
For UI testing - Watin framework.
Here's Jimmy talking about implementation and solution of common problems when doing UI testing. Seems to me that he prefers Gallio + NBehave + MbUnit combo but i personally like BehaveN (it doesn't need test runner, is not tied with particular unit test framework).
HtmlAgilityPack is a nice tool if working with raw html is necessary.
MvcTurbine might simplify technical part of your asp.net-mvc project.
Found useful MvcExtensions extension made by Kazi Manzur Rashid.
For managing javascript and css - Chirpy.
Object to object mapper for MVVM support - AutoMapper.
elmah is great for error logging.
Not necessarily MVC specific, but:
MVC lends itself to take advantage of all the jQuery UI controls and pretty things.
There's also Elmah, and StructureMap for DI/IOC.
Nothing much else to add here except that xVal is a really nice validation library, utilising jQuery. My company is currently in the process of moving from a 'roll-your-own' solution to this.
There are some useful links at the bottom of this post.
Including:
MVC HtmlHelper for Gravatar
Paging HtmlHelper for ASP.NET MVC
Marquee and GridView HtmlHelpers for ASP.NET MVC
ReCAPTCHA HtmlHelper (and also a solution to use ReCAPTCHA in ASP.NET MVC)
ASP.Net MVC Extension method to create a Security Aware Html.ActionLink
CheckboxList Helper
Also, keep an eye on some of the big component developers. Telerik has a demo of some MVC components and I hear DeveloperExpress has some on the way too.
Just to add details to Telerik's MVC support:
We just kicked-off our official support for ASP.NET MVC with last week's CTP. Our new UI Extensions for MVC will aim to bring the productivity of WebForms to MVC without violating any MVC concepts. Our new extensions are built from the ground-up specifically for MVC and they will leverage jQuery on the client for all behaviors and Ajax.
Further, the Extensions are completely open source, licensed under the Microsoft Public License (MS-PL) - the same license that the ASP.NET MVC framework ships under. You can find the CTP source today on Telerik.com or on CodePlex:
http://telerikaspnetmvc.codeplex.com/
All of that said, this is our early support. We will ship the first 3 UI Extensions in November and build from there in 2010. The first planned Extensions are:
Grid
Menu
TabStrip
You can find more details, demos, and downloads on Telerik.com:
www.telerik.com/mvc
Hope that helps.

Resources