Difference between ViewData,ViewBag and TempData in MVC 3.0 Difference between ViewData,ViewBag and TempData in MVC 3.0

ViewData ViewBag TempData

ViewData is a ViewBag uses the dynamic Temp data use during dictionary of feature that was added in to the current and objects that are C# 4.0 It allows an object to subsequent request only accessible using dynamically have properties means it is use when strings as keys added to it. We can say you are sure that next ViewBag=ViewData + request will be dynamic wrapper around the redirecting to next view. ViewData dictionary.

Example for ViewData: ViewData[“JustLearn”]=”Just Learn on http://www.asp.net/ is rock!!”

Example for ViewBag: ViewBag.JustLearn =”Just Learn on http://www.asp.net/ is rock!!”

Example for TempData: TempData[“JustLearn”]=”Just Learn on http://www.asp.net/ is rock!!”

Reference: http://onlydifferencefaqs.blogspot.in/2012/08/difference-between- viewdataviewbag-and.html

MVC 2 vs MVC 3 in ASP.NET

Difference between MVC 2 and MVC 3 in ASP.NET

S.No MVC 2 MVC 3

1 View Engines: View Engines: MVC 2 uses only Web Forms The view engines used in the view engine (.aspx). ASP.NET MVC 3 Framework are the Razor View Engine (.cshtml or .vbhtml) and the Web Forms view engine (.aspx).

2 Chart, WebGrid, WebImage, Chart, WebGrid, WebImage, WebMail Controls: WebMail Controls: Not Available Available

3 Objects available for sharing Objects available for sharing data between View and data between View and Controller: Controller: TempData, ViewData TempData, ViewData ,ViewBag

4 Web Forms view engine Razor View Engine syntax: syntax: @Html code <%=Html code %>

5 Support for jQuery: Support for jQuery: Good Better

6 Support for Dependency Support for Dependency Injection: Injection: Good Better

7 Support of Layouts: Support of Layouts: Only Master Page (.master) Both Master Page (.master) and Layout Page (_Layout.cshtml)

Note: Master pages are the same if we are using the .aspx view engine. If we are using Razor, then it's the Layout page.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/difference-between-mvc-2-and- mvc-3-in.html

Grails 2.0 vs ASP.NET MVC 4.0 Difference between Grails 2.0 and ASP.NET MVC 4

S.No Grails 2.0 ASP.NET MVC 4.0

1 Meaning: Meaning: Grails is an open source web The ASP.NET MVC Framework is application framework which a web application framework that uses the Groovy programming implements the model-view- language (which is in turn controller (MVC) pattern. based on the platform). It is intended to be a high- Based on ASP.NET, it allows productivity framework by software developers to build a Web following the "coding by application as a composition of convention" paradigm, three roles: Model, View and providing a stand-alone Controller. development environment and A model represents the state of a hiding much of the particular aspect of the application. configuration detail from the A controller handles interactions developer. and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that.

2 Community Support: Community Support: No. Grails is built on Groovy Yes. MVC 4 may be built on .NET which is a dynamic language VB or .NET C#. The usage of C# that compiles into byte-code seems to be growing versus VB that runs on the Java virtual according to indeed.com job machine. Unfortunately, the trends. Therefore, in the number of Groovy developers comparison with Grails, this in the world are far comparison is focused on MVC outnumbered by the number of 4 .NET C#. The C# open source C, C++, VB, C#, and Java community is very large. It is not developers. quite the size of Java or C/C++, but it is global.

3 Cost of Development: Cost of Development: Yes. Grails is much cheaper to No. The cost of development is develop and deploy. It is basically free if Visual Studio 2011 conceivable that the cost of Express is considered sufficient development and deployment (Note: In this case Visual Studio is free since it can be done Professional is used). The cost of with open source tools and deployment is likely more than platforms. zero...it depends on the amount of data that is required to be stored and the number of users that would be connecting.

4 OS knowledge required or OS knowledge required or not ? not ? No. The .NET framework is Yes. Since Grails runs in a affected by system updates to the JVM, there is little to no Windows operating system. While relationship between the JVM it is possible to separate the .NET and the operating system. specific updates from the rest of the operating system updates, that is a hassle. Also, due to the success of the .NET framework for Microsoft over past ten years, it has become more intertwined with the operating system. As a result, it is not always clear where .NET begins and and the operating system ends. Therefore, at the very least, ASP.NET MVC 4 requires Windows operating system knowledge and research for each patch deployment...that is an ongoing cost that is arguably greater than that of maintaining a JVM.

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/grails-20-vs-aspnet-mvc-40.html Spring vs ASP.NET MVC Difference between Spring and ASP.NET MVC

S.No Spring ASP.NET MVC

1 Meaning: Meaning: The is an The ASP.NET MVC Framework is open source application a web application framework that framework and Inversion of implements the model-view- Control container for the Java controller (MVC) pattern. platform. Based on ASP.NET, it allows software developers to build a Web application as a composition of three roles: Model, View and Controller. A model represents the state of a particular aspect of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that.

2 Global Preference: Global Preference: 12% 67%

3 Official Website: Official Website: www.springsource.org http://asp.net/mvc

4 License: License: Apache License,GPL2 Proprietary

5 Development Principles: Development Principles: Convention over configuration Convention over configuration,Test- driven development

6 Design pattern: Design pattern: Dependency injection Active-Record,Model-View- Controller,Dependency injection

7 Operating system: Operating system: Cross-platform Windows

8 Programming language: Programming language: Java C#, JavaScript,VB.NET,F#

9 Database: Database: MSSQL MSSQL MySQL MySQL PostgreSQL Oracle Oracle SQLite SQLite PostgreSQL IBM DB2 IBM DB2 JDBC Compatible MongoDB Microsoft SQL Server 2005 Teradata Cassandra

10 Template language: Template language: JSP RazorEngine JSTL ASPX HTML5 Velocity

11 Target audience: Target audience: Enterprise Enterprise,SMB

12 Difficulty level: Difficulty level: Intermediate Beginner Advanced Intermediate Advanced

13 Programming paradigm: Programming paradigm: Aspect-oriented programming Object-oriented

14 Scripting language support: Scripting language support: Groovy JavaScript JavaScript PHP Ruby

15 Object-Relational Mapping: Object-Relational Mapping: , iBatis, more ORM-independent

16 Testing Framework(s): Testing Framework(s): Mock objects, unit tests Unit tests, Functional Tests, Integration Tests

17 DB Migration Framework(s): DB Migration Framework(s): N/A Entity Framework

18 Security Framework(s): Security Framework(s): Spring Security (formerly ASP.NET Forms Authentication Acegi) (Default), Pluggable

19 Form Validation Form Validation Framework(s): Framework(s): Commons Yes (client-side via plugins) validator, Bean Validation

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/spring-vs-aspnet-mvc.html vs ASP.NET MVC Difference between Ruby on Rails and ASP.NET MVC

S.No Ruby on Rails ASP.NET MVC

1 Meaning: Meaning: Ruby on Rails, often The ASP.NET MVC Framework is shortened to Rails, is an open a web application framework that source full-stack web implements the model-view- application framework for the controller (MVC) pattern. Ruby programming language. Rails is a full-stack framework, Based on ASP.NET, it allows meaning that it gives the web software developers to build a Web developer the ability to gather application as a composition of information from the web three roles: Model, View and server, talk to or query the Controller. database, and render A model represents the state of a templates out of the box. As a particular aspect of the application. result, Rails features a routing A controller handles interactions system that is independent of and updates the model to reflect a the web server. change in state of the application, Ruby on Rails emphasize the and then passes information to the use of well-known software view. A view accepts necessary engineering patterns and information from the controller and principles, as Active record renders a user interface to display pattern, Convention over that. Configuration, Don't Repeat Yourself and Model-View- Controller. Note: Ruby on Rails is not to be confused with Ruby, which is a general-purpose programming language, on which Ruby on Rails runs. Ruby itself existed for more than 10 years before the first release of Ruby on Rails.

2 Global Preference: Global Preference: 25% 67%

3 Official Website: Official Website: http://rubyonrails.org http://asp.net/mvc

4 License: License: MIT License Proprietary

6 Design pattern: Design pattern: Active-Record,Model-View- Active-Record,Model-View- Controller Controller,Dependency injection

7 Operating system: Operating system: Linux Windows Mac OS X Windows QNX

8 Programming language: Programming language: Ruby C#, JavaScript,VB.NET,F#

9 Database: Database: MSSQL MSSQL MongoDB MySQL MySQL Oracle PostgreSQL SQLite Drizzle PostgreSQL Oracle IBM DB2 Redis SQLite

10 Template language: Template language: ERB RazorEngine HAML ASPX Erubis Radius

11 Target audience: Target audience: Enterprise Enterprise,SMB Web Development

12 Difficulty level: Difficulty level: Beginner Beginner Intermediate Advanced

13 API: API: Basic Good

14 Scripting language support: Scripting language support: Ruby JavaScript JavaScript coffeescript

15 Object-Relational Mapping: Object-Relational Mapping: ActiveRecord ORM-independent

16 Security Framework(s): Security Framework(s): Plug-in ASP.NET Forms Authentication (Default), Pluggable

Reference: http://onlydifferencefaqs.blogspot.in/2012/09/ruby-on-rails-vs-aspnet-mvc.html