0
I have a class of an android application that does only user registration and I called it Usuariocontroller. According to my controller, it communicates between view and model, but since the class only makes a register, I think it could also be a DAO. I still have a hard time understanding what’s in a controller and DAO
package com.app.eventos.controllers;
import com.app.eventos.dao.ConfiguracaoFirebase;
import com.app.eventos.dao.ConfiguracaoFirebaseAuth;
import com.app.eventos.model.Usuario;
import com.google.firebase.auth.FirebaseUser;
public class UsuarioController {
private Usuario usuario;
public UsuarioController() {}
public void cadastrarUsuario(String nome, String email
, String senha, String idUser) {
usuario = new Usuario(nome, email, senha);
ConfiguracaoFirebase.getDatabaseReference()
.child("usuarios").child(idUser).setValue(usuario);
}
}
Juliana, could you edit your question and instead of pasting an image, put the class in text format? Over time, if the image link expires, your question will lose its meaning and make it difficult for others who have the same doubt as yours ;)
– StatelessDev