Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Technical Question: Django for web/mobile app
2 points by xackpot 1444 days ago | hide | past | web | 4 comments | favorite
Hi Guys, I have a question related to the framework I am using to develop an app (webapp, mobile). I have a webapp with front end written in GWT and backend written in php and I use the same backend for my ios/android app as well. The backend has php scripts that either return json objects or simple responses. Now I was thinking of moving the whole framework to django because I wanted to make use of multi-threading provided by python and also to learn a new framework. So my question is, can I use django in such a setting? Basically, can I use the same server side code for both my webapp and mobile app? Has anyone from HN done it before? Can you please share your thoughts on how to go about it? Thanks a lot, appreciate your responses.

The backend has php scripts that either return json objects or simple responses

I am a PHP developer and I ran into this question recently. At the startup where I work, we have a web app that is completely Ajax driven. When we decided to convert those Ajax endpoints to an API to be used with a mobile app and possibly open it to the public, I did some research and eventually decided on node.js and Restify. One of the draws is that with an Ajax webapp, we already have a team of JS devs on staff, so there would be less of a learning curve. I'd suggest looking into it.

EDIT: I forgot to address the multithreading part. I believe that node.js is not true multithreading...it is event driven, so it can use a single thread more efficiently, which should achieve the same effect.

Thanks. I started to look into Pyjamas which is all goodness of GWT but written in Python. Node.js and Restify look good. I will need to explore more on these. The main reason I wanted to have multithreading in my app was to send notification emails on a separate thread than the main one, when an action is taken by a particular user and others interested in that action and are subscribed for notifications. It's like follow/notify model. I haven't found a solution for this yet.

I wanted to make use of multi-threading provided by python?

As far as i know that line is automatically false. Yes you can use django for returning html and json(django-tastypie for example).

Also please put more info in the title.

Thanks for the info. I was under the impression that python supports multithreading. May be I didn't do enough research. Updated the title.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact