views:

380

answers:

17

I want to get into web-development and trying to pick a framework to playground with as well as a develop complex web-app.

I am considering the following:

  • C# with ASP.NET MVC.
  • Ruby on rails
  • Tomcat/servlets/jsp

For now, I am planning to run it on windows, yet might migrate it to Linux. I want to his framework to be fairly intuitive to develop on, connect to db (probably mysql), good documentation. And as one of the user mentioned,

What development environment will force me to develop good programming habits and solid maintainable code?

How would you compare above frameworks?

As always, ther recommendations are welcome as well.

Thanks

+3  A: 

Go with Ruby on Rails(RoR).

  • It is easy (less is more)
  • Portable
  • Works well with mysql
Cleiton
It's not really solid production level code yet on Windows though, so I'd disagree with the portable
Cruachan
There's too much convention and magic in Rails.
Wahnfrieden
There's loads of monkey patching in rails - so dirty! Some will say pragmatic.. I say look at Django, similar functionality, no monkey patching and less magic!
Wahnfrieden
Matt Grande
what do you mean by portable ?my friend told me that it is hard to install on shared server hosting. since we need to install some gems using admin account.
nightingale2k1
1 - It is easy to find Web Hosting companies that offers suport for RoR.2 - "Convention and magic in Rails", as Darth said: "Rails is magic only if you don't know anything of ruby"
Cleiton
@Matt it DOES have loads of magic. Whether it's easy and good is another issue. You're ignorant of what Rails does if you don't think it has magic.
Wahnfrieden
I'm familiar with Ruby, but it's so nasty to me when Rails does things like catch 'member does not exist' for method calls and does string operations on your call, like in the case of things like find_all_people_by_name. This makes Rails decidedly less 'discoverable'
Wahnfrieden
Rails is also partly responsible for the spread of misconceptions on REST, with its "RESTful routes" which have nothing to do with REST (except for utilizing HTTP properly) and often lead to people throwing up RPC APIs and calling it RESTful.
Wahnfrieden
+1  A: 

This is pretty subjective, but JSP and friends are confusing as hell for a newbie. Don't know anything about RoR or .Net

maksymko
+2  A: 

On the Python side, you can get a simple CherryPy application up and running with just a few lines of code. Simplicity is the key word here, just as an example:

import cherrypy

class HelloWorld(object):
    def index(self):
        return "Hello World!"
    index.exposed = True

cherrypy.quickstart(HelloWorld())

Gives you a standalone python script file which runs its own HTTP server, built-in with your app and all admin around it.

