Can I make changes in Django without having to recompile everything?

469 views
Skip to first unread message

Johann

unread,
Aug 21, 2013, 10:21:41 AM8/21/13
to django...@googlegroups.com
Please tell me if this is true.  I'm deciding on Django, asp.net, or Java.

If I use asp.net or java and I want to make a change to the controller, I have to recompile the class or project, right?

If I use Django, if I change the controller or model logic, do I have to compile everything?  If I change a a model, don't I have to use "special" django/py commands to fix everything in my ORM?  If I just make nominal changes to the logic in a controller, I can just go with it, no recompile necessary?

Sorry for so many questions.  Thanks.

Andreas Kuhne

unread,
Aug 21, 2013, 10:29:43 AM8/21/13
to django...@googlegroups.com
If you compare Django to asp.net or java, django is the easiest to start things with. You never have to compile anything in django, the server does it itself. In development mode it will recompile all classes automatically when you make changes to a file. In a production environment, you may have to restart the webserver for the compilation to take place. 

If you make a change to a model, you do have to run a commandline command to synchronize the database with your model. However I think it is still much easier than Java.

Also the learning curve for django is far lower than java.

Regards,

Andréas


2013/8/21 Johann <needin...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Tim Chase

unread,
Aug 21, 2013, 10:36:19 AM8/21/13
to django...@googlegroups.com, needin...@gmail.com
On 2013-08-21 07:21, Johann wrote:
> Please tell me if this is true. I'm deciding on Django, asp.net,
> or Java.
>
> If I use asp.net or java and I want to make a change to the
> controller, I have to recompile the class or project, right?

Alas, that's one of the reasons that drove me from Java a while back.

> If I use Django, if I change the controller or model logic, do I
> have to compile everything?

Effectively, there's no "recompilation" in Python/Django as it's all
handled by Python and fairly transparent to the user. At worst, you
have to restart the Django process to get Python to do the
recompilation for you.

> If I change a a model, don't I have to use "special" django/py
> commands to fix everything in my ORM?
> If I just make nominal changes to the logic in a controller, I can
> just go with it, no recompile necessary?

If you change the actual database structure (add/remove/rename fields,
change their types, add constraints/indexes, etc) when changing
models, then you'd need to handle those separately. Best practices
usually suggest using South as the least-painful way to do these
database migrations. Though often in pre-release code, I'll just
nuke the database and rebuild it from the ground up.

If it's just the logic changing and not the actual database structure,
then Python/Django tends to handle everything for you as mentioned
above (at worst, just restart the process to have Python recompile
your changes).

> Sorry for so many questions. Thanks.

Anything to save you from ASP/Java development ;-)

-tkc





Reply all
Reply to author
Forward
0 new messages