Re: Proposal: JS library in admin and tools

2009-08-19 Thread andybak

That's because the backed the wrong framework.



On Aug 19, 9:05 am, Andreas  wrote:
> By the way, rails is going agnostic in 3.0... Says it all.
>
> On Aug 18, 4:06 pm, diogobaeder  wrote:
>
> > Hi there,
>
> > After reading this 
> > posthttp://groups.google.com/group/django-developers/browse_thread/thread...
> > I decided to ask you guys about your opinions in choosing an official
> > JavaScript library for Django - what would be the benefits and
> > drawbacks of that -.
>
> > I mean, Rails has an official JS library (Prototype/script.aculo.us),
> > Symfony too (Prototype/script.aculo.us), and both can work with other
> > libraries without too much rework.
>
> > Well, as an Prototype ex-user, and as a currently jQuery heavy user, I
> > much recommend jQuery, because of its ease of use and unobstrusive
> > approach - it doesn't clash with other libraries or classes -.
>
> > Also, as Django Developer Tools already uses jQuery, it would be great
> > to adopt the same library for it and the admin site, if this extension
> > gets to the Django trunk.
>
> > Diogo
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread diogobaeder

Hmm, OK, at least this thread seems to be constructive, not just flame
war... :-)

Jacob, could you please open a thread about the admin-ui proposal? If
I can contribute already, I'd like to make some propositions there,
all of them interface-related...

Thanks,

Diogo



On 18 ago, 16:36, Yuri Baburov  wrote:
> On Wed, Aug 19, 2009 at 1:53 AM, Jacob Kaplan-Moss wrote:
>
> > On Tue, Aug 18, 2009 at 12:35 PM, Yuri Baburov wrote:
> >> Do you think that using *any* javascript framework for admin interface
> >> will get boost for useful admin, overall django improvements and
> >> third-party plugins development?
>
> > That's a different question entirely. The admin's an optional
> > *application*, not part of the framework-y parts; it's also designed
> > for end-users, not other developers. Data entry clerks aren't
> > constrained by a choice of tooling in the admin interface the way
> > developers would in the framework as a whole. Indeed, if you look at
> > the admin-ui SoC project you'll see that this ship has already sailed:
> > the new features added there (and, Murphy willing, to trunk soon
> > enough) are indeed using jQuery.
>
> Jacob,
>
> How Django will/would package jQuery? That one for admin-ui.
>
> This will probably be part of proposal, but maybe you can tell something now 
> :)
>
> --
> Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
> MSN: bu...@live.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Jacob Kaplan-Moss

On Tue, Aug 18, 2009 at 2:36 PM, Yuri Baburov wrote:
> How Django will/would package jQuery? That one for admin-ui.

Like I said, let's table this discussion until there's actually
something specific to talk about. Otherwise this is all just
hand-waving, and I do enough of that anyway.

Jacob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Yuri Baburov

On Wed, Aug 19, 2009 at 1:53 AM, Jacob Kaplan-Moss wrote:
>
> On Tue, Aug 18, 2009 at 12:35 PM, Yuri Baburov wrote:
>> Do you think that using *any* javascript framework for admin interface
>> will get boost for useful admin, overall django improvements and
>> third-party plugins development?
>
> That's a different question entirely. The admin's an optional
> *application*, not part of the framework-y parts; it's also designed
> for end-users, not other developers. Data entry clerks aren't
> constrained by a choice of tooling in the admin interface the way
> developers would in the framework as a whole. Indeed, if you look at
> the admin-ui SoC project you'll see that this ship has already sailed:
> the new features added there (and, Murphy willing, to trunk soon
> enough) are indeed using jQuery.

Jacob,

How Django will/would package jQuery? That one for admin-ui.

This will probably be part of proposal, but maybe you can tell something now :)

-- 
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Alex Gaynor

On Tue, Aug 18, 2009 at 2:29 PM, Jacob Kaplan-Moss wrote:
>
> On Tue, Aug 18, 2009 at 2:04 PM, Alex Gaynor wrote:
>> I'll take a Jacob's comment a step further and say that I personally
>> am opposed to Django using an external JS framework for even the
>> admin.  My reason for this is that it restricts the ability of people
>> to contribute to Django.
>
> Heh.
>
> Well, then let's table this discussion for when I propose merging
> admin-ui to trunk. Let's not get into a hypothetical argument when
> there's a perfectly good concrete one just down the road!
>
> Putting-on-my-flame-proof-pants-ly yours,
>
> Jacob
>
> >
>

