Is Django Right for Me?

134 views
Skip to first unread message

KevinE

unread,
May 27, 2012, 12:28:20 PM5/27/12
to django...@googlegroups.com
Not a web developer but have a bit of software savy and looking to develop a custom app for use in my business which is consulting engineering. I want to develop application that helps me in documenting inspections I make on a jobsite. Basicly what happens is I would go out with a tablet and use my webapp to collect and document construction progress mainly to document construction deficiencies and monitor progress of construction. From the data collected on the job site I would push this data through a reporting engine to prepare a pdf style site review report which would get emailed to the project architect, all the consultants, owner and contractor - the intent is to have this happen while on the job site. On the office side I want to develop a basic project based document management system where I can document when field reviews were conducted, summarize deficiencies and also ensure that deficiencies are completed and signed off on (as the engineer I take legal responsibility for all the deficiencies). I also want to be able to manage all my projects find projects by client, owner, architect etc. 

By the looks of it Django should be able to do all this but the one issue that I am unsure about is an offline mode. The idea is to have a tablet with a data connection but if there is no data connection I still need to complete the forms and cache the data until it can be sync'd later on. From what I have read, data syncing can get a bit knarly, something I don't want to get into myself. 

I envision a custom android app for the tablet - for this I need access to the GPS and camera (my ultra cool feature will be my tablet automatically pulling up a project page as I drive up to the job site based on the GPS coordinates!). Will this be a web page or will it be an actual app?

Guess I am looking for some basic advice on how to architect this with the above issues in mind. 

Russell Keith-Magee

unread,
May 27, 2012, 7:45:58 PM5/27/12
to django...@googlegroups.com
From what you've described, Django will certainly be able to help out
here. However, you're going to need to combine Django with some other
tools to solve all your problems.

Django is a server-side framework -- that is, it deals with the
database and web server that doles out content to whatever client asks
for it -- be it web browser, mobile app, or whatever. In terms of your
problem, that means that Django will be able to provide the interface
by which data is submitted to the server, store the data that is
collected, and provide a web presence to serve that data back to
users. Django doesn't have any built-in PDF generation capability, but
there are a lot of Python libraries that can be used to generate PDFs,
and it's easy to use Django to extract data and feed it into a PDF
generator. Django's documentation contains some simple examples of how
this can be done. [1]

[1] https://docs.djangoproject.com/en/1.4/howto/outputting-pdf/

So - Django will be great on the server side. However, the bigger part
of your problem is the client side, and that's an area where Django
has deliberately avoided offering a solution, so you'll need to
combine Django with some client-side tools that are able to:

* Provide access to the camera and geolocation features of the device you're on
* Store data on the device while there is no live access to the server
* Cache updates on the mobile device while offline for delivery when
it comes back online.
* If necessary, synchronize updates made on the mobile device with
updates on the server

Features like geolocation and offline access can be implemented in
native HTML5 without the need to build an app at all; see
http://html5demos.com for some examples of the cool things you can do
on webpages with a modern browser. You can also use a HTML5-based
development approach embedded in a native app container; for example,
tools like Phonegap [2] and Appcelerator [3] are designed to help out
here.

[2] http://phonegap.com/
[3] http://www.appcelerator.com/

I can't say I know of any libraries that can be used to address the
synchronisation problem -- but then, I haven't really been looking for
one either. It wouldn't surprise me if there is something out there
that you could use, but if it does, it's got very little to do with
the Django side of the fence -- all Django cares about is that you're
using HTTP to communicate with the server.

So - in summary:
* Yes, Django could be a useful part of your tech stack to do what
you're describing
* However, it won't solve the problem on it's own -- you'll need to
pick a client side framework too.

Yours,
Russ Magee %-)

ivan sugiarto

unread,
May 28, 2012, 12:15:31 AM5/28/12
to django...@googlegroups.com
furthermore if you want to integrate Django, Tablet and PC you should make Django webservice (either using Json or XML), after that you must create Tablet and PC application that fetch django webservice.

So the rough architecture would be :

Web Apps (ie Django, PHP or Java) --->create Web Service (XML or JSON) ---> Fetched by (using either GET or POST method) Android or PC apps

the android or pc apps must use database to store data for offline use, I recommend sqlite http://www.sqlite.org/, i have used it in numerous apps and it runs smoothly :)

PS sorry of my bad english


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
ketika anda mentok, anda bisa memutar atau maju terus, tapi tidak mundur

