Sunday, July 14, 2013

Re: Choosing a JS framework to go together with Django

Hi

FWIW an approach I have taken is to split the app into two components, one is a REST based API (developed in Java, but you could use Django), and a website developed with Django. The website renders pages of content (all SEO friendly, with known urls), all interactive JS is provided by jquery, and I use the '/ajax/...' url for browser calls to the website app (validation, autocomplete, etc...). This split gives you the option to develop mobile clients against the API, and to host components on different machines. If you want to start small one option would be to build you API with Django and use the '/api/...' url. That way you can combine API and website on the same server until you need to split things. And using host names like api.foo.com and foo.com makes that relatively painless.

François


On Jul 14, 2013, at 10:52 AM, Jon <jon.ronnenberg@gmail.com> wrote:

> The idea is to generate pure HTML views for non JS clients like search bots. If your view depends on AJAX calls, then it defies the purpose.
>
> I've been developing native mobile apps for the past year, so I get your argument about providing REST end points for your data.
>
> The point of my original post was to NOT do two different views; one for search bots and one for browsers.
> I agree that providing a REST interface is the "right" way to provide data for both browsers and mobile apps. To that end, the project I was suppose to work on, used tastypie.
>
> // Jon
>
> On 14/07/2013, at 15.16, Phang Mulianto <braveh4rt@gmail.com> wrote:
>
>> Hi ,
>>
>> Why not using REST for serving your data to the Front End app, it can be from mobile app or just web app with HTML + javascript.
>>
>> With that you don't need to worry about redo the template side in django and in your front end js app.
>> With REST serving JSON, no template / html needed for the response.
>>
>> You can use Tastypie or Django rest framework which still using Django engine . This way also your application server no need to rendering the HTML view in every request from the first time.
>>
>> Any front end will be able to process the JSON with javascript.
>>
>> Regards,
>>
>> Mulianto
>>
>>
>> On Sun, Jul 14, 2013 at 8:18 PM, dotnetCarpenter <jon.ronnenberg@gmail.com> wrote:
>> In the end, my project stalled due to lack of resources. We might pick it up but it's been abandoned for quite some time. I haven't had any django projects since. Hence, I can't make any recommendations.
>>
>> DjangoAjax looks promising but might lack the community support you expect. It is however based on jQuery and ASP.NET MVC, so if you can see past the M$ cruft, some guides etc are available.
>>
>> --
>> 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-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>>
>> --
>> 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/X_9qJJjiDfE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> 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-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate