Django -vs- Grails -vs-?

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?


Asked by: Rebecca955 | Posted: 06-10-2021






Answer 1

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!

Answered by: Walter572 | Posted: 07-11-2021



Answer 2

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.

Answered by: Alberta381 | Posted: 07-11-2021



Answer 3

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.

Answered by: Maddie487 | Posted: 07-11-2021



Answer 4

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.

Answered by: Agata904 | Posted: 07-11-2021



Answer 5

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.

Answered by: Sophia335 | Posted: 07-11-2021



Answer 6

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.

Answered by: David802 | Posted: 07-11-2021



Answer 7

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.

Answered by: Chloe456 | Posted: 07-11-2021



Answer 8

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.

Answered by: Marcus984 | Posted: 07-11-2021



Answer 9

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.

Answered by: Nicole555 | Posted: 07-11-2021



Similar questions

python - Django Admin app or roll my own?


python - In Django how do i return the total number of items that are related to a model?

In Django how can i return the total number of items (count) that are related to another model, e.g the way stackoverflow does a list of questions then on the side it shows the count on the answers related to that question. This is easy if i get the questionid, i can return all answers related to that question but when am displaying the entire list of question it becomes a bit tricky to display on the side the cou...


python - Valid use case for django admin?

I want to build a django site where a certain group of trusted users can edit their profile information. Does it make sense to have each trusted user go through the django admin interface? I'd only want them to be able to see and edit their own information (obviously). It doesn't seem like this fits the way the django people define "trust", especially the bolded bit... From


python - Django "Did you mean?" query

I am writing a fairly simple Django application where users can enter string queries. The application will the search through the database for this string. Entry.objects.filter(headline__contains=query) This query is pretty strait forward but not really helpful to someone who isn't 100% sure what they are looking for. So I expanded the search. from django.utils import stopw...


python - How to query as GROUP BY in django?

I query a model: Members.objects.all() And it returns: Eric, Salesman, X-Shop Freddie, Manager, X2-Shop Teddy, Salesman, X2-Shop Sean, Manager, X2-Shop What I want is to know the best Django way to fire a group_by query to my database, like: Members.objects.all().group_by('designation') Which doesn't work, of ...


python - group by in django

How can i create simple group by query in trunk version of django? I need something like SELECT name FROM mytable GROUP BY name actually what i want to do is simply get all entries with distinct names.


python - Why does Django only serve files containing a space?

I'm writing a basic Django application. For testing / development purposes I'm trying to serve the static content of the website using Django's development server as per http://docs.djangoproject.com/en/dev/howto/static-files/#howto-static-files. My urls.py contains: (r'^admin/(.*)...


python - Django forms

I had asked a question pertaining to this. But I think it would be better to ask my question directly. I have a "User" table with manytomany relationship with two other tables "Domain" and "Groups". So in the admin interface I see the Groups and Domains as 2 ModelMultipleChoiceFields. But I want to present them on the UI in a more user friendly way. I would like to show each available choice in Domain and Group with a chec...


python - How to chain views in Django?

I'm implementing James Bennett's excellent django-contact-form but have hit a snag. My contact page not only contains the form, but also additional flat page information. Without rewriting the existing view the contact form uses, I'd like to be able to wrap, o...


python - Django email

I am using the Gmail SMTP server to send out emails from users of my website. These are the default settings in my settings.py EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'example@example.com' EMAIL_HOST_PASSWORD = 'pwd' EMAIL_PORT = 587 EMAIL_USE_TLS = True SERVER_EMAIL = EMAIL_HOST_USER DEFAULT_FROM_EMAIL = EMAIL_HOST_USER If I want a user to send an email, I am overriding th...


python - What's the best Django search app?


How can I use a DLL file from Python?

What is the easiest way to use a DLL file from within Python? Specifically, how can this be done without writing any additional wrapper C++ code to expose the functionality to Python? Native Python functionality is strongly preferred over using a third-party library.


python - PubSub lib for c#

Is there a c# library which provides similar functionality to the Python PubSub library? I think it's kind of an Observer Pattern which allows me to subscribe for messages of a given topic instead of using events.


python - What is the best way to copy a list?

This question already has answers here:


python - Possible Google Riddle?

My friend was given this free google website optimizer tshirt and came to me to try and figure out what the front logo meant. t-shirt So, I have a couple of guesses as to what it means, but I was just wondering if there is something more. My first guess is that eac...


How do you check whether a python method is bound or not?

Given a reference to a method, is there a way to check whether the method is bound to an object or not? Can you also access the instance that it's bound to?


ssh - How to scp in Python?

What's the most pythonic way to scp a file in Python? The only route I'm aware of is os.system('scp "%s" "%s:%s"' % (localfile, remotehost, remotefile) ) which is a hack, and which doesn't work outside Linux-like systems, and which needs help from the Pexpect module to avoid password prompts unless you already have passwordless SSH set up to the remote host. I'm aware of Twisted'...


python - How do I create a new signal in pygtk

I've created a python object, but I want to send signals on it. I made it inherit from gobject.GObject, but there doesn't seem to be any way to create a new signal on my object.


python - What do I need to import to gain access to my models?

I'd like to run a script to populate my database. I'd like to access it through the Django database API. The only problem is that I don't know what I would need to import to gain access to this. How can this be achieved?


python - How do I edit and delete data in Django?

I am using django 1.0 and I have created my models using the example in the Django book. I am able to perform the basic function of adding data; now I need a way of retrieving that data, loading it into a form (change_form?! or something), EDIT it and save it back to the DB. Secondly how do I DELETE the data that's in the DB? i.e. search, select and then delete! Please show me an example of the code ...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top