32đź‘Ť
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!
10đź‘Ť
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:
- a great interactive debugger, which makes very good use of Python REPL.
- easy_install anv virtualenv for dependency management, packaging and deployment.
- 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:
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.
- [Django]-Django select only rows with duplicate field values
- [Django]-Django substr / substring in templates
- [Django]-Get model's fields in Django
10đź‘Ť
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.
- [Django]-Python / pip, how do I install a specific version of a git repository from github (what is the correct url)?
- [Django]-How to test "render to template" functions in django? (TDD)
- [Django]-Permission denied – nginx and uwsgi socket
10đź‘Ť
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.
- [Django]-Exception: You cannot access body after reading from request's data stream
- [Django]-More than 1 foreign key
- [Django]-Django – proper way to implement threaded comments
3đź‘Ť
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.
- [Django]-Multiple Database Config in Django 1.2
- [Django]-Django redirect after login not working "next" not posting?
- [Django]-Is there something similar to 'rake routes' in django?
3đź‘Ť
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.
- [Django]-Raw query must include the primary key
- [Django]-Django delete FileField
- [Django]-Using mock to patch a celery task in Django unit tests
1đź‘Ť
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.
- [Django]-How to pass a variable from settings.py to a view?
- [Django]-Django – Site matching query does not exist
- [Django]-How can I keep test data after Django tests complete?
1đź‘Ť
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.
- [Django]-LEFT JOIN Django ORM
- [Django]-Is there a built-in login template in Django?
- [Django]-How to print line breaks in Python Django template
1đź‘Ť
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.
- [Django]-Django storages: Import Error – no module named storages
- [Django]-How to implement FirebaseDB with a Django Web Application
- [Django]-Why Django logging skips log entries?