Re: Is AJAX Alone Reason to Use TG?`
FWIW given my complete newbie perspective, I have a couple of reactions.First, it is clear that the answer to my question that started this meandering thread is a resounding no. I sort of expected that would be the case, but I just wanted to be sure. Second, there's only an advantage to adopting a particular AJAX or other JS toolkit or library into Django if it were so tightly integrated that it would make the job of using that library from within Django more seamless. But with seamlessness comes loss of control. (At the very least, it's true that trying to maintain control or the appearance of it while tightly integrating such functionality would be challenging and an unecessary diversion of resources.) To me, the Django dev team should focus on things only they can do (i.e., core functionality and extensions to it that really have to be in the base), leaving stuff like JS lib implementation to others who see an advantage to having some level of integration. Now that I basically understand how to implement AJAX in Django, I'm happy with the current thinking. What I wanted to avoid was a situation in which the framework I chose got in the way of implementing whatever JS or AJAX stuff I wanted. It seems clear to me that Django stays out of the path and that's where I think I like it. -- ~~Dan Shafer, Information Product Consultant and Authorhttp://www.shafermedia.comGet my book, "Revolution: Software at the Speed of Thought" From http://www.shafermediastore.com/tech_main.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?
there is no problems in using scripts like: http://www.dynamicdrive.com/dynamicindex17/indexb.html In Django,TG,Pylons,Web.py,Whatever Framework :) No widgets required. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?
On 8/3/06, Don Arbow <[EMAIL PROTECTED]> wrote: > Check out this comparison of the six most "popular" (Dojo, > Zimbra,Yahoo, Microsoft, Google, and Prototype), each has its own > strengths and weaknesses: Ehhh... I normally don't pimp my blog in here, but I don't think that's the best review to go by: http://www.b-list.org/links/2006/08/01/surveying-open-source-ajax-toolkits -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/3/06, Gábor Farkas <[EMAIL PROTECTED]> wrote: > - what would we gain by having an 'official' javascript library? Honestly? I think the only thing we gain is an end to people asking "which JS library is the 'official' one for Django?" ;) > so, is there something that django could do to make ajax easier? (except > the server-get-get/post-and-responds-in-json) I've outlined what I think we already do, and what we could do, to make AJAX easier; none of it involves generating client-side code or "recommending" or "endorsing" any third-party toolkits. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/3/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > I just came across this presentation: > http://domscripting.com/presentations/xtech2006/ > which describes a new layer/methodolgy on how ajax should be implemented. It's not really "new"; Jeremy's been advocating that, and smart people have been paying attention to him, for a while now :) > I personally would think implementing something like this would be a step > forward What's to implement (in Django, I mean)? The whole point of it is that you build a perfectly normal application, and then "hijack" it with JS -- Django offers the ability to do this right now, out of the box. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
I just came across this presentation: http://domscripting.com/presentations/xtech2006/which describes a new layer/methodolgy on how ajax should be implemented.I personally would think implementing something like this would be a step forwardand we could then argue about if mochikit or dojo or yui or none is a good implementation.regardsIanOn 03/08/2006, at 7:07 PM, Gábor Farkas wrote:James Bennett wrote: On 8/2/06, gabor <[EMAIL PROTECTED]> wrote: django does not force you to use the django-templating-system (you canuse myghty/zope-tal/whatever instead), but it clearly recommends thedjango-templating-system, and that's the system which is the mosttested/streamlined/documented/developed. I'm not convinced that the analogy holds; to me, officially endorsinga particular JS toolkit would be like re-wiring the template system tofavor a particular version of HTML. Just as the choice of HTML orXHTML and which version to use is best left to a case-by-case basis,the choice of which JS toolkit to use is best left to a case-by-casebasis. hmm.. probably this is the point where we disagree.. which is of course not a bad thing.maybe we should clarify what we mean by words like "endorse", "recommend", "support" etc.and also we're probably approaching this from the wrong end (or at least i).the real question probably is:- what would we gain by having an 'official' _javascript_ library?if the answer is "nothing" then we don't need an official js lib.so, is there something that django could do to make ajax easier? (except the server-get-get/post-and-responds-in-json)gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
James Bennett wrote: > On 8/2/06, gabor <[EMAIL PROTECTED]> wrote: >> django does not force you to use the django-templating-system (you can >> use myghty/zope-tal/whatever instead), but it clearly recommends the >> django-templating-system, and that's the system which is the most >> tested/streamlined/documented/developed. > > I'm not convinced that the analogy holds; to me, officially endorsing > a particular JS toolkit would be like re-wiring the template system to > favor a particular version of HTML. Just as the choice of HTML or > XHTML and which version to use is best left to a case-by-case basis, > the choice of which JS toolkit to use is best left to a case-by-case > basis. > hmm.. probably this is the point where we disagree.. which is of course not a bad thing. maybe we should clarify what we mean by words like "endorse", "recommend", "support" etc. and also we're probably approaching this from the wrong end (or at least i). the real question probably is: - what would we gain by having an 'official' javascript library? if the answer is "nothing" then we don't need an official js lib. so, is there something that django could do to make ajax easier? (except the server-get-get/post-and-responds-in-json) gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
Dan Shafer wrote: > I've spent the last few days looking intently at both Django and TG. I > haven't yet built anything useful in either, but i've poked at them enough > that I think I'm beginning to see through the fog, however dimly. > > My plan for the next six months is to create 4-6 substantial Web > applications which will all be variations on a single theme. IOW, I > anticipate lots of code and component reuse. On this point, it at least > *seems* to me I'd be better served by Django than by TG, though I've asked > on that list for some reactions. > > The second major factor in my design is the need for AJAX componentry and in > that regard, at least, it *seems* TG has a strong upper hand, though it > could clearly be implemented with some effort in Django. Can anyone address > the degree of difficulty or level of effort involved in incorporating, say, > the YUI library, for example, into Django in a sufficiently seamless way > that I could Ajax-ify the components in my designs without jumping through > too many hoops? Or have I perhaps just missed something valuable in my > exploration of Django that suggests this isn't even a problem? I've done AJAX with Struts on Tomcat :) My point is that AJAX, you can do it with good old CGI if you want. You tried Prototype library? It doesn't matter really whether it's Django or TG or RoR or Servlets or ISAPI or what have you. It's so easy. > > -- > ~~ > Dan Shafer, Information Product Consultant and Author > http://www.shafermedia.com > l > > --=_Part_2906_27102895.1154542946098 > Content-Type: text/html; charset=ISO-8859-1 > X-Google-AttachSize: 1333 > > I've spent the last few days looking intently at both Django and TG. I > haven't yet built anything useful in either, but i've poked at them > enough that I think I'm beginning to see through the fog, however dimly. > > My plan for the next six months is to create 4-6 substantial Web > applications which will all be variations on a single theme. IOW, I > anticipate lots of code and component reuse. On this point, it at least > *seems* to me I'd be better served by Django than by TG, though I've asked on > that list for some reactions. > The second major factor in my design is the need for AJAX componentry > and in that regard, at least, it *seems* TG has a strong upper hand, > though it could clearly be implemented with some effort in Django. Can anyone > address the degree of difficulty or level of effort involved in > incorporating, say, the YUI library, for example, into Django in a > sufficiently seamless way that I could Ajax-ify the components in my designs > without jumping through too many hoops? Or have I perhaps just missed > something valuable in my exploration of Django that suggests this isn't even > a problem? > -- ~~Dan > Shafer, Information Product Consultant and Author href="http://www.shafermedia.com";>http://www.shafermedia.coml > > --=_Part_2906_27102895.1154542946098-- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?
On Aug 2, 2006, at 3:28 PM, gabor wrote: > > the same way i would like to see a "recommended" javascript library. Which, though, is the recommended one? Do I want lightweight, or widget heaven? One that follows standards (or should I say convention) or one that pushes the envelope? If I choose Yahoo's mapping API, can I easily switch to Google's? Will the style sheet selector names clash with Django's (or my own)? Check out this comparison of the six most "popular" (Dojo, Zimbra,Yahoo, Microsoft, Google, and Prototype), each has its own strengths and weaknesses: http://www.infoworld.com/article/06/07/31/31FEajax_1.html Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/2/06, gabor <[EMAIL PROTECTED]> wrote: > django does not force you to use the django-templating-system (you can > use myghty/zope-tal/whatever instead), but it clearly recommends the > django-templating-system, and that's the system which is the most > tested/streamlined/documented/developed. I'm not convinced that the analogy holds; to me, officially endorsing a particular JS toolkit would be like re-wiring the template system to favor a particular version of HTML. Just as the choice of HTML or XHTML and which version to use is best left to a case-by-case basis, the choice of which JS toolkit to use is best left to a case-by-case basis. > as David H. Hanssen wrote : > "Flexibility is overrated. Constraints are liberating" Ehh... all due respect to DHH and the Rails folks, just quoting them doesn't make a sound argument in my book; there needs to be something more to back up the point the quote is trying to make. Consider an auto mechanic; in his toolbox, he'll have screwdrivers, ratchets and wrenches with adaptable/interchangeable bits for handling different sizes of screws, bolts and other fasteners. Now imagine a tool manufacturer coming by the garage one day; he says to the mechanic, "you should throw away all your other tools and buy our new Wonder-Tool 3000! It only comes in one size and only handles one type of fastener, but think how liberating that constraint will be!" The mechanic would think this guy was insane. And, to make a better analogy, a web developer is like an auto mechanic; we may be called upon to build all sorts of different sites/applications, and different tools might be the right choices for different jobs. Having a toolbox which intentionally gives you a "one size fits all, don't take on projects that this can't handle" mentality leaves you hobbled and unable to work as effectively. > the same way i would like to see a "recommended" javascript library. OK, I recommend that you use whichever JS library best suits your purposes :) -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On Thu, 2006-08-03 at 01:25 +0200, patrickk wrote: > the django-user (in this case) IS the one who´s writing the code, of > course. I understand that a person can be both a user and a developer, but that has nothing to do with what I wrote. My point was (and still is) that how the admin interface is implemented has nothing to do with how my app is implemented. When I am developing my app, I am not developing the admin interface, so how it works is mostly irrelevant. Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
the django-user (in this case) IS the one who´s writing the code, of course. Am 03.08.2006 um 00:52 schrieb Malcolm Tredinnick: > > On Wed, 2006-08-02 at 21:45 +0200, patrickk wrote: > [...] >> 3. Unless I´m very much mistaken, there´s already some development >> going on - in order to provide AJAX (Dojo) for the Admin-Interface. >> Since most of the django-users (I guess) will use the Admin- >> Interface, they probably won´t switch to another js-toolkit for their >> site ... well, at least I won´t. > > That argument doesn't really fly too far with me, because you are > talking about two different contexts. > > If I am doing something with "AJAX" (man, I hate the word -- it's so > completely non-specific what I am actually doing), I am going to be > writing code, using a Javascript library (maybe), working on HTML. > > If I'm using the Admin interface, I'm a *user*. I'm not developing the > Admin interface (in this scenario), so how it works can be > sufficiently > advanced as to appear like magic to me. I don't insist that every web > page I view uses the same Javascript toolkit, because it honestly > makes > no difference to the user experience. Even within the set of "things > built on Django" that restriction doesn't really add a lot. > > Malcolm > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On Wed, 2006-08-02 at 21:45 +0200, patrickk wrote: [...] > 3. Unless I´m very much mistaken, there´s already some development > going on - in order to provide AJAX (Dojo) for the Admin-Interface. > Since most of the django-users (I guess) will use the Admin- > Interface, they probably won´t switch to another js-toolkit for their > site ... well, at least I won´t. That argument doesn't really fly too far with me, because you are talking about two different contexts. If I am doing something with "AJAX" (man, I hate the word -- it's so completely non-specific what I am actually doing), I am going to be writing code, using a Javascript library (maybe), working on HTML. If I'm using the Admin interface, I'm a *user*. I'm not developing the Admin interface (in this scenario), so how it works can be sufficiently advanced as to appear like magic to me. I don't insist that every web page I view uses the same Javascript toolkit, because it honestly makes no difference to the user experience. Even within the set of "things built on Django" that restriction doesn't really add a lot. Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
James Bennett wrote: > On 8/2/06, patrickk <[EMAIL PROTECTED]> wrote: >> 3. Unless I´m very much mistaken, there´s already some development >> going on - in order to provide AJAX (Dojo) for the Admin-Interface. >> Since most of the django-users (I guess) will use the Admin- >> Interface, they probably won´t switch to another js-toolkit for their >> site ... well, at least I won´t. > > That's actually something that really worries me; Dojo is very nice, > but it's *not* the best toolkit for any given job you throw at it, and > I'd hate to see someone refuse to try a better solution for their > project simply because "I only use what the Django admin app uses". > Django should be about making it easier for developers to do their > jobs, not about telling developers how to do their jobs. > hmmm.. why don't consider ajax the same way as let's say the templating system? django does not force you to use the django-templating-system (you can use myghty/zope-tal/whatever instead), but it clearly recommends the django-templating-system, and that's the system which is the most tested/streamlined/documented/developed. and i think this is very important. as David H. Hanssen wrote : "Flexibility is overrated. Constraints are liberating" (yes, yes, not the brightest idea to quote a RoR developer here :-)) basically it's a good thing, that if i want to create a webapp with django, there is a RECOMMENDED configuration with a RECOMMENDED urlconf, a RECOMMENDED templating system and a RECOMMENDED orm. which i will surely use, and only plug in something else if the default/recommended components are not enough. the same way i would like to see a "recommended" javascript library. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/3/06, Dan Shafer <[EMAIL PROTECTED]> wrote: > The second major factor in my design is the need for AJAX componentry and > in that regard, at least, it *seems* TG has a strong upper hand, though it > could clearly be implemented with some effort in Django. Can anyone address > the degree of difficulty or level of effort involved in incorporating, say, > the YUI library, for example, into Django in a sufficiently seamless way > that I could Ajax-ify the components in my designs without jumping through > too many hoops? Or have I perhaps just missed something valuable in my > exploration of Django that suggests this isn't even a problem? With just a few week's Django experience, I'm finding it straight-forward to integrate Dojo into my application. Django gives you all the tools you need to get the right bit of Javascript onto the page at the right time and its simplejson module makes short work of servicing AJAX requests. The only hoop I've had to jump through with AJAX is relearning the DOM - I have dabbled in DHTML previously, but the functionality I'm now implementing requires more than dabbling. Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com On 8/3/06, Dan Shafer <[EMAIL PROTECTED]> wrote: > I've spent the last few days looking intently at both Django and TG. I > haven't yet built anything useful in either, but i've poked at them enough > that I think I'm beginning to see through the fog, however dimly. > > My plan for the next six months is to create 4-6 substantial Web > applications which will all be variations on a single theme. IOW, I > anticipate lots of code and component reuse. On this point, it at least > *seems* to me I'd be better served by Django than by TG, though I've asked > on that list for some reactions. > > The second major factor in my design is the need for AJAX componentry and > in that regard, at least, it *seems* TG has a strong upper hand, though it > could clearly be implemented with some effort in Django. Can anyone address > the degree of difficulty or level of effort involved in incorporating, say, > the YUI library, for example, into Django in a sufficiently seamless way > that I could Ajax-ify the components in my designs without jumping through > too many hoops? Or have I perhaps just missed something valuable in my > exploration of Django that suggests this isn't even a problem? > > -- > ~~ > Dan Shafer, Information Product Consultant and Author > http://www.shafermedia.com > l > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/2/06, patrickk <[EMAIL PROTECTED]> wrote: > 1. It´s about certainty (which is not so important if you´re certain > about your js-toolkit; I´ve been playing around with different > toolkits for about half a year - and I´m still not sure which ones > better for me ...) With all due respect, this sounds more like a process problem; figure out what you need from the JS toolkit you're going to use, and go with the one which most closely fits those requirements. For me, depending on the project, that tends to bounce between YUI and Dojo. > 2. Most important: It´s about sharing code, adopting solutions and > making development faster. I'm somewhat suspicious of this, because I think that the JS toolkits have already genericized "AJAX UI" about as far as it can be genericized; UI components tend to be reusable and "shareable" only at a fairly high level (e.g., "select box that autocompletes based on a list of data", "calendar table which allows date selection", etc.), and that ground's been covered pretty thoroughly at this point by the toolkits. What would be far, far more useful and important would be building up a repository of AJAX "design patterns" which include examples from whatever toolkit the author was using, but are more about a high-level view of different types of interaction and explain how the server side of things needs to work to support them. > 3. Unless I´m very much mistaken, there´s already some development > going on - in order to provide AJAX (Dojo) for the Admin-Interface. > Since most of the django-users (I guess) will use the Admin- > Interface, they probably won´t switch to another js-toolkit for their > site ... well, at least I won´t. That's actually something that really worries me; Dojo is very nice, but it's *not* the best toolkit for any given job you throw at it, and I'd hate to see someone refuse to try a better solution for their project simply because "I only use what the Django admin app uses". Django should be about making it easier for developers to do their jobs, not about telling developers how to do their jobs. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
agreement and contradiction ... > * Write your view, and if it needs to respond to XMLHttpRequests, have > it serialize the response to XML or JSON. The tools in > django.core.serializers make this extremely easy -- simplejson is > bundled, so you can dump pretty much any Python data structure to > JSON, and we provide serializers for converting Django model instances > to JSON and/or XML. > * Pick a JS toolkit (Dojo and YUI are my favorites) and write the > front-end code to interact with your view(s). > > Really. That's all there is to it. Agree. It´s really easy to do AJAX with Django (and ... I´m not a programmer at all). > > I've taken a lot of flak for this, but I have always maintained, and > always will maintain, that this is just about all Django -- the > framework -- should be doing. The only other thing I'd like to see, > and we've already thrown around drafts of how it would work, is a "web > services"-style API which would generically expose access to Django > models for any sort of remote call, be it XMLHttpRequest or whatever. I´d love to see that ... > > I've gone on at length in my blog about hte reasoning behind this, but > it really comes down to just a few things: > > 1) There are plenty of really, really good JavaScript toolkits being > given away for free right now, and I don't think Django should favor > one or be opinionated about which one you should use; we should just > make it as easy as possible for *any* of them to talk to a > Django-powered backend. Not so sure about this one. There are other good frameworks, but we choose Django to work with. So what´s the advantage to favor a js-toolit? 1. It´s about certainty (which is not so important if you´re certain about your js-toolkit; I´ve been playing around with different toolkits for about half a year - and I´m still not sure which ones better for me ...) 2. Most important: It´s about sharing code, adopting solutions and making development faster. 3. Unless I´m very much mistaken, there´s already some development going on - in order to provide AJAX (Dojo) for the Admin-Interface. Since most of the django-users (I guess) will use the Admin- Interface, they probably won´t switch to another js-toolkit for their site ... well, at least I won´t. > > 2) Tools that try to "helpfully" generate JavaScript calls for you are > brittle and may not save as much time as you think. > > 3) All too often, they're used not for their actual benefits, but > because someone doesn't want to learn and/or write JavaScript. My > personal opinion is that certain types of laziness are good to have in > a developer (because they result in better, reusable, modular code), > but that this is not one of them. Again - I agree with 2) and 3) patrick > > -- > "May the forces of evil become confused on the way to your house." > -- George Carlin > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
Frommy experience with TG and Django, which the TG side may be a bit dated, the only upper hand that TG may have is that 1) TG includes MochiKit and 2) in TG, you just change a decorator to get a jsonified object from a controller rather than HTML. As others have chimed in, including MochiKit is simple. And you can create your own decorators to do repetitive stuff like pass your dictionary to render_to_response and if you do, you could just switch out the decorator to do a jsonified dict rather than HTMLhrmmmI might have to try that - jmj On Wed, 2 Aug 2006 11:22:26 -0700 "Dan Shafer" <[EMAIL PROTECTED]> wrote: > I've spent the last few days looking intently at both Django and TG. I > haven't yet built anything useful in either, but i've poked at them > enough that I think I'm beginning to see through the fog, however > dimly. > > My plan for the next six months is to create 4-6 substantial Web > applications which will all be variations on a single theme. IOW, I > anticipate lots of code and component reuse. On this point, it at > least *seems* to me I'd be better served by Django than by TG, though > I've asked on that list for some reactions. > > The second major factor in my design is the need for AJAX componentry > and in that regard, at least, it *seems* TG has a strong upper hand, > though it could clearly be implemented with some effort in Django. > Can anyone address the degree of difficulty or level of effort > involved in incorporating, say, the YUI library, for example, into > Django in a sufficiently seamless way that I could Ajax-ify the > components in my designs without jumping through too many hoops? Or > have I perhaps just missed something valuable in my exploration of > Django that suggests this isn't even a problem? > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/2/06, Dan Shafer <[EMAIL PROTECTED]> wrote: > The second major factor in my design is the need for AJAX componentry and > in that regard, at least, it *seems* TG has a strong upper hand, though it > could clearly be implemented with some effort in Django. Can anyone address > the degree of difficulty or level of effort involved in incorporating, say, > the YUI library, for example, into Django in a sufficiently seamless way > that I could Ajax-ify the components in my designs without jumping through > too many hoops? Or have I perhaps just missed something valuable in my > exploration of Django that suggests this isn't even a problem? Apologies if this feels like it's directed at you, but I see the myth of "Django can't do AJAX" a lot, and I think we have to dispel it. Doing AJAX with Django is stupid easy. I'm a bit busy at the moment, but I've published a simple working example (using YUI) and I'm in the process of writing up all the aspects of how it works. The gist of it is this: * Write your view, and if it needs to respond to XMLHttpRequests, have it serialize the response to XML or JSON. The tools in django.core.serializers make this extremely easy -- simplejson is bundled, so you can dump pretty much any Python data structure to JSON, and we provide serializers for converting Django model instances to JSON and/or XML. * Pick a JS toolkit (Dojo and YUI are my favorites) and write the front-end code to interact with your view(s). Really. That's all there is to it. I've taken a lot of flak for this, but I have always maintained, and always will maintain, that this is just about all Django -- the framework -- should be doing. The only other thing I'd like to see, and we've already thrown around drafts of how it would work, is a "web services"-style API which would generically expose access to Django models for any sort of remote call, be it XMLHttpRequest or whatever. I've gone on at length in my blog about hte reasoning behind this, but it really comes down to just a few things: 1) There are plenty of really, really good JavaScript toolkits being given away for free right now, and I don't think Django should favor one or be opinionated about which one you should use; we should just make it as easy as possible for *any* of them to talk to a Django-powered backend. 2) Tools that try to "helpfully" generate JavaScript calls for you are brittle and may not save as much time as you think. 3) All too often, they're used not for their actual benefits, but because someone doesn't want to learn and/or write JavaScript. My personal opinion is that certain types of laziness are good to have in a developer (because they result in better, reusable, modular code), but that this is not one of them. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/2/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > You'll have to wait for the second part to see the complete > implementation, but he makes it look pretty easy so far. Or just read the code in the example page :) It's taking a bit longer than I'd anticipated to write up the full exegesis, but that's because I'm trying to make it as accessible as possible to people who've never done asynchronous/event-driven programming before and need to introduce some of the concepts carefully. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/2/06, Dan Shafer <[EMAIL PROTECTED]> wrote: > The second major factor in my design is the need for AJAX componentry and > in that regard, at least, it *seems* TG has a strong upper hand, though it > could clearly be implemented with some effort in Django. Can anyone address > the degree of difficulty or level of effort involved in incorporating, say, > the YUI library, for example, into Django in a sufficiently seamless way > that I could Ajax-ify the components in my designs without jumping through > too many hoops? Or have I perhaps just missed something valuable in my > exploration of Django that suggests this isn't even a problem? The latter: This isn't even a problem. As Elver Loho has written on this mailing list: "What stops you from using Mochikit and JSON with Django? It's like saying that you can't order ice-cream at McDonald's, because it's not part of the Happy Meal you're eating." Simply put, you can use any JavaScript library you want with Django. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
On 8/2/06, Dan Shafer <[EMAIL PROTECTED]> wrote: > > My plan for the next six months is to create 4-6 substantial Web > applications which will all be variations on a single theme. IOW, I > anticipate lots of code and component reuse. On this point, it at least > *seems* to me I'd be better served by Django than by TG, though I've asked > on that list for some reactions. Can't speak on TG, but Django is definitely great at this. > The second major factor in my design is the need for AJAX componentry and > in that regard, at least, it *seems* TG has a strong upper hand, though it > could clearly be implemented with some effort in Django. Can anyone address > the degree of difficulty or level of effort involved in incorporating, say, > the YUI library, for example, into Django in a sufficiently seamless way > that I could Ajax-ify the components in my designs without jumping through > too many hoops? Or have I perhaps just missed something valuable in my > exploration of Django that suggests this isn't even a problem? You may want to take a look at James Bennett's most recent blog posting/tutorial, http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1 He shows the steps you have to take, and even better for you, he uses YUI. You'll have to wait for the second part to see the complete implementation, but he makes it look pretty easy so far. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is AJAX Alone Reason to Use TG?`
It's not very hard to integrate AJAX into Django, it is a bit more manual then TG (from what I've read). But with the AJAX frameworks out there, writing the javascript is far from hard. James has a blog article on AJAX and Django: http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1 As well, the wiki has some AJAX snippets and examples. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Is AJAX Alone Reason to Use TG?`
I've spent the last few days looking intently at both Django and TG. I haven't yet built anything useful in either, but i've poked at them enough that I think I'm beginning to see through the fog, however dimly. My plan for the next six months is to create 4-6 substantial Web applications which will all be variations on a single theme. IOW, I anticipate lots of code and component reuse. On this point, it at least *seems* to me I'd be better served by Django than by TG, though I've asked on that list for some reactions. The second major factor in my design is the need for AJAX componentry and in that regard, at least, it *seems* TG has a strong upper hand, though it could clearly be implemented with some effort in Django. Can anyone address the degree of difficulty or level of effort involved in incorporating, say, the YUI library, for example, into Django in a sufficiently seamless way that I could Ajax-ify the components in my designs without jumping through too many hoops? Or have I perhaps just missed something valuable in my exploration of Django that suggests this isn't even a problem? -- ~~Dan Shafer, Information Product Consultant and Authorhttp://www.shafermedia.coml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---