Yuval A
how friendly is it with mysql?
vehomzzz
as friendly as with any other db. just make sure you have mysql-python ( http://sourceforge.net/projects/mysql-python ) installed
Yuval A
CherryPy's HTTP server is excellent for what it is - but it can be used with any other framework, such as Django, so it's not exclusive to sites written in CherryPy.
Wahnfrieden
+2  A: 

Neither .NET nor JSP are frameworks in and of themselves. Rails is a framework (which I'm personally a fan of). In .NET, you'd probably end up using C# with ASP.NET MVC.

If you know any of the languages, that may not be a bad place to start. Otherwise, Rails is good. I've heard things about Django if you're interested in the Python side of life. Another idea might be to start with something with fewer layers of abstraction, like pure PHP, so that you have something of an idea of how HTTP works under the hood.

manitoba98
PHP is the only one that you forgot to name a framework for, poor PHP.
Alix Axel
CakePHP, CodeIgniter, Symfony, Zend Framework. There you go. But that said, PHP is quick and dirty, but it wouldn't be my first choice as a language.
manitoba98
A: 

Well, no one mentioned it before so I will.

Why not PHP? With frameworks like CodeIgniter it's pretty easy to get started on web dev and there are a load of PHP web hosts avaliable, even cheap ones.

Alix Axel
agree with you ... btw why he got -1 for php related answer ?
nightingale2k1
If you have to ask...
Wahnfrieden
Hummm... Ok. -1 again, lets all quit on PHP. It's a crappy language, nobody uses it anymore!
Alix Axel
PHP is used because of legacy support, speed in extremely critical applications, or because the user didn't know better.
Wahnfrieden
Even if those were all the pros of PHP (which they aren't) why does it make it a bad language? Since this question is subjective my answer is perfectly valid and yet I got several negative votes. Not sure why though, must be some kind of fanaticism between languages.
Alix Axel
It's valid yet ill-advised. PHP isn't a very clean language compared to something like Python. It's a rather hacky attempt at OO, for one.
Wahnfrieden
Well, still I believe it deserves to be mentioned.
Alix Axel
A: 

If migrating to Linux is a possibility, then I don't think C# is a great idea.

JSP is somewhat complicated. Wouldn't recommend.

Ruby on Rails is good, but requires you to delve into the "magic" to get complex tasks accomplished.

I'm looking into starting a Turbo Gears 2 project, which is a Python stack built on Pylons and other technologies.

Corey D
C# is multiplatform.
Wahnfrieden
Many open-source advocates recommend avoiding mono because of patents. So, use according to your own level of risk tolerance.
Corey D
+1  A: 

If you are learning a new technology, you will be investing some time in it, so it is worth having a look at what job prospects you are likely to have with that skill in the future.

At the moment it seems there are quite a few jobs in asp.net and RoR.

If you choose ASP.NET, defently go for the new MVC framework and you will also learn about the .NET Framework and C# (unless you choose another language of course).

So I would recommend ASP.NET MVC.

+1  A: 

Is there any language you know very well now and would like to keep using? If so, check out what frameworks are available with that language.

I prefer ASP.NET MVC, but have found that it's so loosely coupled that you need to really learn a bunch of stuff to build something using a proper stack with best practices. Now if you plan on building smaller "disposable" projects you can start with ASP.NET MVC and use Linq to SQL, the default membership provider and no IoC to get used to the framework and then later on add IoC and maybe switch ORM.

If you are learning the language at the same time as the framework, I'd recommend something where the whole stack is more or less included out of the box. I've heard good things about Django for example.

svinto
A: 

I would recommend Ruby on Rails. Watch the video on Creating a Blog in 15 Minutes. It's a great intro to the basic, and I think it shows off the power and ease of use that Rails has to offer.

Matt Grande
Rails looks impressive in those little screencast demos, but most of that goes out the window when you're doing anything different and at a larger scale.
Wahnfrieden
Wahnfieden, have you ever used RoR extensively? You can do a lot with it. I've never come across anything that I wasn't able to do in Ruby that I was able to do in C#-MVC.
Matt Grande
Wahnfrieden, almost no one is writing next Facebook - even if they think they are. Rails is a perfectly acceptable solution for almost any application.
askegg
For example, generators are not as useful with larger scale projects, yet they look amazing in the screencast demo.
Wahnfrieden
Matt Grande
But that's why those screencasts are misleading.
Wahnfrieden
+5  A: 

I would vote for a Python based web framework. Have a look at Django. It's quite similar to Ruby on Rails, but Python is a much nicer language to learn (in my opinion) and the Python folk is quite nice and helpful. The Django documentation/tutorial is quite good, but you might also have a look a this Book

Achim
Django has far, far less magic than Ruby on Rails, too. Django feels like Python, while you can learn Rails and still not really know Ruby.
Wahnfrieden
You've certainly got a hate on for RoR.
Matt Grande
Rails is magic only if you don't know anything of ruby. It's really not much harder than Django. Both RoR and Django are good choices imho.
Darth
You can't learn Rails without learning Ruby. All the magic of Rails come form Ruby - that's the entire point.Anyway, what it is the problem people have with magic? Personally I love the fact the framework gives me all sorts of stuff for free as long as I stick to the conventions. The difficult thing is learning the conventions.Django seems to have a lot of redundancy and does not seem as clear as Rails. But those choices are really a matter of personal preference.
askegg
@Darth I didn't say RoR is harder to learn. @Matt I use Rails at work, and Django at home, so I have some perspective on this
Wahnfrieden
@askegg Rails monkey patches and hacks so much of Ruby that you can't tell what's part of the standard library or what behavior is allowed in Ruby just by looking at Rails code (without looking at internals). Obviously it's just Ruby, but it doesn't *feel* like just Ruby. While Django generally feels "Pythonic"
Wahnfrieden
A: 

I'm not sure about your background, but if you're beginning with web development I'd recomend PHP. Like manitoba98 said, it's got less abstraction, and is a good starting point for web development. There is no need for compilation, you just upload the files to the server and can run them directly. If you want to run them locally, XAMPP installs in two minutes and works like a charm. It intergrates perfectly with mysql, has good documentation, and is widely used.

I personally found it easier to learn the server/client distinction when I started with PHP, back in ye olde days.

Pedery
No no no no. I've spend weeks debugging and cleaning up bad PHP written by beginning programmers. Don't get me wrong, I like PHP, I use it a *lot*, but it should never, ever be let into the hands of beginner coders without a large printed warning sign
Cruachan
but it is easier to learn web using php.some framework are designed using OOP right now, check on Yii Framework.
nightingale2k1
I don't think this fellow programmer is out to create something like facebook.com. From his description it sounds like wants to *learn* web programming, and for that PHP gets my vote. Getting involved with .Net, masterpages, and that whole caboodle can be quite confusing for someone that only knows a bit of HTML.
Pedery
+1  A: 

I think you're asking the wrong question as there are good solid frameworks available for all the common web languages. The question you should be asking is:

What development environment will force me to develop good programming habits and solid maintainable code?

With that in mind I'd go for Python, and probably Pylons. No question.

Rational? C# and Java are too complex to start with if you're not going to have any tuition and you'll spend an inordinate amount of time looking at the detail - too much so to grasp good overall style. Ruby/ROR is good, but perhaps a little bit to constrained for a first language, and the implementation on Windows is not yet optimal anyway. PHP has also been mentioned - which despite prejudice can be used to develop solid code, it just doesn't encourage it :-)

Python on the other hand will force you to adopt good style, has straightforward syntax, is widely supported and has high leverage - it gets things done fast.

Cruachan
1+ for just that **"What development environment will force my to develop good programming habits and solid maintainable code"** I will add this to my question!
vehomzzz
Hehe, It's very very important though. Languages are simply tools, even COBOL has it's uses. The habits and approaches you develop though will stay with you and it's more important to learn discipline and good technique than obsess over the tool you are currently using.
Cruachan
A: 

for Java world, try: 1. Grails (groovy on rails ... just like ruby on rails but with flavour of java) 2. Tapestry (MVC as well) 3. Struts (MVC)

For php I would recommend YiiFramework, CakePhp or CodeIgniter ... how said that PHP are for bad boys :) I think php 5.3 getting better now

nightingale2k1
A: 

I'm a fellow "old school programmer/new school enthusiast", and I'm looking at ramaze instead of rails, as it seems like a better balance of flexibility and "magic".

http://ramaze.net/

A: 

Struts 2 is a solid MVC Framework for Java. I just started using it in June and I must say that I'm fairly impressed with it. The other one for Java that I would recommend is Java Server Faces. I have used that in the past, but I must say that I think I would use Struts 2 before Java Server Faces.

To support those MVC Frameworks I would suggest to use an ORM such as hibernate.

scheibk
A: 

Ruby on Rails

I'd suggest you go with Ruby on Rails, because

  • it's easy to learn, means you can start developing quite robust applications very quickly
  • it's portable, so you can run it on both Windows and Linux

Another good reason is, that it's opensource, so you don't have to pay anything for licence, like with .NET.

Ruby on Rails also has nice integration with MySQL

As for the development environment, NetBeans have some really nice Ruby on Rails support.

ASP.NET

ASP.NET MVC is also a good choice, but the main drawback is when you want to make something commercial, you have to buy license, which aint cheap, so it's pretty hard to start working commercial on your own.

Django

Last option, that you didn't mention is Django, which is mostly like Python version of Rails (yep, I'm gonna burn in hell for saying this). Both Django and Ruby on Rails follow MVC, so it's matter of taste.

JSP

I don't suggest starting with JSP, because it doesn't force any good programming habbits.

Darth
Django is not Python version of Rails. It's really original and the idioms is totally different.
jpartogi
@jpartogi: well not really, Django might seem less magic than Rails, if you don't know Ruby very well, but in general, there is not much difference between Django and Rails, compared to .NET or JSP
Darth
There are significant differences. I know Ruby well, and I still think Rails is full of "magic" in terms of how it handles Ruby, using hacks to extend functionality.
Wahnfrieden
A: 

There's no final answer to this question. Most will simply cite their prior experience and make their preferred look attractive. I'm using Stripes with Tomcat and IntelliJ IDEA for IDE. Cannot be happier. Easy to learn, fast to develop and a powerful language (Java).

Daniil