You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Akhil Anil <ak...@gmail.com> on 2013/08/29 18:55:45 UTC
Ideas for smd (dojo) alternatives in jQuery
I'm trying to implement a jQuery alternative to the existing dojo. I've
been reading quite a bit about 'smd' that's required by dojo. It actually
sort of clones the java class and invoke the java function from javascript.
I couldn't find this kind of functionality in jquery. What are the options
or any workarounds?
--
Thanks and regards....
May God Bless us!
*AkH!L.*
*http://akhilspassion.blogspot.com*
Re: Ideas for smd (dojo) alternatives in jQuery
Posted by Luciano Resende <lu...@gmail.com>.
On Sat, Sep 14, 2013 at 8:37 AM, Akhil Anil <ak...@gmail.com> wrote:
> How do I register my new project as a service under META-INF/services.
>
> just like
>
> *
> /modules/implementation-widget-runtime-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGenerator
> *
> *
> *
> I created
>
> /modules/implementation-widget-runtime-*jquery*
> /src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGenerator
> *
> *
>
>
> I found the service fetching is done in Line 176
> org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer.ServiceDeclarationImpl.getServiceDeclarations(String
> serviceName)
>
> But what is happening under the hood of getResources(name). My bad.
>
>
>
We discover the concrete implementation of a given interface, by adding a
META-INF/services/interface and inside the file add the concrete
implementation class and any configuration required.
getResource asks the classLoader to find the files by name, and will read
the concrete details inside it.
Hope this clarifies a bit.
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
Re: Ideas for smd (dojo) alternatives in jQuery
Posted by Akhil Anil <ak...@gmail.com>.
How do I register my new project as a service under META-INF/services.
just like
*
/modules/implementation-widget-runtime-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGenerator
*
*
*
I created
/modules/implementation-widget-runtime-*jquery*
/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGenerator
*
*
I found the service fetching is done in Line 176
org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer.ServiceDeclarationImpl.getServiceDeclarations(String
serviceName)
But what is happening under the hood of getResources(name). My bad.
On 6 September 2013 23:41, Akhil Anil <ak...@gmail.com> wrote:
> Please find my first ever patch (as an attachment in the jira issue<https://issues.apache.org/jira/browse/TUSCANY-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel>) to open source code for the following tasks:
>
> - Add support for bootstrapping jquery (similar to
> web-javascript-dojo/) (patch)
> - Add proxy generation using jquery (similar to
> implementation-widget-runtime-dojo/) (patch)
>
> Apologies if there are many mistakes, there are a few flaws Im aware of.
> Didn't download the official jquery. I've used org.jszip.redist:jquery.
> The proxy generation code is left intact (its left as it is in dojo, except
> for the renamed variable names). I didn't quite figure out what to generate
> for jquery or if it should be changed at all. If this is how a real patch
> is taken for Tuscany I could try out more in the coming days.
>
>
> On 29 August 2013 23:43, Luciano Resende <lu...@gmail.com> wrote:
>
>>
>>
>>
>> On Thu, Aug 29, 2013 at 9:55 AM, Akhil Anil <ak...@gmail.com>wrote:
>>
>>> I'm trying to implement a jQuery alternative to the existing dojo. I've
>>> been reading quite a bit about 'smd' that's required by dojo. It actually
>>> sort of clones the java class and invoke the java function from javascript.
>>> I couldn't find this kind of functionality in jquery. What are the options
>>> or any workarounds?
>>>
>>>
>>>
>> Just look for JSON-RPC client for JQuery, SMD is a dojo specific thing
>> and might not be needed for other clients.
>>
>> As for next steps, I'd recommend :
>>
>> - Add support for bootstrapping jquery (similar to web-javascript-dojo/)
>> (patch)
>> - Add proxy generation using jquery (similar to
>> implementation-widget-runtime-dojo/) (patch)
>> - Add support for rest which is simpler (patch)
>> - Add support for json-rpc (and investigate possible clients for that)
>> (patch)
>>
>> It would be great to have patches coming for the first two items next
>> week.
>>
>>
>> --
>> Luciano Resende
>> http://people.apache.org/~lresende
>> http://twitter.com/lresende1975
>> http://lresende.blogspot.com/
>>
>
>
>
> --
>
> Thanks and regards....
>
> May God Bless us!
>
> *AkH!L.*
>
> *http://akhilspassion.blogspot.com*
>
--
Thanks and regards....
May God Bless us!
*AkH!L.*
*http://akhilspassion.blogspot.com*
Re: Ideas for smd (dojo) alternatives in jQuery
Posted by Akhil Anil <ak...@gmail.com>.
Please find my first ever patch (as an attachment in the jira
issue<https://issues.apache.org/jira/browse/TUSCANY-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel>)
to open source code for the following tasks:
- Add support for bootstrapping jquery (similar to web-javascript-dojo/)
(patch)
- Add proxy generation using jquery (similar to
implementation-widget-runtime-dojo/) (patch)
Apologies if there are many mistakes, there are a few flaws Im aware of.
Didn't download the official jquery. I've used org.jszip.redist:jquery. The
proxy generation code is left intact (its left as it is in dojo, except for
the renamed variable names). I didn't quite figure out what to generate for
jquery or if it should be changed at all. If this is how a real patch is
taken for Tuscany I could try out more in the coming days.
On 29 August 2013 23:43, Luciano Resende <lu...@gmail.com> wrote:
>
>
>
> On Thu, Aug 29, 2013 at 9:55 AM, Akhil Anil <ak...@gmail.com> wrote:
>
>> I'm trying to implement a jQuery alternative to the existing dojo. I've
>> been reading quite a bit about 'smd' that's required by dojo. It actually
>> sort of clones the java class and invoke the java function from javascript.
>> I couldn't find this kind of functionality in jquery. What are the options
>> or any workarounds?
>>
>>
>>
> Just look for JSON-RPC client for JQuery, SMD is a dojo specific thing and
> might not be needed for other clients.
>
> As for next steps, I'd recommend :
>
> - Add support for bootstrapping jquery (similar to web-javascript-dojo/)
> (patch)
> - Add proxy generation using jquery (similar to
> implementation-widget-runtime-dojo/) (patch)
> - Add support for rest which is simpler (patch)
> - Add support for json-rpc (and investigate possible clients for that)
> (patch)
>
> It would be great to have patches coming for the first two items next week.
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>
--
Thanks and regards....
May God Bless us!
*AkH!L.*
*http://akhilspassion.blogspot.com*
Re: Ideas for smd (dojo) alternatives in jQuery
Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Aug 29, 2013 at 9:55 AM, Akhil Anil <ak...@gmail.com> wrote:
> I'm trying to implement a jQuery alternative to the existing dojo. I've
> been reading quite a bit about 'smd' that's required by dojo. It actually
> sort of clones the java class and invoke the java function from javascript.
> I couldn't find this kind of functionality in jquery. What are the options
> or any workarounds?
>
>
>
Just look for JSON-RPC client for JQuery, SMD is a dojo specific thing and
might not be needed for other clients.
As for next steps, I'd recommend :
- Add support for bootstrapping jquery (similar to web-javascript-dojo/)
(patch)
- Add proxy generation using jquery (similar to
implementation-widget-runtime-dojo/) (patch)
- Add support for rest which is simpler (patch)
- Add support for json-rpc (and investigate possible clients for that)
(patch)
It would be great to have patches coming for the first two items next week.
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
Re: Ideas for smd (dojo) alternatives in jQuery
Posted by Rineez Ahmed <ri...@gmail.com>.
I think the parts that invoke java code from javascript can be reused
across any javascript framework. If the code is pure javascript and not
dependant on the javascript framework then what is the need to implement it
again differently for each framework?
Or are you saying it is using some of Dojo's feature to invoke java code?
Regards
Rineez
On Thu, Aug 29, 2013 at 10:25 PM, Akhil Anil <ak...@gmail.com> wrote:
> I'm trying to implement a jQuery alternative to the existing dojo. I've
> been reading quite a bit about 'smd' that's required by dojo. It actually
> sort of clones the java class and invoke the java function from javascript.
> I couldn't find this kind of functionality in jquery. What are the options
> or any workarounds?
>
> --
>
> Thanks and regards....
>
> May God Bless us!
>
> *AkH!L.*
>
> *http://akhilspassion.blogspot.com*
>
--
Regards