Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Which AJAX library is the best for django and why?
Looking for one with a large database of tutorials, books and detailed documentation.
Which one is the easiest to work with?
Which one is in early development but shows great promise for the future?
Regards,
chriss
I highly recommend jQuery. There are several tutorials on how to implement it.
http://lethain.com/entry/2007/dec/11/two-faced-django-part-5-jquery-ajax/
http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields/
http://vincentxu.net/minimal-ajax-in-django-with-jquery-post
NOTE: Microsoft also announced a while ago that jQuery would be the official client-side framework for ASP.NET MVC, so its good to know regardless of what server side framework you're using.
I think this may be what you're looking for: django-dajax
Pretty well documented. Simple api. Very clean and nice. I plan on using it more in some of my projects. It's JS library agnostic, and works well with jQuery if that's your thing.
UPDATE:
Other solutions similar to dajaxice, but not standard dajax.
https://github.com/joestump/django-ajax - Joe Stump's solution that makes it dead simple to create restful endpoints from your models.
https://bitbucket.org/jespern/django-piston/wiki/Home - Similar idea, but a bit more robust. You can define the data format for your endpoints (xml vs json etc).
https://github.com/toastdriven/django-tastypie - Similar to piston, but I've had better luck with tastypie.
In the end they mostly work the same.
Define/include some predefined URL routes.
Register models/views/functions that will be used as data sources.
Enjoy.
UDATE2:
This advice is super old. Should probably research other solutions.
There's nothing about Django that makes any of the libraries easier or work better with the framework. Just use the one that fits your brain the best.
Having said that, my sense is that jQuery is more popular in the Django world and is what I personally use. Most notably, many of the apps in Pinax require jQuery. Some other shared apps and code snippets for Django:
http://www.djangosnippets.org/tags/jquery/
http://code.google.com/p/django-ajax-validation/
http://code.google.com/p/django-todo/
http://code.google.com/p/donita/
Also keep in mind that the newest Django books (Python Web Development with Django, Learning Website Dev with Django) use jQuery in their tutorials.
Checkout Dajax:
Dajax Project
Easy to use AJAX libraries for Django
Fast, easy and lightweight libraries
to implement AJAX inside your django
projects. Ready to use in 5 minutes.
Dajax is a powerful tool to easily and
super-fastly develop asynchronous
presentation logic in web applications
using python and almost no lines of JS
source code.
It supports up to four of the most
popular JS frameworks: Prototype,
jQuery, Dojo and mootols.
I've successfully used jquery, YUI and Dojo on different django projects. There's nothing about any of those that made it better to use with django specifically. I agree with jpartogy that mochikit may fit django more than any other just because of the "pythonic" (twisted-like) API. It really depends on what you are looking for in an ajax framework.
Personally I like what jQuery can do with given amounts of code but the greatest challenge in writing jQuery code is making it readable.
YUI is much more verbose than other frameworks because it sets a convention for using namespaces, but there are shortcuts to write less code and it avoids trying to make javascript look like something else.
Dojo tries to make javascript look like Java and from my experience is pretty slow. It has some nice widgets and a javascript implementation of the django templating language (which is pretty useful even outside of django projects).
I personally avoid prototype and mootools because they can break other javascript code (or vice versa).
If you are new to javascript and ajax I'd recommend jQuery because it's the easiest to start with. But I don't expect any js framework to be integrated with django mostly because there's really no need for that.
+1 to Soviut and Daniel for good answers. Jquery is a nice framework. Besides Pinax a couple other "big" Django applications use it: Satchmo and Review Board (which switched from another framework... mootools IIRC).
Also popular is rolling your own Javascript without using any framework, for example the Django admin.
The only other suggestion I might make is that, if you are a very experienced Pythonhead, then you might like mochikit which comes under some criticism for being too 'pythonic'.
It seems to be the framework of choice for Turbogears but I personally haven't seen any Django projects using it.
Okay this might be subjective because the definition of 'best' can mean different to each individual. But since you are working with Django, that means you will get your hands down with Python syntax. One notable Javascript library that doesn't get exposed too much is Mochikit. The good thing about it is it has syntax that is familiar to Python programmer (because the creator is a Python programmer). It has quite nicely written down documentation as well. TurboGears out-of-the-box supports Mochikit.
If you need to work with AJAX in your django projects with very little setup and simple to use, my offer is:
django-ajax (Github, Pypi)
Fast, flexible and easy to use AJAX libraries for django projects. Contains ajax decorator, ajax middleware, shortcuts and more.
The phrase "Best AJAX Library" is highly subjective and depends on personal preferences, existing know how, requirements of the work etc. etc.
While I prefer jQuery for (almost) everything, I know some people whio swear by Dojo or ExtJS. There might be case where you want to use jQuery but requirements might be dictate that you use ExtJS.
All said. Use jQuery. jQuery rocks ;)
Django doesn't really tie in with the client side. Use whatever you're comfortable with. Django plays well with everything in that area, because you just write it in the templates.
Related
I'm looking for a set of Javascript based UI components for a web app I'm building and have found that many of the best looking web apps were built with the Capuccino framework; see http://www.getflow.com/, http://www.picsengine.com/home/ and http://timetableapp.com/ for examples.
However, I'm not a Cocoa developer and have no interest in learning Objective-J. Ideally, I'd find a set of components that provide the visual end result of Capuccino apps without the underlying weight of the framework.
I have seen the Aristo jQuery UI them (http://taitems.tumblr.com/post/482577430/introducing-aristo-a-jquery-ui-theme), but jQuery UI just doesn't seem to have the depth of components available in Capuccino.
I realize this may be a long shot, but I figured it can't hurt to ask. :)
Thanks.
As another option, there is jQuery UI: nice if you are already familiar with jQuery, with the plus side of not being too heavyweight, but may not have all the components you need pre-defined. A nice thing is that it encourages to write the HTML in a way that degrades gracefully when your application in older browsers.
Maybe sproutcore is an alternative for you, although it requires you to hand-code everything in javascript from scratch. It offers most basic components and is easily adjustable to your personal design goals. Sproutcore is used in Apples Mobile Me and in some other big projects.
Another possibility might by vaadin which offers a rich set of prebuild controls and is based on Googles GWT javascript compiler. But it only makes sense if you are developing in a java environment.
I already know Asp.net and C#. I want to build web site, and I need to choose between learning Silverlight or learning Ajax.
The site will be (visual) with nice tables and a little graphics, and with hard work with db.
My question is what is the recommended way for me, and the reasons.
Thank u and sorry for my English.
Microsoft's current position would indicate that you should go with Asp.Net + HTML + CSS + jQuery (I would use MVC as it gives you much better control as to what gets rendered in the page, but that's just a recommendation).
http://mashable.com/2010/10/29/microsoft-silverlgiht-html/
Even if we ignore all the news regarding this shift from SilverLight to what's commonly being called "HTML5", learning & using jQuery + HTML + CSS has several advantages:
From a personal standpoint, all the knowledge you'll get will be useful for C# and for any other languages you need to use in the future for developing web apps.
Using Silverlight (or flash) you are basically telling search engines to ignore you. Ok, maybe it's not so radical, but you'll have a hard time trying to make your page climb positions in Google & Bing, if you intend to do so.
Silverlight makes you depend on a browser plugin. Your page won't work in any OS or browser that doesn't have the plugin installed.
You'll find much more information and documentation for jQuery + HTML than for Silverlight, as jQuery is used not only with C#, but also with PHP, Java...
As a benefit of using Silverlight, however, you will gain the ability to stream DRM'd content (it's actually Silverlight's and Flash's main strength right now). How useful that will be to you, I don't know.
The question promotes somewhat subjective answers, so please understand that the answers will vary from person to person.
I would prefer AJAX in this instance. If you need to do a lot of animation then silverlight is probably your best bet. However, if you're looking just to display tabular data (with some graphics), the most commonly used approach (by my observation) is to use AJAX to populate tabular data.
The most common use I see for Silverlight these days is media streaming and proof of concepts.
First of all, I'm sorry because of this lame question. But I'm kind of lost in all dynamic-html, ajax, etc stuff. So i decided get help from the pros.
Basically what I'm trying to do is creating a web page which have dynamic content(messages) coming from a web server(asp.net or php) presented in floating(movable by viewer) boxes in the page. And those boxes will be created dynamically upon a trigger from the server. And the viewer should be able to draw lines between those boxes to connect them(this information will also be sent/received to/from the server). Now which technologies should i use to have this? Is a combination of ajax+html5+jscript enough for this? Or do i need libraries like Yahoo's YUI, Google's GWT, etc.? Or, is flash/silverlight the best solution? Or something else?
Thanks
I'm no pro but I'd go for the HTML+JS+CSS version. As for the libraries, they'll help you in getting your content accross the many browsers and provide you with some nice utilities ;)
You don't need frameworks to do any of this. They might make the job easier, but, ultimately, they'll produce HTML and Javascript that make use of AJAX to get the job done.
Sounds like a big job, so be sure consider appropriate server-side and Javascript frameworks, and good luck.
You first have to decide between HTML5/JS/CSS, Flash and Silverlight for your client technology. Consider the client machines you need to support (Windows, Mac, Linux, iPad etc.)
You then pick your server-side language/platform. AJAX is your communication medium.
If you're going with HTML5/JS/CSS you'd like to pick a JS framework to speed up development. jQuery makes for quick coding. Other frameworks may have more features but are more abstracted from plain JS. You might want to use GWT if you're more familiar with Java than Javascript.
I know this is a duplicate kind of question.
I have worked with ASP.Net and ASP.Net MVC 1.0. I never really got a chance to get into ASP.Net AJAX.
My question is it really worth to invest in learning ASP.Net AJAX 3.5 or 4.0 given the fact, I have hardly used it ?
Please let me know your advise.
EDIT : - Thanks all for your response. Robert\Justin\etc have provided valuable insight.
I have a copy of ASP.Net AJAX In Action in my office library. My guess this book should be pretty enough for me, though It was for ASP.Net 2.0.
Do I need to invest in books\Time for ASP.Net AJAX 3.5 or 4.0 ?
There are so many Ajax Libraries out there, is not even funny. Here is a good link on what is out there.
Since we already use ASP.net, I made sure to spend a little bit of time familiarizing myself with asp.net ajax. Just enough to do the basics. However, for everything else, we use jQuery, which, by the way, integrates nicely with ASP.Net. Have you ever wondered why the ASP.Net team has started supporting jQuery: intellisense, included scripts, contributing to the project, doing demos with it, etc...
So here is my 2 cents. Look into the basics in asp.net ajax but focus your efforts into, IMHO, a better library like jQuery.
Good luck!
-D
Are you interested in it? Do you think you might want to use it someday for something? Do you want to make sure you're equipped to use the best tools for the problem at hand?
If you answered yes (to any of them), you should invest the time to learn it.
You can never hurt yourself by learning new things (as long as you learn how to properly apply them).
ASP.Net AJAX is probably not worth learning if you're going to stick with Asp.Net MVC going forward. Or to put it another way... You can spend your time and resources learning something else.
It's not that it's a bad framework, it's good. But it's designed to make javascript familiar to .Net Developers who are used to the Webforms model.
I suspect that MS has de-emphasized the role asp.net Ajax will play in the future.
ASP.net ajax is a pretty terrible library, compared to the alternatives. The only reason to use it is if you are using the asp.net ajax controls.
Yes. Learn as much as you can as often as you can. While you may never use these skiils directly, the experience and breadth of knowledge will help you in any situation.
If you have an understanding of ASP.NET already, I'm assuming you also understand JavaScript and etc. As a result, AJAX wouldn't buy you that much (unless you're on a project that requires knowing it). If you plan on being a web developer for any length of time, I would say that Silverlight and/or jQuery would be much more valuable than Ajax.
I'm looking into doing a project for someone, and they want to implement a wiki into their site. I plan on building the site using Code Igniter, and I was hoping there was some kind of Wiki Application available, but I have not yet been able to find one. Does anybody know of one, or have any suggestions?
I understand that you might want to learn to implement a large-scale app in CodeIgniter. However, in the case of a wiki, don't re-invent the wheel! There are tons of already available wiki software for you to use.
A few of the best that are written in PHP include:
PmWiki
dokuwiki
MediaWiki (used by Wikipedia)
This way you can integrate these well produced systems, which have a wealth of documentation to your advantage. Instead of wasting time creating the entire wiki from scratch, you can just integrate the rest of your CodeIgniter application into one of these ready-made offerings. Saving you some time, learning about their inner workings and giving your client/friend a better overall system.
Expression Engine is built on CodeIgniter and includes a wiki module.
It's not in CodeIgniter, but you can include the classes in the Text_Wiki PEAR package.
The PEAR page has almost zero documentation, but there seems to be a lot of information here.
This will just do the conversion of wiki markup to html. You have to do the image uploads, page views, permissions, etc yourself.