You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Alexander Klimetschek <al...@mindquarry.com> on 2007/04/04 16:36:45 UTC

Re: Circular deps in servlet connections (was Re: Servlet Services + Shielding)

Grzegorz Kossakowski schrieb:
> Alexander Klimetschek napisał(a):
>> Yes, this would indeed be better. The super block must not know of its
>> concrete children, but be able to call polymorphic matchers - true OO.
>> Then I can remove the cyclic dep.
>>
>> Alex
>>
>> BTW: When I started to use blocks and especially using the inheritance
>> feature, I was surprised that I manually had to include the
>> forward-**-to-super-block matcher at the end of the child sitemap....
>>
> 
> I'll create issue for this one. Once again: would you like to implement it? If so, just put a message on list.
> 

I could easily create the patch for the warning message.

Regarding the other solution (automatically resolving the circular dep and 
thus allowing it): I would now agree to skip this. A bit of research showed 
that generic circular deps handling is difficult. There are solutions if one 
specifically knows the two objects (see [1] and [2]). But here we are in a 
piece of code that has to work generically.

Instead, it would be nice to get the real forwarding implemented soon - but 
I don't know yet where to tackle the servlet-services code to get this done.

Alex

[1] http://forum.springframework.net/archive/index.php/t-94.html

[2] http://forum.springframework.org/archive/index.php/t-10186.html

-- 
Alexander Klimetschek
http://www.mindquarry.com


Forms/Ajax refactoring testing (was: Re: Circular deps in servlet connections)

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Alexander Klimetschek napisał(a):
> Grzegorz Kossakowski schrieb:
>> You mentioned that you play with Dojo. I have some troubles with 
>> fixing upload progress sample from Forms. I guess it's
>> clearly client side issue but I cannot debug relevant code snippet 
>> (it does not appear in Firebug) and I'm really tired
>> with all these AJAX issues. Can I count on your help with this one?
>
> Yes, I can provide a test scenario here, we are using uploads as well.

Great, thanks for your offer!

>> I'm going to write report on Forms/Ajax refactorings and will mention 
>> this problem.
>
> Can you give a short example on how one configures that all dojo js 
> and form xsl files etc. are retrieved by an ajax/forms sitemap? Will 
> those sitemaps get mounted automatically under some URL?
Yes, sitemaps (actually servlets running sitemaps) are mounted at 
location configured in src/main/resources/META-INF/cocoon/spring. See 
recent thread for more detailed info: 
http://thread.gmane.org/gmane.text.xml.cocoon.devel/72486
However, apart from your own block, you don't need to bother yourself 
with mount locations of blocks because you should use connections and 
servlet: scheme. Actually, that is one of reasons (not only one!) why 
servlet-service-fw is so sexy that I decided to refactor whole Ajax and 
Forms blocks ;-)

I provided migration guides in draft version:
http://cocoon.zones.apache.org/daisy/cdocs-ajax/g1/1350.html
http://cocoon.zones.apache.org/daisy/cdocs-forms/g1/1351.html

Could you provide result of your migration? I suggest to try with some 
small application.

-- 
Grzegorz Kossakowski

Re: Circular deps in servlet connections (was Re: Servlet Services + Shielding)

Posted by Alexander Klimetschek <al...@mindquarry.com>.
Grzegorz Kossakowski schrieb:
> I hope to commit some basic (without caching implemented) code within days. It took me quite a long time to clarify
> whole idea...

Great!

> You mentioned that you play with Dojo. I have some troubles with fixing upload progress sample from Forms. I guess it's
> clearly client side issue but I cannot debug relevant code snippet (it does not appear in Firebug) and I'm really tired
> with all these AJAX issues. Can I count on your help with this one?

Yes, I can provide a test scenario here, we are using uploads as well.

> I'm going to write report on Forms/Ajax refactorings and will mention this problem.

Can you give a short example on how one configures that all dojo js and form 
xsl files etc. are retrieved by an ajax/forms sitemap? Will those sitemaps 
get mounted automatically under some URL?

Alex

-- 
Alexander Klimetschek
http://www.mindquarry.com


Re: Circular deps in servlet connections (was Re: Servlet Services + Shielding)

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Alexander Klimetschek napisał(a):
> Great, I'd love to have a postable source. How far are you? I could help
> you in testing it next week, when I have our webapp running with Cocoon
> trunk (going from dojo 0.3.1 to 0.4.1 is quite some work...).
> Specifically I want to reuse lots of styling pipelines copied across our
> sitemaps and thus place them in one single location.

I hope to commit some basic (without caching implemented) code within days. It took me quite a long time to clarify
whole idea...

You mentioned that you play with Dojo. I have some troubles with fixing upload progress sample from Forms. I guess it's
clearly client side issue but I cannot debug relevant code snippet (it does not appear in Firebug) and I'm really tired
with all these AJAX issues. Can I count on your help with this one?

I'm going to write report on Forms/Ajax refactorings and will mention this problem.

-- 
Grzegorz Kossakowski

Re: Circular deps in servlet connections (was Re: Servlet Services + Shielding)

Posted by Alexander Klimetschek <al...@mindquarry.com>.
Grzegorz Kossakowski schrieb:
> For now, just digging into the code is the only option IMO.

Ok, I will have a look at it next week.

 > I'm busy with other stuff (postable source especially) so will not
> be able to do this.

Great, I'd love to have a postable source. How far are you? I could help you 
in testing it next week, when I have our webapp running with Cocoon trunk 
(going from dojo 0.3.1 to 0.4.1 is quite some work...). Specifically I want 
to reuse lots of styling pipelines copied across our sitemaps and thus place 
them in one single location.

Alex

-- 
Alexander Klimetschek
http://www.mindquarry.com


Re: Circular deps in servlet connections (was Re: Servlet Services + Shielding)

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Alexander Klimetschek napisał(a):
> Grzegorz Kossakowski schrieb:
>
> I could easily create the patch for the warning message.
>
> Regarding the other solution (automatically resolving the circular dep 
> and thus allowing it): I would now agree to skip this. A bit of 
> research showed that generic circular deps handling is difficult. 
> There are solutions if one specifically knows the two objects (see [1] 
> and [2]). But here we are in a piece of code that has to work 
> generically.

Yes, in general circular dependencies are not recommended.

> Instead, it would be nice to get the real forwarding implemented soon 
> - but I don't know yet where to tackle the servlet-services code to 
> get this done.

I don't internals too, but I hope that Daniel will have some free time 
to give us hints. For now, just digging into the code is the only option 
IMO. I'm busy with other stuff (postable source especially) so will not 
be able to do this.

-- 
Grzegorz Kossakowski