You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Beat Hoermann <ho...@freesurf.ch> on 2006/08/04 15:16:58 UTC

Tapestry 4.1: dojo everywhere?

I created a form with a single text field. To my surprise Tapestry 4.1 
rendered an HTML-page that contained a piece of javascript with dojo-commands. 
Since the "dojo.js" was not loaded into the HTML-page it gave me an error. So 
I surrounded the form component with a shell component. After all, my tiny web-
app, just displaying a simple text field and a submit button, not using ajax 
nor any dojo things, was forced to load the 173 KByte heavy "dojo.js". The 
integration of dojo into Tapestry seems quite invasive to me.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Jesse Kuhnert <jk...@gmail.com>.
It's more for "javascript" in general now. As I've stated before though,
nothing is set in stone yet wrt how dojo is included. It sounds already like
I'll need to investigate a few paths to find the most optimal solution to
fit all needs.

On 8/7/06, D&J Gredler <dj...@gmail.com> wrote:
>
> I think the Tap devs decided to stop maintaining custom validation logic
> and
> offload that on a 3rd party lib: dojo. I believe that's why you're seeing
> dojo included when you have forms. It might be possible to tweak Tapestry
> so
> that it doesn't include dojo if the form doesn't have any validation
> defined
> on its fields... but I'm not sure.
>
> On 8/5/06, Beat Hoermann <ho...@freesurf.ch> wrote:
> >
> >
> > Thus, even in a "standard" web-app, displaying just a form, the dojo-
> > infrastructure must be loaded. Why?
> >
> >
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Tapestry 4.1: dojo everywhere?

Posted by D&J Gredler <dj...@gmail.com>.
I think the Tap devs decided to stop maintaining custom validation logic and
offload that on a 3rd party lib: dojo. I believe that's why you're seeing
dojo included when you have forms. It might be possible to tweak Tapestry so
that it doesn't include dojo if the form doesn't have any validation defined
on its fields... but I'm not sure.

On 8/5/06, Beat Hoermann <ho...@freesurf.ch> wrote:
>
>
> Thus, even in a "standard" web-app, displaying just a form, the dojo-
> infrastructure must be loaded. Why?
>
>

Re: Tapestry 4.1: dojo everywhere?

Posted by Beat Hoermann <ho...@freesurf.ch>.
Bernard <bernard <at> man.poznan.pl> writes:

> 
> Beat Hoermann wrote:
> > I surrounded the form component with a shell component. After all, my tiny 
web-
> > app, just displaying a simple text field and a submit button, not using 
ajax 
> > nor any dojo things, was forced to load the 173 KByte heavy "dojo.js". The 
> > integration of dojo into Tapestry seems quite invasive to me.
> 
> Take look at this (Shell component): 
> <http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-
framework/src/java/org/apache/tapestry/html/Shell.jwc?view=markup>
> 
> it is my guess, that you need to set "ajaxEnabled" parameter to false 
> (true is default).
> 
> Jesse, I wouldn't be so eager to enable Ajax on default. Ajax is cool 
> but I'd rather have working version of plain html app first, than 
> fiddling with JS code which may not work on all browsers. After all, 
> good UI design principle says that you should provide alternative with 
> non-JS UI when the JS is disabled. Will 4.1 components do that?
> 
> I would rather  to work like that: if I include Ajax enabled component 
> it would include required JS scripts (with unique). No ajax enabled 
> components used - no redundant js included.
> 
> Beat, your example is of "pet-shop" kind but I agree that is a little 
> bit of overkill. The good side is that browser caches JS so it would be 
> downloaded once :)
> 
> Best regards,
> Bernard
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
> For additional commands, e-mail: users-help <at> tapestry.apache.org
> 
> 

Thank you for your answer! Good to know about these parameters.

The point is more critical: Tapestry now forces you to load the dojo-
infrastructure ("dojo.js") even if you do not want/need it. Switching off the 
loading of the "dojo.js", as you described, is not a solution.

Take the following template:

