You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by fish fish <fi...@gmail.com> on 2017/03/20 15:41:46 UTC
How to bind angular object with backend when write Helium Application
Hi Group,
Recently we are exploring building data analysis application based on
Zeppelin. We checked Helium document and think it could be an appropriate
way to customize both frontend and backend in Zeppelin. However, we did not
find a way to bind angular object with backend data when extends
Application. More detail, we want to catch the frontend angular object
value / change event in the backend and then process in some way to
feedback to frontend. Could someone kindly show us the right way to do
this? We are now using 0.8.0 snapshot code. Thank you very much in advance!
Best,
Fishfish
Re: How to bind angular object with backend when write Helium Application
Posted by fish fish <fi...@gmail.com>.
Hi Lee,
Follow your instruction, I can update frontend from beckend and get
AngularObject through 'HeliumAppAngularObjectRegistry'. However, I don't
know how to get 'InterpreterContext' in Helium Application, which is needed
to initialize an 'AngularObjectWatcher' when adding watcher. I checked
ApplicationContext but seems I cannot get InterpreterContext there. Could
you share more lights on that? Thanks!
2017-03-21 11:20 GMT+08:00 fish fish <fi...@gmail.com>:
> Thank you Lee for such promptly response! Will check the code and get back
> if any further problems. Thank you again!
>
> 2017-03-21 3:23 GMT+08:00 moon soo Lee <mo...@apache.org>:
>
>> Hi Hishfish,
>>
>> If you take a look Clock example [1], you'll see how it creates angular
>> objects and update every seconds from backend, so front-end can be updated
>> accordingly.
>>
>> After you add your object into AngularObjectRegistry, you can get
>> AngularObject and add watcher [2]. Then any changes of the angular scope
>> variable from front end will trigger your watcher where you can place your
>> backend logics.
>>
>> Hope this helps,
>>
>> Thanks,
>> moon
>>
>> [1] https://github.com/apache/zeppelin/blob/master/zeppelin-
>> examples/zeppelin-example-clock/src/main/java/org/apache/
>> zeppelin/example/app/clock/Clock.java#L72
>> [2] https://github.com/apache/zeppelin/blob/master/zeppelin-
>> interpreter/src/main/java/org/apache/zeppelin/display/Angula
>> rObject.java#L219
>>
>>
>> On Mon, Mar 20, 2017 at 8:47 AM fish fish <fi...@gmail.com> wrote:
>>
>>> Hi Group,
>>>
>>> Recently we are exploring building data analysis application based on
>>> Zeppelin. We checked Helium document and think it could be an appropriate
>>> way to customize both frontend and backend in Zeppelin. However, we did not
>>> find a way to bind angular object with backend data when extends
>>> Application. More detail, we want to catch the frontend angular object
>>> value / change event in the backend and then process in some way to
>>> feedback to frontend. Could someone kindly show us the right way to do
>>> this? We are now using 0.8.0 snapshot code. Thank you very much in advance!
>>>
>>> Best,
>>>
>>> Fishfish
>>>
>>
>
Re: How to bind angular object with backend when write Helium Application
Posted by fish fish <fi...@gmail.com>.
Thank you Lee for such promptly response! Will check the code and get back
if any further problems. Thank you again!
2017-03-21 3:23 GMT+08:00 moon soo Lee <mo...@apache.org>:
> Hi Hishfish,
>
> If you take a look Clock example [1], you'll see how it creates angular
> objects and update every seconds from backend, so front-end can be updated
> accordingly.
>
> After you add your object into AngularObjectRegistry, you can get
> AngularObject and add watcher [2]. Then any changes of the angular scope
> variable from front end will trigger your watcher where you can place your
> backend logics.
>
> Hope this helps,
>
> Thanks,
> moon
>
> [1] https://github.com/apache/zeppelin/blob/master/zeppelin-
> examples/zeppelin-example-clock/src/main/java/org/
> apache/zeppelin/example/app/clock/Clock.java#L72
> [2] https://github.com/apache/zeppelin/blob/master/zeppelin-
> interpreter/src/main/java/org/apache/zeppelin/display/
> AngularObject.java#L219
>
>
> On Mon, Mar 20, 2017 at 8:47 AM fish fish <fi...@gmail.com> wrote:
>
>> Hi Group,
>>
>> Recently we are exploring building data analysis application based on
>> Zeppelin. We checked Helium document and think it could be an appropriate
>> way to customize both frontend and backend in Zeppelin. However, we did not
>> find a way to bind angular object with backend data when extends
>> Application. More detail, we want to catch the frontend angular object
>> value / change event in the backend and then process in some way to
>> feedback to frontend. Could someone kindly show us the right way to do
>> this? We are now using 0.8.0 snapshot code. Thank you very much in advance!
>>
>> Best,
>>
>> Fishfish
>>
>
Re: How to bind angular object with backend when write Helium Application
Posted by moon soo Lee <mo...@apache.org>.
Hi Hishfish,
If you take a look Clock example [1], you'll see how it creates angular
objects and update every seconds from backend, so front-end can be updated
accordingly.
After you add your object into AngularObjectRegistry, you can get
AngularObject and add watcher [2]. Then any changes of the angular scope
variable from front end will trigger your watcher where you can place your
backend logics.
Hope this helps,
Thanks,
moon
[1]
https://github.com/apache/zeppelin/blob/master/zeppelin-examples/zeppelin-example-clock/src/main/java/org/apache/zeppelin/example/app/clock/Clock.java#L72
[2]
https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java#L219
On Mon, Mar 20, 2017 at 8:47 AM fish fish <fi...@gmail.com> wrote:
> Hi Group,
>
> Recently we are exploring building data analysis application based on
> Zeppelin. We checked Helium document and think it could be an appropriate
> way to customize both frontend and backend in Zeppelin. However, we did not
> find a way to bind angular object with backend data when extends
> Application. More detail, we want to catch the frontend angular object
> value / change event in the backend and then process in some way to
> feedback to frontend. Could someone kindly show us the right way to do
> this? We are now using 0.8.0 snapshot code. Thank you very much in advance!
>
> Best,
>
> Fishfish
>