Friday, April 20, 2012

ScrumTime - Grails 2.0 vs ASP.NET MVC 4

In my previous post, I documented the process of considering the various "Web Stacks" that are widely available for the implementation of ScrumTime 1.0.  This post is a continuation of that post.


Here are the factors that go into considering these two "Web Stacks" as viable open source platforms:

  1. Does the platform support multiple databases in such a way that does not require a major refactoring for each database supported?
  2. Does the platform have native support for a multilingual user interface?
  3. Does the platform support a modular view solution that can support various screen sizes and capabilities?
  4. Does the platform allow the business logic layer to be decoupled and reused in other non-web application capacity?
  5. Is there a large development community that will be able to look at the code base to add to the project at a future date?
  6. Is the platform significantly cheaper to develop and deploy than the competition?
  7. Is the platform stable over a long period of time? (do security patches to the OS threaten the features of the deployment?)

Last week, I began implementing ScrumTime 1.0 in ASP.NET MVC 4.  The source may be found here.  This week I began implementing ScrumTime 1.0 with Grails 2.0.  The source may be found here.


Here are the answers to the questions above:


Grails Answers

  1. Yes. Grails uses hibernate under the covers.  Therefore, Grails has support for all major database vendors and the JDBC drivers are widely available.
  2. Yes. Grails has a large focus on multilingual user interfaces with the inclusion of the i18n folder with each newly created project.  This folder holds the resource files that contains the different strings for the different languages supported.
  3. Yes. Grails supports a concept of "layouts" and "templates" that allows a developer to create and reuse view components.
  4. Yes. Grails compiles down to a set of Java classes that may be referenced from any other Java application running on the same VM.
  5. No. Grails is built on Groovy which is a dynamic language that compiles into byte-code that runs on the Java virtual machine.  Unfortunately, the number of Groovy developers in the world are far outnumbered by the number of C, C++, VB, C#, and Java developers.
  6. Yes. Grails is much cheaper to develop and deploy.  It is conceivable that the cost of development and deployment is free since it can be done with open source tools and platforms.
  7. Yes. Since Grails runs in a JVM, there is little to no relationship between the JVM and the operating system.  
ASP.NET MVC 4 Answers
  1. Yes, well sort of. MVC 4 supports the latest Entity Framework 4.1 that includes something known as "Code First".  Code First support all Microsoft databases, Oracle, MySQL, and supposedly any database that has an ADO.NET provider.  Another option is to use NHibernate instead of EF at all.  NHibernate supports all of the major database vendors.
  2. Yes. MVC 4, like all .NET applications, may contain "resource files."  There are several options for making use of the resource strings, but the most clear option is to use a reference in the model's constraint annotations.
  3. Yes. MVC 4 allows developers to define "layouts" and "partial views" that follow the view reuse best practices of other web frameworks like Grails and Ruby on Rails.
  4. Yes. The most straightforward way to implement a reusable Business Logic Layer in MVC 4 is to implement the BLL in a separate .NET DLL.  Then the DLL may be used by the MVC 4 web application.
  5. Yes. MVC 4 may be built on .NET VB or .NET C#.  The usage of C# seems to be growing versus VB according to indeed.com job trends.  Therefore, in the comparison with Grails, I have focused on MVC 4 .NET C#.  The C# open source community is very large.  It is not quite the size of Java or C/C++, but it is global.
  6. No. The cost of development is basically free if Visual Studio 2011 Express is considered sufficient (I have been using Visual Studio Professional).  The cost of deployment is likely more than zero...it depends on the amount of data that is required to be stored and the number of users that would be connecting. 
  7. No.  The .NET framework is affected by system updates to the Windows operating system.  While it is possible to separate the .NET 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. 

Based on the criteria above, the ASP.NET MVC 4 "Web Stack" seems to be the prudent choice because of the large development community.  However, the development cost and deployment cost is not as positive. By April 23, 2012 June 15, 2012, I will make the final decision and proceed with the full implementation at that time.


*Update (04/23/2012) - ASP.NET MVC 4 is the first to be heavily researched.  The source may be found here on GitHub. 


*Update (05/14/2012) - Grails 2.0 heavy research begins.  The source may be found here on GitHub. 

13 comments:

  1. Thanks for the insight Ernie. I am having the same "dilemma" in choosing my web development framework of choice going forward. ASP.NET MVC has come a long way, but I am so very tempted and excited about the opportunities that Grails presents to the developer. As a previous Django developer in Python, I see that both ASP.NET MVC and Grails have provided improvements that will push Django to the back burner. But, as you say having a full suite of tools in your back pocket is always useful ... I will continue to follow your progress and comments ... thanks!

    ReplyDelete
  2. 6 - cheaper - I think you'd need to factor in both a VS Pro license and an IntelliJ Pro license to compare. Or do you think the Express edition has enough for every day devs?

    ReplyDelete
  3. @Michael, that's a great point. If I consider a new user that wants the professional version of either one...the IntelliJ Pro is a maximum of $699 with yearly subscription and the VS 2010 Pro is $703 with MSDN Renewal. So, it is effectively even.

    But, the interesting point to consider is that Grails has many options for development (NetBeans, IntelliJ, Eclipse, TextMate, etc). However, ASP.NET MVC 4 offers only one legitimate choice, Visual Studio.

    ReplyDelete
  4. You forgot about "Is there a support path" MVC=yes, Grails=no. Also, #7 is Yes for MVC. You must not know about targeting. All Visual Studio projects (MVC, Web App, Console App, etc.) can be "targeted" to a specific framework version. So let's say you targeted 3.5, MS would never "update" 3.5. New features and major bug fixes go into a "service packs" and you need to test your apps on these prior to deploying to PROD. Just as you would have to do with any other framework including Grails. Also there has NEVER been an OS update that also updates the .NET framework. You apply service packs separately or upgrade to a newer version of the framework.

    ReplyDelete
  5. @Zeno - I appreciate your thoughts on this. I am well aware of the fact that .NET applications can target different versions of .NET. I had forgotten that I can specify the specific version of the framework down to the patch level. This does resolve my concern.

    In terms of patching a running system, I would have to disagree about the relationship between the .NET Framework and the core OS. I believe there is a relationship since the following security bulletin indicates that both the OS and .NET are altered by this patch. http://technet.microsoft.com/en-us/security/bulletin/MS11-100

    It was this security patch that caused issue because the ASP.NET and Sharepoint applications did not target a specific patch level of the Framework.

    I am curious, what is your support path for ASP.NET MVC? Are you referring to asking Microsoft for help or tapping into the community at large?

    ReplyDelete
  6. 1.Grail is open source web application and use to Groovy language when asp.net is web application and it based on MVC
    2.Grail is not community support when asp.net is Community support
    3.Grail is much cheaper when asp.net is basically free

    ReplyDelete
  7. One comment (or at least a footnote) is that in terms of the developer community for Grails (criteria 5), Java can be used within the platform readily enough. Moreover, while it might be splitting hairs and I'll get gruff from Groovy purists, in a superficial sense Groovy is Java and Java developers COULD write Groovy code without learning much if anything new (although what's the fun in that)? Typically the Java Spring developers (myself and the ones I've hired) immediately feel right at home in the Grails/Groovy environment. I see it's been a little while since the last comment in this thread, so interested in how your experiences have been since?

    While I've been developing quite a bit in Groovy/Grails, I've ironically had to take a crash course recently in .Net MVC 4 for a project and it's truly remarkable how many ideas the two frameworks share. I love the tool support Microsoft has for it's developers as well as educational support and things seem to just integrate really well. It's probably a personal preference but of the two, I'd still pick Grails for new projects due to the huge open source community available in the Java ecosystem in which Grails operates. After all is said and done, Grails is really just Spring MVC under the covers of which there is an gigantic community and support. Oh, and you can't beat that price! :)

    ReplyDelete
  8. Lonnie, I very much agree with you. I have created a ScrumTime in Grails and one in ASP.NET MVC. Neither of these have been production quality tools. Within the past few months, I have concluded that the best approach is to use a Groovy/Grails/Spring MVC backend and an AngularJS front end. My goal is to reach a true 1.0 production quality tool by late summer 2014. If I have the time or requests to do so, I will create a rudimentary ASP.NET MVC / WCF backend as well. However, my focus is on a Java based backend.

    Thank you for your thoughts! Good luck with your ASP.NET MVC 4 project.

    ReplyDelete
  9. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    cloud computing training in chennai | cloud computing courses in chennai

    ReplyDelete
  10. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Web Designing Course in Chennai | web designing training in chennai

    ReplyDelete
  11. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    Dot net training in Chennai | dot net course in Chennai

    ReplyDelete
  12. I have read your blog its very attractive and impressive. I like it your blog.

    ASP.NET MVC Online Training in India



    ASP.NET MVC Training in Chennai

    ReplyDelete