-- Bradley Holt <[EMAIL PROTECTED]> wrote
(on Wednesday, 21 May 2008, 04:48 PM -0400):
> On Wed, May 21, 2008 at 4:19 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]>
> wrote:
> 
>     -- Bradley Holt <[EMAIL PROTECTED]> wrote
>     (on Wednesday, 21 May 2008, 03:49 PM -0400):
>     > We probably will not be switching to Dojo (but I'll be looking into it
>     for
>     > sure), even with it being available as part of ZF. We currently use
>     jQuery.
>     > Part of the benefit of using jQuery is that a CSS designer can learn how
>     to use
>     > it. This is because they can take the same concept of applying style
>     using CSS
>     > selectors but instead add behavior using CSS selectors (leveraging the
>     skills
>     > they already have and not burdening a developer with the work). Sure, 
> for
>     > full-on RIAs ZF + Dojo will probably be the best option. But with jQuery
>     our
>     > designers can do a lot of the JavaScript work - I'm not going to ask a
>     designer
>     > to learn Dojo as it seems a lot more complicated (I haven't used Dojo,
>     just
>     > read through some of the documentation).
> 
>     Actually, in many cases, using Dojo is as simple or simpler than what
>     you've just stated regarding jquery. ;-)
> 
> 
> I'll definitely be checking out Dojo with this new ZF integration - I really
> don't know enough to speak very intelligently about it. Heck, the fact that 
> you
> recommend and like using Dojo is enough for me to check it out, never mind the
> ZF integration. ;-)
>  
> 
> 
> 
>     For instance, want to make a date chooser?
> 
>        <input type="text" name="foo" dojoType="dijit.form.DateTextBox" />
> 
> 
> OK, now I remember one of the things that turned me off about Dojo when I 
> first
> looked at. I'm a stickler for valid XHTML and the dojoType attribute breaks
> validity. I realize this is just for illustrative purposes and there's 
> probably
> a way to use Dojo and still have valid XHTML. I'll look into it more on my own
> (don't want to turn this into a Dojo discussion).

This is a good point, and, as usual, there is an answer to it. You can
always programmatically attach dijits to nodes by CSS selectors, and
this is a method I've used with success in the past.

The issue has also been debated pretty heavily in the Dojo community
already. Alex Russell (of the dojo foundation) has a couple of lengthy
posts about it:

    http://alex.dojotoolkit.org/?p=622
    http://alex.dojotoolkit.org/?p=642

The bottom line is: yes, it will not pass the W3C XHTML validators, but
_all_ major browsers will utilize the notation without issue. So, you
can programmatically decorate your elements, or use the attribute
notation (dojoType="...") cross-browser without problems. If XHTML
validation is an issue or you feel strongly about it, the programmatic
option is relatively easy and perfectly viable.


>     If you want to modify based on CSS selectors, you can leverage
>     dojo.query():
> 
>        dojo.query('#foo li a').style("text-decoration: none; color: #F00;");
> 
> 
> Right after I sent out my email I did some Googling (sorry, "web searching")
> and found dojo.query - I'm curious as to how it compares to jQuery, I'll
> definitely take a look at it.

I haven't played with jquery much, so I can't answer to it. But if
you've ever used the $$() function in prototype, it'll be very familiar.

>     Dojo has come a long way in the past year, and many things have become
>     trivial to perform. It's definitely worth looking into.
> 
>     But, again, just because we're going to partner with Dojo does not mean
>     ZF users need to use Dojo. If you're comfortable with a JS library
>     already, ZF will continue to accomodate it. :-)
> 
> 
> Definitely - I don't see integrating jQuery with ZF to be much of a problem,
> especially with this new component.
>  
> 
> 
> 
>     > My point being that I would find jQuery + ZF integration useful because
>     > switching to Dojo probably doesn't make sense for us.
> 
>     Exactly. And perhaps that will lead to you or others contributing jQuery
>     integration in the future. :-)
> 
> 
> Already thought of it, now if I could only find the time to actually 
> contribute
> something to ZF :-)
>  
> 
> 
> 
> 
>     > On Wed, May 21, 2008 at 3:35 PM, Rob Allen <[EMAIL PROTECTED]> wrote:
>     >
>     >
>     >     On 21 May 2008, at 20:15, Pádraic Brady wrote:
>     >
>     >
>     >         It's really great news! And once the Dojo implementation is in
>     place as
>     >         a template it's an open field for someone to step up and do
>     something
>     >         similar for the lighter libraries like jQuery.
>     >
>     >
>     >
>     >     I wonder if this will actually happen long term?
>     >
>     >     I think you can essentially assume that most other JS/Ajax libraries
>     won't
>     >     be used with ZF by the majority of developers once the new Zend-Dojo
>     stuff
>     >     is released. There just won't be the same level of documentation,
>     mailing
>     >     list or irc help on how to do stuff compared to using Dojo.
>     >
>     >     Even if the relevant components are written for another JS library,
>     to
>     >     adopt them you have to decide if they will be keep up with the
>     official
>     >     Zend-Dojo components over the years that follow. Who will maintain
>     them and
>     >     update them through ZF 2.0, 3.0 etc? This is the bit that would 
> worry
>     me
>     >     about adopting something other than Dojo for use with ZF over the
>     long
>     >     term.
>     >
>     >
>     >     I'm planning on telling my developers at work that we need to 
> migrate
>     to
>     >     Dojo over the next 6 months.  I had a look at the Dojo docs and at
>     first
>     >     glance they don't look as comprehensive as we've been used to, but
>     I'm sure
>     >     we'll manage.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to