You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by uvwxy <gi...@git.apache.org> on 2015/03/31 17:49:01 UTC

[GitHub] thrift pull request: [THRIFT-2820] Implement an alternative Transp...

GitHub user uvwxy opened a pull request:

    https://github.com/apache/thrift/pull/413

    [THRIFT-2820] Implement an alternative Transport for JS using the AngularJS $http-service

    I added the target --gen js:angular to generate angularjs targeted thrift service clients. The thrift.js has been modified simliar to the --gen js:jquery target.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/uvwxy/thrift dev-uvwxy

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/413.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #413
    
----
commit 6e3167d568911019b543697db337846058ed47c8
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-26T19:21:55Z

    m: untested initial version that generates angular js targeted code

commit a06fc739938440fcce1d9cf01fc5bad29f6045bd
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T10:26:41Z

    m: use Content-Type as described in THRIFT-2756

commit c3237d14dde47ab495b95c171180f530e08e3ea7
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T14:35:28Z

    m: integrate angular implementation into qunit tests (still failing)

commit cc8764001774c008f9d17d9fca1e1a23336fefb7
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T14:43:25Z

    m: cleanup (96 assertions of 104 passed, 8 failed)

commit 71ead83979882f2c238e8d6be055ed4bbaccc8ef
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T14:56:17Z

    m: fallback to jqRequest if  not initialized (make test.js async work)

commit c27875f9703e26ea2816649eca0a75a2ed6f01bd
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T14:58:48Z

    m: cleanup (all assertions pass)

commit 61d13c5d146c9feba7a77a3a6194ca564172e58e
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T15:00:23Z

    b: add missing ;

commit ddeb8c1214e0447c75674feecd3fc051db37c171
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T15:29:51Z

    m: fix correct handling of exceptions

commit b37ff7b07194dec51891c9695a2761702db45eea
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T16:11:48Z

    m: use factory instead of controller

commit 41631058afca3ebf0998a0bbdf9b0cafa6267583
Author: Paul Smith <co...@uvwxy.de>
Date:   2015-03-29T20:36:47Z

    m: added --gen js:angular=appvar to enable factory generation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: [THRIFT-2820] Implement an alternative Transp...

Posted by uvwxy <gi...@git.apache.org>.
Github user uvwxy commented on the pull request:

    https://github.com/apache/thrift/pull/413#issuecomment-88218807
  
    See https://issues.apache.org/jira/browse/THRIFT-2820?focusedCommentId=14389241&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14389241 for explanation


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: [THRIFT-2820] Implement an alternative Transp...

Posted by henrique <gi...@git.apache.org>.
Github user henrique commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/413#discussion_r28652449
  
    --- Diff: lib/js/test/test-angular.html ---
    @@ -0,0 +1,58 @@
    +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    +<!--
    +  Licensed to the Apache Software Foundation (ASF) under one
    +  or more contributor license agreements. See the NOTICE file
    +  distributed with this work for additional information
    +  regarding copyright ownership. The ASF licenses this file
    +  to you under the Apache License, Version 2.0 (the
    +  "License"); you may not use this file except in compliance
    +  with the License. You may obtain a copy of the License at
    +
    +    http://www.apache.org/licenses/LICENSE-2.0
    +
    +  Unless required by applicable law or agreed to in writing,
    +  software distributed under the License is distributed on an
    +  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +  KIND, either express or implied. See the License for the
    +  specific language governing permissions and limitations
    +  under the License.
    +-->
    +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    +<head>
    +  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    +  <title>Thrift Javascript Bindings: Unit Test</title>
    +
    +  <script src="build/js/thrift.js"         type="text/javascript" charset="utf-8"></script>
    +  <script src="gen-js/ThriftTest_types.js" type="text/javascript" charset="utf-8"></script>
    +  <script src="gen-js/ThriftTest.js"       type="text/javascript" charset="utf-8"></script>
    +
    +  <!-- AngularJS + Dependency-->
    +  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    --- End diff --
    
    Could we remove the jq dependency here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: [THRIFT-2820] Implement an alternative Transp...

Posted by uvwxy <gi...@git.apache.org>.
Github user uvwxy commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/413#discussion_r30312844
  
    --- Diff: lib/js/test/test-angular.html ---
    @@ -0,0 +1,58 @@
    +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    +<!--
    +  Licensed to the Apache Software Foundation (ASF) under one
    +  or more contributor license agreements. See the NOTICE file
    +  distributed with this work for additional information
    +  regarding copyright ownership. The ASF licenses this file
    +  to you under the Apache License, Version 2.0 (the
    +  "License"); you may not use this file except in compliance
    +  with the License. You may obtain a copy of the License at
    +
    +    http://www.apache.org/licenses/LICENSE-2.0
    +
    +  Unless required by applicable law or agreed to in writing,
    +  software distributed under the License is distributed on an
    +  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +  KIND, either express or implied. See the License for the
    +  specific language governing permissions and limitations
    +  under the License.
    +-->
    +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    +<head>
    +  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    +  <title>Thrift Javascript Bindings: Unit Test</title>
    +
    +  <script src="build/js/thrift.js"         type="text/javascript" charset="utf-8"></script>
    +  <script src="gen-js/ThriftTest_types.js" type="text/javascript" charset="utf-8"></script>
    +  <script src="gen-js/ThriftTest.js"       type="text/javascript" charset="utf-8"></script>
    +
    +  <!-- AngularJS + Dependency-->
    +  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    --- End diff --
    
    The dependency is required to run the tests that do not use the angular js service.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: [THRIFT-2820] Implement an alternative Transp...

Posted by uvwxy <gi...@git.apache.org>.
Github user uvwxy commented on the pull request:

    https://github.com/apache/thrift/pull/413#issuecomment-94244430
  
    Hi Henrique,
    
    the dependecy is only needed when $http is not initialised correctly. In this case I fall back to the jqRequest mechanism to complete the tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: [THRIFT-2820] Implement an alternative Transp...

Posted by henrique <gi...@git.apache.org>.
Github user henrique commented on the pull request:

    https://github.com/apache/thrift/pull/413#issuecomment-88279965
  
    Hi Paul,
    Thanks for the PR. It looks pretty good, but have tried to remove the jQuery dependency?
    As you mentioned on your comments, I also think it make more sense if we didn't need it but I am not completely sure if you can run $http only with jqLite...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request #413: [THRIFT-2820] Implement an alternative Transport f...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/thrift/pull/413


---

[GitHub] thrift issue #413: [THRIFT-2820] Implement an alternative Transport for JS u...

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:

    https://github.com/apache/thrift/pull/413
  
    This pull request is being closed due to lack of activity.  
    You can re-open it after rebasing on the current master if you would like it to be reconsidered.


---