Single Page Application or Multi-page Application? [closed] - django

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am working on a web application project. This web application will have many users, and each user will be able to upload images to the website. Then I will write an android application to access those images. This is the description of my project.
Should I go with single page application such as backbone.js or should i go with a multi-page application approach such as Django? For the database stuff, I was thinking of going with Mongodb for now. Any advice on that is very appreciated !
Thanks,

An SPA (single page app) has nothing to do with going with Django or Backbone. You can write an SPA while using Django. BUT you can also use Backbone along with Django. For more on this, read these posts:
http://sidazad.tumblr.com/post/52201957429/web-2-0-the-switch-to-client-javascript-frameworks
http://sidazad.tumblr.com/post/52591790157/the-search-for-the-perfect-software-stack-part-1
To answer your question, I'd say use Backbone + Django and go with a Single Page App. That's where the web is moving. By using Backbone as well as Django you will get the advantages that Django provides on the server side while getting the great client side code organization and plumbing for a SPA from Backbone.
There are ways in which you can write your django templates so they are reusable on the client side. Look at this project in my GitHub for help with this on which I will be writing a post soon:
https://github.com/sidazad/django-backbone-stack-1

Related

Confused about API relevance and Django [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
Im new to web development and trying to learn APIs through Django Rest Framework. I am actually confused about why we actually need to build an API. For example, I've seen tutorials of creating blog APIs, where it returns the posts and its info. Why would we need an API for that? We can simply create regular Django views to do the same. I've heard that APIs only provide the 'data', but I can also obtain data from regular Django. So why would you install a totally new 'sub' framework to do these for you?
Suppose you want to build a mobile application that serves some blog posts. have you thought about how you are going to fetch the blog posts from a back-end.
Take the case of instagram, the app fetches images,comments and tags from the django backend in the form of json data and can display relevant data on the application. in short, APIs can be used when the backend and frontend technologies are different and they can communicate through APIs
The biggest reason to use Django REST Framework is because it makes serialization so easy!
see this medium post
https://medium.com/#BennettGarner/build-your-first-rest-api-with-django-rest-framework-e394e39a482c

Django best practice combain REST API with Web application or sperate the both? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am currently working on a Project with Django backend and Flutter frontend. We have to do a Web application for the admin for adding data to the Rest framework/Database (excluding the admin panel).
My question is, should I add the web application to the existing API project, or should I start a completely new Project.
it's possible to start a new project and use the same database but i think it's not a true way according to the django principles and you can simply add another app in your project for your web application.
off course you know that django-rest-framework is a library based on django framework,not an another framework!

Best way to have a web user interface for a Qt application? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have written a service using C++ and Qt framework (QtService). The service should run in the background. I need the service to have a web user interface and can be accessed using web browsers. I mean the service should act as as a web server and output html content to a specific port. I know there are some frameworks that can be used to generate web content in C++, but by taking into account that I am using Qt, I prefer to use Qt features as much as possible rather than a new framework. Any ideas?
I have read about Cutelyst on the Qt blog a few times, which seems an exact fit to your question.

How Django ORM, REST API and a Web app stack up? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to develop a web application in Django including a REST API and also a web application to allow user to login and see stuff. I'm a bit confused as to how these are connected together.
I'm thinking that Django ORM is at the bottom and on top of that comes the API and then the web app uses the API to generate HTML. Is this correct understanding? A yes or no with few {key}words explanation would be enough.
What is the best practice?
Basically Django ORM is the bottom layer in your app as it will make possible to manipulate your data. When it comes to APIs, the main goal is to make accessible and manipulable your data from different devices (clients), for instance your web app and your iOS app may consume the same API and that will reduce your implementation time and eventually it will give you a better integration through your different clients and devices. Last but not least, the Web app is at this point the consumer to your API and your front-end.
You could check Tastypie or Django REST framework/ in order to implement your API and for your web app you have plenty of frameworks that you could use as Backbone, AngularJS etc.

What to use for a backend setup while working with AngularJS in client-side? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I need to build a backend for a web application, i'm using AngularJS in the client-side, but i'm lost in what to use to accomplish the backend stuff as well as the web service.
I've read about Breezejs but it requires .Net, i know php btw (yii), and i need this backend to accept and return JSON. It will be used to store users info and do crud operations.
This is a subjective question, not very suitable for StackOverflow...
...but I must recommend Laravel 4, since you are used to PHP.
If the INPUT is JSON, the framework delivers it to you easily:
$value = Input::get('key');
If you are returning a model, its toArray method is applied automatically:
return $this->user->configuration;
The code snippet above is actually a real single-liner controller method I have in my app. The user is already logged in... there is a "configuration" table (one-to-one relationship)... With the above line, Eloquent (Laravel ORM) will make the proper query, fetch the result, and return the record... and it will be transformed into JSON for delivery...
I am used to several PHP frameworks, from Code Igniter to Symfony 2 - and I've never been happier than now with Laravel 4.
Yii is a normal solution since you already know some PHP, so this is the easy way.
Another way is if you want some exotic, I'll recommend CompoundJS framework for node.js, its good for REST API.