Fair enough :)

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Jacob Kaplan-Moss

On Tue, Aug 18, 2009 at 2:04 PM, Alex Gaynor wrote:
> I'll take a Jacob's comment a step further and say that I personally
> am opposed to Django using an external JS framework for even the
> admin.  My reason for this is that it restricts the ability of people
> to contribute to Django.

Heh.

Well, then let's table this discussion for when I propose merging
admin-ui to trunk. Let's not get into a hypothetical argument when
there's a perfectly good concrete one just down the road!

Putting-on-my-flame-proof-pants-ly yours,

Jacob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Yuri Baburov

On Wed, Aug 19, 2009 at 2:04 AM, Alex Gaynor wrote:
> I'll take a Jacob's comment a step further and say that I personally
> am opposed to Django using an external JS framework for even the
> admin.  My reason for this is that it restricts the ability of people
> to contribute to Django.  If Django's admin uses jQuery and I know
> Mootools then I have to learn something new to contribute, but if it's
> "vanilla" JS then I can dive right it, regardless of what framework I
> come from (to the people leaping up to say that it's possible to use
> jQuery/Mootools/PonyJS/whatever without really knowing Javascript I
> submit to you that that is no less frightening then someone who thinks
> they know Django without knowing Python).

Well, in reality, difference between mootools and jQuery is less than
between mootools and current admin js code :)

Different javascript libraries are pretty consistent in providing
almost the same basic functionality, most useful things on which
browser vendors didn't agree.

IMO, extending django admin is easier if you have experience with any
javascript library and if you use a library for this.

Let's take ajax autocomplete field for example. Ajax-based filter in
admin app for my 1e7 entries and 1000 choices... Or adding any js
animation effect on django admin form fields...

Or let's take last example: I want to add shift-click select
functionality for range of checkboxes in django admin app and make
that work for any django developer using django admin. After jQuery
introduction in admin I will just copy existing and tested solution.
And until that I have to create raw js code, not using any shortcuts
for that jQuery offers, that would simplify development.

So I don't understand what do you suggest then. Create one more js
library for django (which is happening slowly)?

-- 
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Alex Gaynor

On Tue, Aug 18, 2009 at 12:49 PM, David Zhou wrote:
>
> On Tue, Aug 18, 2009 at 1:35 PM, Yuri Baburov wrote:
>>
>> In example, I want some django 3rd-party or contrib package with
>> autocomplete fields, ajax validation, ajax form sending and inline
>> property editing.
>> I want to be able to integrate it into admin interface and overall
>> interface in painless and fast way.
>>
>> What do you suggest me to do?
>> How do you see further django-and-js-related infrastructure in future?
>
> What a 3rd-party chooses to use to accomplish functionality is up to
> them.  jQuery, plus most other libraries, have the ability to operate
> in a mode that doesn't cause conflicts with other libraries.  As long
> as the 3rd-party Django app properly uses those features of the JS
> lib, this isn't an issue.
>
> That way, you can you whatever 3rd party app you want, and not have to
> worry about what javascript framework they may or may not have used.
>
> Integration to the admin can be normal via the normal avenues of admin
> customization -- namely, adding in your own forms, templates, and
> views.  I'm not sure I see how what JS library is used to do things
> like AJAX is related.
>
> -- dz
>
> >
>

I'll take a Jacob's comment a step further and say that I personally
am opposed to Django using an external JS framework for even the
admin.  My reason for this is that it restricts the ability of people
to contribute to Django.  If Django's admin uses jQuery and I know
Mootools then I have to learn something new to contribute, but if it's
"vanilla" JS then I can dive right it, regardless of what framework I
come from (to the people leaping up to say that it's possible to use
jQuery/Mootools/PonyJS/whatever without really knowing Javascript I
submit to you that that is no less frightening then someone who thinks
they know Django without knowing Python).

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Jacob Kaplan-Moss