<html>
   <head>
      <title>Tapestry 4.1 Test </title>
   </head>
   <body jwcid="@Body">
      <form jwcid="@Form" success="listener:doSubmit">
         <input jwcid="@TextField" value="ognl:input" />
         <input type="submit" value="Submit"/>
      </form>
   </body>
</html>

The corresponding java file:

public abstract class Home extends BasePage {
	private String input = "";
	
	public abstract String getInput();
	public abstract void setInput(String input);
	
   public void doSubmit() {
      // do some side-effects
   }
}

The rendered output contains:

...
<script type="text/javascript"><!--
dojo.event.connect(window, 'onload', function(e) {
dojo.require("tapestry.form");tapestry.form.registerForm('Form');
});
...

Thus, even in a "standard" web-app, displaying just a form, the dojo-
infrastructure must be loaded. Why?

To make things clear: The "dojo.js" needs 173 KByte space. Take an average 
bandwith of 128 Kbit = 16 KByte per second. Loading the "dojo.js" then takes 
11 seconds -> not the reaction you expect from a thin client web-app. On the 
other hand, 11 seconds are okay for a fatter, rich client web-app based on 
dojo components.

It is unclear to me where XHR (aka ajax) begins and where it ends in Tapestry 
4.1. The same for dojo. Of course, dojo uses XHR-communication, but does 
Tapestry support me writing an XHR-web-app *without* using the dojo-
infrastructure and without writing dynamic scripts?

Curious to know about that as Tapestry 4.1 evolves...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Re: Tapestry 4.1: dojo everywhere?

Posted by Sam Gendler <sg...@ideasculptor.com>.
I haven't invesitgated 4.1, but surely you can always replace the
default 170KB dojo.js with a stripped down one, since dojo provides
the possibility of custom builds.  If you actually use the dojo
functionality, of course, your code will be downloaded piecemeal by
dojo, but if you avoid the using much of dojo, you can always use a
minimalist cutom dojo.js.  I actually think it would be a good idea to
provide this in the final release of 4.1, so that it will be possible
to specify different versions of dojo.js depending upon the intent of
your page.  For instance, I run my entire website, even the
non-dynamic stuff, out of tapestry, using the shell component as a
simple templating system and utilizing the internationalization.  It
isn't a high traffic site, so I can get away with this, but I sure as
hell wouldn't want to be sending down a 170KB dojo.js file on pages
which have absolutely no javascript whatsoever on them, nor do I want
to deal with having to offload the 'static' pages to some other
webserver, since they aren't truly static and I do want
internationalization.

--sam


On 8/5/06, Beat Hoermann <ho...@freesurf.ch> wrote:
> Jesse Kuhnert <jkuhnert <at> gmail.com> writes:
>
> > You should find that no XmlHttpObject's will be created against your will
> > unless you specifically set a parameter or call a method that is designed to
> > do it. (whether directly or as a side effect).
>
> Good idea!
>
> > The framework does continue to include javascript in your pages, as it has
> > always done.
>
> Of course, I guess nobody wants to miss that! It is just a difference to load
> a few inline JS-snippets of 50 Bytes or a JS-file of 173 KByte.
>
> > The summary between that documented page, and another email written on this
> > list - is that your thoughts are valid/common, but until someone presents me
> > with a real "problem" that I can measure and test against I'm not going to
> > invest the time/effort it would require to write the API around unknown
> > object environments.
>
> Do you mean the portlet thread? Here again: The guy doesn't need the 173
> KByte "dojo.js". He just turns it off (or later it won't be automatically
> loaded anymore).
>
> I don't quite understand what you mean with "a real problem" and "unknown
> object environments". I do not have a concrete setting. Intuitively the
> new "EventListener" and the new "ResponseBuilder" fit. Eventually, I would
> like to use them for simple XHR-communication (aka ajax) without being forced
> to load the dojo-infrastructure. I don't know if this can be accomplished or
> how Tapestry generally supports me doing XHR without writing dynamic scripts
> and without using dojo. Sure, you guys have already done a lot of conceptional
> work on this and it is not a problem for me to wait for a refreshed user doc.
>
> My current point is: It is not clear to me why a thin web-app has to load the
> dojo-infrastructure if it doesn't need dojo. (I showed an example in the
> response to Bernard.)
>
> > I would certainly be all for reducing the total compressed size of the
> > initial dojo bootstrap file though. No argument here for that :) Some of it
> > would involve simply including less packages in the default build, some of
> > it involving other things I've been mulling over in my head for a while.
>
> Not of a concern to me: Dojo provides so many valuable things for a web-app,
> all rectifying the additional loading time. My concern: How can I rectify a 10
> sec startup-time for a web-app that doesn't use dojo.
>
> Thank's for your answer! It is a pleasure for me to see how things evolve
> around Tapestry and XHR!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Andreas Andreou <an...@gmail.com>.
I see them being returned with 304 not-modified status code
(using friendly urls, but this shouldnt matter)

On Tue, Jul 15, 2008 at 6:00 AM, Jeremy F. Kassis
<jk...@jkassis.com> wrote:
>
> Hmm. Just finished upgrade to 4.1.5 and the asset service clearly isn't
> caching dojo .js resources.
>
> Using firebug, I can see every request. There is no MD5 digest in any of the
> urls, and when I add a breakpoint to the asset service and step through the
> service() method, I can see it open the resource connection and deliver the
> payload.
>
> My server transfers 106KB of script on every request. :-(
>
>
>
>
> Jessek wrote:
>>
>> You could try upgrading to a current release - 4.1.5 looks to be your
>> best bet right now.
>>
>> http://tapestry.apache.org/download.html
>>
>> It handles all the caching stuff / reduced dojo footprint / other
>> things already.   I would definitely take the time
>> to attempt an upgrade to 4.1.5 first if I were putting something out
>> on a live site.
>>
>
> --
> View this message in context: http://www.nabble.com/Tapestry-4.1%3A-dojo-everywhere--tp5650151p18457240.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by "Jeremy F. Kassis" <jk...@jkassis.com>.
Hmm. Just finished upgrade to 4.1.5 and the asset service clearly isn't
caching dojo .js resources.

Using firebug, I can see every request. There is no MD5 digest in any of the
urls, and when I add a breakpoint to the asset service and step through the
service() method, I can see it open the resource connection and deliver the
payload.

My server transfers 106KB of script on every request. :-(




Jessek wrote:
> 
> You could try upgrading to a current release - 4.1.5 looks to be your
> best bet right now.
> 
> http://tapestry.apache.org/download.html
> 
> It handles all the caching stuff / reduced dojo footprint / other
> things already.   I would definitely take the time
> to attempt an upgrade to 4.1.5 first if I were putting something out
> on a live site.
> 

-- 
View this message in context: http://www.nabble.com/Tapestry-4.1%3A-dojo-everywhere--tp5650151p18457240.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Jesse Kuhnert <jk...@gmail.com>.
You could try upgrading to a current release - 4.1.5 looks to be your
best bet right now.

http://tapestry.apache.org/download.html

It handles all the caching stuff / reduced dojo footprint / other
things already.   I would definitely take the time
to attempt an upgrade to 4.1.5 first if I were putting something out
on a live site.

On Mon, Jul 14, 2008 at 7:25 PM, Jeremy F. Kassis
<jk...@jkassis.com> wrote:
>
> I know this is an old thread, but I've been working on a T4.1.1 application
> for a long time and it's about to go live. Our recent live site testing
> shows that these huge .js files kill the initial page load and they aren't
> really getting cached by the browser, so they transfer on *every* page load.
>
> I'm curious to know...
>
> 1. What happened to the stripped and compressed dojo file here Jessek
> mentioned?
>
> 2. If it's not around / in use, what dojo packages does T4.1.1 need and how
> do I do a custom build (a good url would b fine).
>
> 3. Why aren't these resources getting cached? I've modified the T4.1.1 asset
> service to deliver just an "Expires" and "Cache-control" header, but the
> browser still fetches them every time. I played with T5 a few months ago,
> but haven't been following it for a while. Has this been solved in T5?
>
>
> Many thanks everyone!
>
>
>> Just as an update on this thread, it looks like they've been working on
>> build size and I'm currently able to create a 23kb file for dojo..So, I
>> hope
>> that will speed things up a little bit.
>
>
> --
> View this message in context: http://www.nabble.com/Tapestry-4.1%3A-dojo-everywhere--tp5650151p18455296.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by "Jeremy F. Kassis" <jk...@jkassis.com>.
I know this is an old thread, but I've been working on a T4.1.1 application
for a long time and it's about to go live. Our recent live site testing
shows that these huge .js files kill the initial page load and they aren't
really getting cached by the browser, so they transfer on *every* page load.

I'm curious to know...

1. What happened to the stripped and compressed dojo file here Jessek
mentioned?

2. If it's not around / in use, what dojo packages does T4.1.1 need and how
do I do a custom build (a good url would b fine).

3. Why aren't these resources getting cached? I've modified the T4.1.1 asset
service to deliver just an "Expires" and "Cache-control" header, but the
browser still fetches them every time. I played with T5 a few months ago,
but haven't been following it for a while. Has this been solved in T5?


Many thanks everyone!


> Just as an update on this thread, it looks like they've been working on
> build size and I'm currently able to create a 23kb file for dojo..So, I
> hope
> that will speed things up a little bit.


-- 
View this message in context: http://www.nabble.com/Tapestry-4.1%3A-dojo-everywhere--tp5650151p18455296.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Pedro Viegas <pv...@gmail.com>.
Hi Jesse,

23Kb? The original 176Kb shrinked to 176Kb with the same features? I'm
stunned! :-)
That will sure speed thinhs up a bit!

Regards,

On 8/13/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Just as an update on this thread, it looks like they've been working on
> build size and I'm currently able to create a 23kb file for dojo..So, I
> hope
> that will speed things up a little bit.
>
> On 8/5/06, Beat Hoermann <ho...@freesurf.ch> wrote:
> >
> > Jesse Kuhnert <jkuhnert <at> gmail.com> writes:
> >
> > > You should find that no XmlHttpObject's will be created against your
> > will
> > > unless you specifically set a parameter or call a method that is
> > designed to
> > > do it. (whether directly or as a side effect).
> >
> > Good idea!
> >
> > > The framework does continue to include javascript in your pages, as it
> > has
> > > always done.
> >
> > Of course, I guess nobody wants to miss that! It is just a difference to
> > load
> > a few inline JS-snippets of 50 Bytes or a JS-file of 173 KByte.
> >
> > > The summary between that documented page, and another email written on
> > this
> > > list - is that your thoughts are valid/common, but until someone
> > presents me
> > > with a real "problem" that I can measure and test against I'm not
> going
> > to
> > > invest the time/effort it would require to write the API around
> unknown
> > > object environments.
> >
> > Do you mean the portlet thread? Here again: The guy doesn't need the 173
> > KByte "dojo.js". He just turns it off (or later it won't be
> automatically
> > loaded anymore).
> >
> > I don't quite understand what you mean with "a real problem" and
> "unknown
> > object environments". I do not have a concrete setting. Intuitively the
> > new "EventListener" and the new "ResponseBuilder" fit. Eventually, I
> would
> > like to use them for simple XHR-communication (aka ajax) without being
> > forced
> > to load the dojo-infrastructure. I don't know if this can be
> accomplished
> > or
> > how Tapestry generally supports me doing XHR without writing dynamic
> > scripts
> > and without using dojo. Sure, you guys have already done a lot of
> > conceptional
> > work on this and it is not a problem for me to wait for a refreshed user
> > doc.
> >
> > My current point is: It is not clear to me why a thin web-app has to
> load
> > the
> > dojo-infrastructure if it doesn't need dojo. (I showed an example in the
> > response to Bernard.)
> >
> > > I would certainly be all for reducing the total compressed size of the
> > > initial dojo bootstrap file though. No argument here for that :) Some
> of
> > it
> > > would involve simply including less packages in the default build,
> some
> > of
> > > it involving other things I've been mulling over in my head for a
> while.
> >
> > Not of a concern to me: Dojo provides so many valuable things for a
> > web-app,
> > all rectifying the additional loading time. My concern: How can I
> rectify
> > a 10
> > sec startup-time for a web-app that doesn't use dojo.
> >
> > Thank's for your answer! It is a pleasure for me to see how things
> evolve
> > around Tapestry and XHR!
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>


