[Firebase] How can I CRUD the data?

Forge Component
(11)
Published on 2018-12-20 by Labs
11 votes
Published on 2018-12-20 by Labs

Hi! 

How can I CRUD the data?

I sought the logic all over this component, but I couldn't find it.

It seems to have only sign-in/log-in logic. 

Hi Yatima,


Did you follow the configuration instructions for this component?

João Marques wrote:

Hi Yatima,


Did you follow the configuration instructions for this component?

Hi João,

Thanks for your comment.

I have read it, but it's written about only Firebase Token, isn't it?

How does OutSystems read or write data to Firebase DB?


Hi Yatima,


Firebase allows you to trigger something on a client-side that was triggered in the server-side.

The component actions "NotifyEvent" allows you to send the information you want on the FirebaseEvent structure (you have plain text or advanced JSON). On the client-side handler of the notification you can deserialize the message to obtain more information on the event.


Cheers,

João


Hello Yatima,

From what I understand, what you need is to populate your Firebase Database with some data.

Currently, this firebase component is not oriented for that. 

Since we have the OutSystems database available, this component only offers the option for real-time events. For that, the component uses the real-time database, but it will replace your database entry every time you do another request.

Can you provide some more details of what you're trying to achieve with the usage of the Firebase Database? 

Cheers,

Samuel Jesus


Hi there,

Thanks to all of you, I can understand what is this component for.

I want to click two "MARK AS A SOLUTION" button... haha


Samuel Jesus wrote:

Can you provide some more details of what you're trying to achieve with the usage of the Firebase Database? 

I want to read or write data to Firebase DB because I have already data there.

Hi Yatima,


Haha, as Samuel said I don't think the component is at the moment oriented for that. Perhaps a functionality to look at in a future release.


Cheers,

João

João Marques wrote:

Hi Yatima,


Firebase allows you to trigger something on a client-side that was triggered in the server-side.

The component actions "NotifyEvent" allows you to send the information you want on the FirebaseEvent structure (you have plain text or advanced JSON). On the client-side handler of the notification you can deserialize the message to obtain more information on the event.


Cheers,

João



Can i ask server-side it means outsystem server or firebase server?

Hi Benchawan,


I meant OutSystems server side.

For instance, an example scenario is if you have a timer that fetches data and when it notices differences, updates the DB. In this scenario, you could use the "NotifyEvent" action to warn pages (with listeners to this event) to refresh.


Cheers,

João

Samuel Jesus wrote:

Hello Yatima,

From what I understand, what you need is to populate your Firebase Database with some data.

Currently, this firebase component is not oriented for that. 

Since we have the OutSystems database available, this component only offers the option for real-time events. For that, the component uses the real-time database, but it will replace your database entry every time you do another request.

Can you provide some more details of what you're trying to achieve with the usage of the Firebase Database? 

Cheers,

Samuel Jesus



Hi Samuel and João, 

I think I have a similar challenge. This is what I want to achieve: 

1. Use FireBase to Store the RealTime GPS coordinates of a Mobile.

2. Having a Web App that renders a Google Map showing the RealTime location of a specific Mobile (listening Firebase Table). I know this works because if I change the values on the FireBase table, I mean, manually going there and changing it, then it works as expected, the marker moves on the Google Map in RealTime.

3. Update the RealTime GPS coordinates of the Mobile in the Firebase Table.


Points #1 and #2 are done. I would like to know if someone around used the plugin to update a table in FireBase - that's what I miss. This is point #3. I guess the plugin is not oriented for that but maybe someone had a similar challenge before? How to update data on the FireBase table? The table looks like the picture attached (this example shows is for two mobiles and their location).


Thank you for your time and help!




Yatima Kagurazaka wrote:

Hi! 

How can I CRUD the data?

I sought the logic all over this component, but I couldn't find it.

It seems to have only sign-in/log-in logic. 

Hi Yatima, 


I'm having the same problem!

Did you (or anyone) manage to solve this ?


Joao Tiburcio, you want to CRUD the data on the Firebase table. Is that it? I solved it but not with the component. If that's it, I can try to prepare a quick demo. 

Hugo Menino Aguiar wrote:

Joao Tiburcio, you want to CRUD the data on the Firebase table. Is that it? I solved it but not with the component. If that's it, I can try to prepare a quick demo. 

Hi Hugo, Do you have a simple demo for that so I can check it out?

Thanks in advance :)


Hugo Menino Aguiar wrote:

Joao Tiburcio, you want to CRUD the data on the Firebase table. Is that it? I solved it but not with the component. If that's it, I can try to prepare a quick demo. 


Hi Hugo, I managed to do a similar thing, I used just a Rest API to connect with the realtime database.

It worked but .. I can't make a Get All method yet .. it says that I have a json array and should be an object or something similar.


I made a post in the forum, if anyone here manage to help me : 

https://www.outsystems.com/forums/discussion/50529/failed-to-parse-response-of-method-to-firebase/