Skip to main content
Participant
January 30, 2019
Question

How to implement Google Firebase Firestore SDK?

  • January 30, 2019
  • 2 replies
  • 563 views

We're trying to implement a connection to the Google Firebase Firestore database.

In java, as explained by firebase documentation, one should add a depencency as follows:

dependencies {

  implementation 'com.google.firebase:firebase-admin:6.7.0'

}

This way there's access to FirebaseApp and FirebaseOptions classes.

How can we do this in ColdFusion? Tnx!

This topic has been closed for replies.

2 replies

Charlie Arehart
Community Expert
Community Expert
October 2, 2022

While I've never heard of firestorm, I may still be able to help. First, that looks like a maven config line. Docs which show that presume one is compiling Java code.

 

For us in cf, we'd instead use the cf  createObject function or cfobject tag to create an instance of that Java class, in this case that com.google.firebase referenced there. 

 

And to use that, you'd need to have placed the jar for that tool into cf's class path, and typically that's the cfusion/lib folder (or [instance]/lib if using instances).

 

You can find more on using Java objects in the cf docs. As such, it's usually  not necessary to find specific examples of any specific Java object, but rather to just get comfortable using ANY Java objects. There are many other resources (articles, blog posts, presentations), from myself and others over the years, that should also help.

 

Finally, note that their ARE in fact many examples of github (and other open source repos) where people HAVE built cfml CFCs as APIs that front use of such Java objects. You can get ideas from those, even if not about your specific Java object.

 

Let us know if this helps either of you to get going. Same with if you hit trouble trying to use this specific object. 

/Charlie (troubleshooter, carehart. org)
sivanl79897949
Participant
October 2, 2022

Hi. Did you ever find a solution for that? It seems so strange that there's hardly any google results out there where coldfusion users connected to Firestore. Am I missing something? Any help would be much appreciated. -Sivan