-- 
Pedro Viegas

Re: Tapestry 4.1: dojo everywhere?

Posted by "Jeremy F. Kassis" <jk...@jkassis.com>.
I know this is an old thread, but I've been working on a T4.1.1 application
for a long time and it's about to go live. Our recent live site testing
shows that these huge .js files kill the initial page load and they aren't
really getting cached by the browser, so they transfer on *every* page load.

I'm curious to know...

1. What happened to the stripped and compressed dojo file here Jessek
mentioned?

2. If it's not around / in use, what dojo packages does T4.1.1 need and how
do I do a custom build (a good url would b fine).

3. Why aren't these resources getting cached? I've modified the T4.1.1 asset
service to deliver just an "Expires" and "Cache-control" header, but the
browser still fetches them every time. I played with T5 a few months ago,
but haven't been following it for a while. Has this been solved in T5?


Many thanks everyone!


> Just as an update on this thread, it looks like they've been working on
> build size and I'm currently able to create a 23kb file for dojo..So, I
> hope
> that will speed things up a little bit.


-- 
View this message in context: http://www.nabble.com/Tapestry-4.1%3A-dojo-everywhere--tp5650151p18455280.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Beat Hoermann <ho...@freesurf.ch>.
Jesse Kuhnert <jkuhnert <at> gmail.com> writes:

