Request for advice on refactoring a big Django project

87 views
Skip to first unread message

bobhaugen

unread,
Feb 23, 2017, 12:11:14 PM2/23/17
to Django users

Dear Django people,


We are working on an open-source Django system that has grown both in terms of user and developer communities and also size of code base. It is in production with 370 users that we know of.


It has several names, but one is NRP, which stands for Network Resource Planning system, as contrasted with ERP, which stands for Enterprise Resource Planning. NRP has the same scope as ERP, but is for economic networks, not single enterprises. And it is aimed at communities who are experimenting with cooperative economic systems.


We want to refactor the system. It has become too big and unmanagable. So we are looking for advice on how to refactor.


Here's the original repo: https://github.com/valnet/valuenetwork which is being used byhttp://www.sensorica.co/
Here are the active forks:
https://github.com/FreedomCoop/valuenetwork used by https://freedomcoop.eu/
https://github.com/gopacifia/DEEP planning to be used by http://gopacifia.org/en/


Here's an overview slide deck of the the original system. The forks have added other features, including digital currencies.
https://speakerdeck.com/mikorizal/1-nrp-overview


We think if we refactor this software, many of the features could be reusable by other projects that are not necessarily aimed at the same kinds of user communities. For example, any supply chain or business joint venture is an economic network, and many LLCs are actually networks under the covers. Moreover, we think that economic networks and ecosystems are the wave of the future, more than individual companies. But some of the features of this software base would also be useable by individual organizations.


The system is based on the Resource-Event-Agent (REA) model, which is a much simpler basis for business systems than the usual ERP model. Here's how REA applies to supply chains, for example.


Here's our current discussion about how to do the refactoring: #215


Anyway, we will be grateful for any advice, and if anybody wants to help, that would be even better.

bobhaugen

unread,
Mar 6, 2017, 5:36:56 AM3/6/17
to Django users
I was disappointed to get no response on this topic, and would be grateful for any feedback on why that might have been.

Too big? Big ball of mud? Stupid project? ____? (I have very little touchiness...)

I hope people did not think we wanted to get them to do all or even very much work for us. We are charging ahead here:

We did find, and are using, some delicious advice from Marty Alchin:
And upgrading to the latest version of django, changing to class-based views, and breaking up both models and views into several files.

Next: a bunch of abstract base classes.

After that: more API work and a mobile app to use it.

Antonis Christofides

unread,
Mar 6, 2017, 6:46:30 AM3/6/17
to django...@googlegroups.com

Hi,

I, like many people, am busy. I will generally not spend too much time on the messages of this list. I delete most of them after only reading the subject line. If I do choose to read the body, I expect to understand what it is about after a few seconds of reading. But all I can see in your original message is that you have a big Django project that needs refactoring, and several links with the code and your discussions about them. Essentially the message I'm getting is "I can't tell you what I want in this email message, but if you click on these links and study them for about half an hour, you'll get it".

Likewise, it would have been way better to include your original message in the reply. In order to find your original message I had to dig in my Trash folder. I would normally not do that, and I would have ignored your reply as well. It just happens that I'm travelling and I'm quite relaxed.

Bottom line: you need to make it very easy for me to help you, and I believe the same goes for other people as well.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vinicius Assef

unread,
Mar 6, 2017, 6:52:07 AM3/6/17
to django...@googlegroups.com

Bob Haugen

unread,
Mar 6, 2017, 6:52:42 AM3/6/17
to django...@googlegroups.com
Antonis, thank you very much for the feedback! You are absolutely
correct! I apologize to you and the list, and will strive to follow
your suggestions in the future.

I suspect, however, that the very long explanation that would have
been required to avoid the links would have been offputting, too. This
might be a request that was just inappropriate for this list.

As for now, we're charging happily ahead.
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/9OU0TfwcmTQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.com.

Vijay Khemlani

unread,
Mar 6, 2017, 7:14:42 AM3/6/17
to django...@googlegroups.com
Also, this type mailing lists are usually for specific questions about
the framework

"How do I make this particular query with the ORM"
"Why isn't this variable getting rendered in the template"

etc

Your question is kinda broad
> https://groups.google.com/d/msgid/django-users/CA%2BSvw0WRHpTUUV1RceS8MWuRjGQ3JyJqZ%3DCKdKGSLYV8%2BQma2g%40mail.gmail.com.

Mark Phillips

unread,
Mar 6, 2017, 11:10:53 AM3/6/17
to django users
I echo Vijay's comment. Lists like this are really great for very specific questions and short code segments or error message that a more experienced person can answer off the top of their head. Your question is very broad and requires a large time commitment from the reader to respond. With that said, there is nothing wrong with posting your question as you may get someone who has some free time to dive in and try to help. Or someone who has done a lot of refactoring and can give you some pointers. But don't be dismayed if no one responds. 

You could also rephrase your question to be more like "I am in the process of refactoring a large project. What recommendations would you make as far as how to tackle this project? We built the project using Django x.x.x, so where would you recommend we start with this project." More along the lines of best practices for refactoring django projects, or what has the reader learned after refactoring django projects. This question does not require the reader to dive into your code, but to relate what they know about the topic. Easier and much less time consuming for the reader.

You could also offer to pay someone to help kick start your project, and then if someone responds, take the discussion offline.

As you refactor the project and run into issues, be sure to post those very specific questions and short code segments/error message to the list. The folks here are very friendly, extremely knowledgeable, and very willing to help as long as you make it super easy for them to help you figure out the answer to a specific question.

God luck!

Mark. 


>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/9OU0TfwcmTQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

bobhaugen

unread,
Mar 7, 2017, 9:50:23 AM3/7/17
to Django users
> But don't be dismayed if no one responds. 

I'm not at all dismayed, and knew it was a shot in the dark, but might as well try for somebody who likes to discuss Django refactoring, or might be interested in the stuff we are building. And thanks again for the responses to my question about why no responses. 

>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/a3e12fd2-fc27-447a-a5f5-e394c3d67cff%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/9OU0TfwcmTQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4d7559f1-e3a2-64f0-d6b3-60c902e17921%40djangodeployment.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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

> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BSvw0WRHpTUUV1RceS8MWuRjGQ3JyJqZ%3DCKdKGSLYV8%2BQma2g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
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 https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages