Question

I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools?

Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier.

Ruby has similar issues and although I do like Ruby much better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app.

Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare?

Was it helpful?

Solution

You asked for someone who used both Grails and Django. I've done work on both for big projects. Here's my Thoughts:

IDE's: Django works really well in Eclipse, Grails works really well in IntelliJ Idea.

Debugging: Practically the same (assuming you use IntelliJ for Grails, and Eclipse for Python). Step debugging, inspecting variables, etc... never need a print statement for either. Sometimes django error messages can be useless but Grails error messages are usually pretty lengthy and hard to parse through.

Time to run a unit test: django: 2 seconds. Grails: 20 seconds (the tests themselves both run in a fraction of a second, it's the part about loading the framework to run them that takes the rest... as you can see, Grails is frustratingly slow to load).

Deployment: Django: copy & paste one file into an apache config, and to redeploy, just change the code and reload apache. Grails: create a .war file, deploy it on tomcat, rinse and repeat to redeploy.

Programming languages: Groovy is TOTALLY awesome. I love it, more so than Python. But I certainly have no complaints.

Plugins: Grails: lots of broken plugins (and can use every java lib ever). Django: a few stable plugins, but enough to do most of what you need.

Database: Django: schema migrations using South, and generally intuitive relations. Grails: no schema migrations, and by default it deletes the database on startup... WTF

Usage: Django: startups (especially in the Gov 2.0 space), independent web dev shops. Grails: enterprise

Hope that helps!

OTHER TIPS

However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier.

Python has:

  1. a great interactive debugger, which makes very good use of Python REPL.
  2. easy_install anv virtualenv for dependency management, packaging and deployment.
  3. profiling features comparable to other languages

So IMHO you shouldn't worry about this things, use Python and Django and live happily :-)

Lucky for you, newest version of Django runs on Jython, so you don't need to leave your whole Java ecosystem behind.

Speaking of frameworks, I evaluated this year:

  1. Pylons (Python)
  2. webpy (Python)
  3. Symfony (PHP)
  4. CakePHP (PHP)

None of this frameworks comes close to the power of Django or Ruby on Rails. Based on my collegue opinion I could recommend you kohana framework. The downside is, it's written in PHP and, as far as I know, PHP doesn't have superb tools for debugging, profiling and packaging of apps.

Edit: Here is a very good article about packaging and deployment of Python apps (specifically Django apps). It's a hot topic in Django community now.

The statement that grails deletes the database on start-up is completely wrong. It's behavior on start-up is completely configurable and easy to configure. I generally use create-drop when running an app in dev mode. I use update when I run in test and production.

I also love the bootstrap processing that lets me pre-configure test users, data, etc by environment in Grails.

I'd love to see someone who has really built and deployed some commercial projects comment on the pros / cons. Be a really interesting read.

Grails.

Grails just looks like Rails (Ruby),but it uses groovy which is simpler than java. It uses java technology and you can use any java lib without any trouble.

I also choose Grails over simplicity and there are lots of java lib (such as jasper report, jawr etc) and I am glad that now they join with SpringSource which makes their base solid.

I have two friends who originally started writing an application using Ruby on Rails, but ran into a number of issues and limitations. After about 8 weeks of working on it, they decided to investigate other alternatives.

They settled on the Catalyst Framework, and Perl. That was about 4 months ago now, and they've repeatedly talked about how much better the application is going, and how much more flexibility they have.

With Perl, you have all of CPAN available to you, along with the large quantity of tools included. I'd suggest taking a look at it, at least.

The "good deployment" issue -- for Python -- doesn't have the Deep Significance that it has for Java.

Python deployment for Django is basically "move the files". You can run straight out of the subversion trunk directory if you want to.

You can, without breaking much of a sweat, using the Python distutils and build yourself a distribution kit that puts your Django apps into Python's site-packages. I'm not a big fan of it, but it's really easy to do.

Since my stuff runs in Linux, I have simple "install.py" scripts that move stuff out of the Subversion directories into /opt/this and /opt/that directories. I use an explicit path settings in my Apache configuration to name those directories where the applications live.

Patching can be done by editing the files in place. (A bad policy.) I prefer to edit in the SVN location and rerun my little install to be sure I actually have all the files under control.

cakephp.org

Cakephp is really good, really close to ruby on rails (1.2). It is in php, works very well on shared hosts and is easy to implement.

The only downside is that the documentation is somewhat lacking, but you quickly get it and quickly start doing cool stuff.

I totally recommend cakephp.

Personally I made some rather big projects with Django, but I can compare only with said "montrosities" (Spring, EJB) and really low-level stuff like Twisted.

Web frameworks using interpreted languages are mostly in its infancy and all of them (actively maintained, that is) are getting better with every day.

By "good deployment" are you comparing it with Java's EAR files, which allow you to deploy web applications by uploading a single file to a J2EE server? (And, to a lesser extent, WAR files; EAR files can have WAR files for dependent projects)

I don't think Django or Rails have gotten quite to that point yet, but I could be wrong... zuber pointed out an article with more details on the Python side.

Capistrano may help out on the Ruby side.

Unfortunately, I haven't really worked with either Python or Ruby that much, so I can't help out on profilers or debuggers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top