> 
> Just as an update on this thread, it looks like they've been working on
> build size and I'm currently able to create a 23kb file for dojo..So, I hope
> that will speed things up a little bit.
> 

Great, what a progress!

Reducing the size of the "dojo.js" is always a good idea. Reducing the 
dependency of Tapestry on dojo is even better: If the developer's intention is 
to work without dojo then the web-app built with Tapestry should not include 
the "dojo.js". Hence, the goal is to integrate dojo into Tapestry in a non-
invasive way.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Just as an update on this thread, it looks like they've been working on
build size and I'm currently able to create a 23kb file for dojo..So, I hope
that will speed things up a little bit.

On 8/5/06, Beat Hoermann <ho...@freesurf.ch> wrote:
>
> Jesse Kuhnert <jkuhnert <at> gmail.com> writes:
>
> > You should find that no XmlHttpObject's will be created against your
> will
> > unless you specifically set a parameter or call a method that is
> designed to
> > do it. (whether directly or as a side effect).
>
> Good idea!
>
> > The framework does continue to include javascript in your pages, as it
> has
> > always done.
>
> Of course, I guess nobody wants to miss that! It is just a difference to
> load
> a few inline JS-snippets of 50 Bytes or a JS-file of 173 KByte.
>
> > The summary between that documented page, and another email written on
> this
> > list - is that your thoughts are valid/common, but until someone
> presents me
> > with a real "problem" that I can measure and test against I'm not going
> to
> > invest the time/effort it would require to write the API around unknown
> > object environments.
>
> Do you mean the portlet thread? Here again: The guy doesn't need the 173
> KByte "dojo.js". He just turns it off (or later it won't be automatically
> loaded anymore).
>
> I don't quite understand what you mean with "a real problem" and "unknown
> object environments". I do not have a concrete setting. Intuitively the
> new "EventListener" and the new "ResponseBuilder" fit. Eventually, I would
> like to use them for simple XHR-communication (aka ajax) without being
> forced
> to load the dojo-infrastructure. I don't know if this can be accomplished
> or
> how Tapestry generally supports me doing XHR without writing dynamic
> scripts
> and without using dojo. Sure, you guys have already done a lot of
> conceptional
> work on this and it is not a problem for me to wait for a refreshed user
> doc.
>
> My current point is: It is not clear to me why a thin web-app has to load
> the
> dojo-infrastructure if it doesn't need dojo. (I showed an example in the
> response to Bernard.)
>
> > I would certainly be all for reducing the total compressed size of the
> > initial dojo bootstrap file though. No argument here for that :) Some of
> it
> > would involve simply including less packages in the default build, some
> of
> > it involving other things I've been mulling over in my head for a while.
>
> Not of a concern to me: Dojo provides so many valuable things for a
> web-app,
> all rectifying the additional loading time. My concern: How can I rectify
> a 10
> sec startup-time for a web-app that doesn't use dojo.
>
> Thank's for your answer! It is a pleasure for me to see how things evolve
> around Tapestry and XHR!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Tapestry 4.1: dojo everywhere?

Posted by Beat Hoermann <ho...@freesurf.ch>.
Jesse Kuhnert <jkuhnert <at> gmail.com> writes:

> You should find that no XmlHttpObject's will be created against your will
> unless you specifically set a parameter or call a method that is designed to
> do it. (whether directly or as a side effect).

Good idea!

> The framework does continue to include javascript in your pages, as it has
> always done.

Of course, I guess nobody wants to miss that! It is just a difference to load 
a few inline JS-snippets of 50 Bytes or a JS-file of 173 KByte.

> The summary between that documented page, and another email written on this
> list - is that your thoughts are valid/common, but until someone presents me
> with a real "problem" that I can measure and test against I'm not going to
> invest the time/effort it would require to write the API around unknown
> object environments.

Do you mean the portlet thread? Here again: The guy doesn't need the 173 
KByte "dojo.js". He just turns it off (or later it won't be automatically 
loaded anymore).

I don't quite understand what you mean with "a real problem" and "unknown 
object environments". I do not have a concrete setting. Intuitively the 
new "EventListener" and the new "ResponseBuilder" fit. Eventually, I would 
like to use them for simple XHR-communication (aka ajax) without being forced 
to load the dojo-infrastructure. I don't know if this can be accomplished or 
how Tapestry generally supports me doing XHR without writing dynamic scripts 
and without using dojo. Sure, you guys have already done a lot of conceptional 
work on this and it is not a problem for me to wait for a refreshed user doc.

My current point is: It is not clear to me why a thin web-app has to load the 
dojo-infrastructure if it doesn't need dojo. (I showed an example in the 
response to Bernard.)

> I would certainly be all for reducing the total compressed size of the
> initial dojo bootstrap file though. No argument here for that :) Some of it
> would involve simply including less packages in the default build, some of
> it involving other things I've been mulling over in my head for a while.

Not of a concern to me: Dojo provides so many valuable things for a web-app, 
all rectifying the additional loading time. My concern: How can I rectify a 10 
sec startup-time for a web-app that doesn't use dojo.

Thank's for your answer! It is a pleasure for me to see how things evolve 
around Tapestry and XHR!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yes, it was a mistake to leave that parameter in there at all. It was during
a fanciful/fleeting moment where I thought it would be a good/practical idea
to globally turn "ajax" on/off like a water spicket.

Rational thought soon returned when actually implementing these features.
You should find that no XmlHttpObject's will be created against your will
unless you specifically set a parameter or call a method that is designed to
do it. (whether directly or as a side effect).

The framework does continue to include javascript in your pages, as it has
always done. This page outlines more behind this thought,
http://tapestry.apache.org/tapestry4.1/javascript/packaging.html.

The summary between that documented page, and another email written on this
list - is that your thoughts are valid/common, but until someone presents me
with a real "problem" that I can measure and test against I'm not going to
invest the time/effort it would require to write the API around unknown
object environments.

I would certainly be all for reducing the total compressed size of the
initial dojo bootstrap file though. No argument here for that :) Some of it
would involve simply including less packages in the default build, some of
it involving other things I've been mulling over in my head for a while.

So, it's not set in stone yet, just convenient so far. I'm willing to work
with someone(s) when/if anyone gets a bug up their proverbial butt about it
enough to work with me on it :)

On 8/4/06, hv @ Fashion Content <in...@fashioncontent.com> wrote:
>
> I think the intention is that ajax functionality is disabled by default.
>
> "Bernard" <be...@man.poznan.pl> skrev i en meddelelse
> news:44D3C57B.2000708@man.poznan.pl...
> > Beat Hoermann wrote:
> >> I surrounded the form component with a shell component. After all, my
> >> tiny web-
> >> app, just displaying a simple text field and a submit button, not using
> >> ajax nor any dojo things, was forced to load the 173 KByte heavy
> >> "dojo.js". The integration of dojo into Tapestry seems quite invasive
> to
> >> me.
> >
> > Take look at this (Shell component):
> > <
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc?view=markup
> >
> >
> > it is my guess, that you need to set "ajaxEnabled" parameter to false
> > (true is default).
> >
> > Jesse, I wouldn't be so eager to enable Ajax on default. Ajax is cool
> but
> > I'd rather have working version of plain html app first, than fiddling
> > with JS code which may not work on all browsers. After all, good UI
> design
> > principle says that you should provide alternative with non-JS UI when
> the
> > JS is disabled. Will 4.1 components do that?
> >
> > I would rather  to work like that: if I include Ajax enabled component
> it
> > would include required JS scripts (with unique). No ajax enabled
> > components used - no redundant js included.
> >
> > Beat, your example is of "pet-shop" kind but I agree that is a little
> bit
> > of overkill. The good side is that browser caches JS so it would be
> > downloaded once :)
> >
> > Best regards,
> > Bernard
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Tapestry 4.1: dojo everywhere?

Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
I think the intention is that ajax functionality is disabled by default.

"Bernard" <be...@man.poznan.pl> skrev i en meddelelse 
news:44D3C57B.2000708@man.poznan.pl...
> Beat Hoermann wrote:
>> I surrounded the form component with a shell component. After all, my 
>> tiny web-
>> app, just displaying a simple text field and a submit button, not using 
>> ajax nor any dojo things, was forced to load the 173 KByte heavy 
>> "dojo.js". The integration of dojo into Tapestry seems quite invasive to 
>> me.
>
> Take look at this (Shell component): 
> <http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc?view=markup>
>
> it is my guess, that you need to set "ajaxEnabled" parameter to false 
> (true is default).
>
> Jesse, I wouldn't be so eager to enable Ajax on default. Ajax is cool but 
> I'd rather have working version of plain html app first, than fiddling 
> with JS code which may not work on all browsers. After all, good UI design 
> principle says that you should provide alternative with non-JS UI when the 
> JS is disabled. Will 4.1 components do that?
>
> I would rather  to work like that: if I include Ajax enabled component it 
> would include required JS scripts (with unique). No ajax enabled 
> components used - no redundant js included.
>
> Beat, your example is of "pet-shop" kind but I agree that is a little bit 
> of overkill. The good side is that browser caches JS so it would be 
> downloaded once :)
>
> Best regards,
> Bernard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 4.1: dojo everywhere?

Posted by Bernard <be...@man.poznan.pl>.
Beat Hoermann wrote:
> I surrounded the form component with a shell component. After all, my tiny web-
> app, just displaying a simple text field and a submit button, not using ajax 
> nor any dojo things, was forced to load the 173 KByte heavy "dojo.js". The 
> integration of dojo into Tapestry seems quite invasive to me.

Take look at this (Shell component): 
<http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc?view=markup>

it is my guess, that you need to set "ajaxEnabled" parameter to false 
(true is default).

Jesse, I wouldn't be so eager to enable Ajax on default. Ajax is cool 
but I'd rather have working version of plain html app first, than 
fiddling with JS code which may not work on all browsers. After all, 
good UI design principle says that you should provide alternative with 
non-JS UI when the JS is disabled. Will 4.1 components do that?

I would rather  to work like that: if I include Ajax enabled component 
it would include required JS scripts (with unique). No ajax enabled 
components used - no redundant js included.

Beat, your example is of "pet-shop" kind but I agree that is a little 
bit of overkill. The good side is that browser caches JS so it would be 
downloaded once :)

Best regards,
Bernard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org