On Tue, Aug 18, 2009 at 12:35 PM, Yuri Baburov wrote:
> Do you think that using *any* javascript framework for admin interface
> will get boost for useful admin, overall django improvements and
> third-party plugins development?

That's a different question entirely. The admin's an optional
*application*, not part of the framework-y parts; it's also designed
for end-users, not other developers. Data entry clerks aren't
constrained by a choice of tooling in the admin interface the way
developers would in the framework as a whole. Indeed, if you look at
the admin-ui SoC project you'll see that this ship has already sailed:
the new features added there (and, Murphy willing, to trunk soon
enough) are indeed using jQuery.

> Maybe some library-agnostic helpers?

I don't think this is possible.

> At least $() instead of document.getElementById()

Here you go: ``var $ = document.getElementById;`` Enjoy.

> Or kind of "django-jquery-helpers" sort of third-party addons?

This has already been done at least a few times: see django-helpers,
dojango, etc.

> How do you see further django-and-js-related infrastructure in future?

Heh, you give me far too much credit. I'm a here-and-now kind of guy.

Jacob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread David Zhou

On Tue, Aug 18, 2009 at 1:35 PM, Yuri Baburov wrote:
>
> In example, I want some django 3rd-party or contrib package with
> autocomplete fields, ajax validation, ajax form sending and inline
> property editing.
> I want to be able to integrate it into admin interface and overall
> interface in painless and fast way.
>
> What do you suggest me to do?
> How do you see further django-and-js-related infrastructure in future?

What a 3rd-party chooses to use to accomplish functionality is up to
them.  jQuery, plus most other libraries, have the ability to operate
in a mode that doesn't cause conflicts with other libraries.  As long
as the 3rd-party Django app properly uses those features of the JS
lib, this isn't an issue.

That way, you can you whatever 3rd party app you want, and not have to
worry about what javascript framework they may or may not have used.

Integration to the admin can be normal via the normal avenues of admin
customization -- namely, adding in your own forms, templates, and
views.  I'm not sure I see how what JS library is used to do things
like AJAX is related.

-- dz

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Yuri Baburov

On Tue, Aug 18, 2009 at 9:53 PM, Jacob Kaplan-Moss wrote:
>
> Django is a server-side framework. It should never dictate front-end
> considerations.

Hi Jacob,

Pretty understand and agree with your will, as a user of Dojo,
mootools, prototype.js and jQuery in different projects.

Though I believe the question was not about dictate, but on how Django
can support users with their JS framework of choice.

Do you think that using *any* javascript framework for admin interface
will get boost for useful admin, overall django improvements and
third-party plugins development?
Do you think that choosing it sooner will get that boost sooner?

Maybe some library-agnostic helpers?
At least $() instead of document.getElementById()
Or kind of "django-jquery-helpers" sort of third-party addons?
Or do need each django 3rd party plugin support their own JS library of choice?
Currently jQuery is appearing in different projects as de-facto
standard of that "JS library of choice" just because of that wish to
reuse other people efforts.

In example, I want some django 3rd-party or contrib package with
autocomplete fields, ajax validation, ajax form sending and inline
property editing.
I want to be able to integrate it into admin interface and overall
interface in painless and fast way.

What do you suggest me to do?
How do you see further django-and-js-related infrastructure in future?

-- 
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Proposal: JS library in admin and tools

2009-08-18 Thread Jacob Kaplan-Moss

Django is a server-side framework. It should never dictate front-end
considerations.

Jacob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Proposal: JS library in admin and tools

2009-08-18 Thread diogobaeder

Hi there,

After reading this post
http://groups.google.com/group/django-developers/browse_thread/thread/8d6e4d7d163db943?hl=en
I decided to ask you guys about your opinions in choosing an official
JavaScript library for Django - what would be the benefits and
drawbacks of that -.

I mean, Rails has an official JS library (Prototype/script.aculo.us),
Symfony too (Prototype/script.aculo.us), and both can work with other
libraries without too much rework.

Well, as an Prototype ex-user, and as a currently jQuery heavy user, I
much recommend jQuery, because of its ease of use and unobstrusive
approach - it doesn't clash with other libraries or classes -.

Also, as Django Developer Tools already uses jQuery, it would be great
to adopt the same library for it and the admin site, if this extension
gets to the Django trunk.

Diogo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---