As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Today, Facebook announced an entirely new way to share user actions on your site on through your app. The documentation is a good attempt at explaining how things work, but if I hadn't already built a sophisticated app off the existing OpenGraph API, I would probably be lost.
What's not made clear, at all, is what happens to the "old" permissions. Facebook wants us to prompt our users for the publish_action permission. I assume I can start (or can I not start yet? not clear here when this is usable on my live site) passing publish_action as a permission in my getLoginUrl (PHP SDK) call immediately.
What happens to the now "old" publish_stream permission? Do I need both? Will publish_stream be fazed out? Can already granted publish_stream permissions be translated in to publish_action so I don't have to prompt all my users for a new permission and scare them away? How do I future proof my app? What about that SPAM algorithm Facebook unleashed on app devs a few months ago, killing people's apps because they were "abusing" the publishing mechanism... does that exist for these new actions? Is there any guidance on how not to upset the algorithm gods and get banned?
I realize the new API was only just announced a few hours ago, but these are important questions and I seriously doubt I'm the only one that has them. I'd love to hear some feedback on this.
You can start testing publish_actions today, but shouldn't be asking users for it yet in your production apps until open graph launches more broadly.
publish_stream will continue to exist for more explicit posts, but we encourage apps to use open graph for Timeline apps.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm using Angular.js for my project. The business logic is developed within Angular I'm just looking for two things:
I need a way for easy user authentication and I don't know how to implement it through Angular.
I need a server side framework that provides a REST Api, an api for implementing a relational data model and good suppport for databases like Postgres or Mysql.
Now I'm using the Django framework for these two things it works perfectly with databases and provides a beautiful api for working with data, but I feel using Django along with angular is not a good solution because I don't use much of the functionalities that Django provides. I just need a simple REST api with a good Data Model api. Any suggestions for me?
I think it really depends what exactly you are using from Django. If the API is simple, you don't use many middleware classes, context processors, etc.. then you could drop it. If you are used to Python there a bunch of lightweight WSGI web frameworks out there, for example Bottle or Flask. They usually perform a little better than Django + they are mostly written so you can easily create REST API's. The "disadvantage" is that if you need specific things like a SQL ORM or some cache handling you have to include these batteries separately and can not use the Django own parts you are probably used to. This also includes to roll your own authentication system.
I think you have to figure out if you really want to rewrite the code. I personally think that the slight performance boost is often not worth the effort and time.
Regarding question 1 (authentication), this blog post + sample explains a great solution :
https://github.com/witoldsz/angular-http-auth
I don't know much about Django but I would be surprised if you couldn't change its "rendering mode". I've been using Express (Node.js) to expose a REST api. It was easy to swap from HTML rendering to JSON.
This may not be appropriate for your environment (not sure what platform you are on), but our current project is using AngularJS with a REST-like back-end built with ASP.NET Web API. It all fits really well together. As Web API is built on top of ASP.NET you get authentication 'for free' and there is no shortage of relational database frameworks out there for .NET. We're using Entity Framework Code-First with a bit of Massive thrown in here and there. That works fine for what we need and is really quick and easy to put together but you could also use NHibernate or any of the many other frameworks which are available for .NET.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm building a new web app. It will be in Django, but I'm now looking for a good frontend javascript library/framework to use.
I know JQuery, but what about Backbone.js or node.js? Thoughts?
I'm looking past JQuery because an MVC JavaScript library would be nice to use.
The things you're talking about all serve different purposes, and I'm not sure any of them is an exact match for what you said you want.
As you know, jQuery is all about client-side presentation and interaction, implemented in the browser.
Django -- a fine MVC framework for pythonistsas -- is the only thing on your list which codifies the MVC approach.
Node.js really isn't a front-end. It's "just" javascript (V8) grafted on to an event loop. Really. That's it. And your browser migth be running V8 (Chrome does) but it's not going to be running node.js. Node.js is about server-side javascript goodness. Since you're already doing your backend in Django, you've already committed to python. So node.js probably isn;t a consideration.
But here are some things you might like to know if you decide to do your app in javascript instead. Node.js has a lot to offer on the server. While node.js itself mostly provides a solid API abstraction over the network and filesystem layers, the ecosystem is amazing. The most widely used "web back-end framework" there is express. The docs are a little rough compared to what you're used to with Django, but you can build great sites. There is no baked-in MVC model (yet, that I know about, but that could literally change today) and persistence is provided by a bewildering array of database modules for just about every store you'd ever want to use. If you asked node.js proponents, I suspect at least a few of them are not very interested in the "old" MVC approach.
I don't know much about Backbone.js, but as I recall it's focus is on supporting ReSTful implementations and helping you avoid the sort of tangled mess that javascript middleware can easily become. (Of course it's possible to be elegant in javascript; but it's easier to be messy, especially when you add async events.)
I don't know why your question got dinged, and I hope this at least provides some food for thought. Good luck!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am building my first web app with jQuery/CSS3/HTML in the front end that would GET/POST data from a backend implemented in DJANGO.
For this, I would like to build entities in DJANGO that are ReSTified. The DJANGO site https://www.djangoproject.com/ talks mostly about DJANGO MVC. I dont think I want MVC. Am I thinking right? If so how would I get DJango do ReST for me?
Moreover what style of architecture is better? MVC or ReST?
Can you please advise?
Regards,
Manav
These are completely orthogonal concepts.
Django is built on the MVC pattern (in fact a variant of that, better referred to as MTV). That simply refers to how the application is structured - in Django's case, with models, views and templates. If you're using Django, you can't get away from that.
REST is a pattern for how an application interacts with its caller - ie by using HTTP verbs and serving up (usually) JSON. You can't "build an application in REST", but you can write a REST application using any structure you like, including MVC.
Django itself is an MVC framework. However, there are apps available that will allow you to create an API for your models.
I believe that the most common ones are django-tastypie and django-piston
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am learning Django and has made a simple app. I was thinking of deploying that app to Google AppEngine.
What is the easiest way to do it (i.e. the one which involves changing as little code as possible)?
What is the best way to do it (i.e. the one which supports most of Django's features)?
I know similar questions have been asked here but none of the questions were asked after Nov 2010 (http://code.google.com/appengine/articles/django.html)?
If you want to learn full django with Google App Engine the project to recommend is www.allbuttonspressed.com
It implements full django with Google App Engine. If you want to learn the basics I suggest starting with SDK 1.6 and python 2.7 so that you realize that upgrading from python 2.6 to 2.7 without manually copying in the django you use will break django dependance.
I used much django with app engine but I'm getting out in favor of Jinja2 for template engine and WTForms for forms since with python 2.7 the google.db.djangoforms is not available so for more advanced stuff than basic forms you would want a form framework and WTForms seems OK though I didn't use all of it yet.
I hope some of these opinions from me be relevant.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I've been using wordpress for a few years to run a couple of community based sites. one of them is a blog, while the other is more of an app, and I use wordpress for the admin feature only.
I'm thinking of moving to django as I'm familiar with python, I want to play with geodjango and I don't feel an urge or the need to do anything from scratch.
What are your thoughts on going from the wordpress blogging engine to the django framework in terms of programming, extensibility, scalability, speed, etc...
cheers
Django and wordpress cannot be compared, because, like it is said in django docs: "Django is a thing that you use to create things like wordpress".
If you would like to compare the speed:
Wordpress is really slow engine. One of the slowest. Sometime it needs to make 30 hits to database to show only one page.
In django it completely depends on how you white your app. You can make it slow, fast, or whatever, depending on your skills and functionality that you wish to receive.
So, your question can't be answered, because you must decide whether you are whilling to make your new blog from scratch or not. If you are, then Django would be a great choice. If not, stay on the wordpress, or try a different engine.
Wordpress is a CMS. Django is a web development framework. You cannot compare them in any reasonable way.
Everything that you get for free from Wordpress you will need to work for in Django, or at the very least install a pre-existing module for it.
The effects of scalability and performance will only depend on your implementation of the things you want to do in Django.