Ivan Sugiarto Widodo, ST
Commander In Chief
PT Widodo Rekayasa Komputasi
http://ivan-sugi.blogspot.com
http://wirekom.co.id

yati sagade

unread,
May 28, 2012, 6:17:39 AM5/28/12
to django...@googlegroups.com
Hi
As per a previous answer, Django is a server side framework, and should handle most of your use cases. But you're on your own with the offline caching thing. You have to build some logic in the client side of the app. If I were you, I would have created a RESTful API using django-piston (a Django app to easily create RESTful APIs). Then, my server side interface would essentially be technology agnostic. On typical web clients like a browser, you could use HTML5 offine storage capabilities( a new feature) and AJAX to accomplish your task. Then from a tablet app, also, you can make requests to these REST endpoints you created to push the data to the server, and  offline storage for this type of a client should be easy to get I guess(I have no Android experience). This design will make your app very loosely coupled and highly flexible. Also, do share with us whatever you end up creating(as long as it is not Flash :P).

Cheers!
Yati Sagade

Twitter: @yati_itay

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869


KevinE

unread,
May 29, 2012, 8:33:16 AM5/29/12
to django...@googlegroups.com
Thanks for all the posts - the more I look the more overwhelming web development is getting. Seems every sentence I read requires starting another search to found out WTF this term or that term means.... grrrrrr....

Just one question - why would django avoid an offline mode - is that a completely unreasonable/undo-able extension? It seems to me that smartphones may eventually take over normal computers on the web but with the inherent distinction that on a smartphone you are not always guaranteed a data connection. I have been looking at all the mobile development systems and very few (if any) have really dealt with offline mode (not sure how powerful html5 is and whether you could support it for a complete database?) 

So if I uncouple my client app am I not losing all the advantages of using django? Seems to me I will be rewriting alot of my code...

Carsten Agger

unread,
May 29, 2012, 8:42:14 AM5/29/12
to django...@googlegroups.com
Den 29-05-2012 14:33, KevinE skrev:
> Just one question - why would django avoid an offline mode - is that a
> completely unreasonable/undo-able extension? It seems to me that
> smartphones may eventually take over normal computers on the web but
> with the inherent distinction that on a smartphone you are not always
> guaranteed a data connection. I have been looking at all the mobile
> development systems and very few (if any) have really dealt with
> offline mode (not sure how powerful html5 is and whether you could
> support it for a complete database?)
>
> So if I uncouple my client app am I not losing all the advantages of
> using django? Seems to me I will be rewriting alot of my code...
>

Django is inherently a Web application framework. You could build
off-line applications to be used by one person with no connection to the
Internet, but the easiest way to do that would probably be to set up a
local Web server, e.g. an Apache server. So it would be online, but it
would still be "Web".

--
Carsten Agger
Magenta ApS
�bogade 15
8200 �rhus N

Tlf +45 5060 1269
Mob +45 2086 5010
http://www.magenta-aps.dk
cars...@magenta-aps.dk

Javier Guerra Giraldez

unread,
May 29, 2012, 10:05:33 AM5/29/12
to django...@googlegroups.com
On Tue, May 29, 2012 at 7:33 AM, KevinE <kel...@elburyconsulting.com> wrote:
> Just one question - why would django avoid an offline mode - is that a
> completely unreasonable/undo-able extension?

Django is a web server framework. when you're offline, you don't have a server.

> It seems to me that smartphones
> may eventually take over normal computers on the web but with
> the inherent distinction that on a smartphone you are not always guaranteed
> a data connection.

smartphones are clients, Django isn't supposed to work there. there
are plenty of smartphone frameworks, those that are web-oriented
usually work with any server-side framework, typically by some REST
interface. some of them also help with the offline problem. (i
haven't use any of them yet, but it's a recurring theme in their
websites)

--
Javier

Marcin Tustin

unread,
May 29, 2012, 10:58:43 AM5/29/12
to django...@googlegroups.com
Django makes up one part of the web stack: the application server. It doesn't have a robust webserver. It doesn't have its own database. Likewise, it doesn't have its own client-side application toolkit.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/a_3u8sBjLFMJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Marcin Tustin
Tel: 07773 787 105

Message has been deleted

Mike Dewhirst

unread,
May 29, 2012, 8:11:32 PM5/29/12
to django...@googlegroups.com
On 29/05/2012 10:33pm, KevinE wrote:
> Thanks for all the posts - the more I look the more overwhelming web
> development is getting. Seems every sentence I read requires starting
> another search to found out WTF this term or that term means....
> grrrrrr....

The most important part of the architecture "stack" is the user. It
seems to me that as you are the problem-domain expert you are far too
valuable a development resource to waste your time on the
technicalities. I know you are a savvy user but that might be getting in
your way at the moment.

In your place, I would look at the smallest possible useful bit of
software I could (more or less) easily develop myself. The key to
deciding what to do is identifying the most valuable benefit achievable
in the shortest timeframe. That instantly eliminates all the big items.
Then you build it and start getting business value from it. Then you
open-source it and get a community going.

It would help if you could draw a parallel between your own business
requirements and the business requirements of software developers so
that the same app would work for both. That way you get an armchair ride
and only have to tweak stuff to suit yourself.

Bottom line is that Django will only be an appropriate part of the stack
for your app if you embrace developers who are comfortable with Django.
If you are going to do it yourself you need to become comfortable with
it yourself or use something you know already.

My personal view is that the learning curve for client-side stuff is
much steeper than Django on the server side. Also from my perspective it
is a very big ask to cover the entire stack by yourself. Django is very
nice and you can do most of it yourself if you postpone the really hard
stuff until you have more experience or at least can specify it exactly.

It looks like a nice app. Good luck.

Mike

>
> Just one question - why would django avoid an offline mode - is that a
> completely unreasonable/undo-able extension? It seems to me that
> smartphones may eventually take over normal computers on the web but
> with the inherent distinction that on a smartphone you are not always
> guaranteed a data connection. I have been looking at all the mobile
> development systems and very few (if any) have really dealt with
> offline mode (not sure how powerful html5 is and whether you could
> support it for a complete database?)
>
> So if I uncouple my client app am I not losing all the advantages of
> using django? Seems to me I will be rewriting alot of my code...

kenneth gonsalves

unread,
May 30, 2012, 1:47:52 AM5/30/12
to django...@googlegroups.com
On Tue, 2012-05-29 at 09:05 -0500, Javier Guerra Giraldez wrote:
> On Tue, May 29, 2012 at 7:33 AM, KevinE <kel...@elburyconsulting.com>
> wrote:
> > Just one question - why would django avoid an offline mode - is that
> a
> > completely unreasonable/undo-able extension?
>
> Django is a web server framework. when you're offline, you don't have
> a server.

you can run a webserver on a netbook or laptop and run django too. If
you use sqllite, it is dead easy to sync your local db with the one on
the net the moment you get connectivity.
--
regards
Kenneth Gonsalves

马龙

unread,
May 30, 2012, 1:58:03 AM5/30/12
to django...@googlegroups.com
can you explain your question more clearly ? Djanjo is a *FULL STACK* web dev framework 

2012/5/30 kenneth gonsalves <law...@thenilgiris.com>
--
regards
Kenneth Gonsalves

--
You received this message because you are subscribed to the Google Groups "Django users" group.

kenneth gonsalves

unread,
May 30, 2012, 7:57:31 AM5/30/12
to django...@googlegroups.com
On Wed, 2012-05-30 at 13:58 +0800, 马龙 wrote:
> can you explain your question more clearly ? Djanjo is a *FULL STACK*
> web
> dev framework

is this addressed to me or to the OP? If it is to me, as an example, I
have a django site that monitors and reports on various construction and
other activities. The supervisor goes to the villages with netbooks. If
there is connectivity, he enters the data directly to the server on the
internet. If not, he has a local copy of the site running on his netbook
with a local copy of the database, synced before he leaves his office.
So he enters the data on that and later syncs it with the server. It is
not rocket science to write the scripts for syncing.
--
regards
Kenneth Gonsalves

Message has been deleted

kenneth gonsalves

unread,
May 31, 2012, 1:57:09 AM5/31/12
to django...@googlegroups.com
On Wed, 2012-05-30 at 12:01 -0400, Dennis Lee Bieber wrote:
> > other activities. The supervisor goes to the villages with netbooks.
> If
> > there is connectivity, he enters the data directly to the server on
> the
> > internet. If not, he has a local copy of the site running on his
> netbook
> > with a local copy of the database, synced before he leaves his
> office.
> > So he enters the data on that and later syncs it with the server. It
> is
> > not rocket science to write the scripts for syncing.
>
> If there is only one "supervisor" doing this, it may not be
> difficult...
>
>

that is the use case of the OP - and I do not see a big problem if
multiple people do it. Yet to test it out in practice. After all that is
what a dvcs does.
--
regards
Kenneth Gonsalves

Reply all
Reply to author
Forward
0 new messages