theKindOfMe

November 27, 2008

ASP.NET MVC and Ruby on Rails

Filed under: Uncategorized — Tags: , , , , — yasi8h @ 5:31 pm

the last few days i have been learning about asp.net and about the new asp.net mvc framework. i am very new to asp.net. i’ve never ever used asp before. but as per a requirement at my work place i had to look in to it. i was rather excited to look in to it really. because i always admired mvc design pattern! 🙂 i am one of those people who love the separation of concerns. as a side project(and for my ‘final year’ project) i have been learning ruby and rails at home. so when i started looking in to asp.net mvc i had a considerable understanding of the rails framework. so while learning asp.net mvc, i really felt that its a lot similar to rails. there are lots of mvc frameworks out there and i am sure that most of them learn from each other. so thats is a grate thing. i mean as far as technology is concerned ‘copying’ is a good thing. so then you can build up something new on top of something that is already there. so anyways there were a lot of things that i felt was shared between rails and asp.net mvc. for example the way you write out the configuration for url routing in your application. in rails you put that stuff in application.rb(applicationcontroller). and you write all the configuration on the routing using ruby. so in asp.net mvc we do it in the applicationcontroller which is in the global.aspx. and in asp.net mvc there are many instances where the convention over configuration principal is applied. in controller classes. each and every public method is a action. but in the early version of the mvc fw this was not the case, you had to mark the action methods using a attribute. the url routing was configured using xml in the early releases, but later on you can now configure them in c#. i also noted that new additions to c# 3 language spec makes it a bit more like ruby. now i am not saying c# is like ruby. it is of course NOT. but microsoft have introduced some new features like anonymous methods… that is been used a lot in mvc fw(at least in the samples/blog posts found on the net…).

whats more it seems that mvc fw will have some kind of scaffolding capabilities in the future! 🙂 right now even there is the asp.net dynamic data project. it offers you something more like scaffolding. you can give it a model and it will generate all the CURD stuff for you. dynamically. and these forms have basic validation stuff built in. further more these generated asp pages use ajax controls. i am not very educated about dynamic scaffolding capabilities with rails so i can’t compare it with dynamic data. but i am sure rails have some exciting stuff none the less.

all in all, mvc(the design pattern) rocks! 🙂 that i am sure of. for me it have been easy to learn these two frameworks together in parallel. because most of the things that you learn in one framework can be applied to the other. i am not talking about very low level implementation details. but how things get done in the higher level. (ie: implementing authorization with the use of filters…). i love these two fws. microsoft been what it is, becomes inherently ‘evil’, so i can’t really show my love towards asp.net mvc fw. but anyways its exciting. i am enjoying learning mvc fm and rails. i have been missing out on these grate frameworks been in the mobile development side. but not anymore.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: