exploring Dojo

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

exploring Dojo

SETH ATKINS
Not sure if this is the best list to ask, but here goes. My first foray into
working with Dojo (as a client scripting framework) in conjunction with ZF.
I like the capabilities, and it seems really easy to implement and get nice
looking results. I need things like date pickers, combobox, etc....all
things that Dojo has built in. So I was really excited when it took 10-15
minutes to build a nice looking form by following a tut.

Here's the rub. My primary usage is mobile browsers (Android/iPhone), and a
sample form took like 2 minutes to load over 3G. So Dojo looks to be a
non-starter for me even though it has everything I need. Or am I doing
something wrong here? For example
http://zendgeek.blogspot.com/2009/07/creating-nice-dojo-form-in-zend.html.
The form in this tutorial is what takes forever to load over 3G. Even over
my local Wi-Fi between browser and development server, it feels a little
"heavy".

Is there any experience and/or suggestions on lightweight JS frameworks that
offer relatively comparable features to Dojo? I'm really new to the whole
client scripting framework/library thing and know two names: Dojo and
JQuery. Done a little JS by hand for this or that, but no frameworks. I just
need a pointer in the right direction. Keep in mind "comboboxes" or similar
are really important for me.

Thanks,
Seth


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: exploring Dojo

hunterjensen
Seth

You might want to take a look at Sencha Touch -
http://www.sencha.com/products/touch/ - not exactly what you're looking for
but might be even better.

Hunter

-----------------------
Hunter Jensen
Barefoot Solutions
[hidden email]
858.442.0734
 

-----Original Message-----
From: Seth Atkins [mailto:[hidden email]]
Sent: Thursday, October 13, 2011 11:03 AM
To: [hidden email]
Subject: [fw-webservices] exploring Dojo

Not sure if this is the best list to ask, but here goes. My first foray into
working with Dojo (as a client scripting framework) in conjunction with ZF.
I like the capabilities, and it seems really easy to implement and get nice
looking results. I need things like date pickers, combobox, etc....all
things that Dojo has built in. So I was really excited when it took 10-15
minutes to build a nice looking form by following a tut.

Here's the rub. My primary usage is mobile browsers (Android/iPhone), and a
sample form took like 2 minutes to load over 3G. So Dojo looks to be a
non-starter for me even though it has everything I need. Or am I doing
something wrong here? For example
http://zendgeek.blogspot.com/2009/07/creating-nice-dojo-form-in-zend.html.
The form in this tutorial is what takes forever to load over 3G. Even over
my local Wi-Fi between browser and development server, it feels a little
"heavy".

Is there any experience and/or suggestions on lightweight JS frameworks that
offer relatively comparable features to Dojo? I'm really new to the whole
client scripting framework/library thing and know two names: Dojo and
JQuery. Done a little JS by hand for this or that, but no frameworks. I just
need a pointer in the right direction. Keep in mind "comboboxes" or similar
are really important for me.

Thanks,
Seth


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]




--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: exploring Dojo

weierophinney
Administrator
In reply to this post by SETH ATKINS
-- Seth Atkins <[hidden email]> wrote
(on Thursday, 13 October 2011, 01:02 PM -0500):

> Not sure if this is the best list to ask, but here goes. My first
> foray into working with Dojo (as a client scripting framework) in
> conjunction with ZF. I like the capabilities, and it seems really
> easy to implement and get nice looking results. I need things like
> date pickers, combobox, etc....all things that Dojo has built in. So
> I was really excited when it took 10-15 minutes to build a nice
> looking form by following a tut.
>
> Here's the rub. My primary usage is mobile browsers
> (Android/iPhone), and a sample form took like 2 minutes to load over
> 3G. So Dojo looks to be a non-starter for me even though it has
> everything I need. Or am I doing something wrong here? For example http://zendgeek.blogspot.com/2009/07/creating-nice-dojo-form-in-zend.html.
> The form in this tutorial is what takes forever to load over 3G.
> Even over my local Wi-Fi between browser and development server, it
> feels a little "heavy".
>
> Is there any experience and/or suggestions on lightweight JS
> frameworks that offer relatively comparable features to Dojo? I'm
> really new to the whole client scripting framework/library thing and
> know two names: Dojo and JQuery. Done a little JS by hand for this
> or that, but no frameworks. I just need a pointer in the right
> direction. Keep in mind "comboboxes" or similar are really important
> for me.

Typically, you prototype by simply using features of dojo. What happens
in this scenario is that you end up with a fair number of XHR requests
to the server to get the various Dijit classes necessary to fulfill the
functionality. This is great during development, as you can use at-will,
adding and removing functionality as needed.

The penalty, of course, is that all those XHR requests add up and lead
to issues like you're seeing.

So, once your UI starts to crystalize, you want to create what's called
a Dojo "build". When you do this, you basically create a custom JS
module that does dojo.require calls to all the various Dojo classes you
need for your UI. You then pass this to the build system, which creates
a custom distribution for you that has all these class files in a
single, minimized file for you; you can also have it do this for the CSS
files your UI uses. When I've done this, I've gone from situations like
you describe to practically instantaneous delivery.

ZF provides a tool for creating the builds if you download the full
distribution, and it's documented here:

    http://framework.zend.com/manual/en/zend.dojo.build-layers.html

A tutorial covering Dojo builds is here:

    http://dojotoolkit.org/documentation/tutorials/1.6/build/

There's also a Dojo web builder, which is a web interface that allows
you to select the various dijits and classes you use, and will then
create a custom build for you:

    http://build.dojotoolkit.org/

When it comes down to it, this is an issue for just about every JS
library, and most have ways to "build" or "minimize" so that you can
reduce network latency, size, and execution time. Since you're trying to
build a mobile application, you'll need to explore and experiment with
these tools to build an optimal experience for your users.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]