Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Re:

Pedro não tive dúvidas (ainda) não. :D

Foram afirmações de testes que fiz aqui.

Ele gera uma pasta ".apt_generated" na raiz do projeto contendo o código compilado.


Em 4 de abril de 2014 14:15, Pedro Subutzki <Pepeu> <falecompepeu@gmail.com> escreveu:
Olá Felipe,
Tem um lugar que ele gera o fonte antes de compilar. Infelizmente minha memória anda bem desgastada e não me permite responder corretamente mas dá uma olhada nas Issues do GitHub que deve ter isso por lá.


Abraços,
Pedro Subutzki
__________________________________________
HADI - Makes SQLite in Android easy and simple
https://github.com/PepeuCps/Hadi


Em 4 de abril de 2014 14:01, Felipe Aron <felipearon@gmail.com> escreveu:

Pedro, importei o Butter Knife aqui no projeto que estou iniciando na empresa.

Cara, impressionante, não é que funciona mesmo? 

Praticamente, exclui a declaração do Button, e o link com xml usando o método direto:

@OnClick(R.id.btnColeta)
public void coleta(Button button) {
  startActivity(new Intent(ctx, ColetaIncluir.class));
}

Já ganhei algumas linhas de código! Claro que isso faz eu ganhar em alguns pontos, mas perder em outros (ex. conhecimento do que acontece por trás dos bastidores).

O mais interessante, é que da pra usar os dois modos (BK e nativo). Fiz o teste, declarando o Button:

@InjectView(R.id.btnColeta) Button btnColeta;

Depois usei o método comum:

btnColeta.setOnClickListener(...)

Gostei desse annotation. :D


Em 4 de abril de 2014 11:23, Carlos Eduardo <carloseduardopelegrin@gmail.com> escreveu:

Lucio/all

E no caso que eu comentei, existe diferença?


--
Carlos Eduardo Simões Pelegrin


Em 4 de abril de 2014 11:18, Rodrigo C. Nóbrega <rodrigocorcino@gmail.com> escreveu:

Valeu pela informação! vou ler mais sobre!


Em 4 de abril de 2014 10:38, luciofm <luciofm@gmail.com> escreveu:
Depende...

Se as anotações forem via reflection em tempo de execução, sim, existe uma penalidade..

No caso do butterkniffe (e possivelmente alguns outros), as anotações são processadas em tempo de compilação, gerando o código necessário. Nesse caso não existe nenhuma diferença de performance.

Lúcio Maciel
luciofm@gmail.com


2014-04-04 10:37 GMT-03:00 Rodrigo C. Nóbrega <rodrigocorcino@gmail.com>:

Marcelo Alves ou alguém do grupo sabe se com annotations deixaria o código mais lento ?
+1 annotations


Em 4 de abril de 2014 09:44, Felipe Aron <felipearon@gmail.com> escreveu:

Interessante Pedro! Vou dar uma olhada nisso... show de bola!


Em 4 de abril de 2014 09:40, Pedro Subutzki <Pepeu> <falecompepeu@gmail.com> escreveu:

+1 pra annotations!
Eu costumo usar o Butter Knife: https://github.com/JakeWharton/butterknife

É bem simples e serve pra várias coisas. Um exemplo de onClick:
    @OnClick(R.id.submit) void submit() {      // TODO call server...    }
Usei em vários projetos e não tive problemas.

Abraços,
Pedro Subutzki
__________________________________________
HADI - Makes SQLite in Android easy and simple
https://github.com/PepeuCps/Hadi


Em 4 de abril de 2014 01:20, Marcelo Alves <marcelo.alves@gmail.com> escreveu:

Eu sou totalmente a favor de annotations, embora eu tenha me apaixonado por xtend (eu deveria escrever uns posts pra cá e tentar convencer mais gente a usar) :-) Acho que cai bem no caso de evitar uma otimização prematura : enquanto sua app não está no ar, você deixa de ganhar dinheiro, e sem profiling / medição de performance, não tem como saber se realmente annotation vai dar um impacto negativo significativo pro usuário.


--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
سمووحخ ̷̴̐ خ ̷̴̐ خ ̷̴̐ خ امارتيخ ̷̴̐ خ
Analista-Programador

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
سمووحخ ̷̴̐ خ ̷̴̐ خ ̷̴̐ خ امارتيخ ̷̴̐ خ
Analista-Programador

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
سمووحخ ̷̴̐ خ ̷̴̐ خ ̷̴̐ خ امارتيخ ̷̴̐ خ
Analista-Programador

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário