Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Diego Campos Rosa 
Migrando aplicações para FireDac
Agenda 
• Compreendendo o FireDac 
• Migrando Aplicações para FireDac 
• Migrando Paradox e dBase Databases 
• Compatibili...
Compreendendo o FireDac 
• Cross-platform 
• FireDac interface para TDataset 
• Poder e Praticidade
Migrando Aplicações para FireDac 
↪Compatibilidade BDE e FireDac 
• Componentes 
BDE FireDac 
TQuery TFDQuery 
TStoredProc...
Migrando Aplicações para FireDac 
↪Compatibilidade BDE e FireDac 
• Classes Auxiliares 
BDE FireDac 
TParam TADParam 
TPar...
Migrando Aplicações para FireDac 
↪ Principais dificuldades na migração 
• Migrando Paradox e dBase Databases 
• Mudar par...
Migrando Aplicações para FireDac 
↪ Migrando Paradox e dBase Databases 
• Se eu tenho um banco de dados Paradox ou dBase, ...
Migrando Aplicações para FireDac 
↪ Ferramentas para auxiliar na migração 
• Refind é um utilitário de linha de comando pa...
Migrando Aplicações para FireDac 
↪ Ferramentas para auxiliar na migração 
• BDE Aliases Migration (FireDAC) 
• Mais infor...
Considerações e dicas para sua migração 
Dica 1 √ Remover propriedades que não possuem 
análogos no FireDAC. 
√ SessionNam...
Considerações e dicas para sua migração 
Dica 2 √ Embora FireDAC possua um análogo do 
componente TTable do BDE, chamado T...
Considerações e dicas para sua migração 
Dica 3 √ A aplicação BDE com campos persistentes 
deve ter suas propriedades Prov...
Considerações e dicas para sua migração 
Dica 4 
Screen.Cursor := crSQLWait; 
Try 
...... 
Finally 
Screen.Cursor := crDef...
Considerações e dicas para sua migração 
Dica 5 √ FireDAC não possue um análogo para o acesso 
à API do BDE. Assim, cada c...
Considerações e dicas para sua migração 
Dica 6 √ Muitos componentes de terceiros requerem 
adaptadores para interface de ...
Considerações e dicas para sua migração 
Dica 7 √ Tratar Exceptions específicas do FireDac 
√ EDBEngineError é a classe de...
Considerações e dicas para sua migração 
Dica 8 TBatchMove 
TADDataMove 
√ São diferentes em 
muitos aspectos. 
√ Será nec...
Considerações e dicas para sua migração 
Dica 9 TFDConnection.OnLogin 
TDatabase.OnLogin 
√ Embora possuam a 
mesma finali...
Considerações e dicas para sua migração 
Dica 10 √ Muito cuidado com consultas que 
utilizem recursos específicos do SGDB....
diego.camposrosa@gmail.com 
www.facebook.com/diego.camposrosa
Migrando aplicações para FireDac - Embarcadero Conference 2014
Upcoming SlideShare
Loading in …5
×

Migrando aplicações para FireDac - Embarcadero Conference 2014

3,713 views

Published on

Vamos orienta-lo através de uma série de etapas como realizar a migração de aplicações que utilizam BDE para passar a utilizar o FireDac (o novo conjunto de componentes de acesso a banco de dados). E como grande parte desse processo pode ser automatizado.

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Migrando aplicações para FireDac - Embarcadero Conference 2014

  1. 1. Diego Campos Rosa Migrando aplicações para FireDac
  2. 2. Agenda • Compreendendo o FireDac • Migrando Aplicações para FireDac • Migrando Paradox e dBase Databases • Compatibilidade BDE e FireDac • Ferramentas para auxiliar na migração • Principais dificuldades na migração • FireDac em Ação! • Considerações e dicas para sua migração
  3. 3. Compreendendo o FireDac • Cross-platform • FireDac interface para TDataset • Poder e Praticidade
  4. 4. Migrando Aplicações para FireDac ↪Compatibilidade BDE e FireDac • Componentes BDE FireDac TQuery TFDQuery TStoredProc TFDStoredProc TTable TFDTable TUpdateSQL TFDUpdateSQL TBatchMove TADDataMove
  5. 5. Migrando Aplicações para FireDac ↪Compatibilidade BDE e FireDac • Classes Auxiliares BDE FireDac TParam TADParam TParams TADParams TBlobStream TFDBlobStream TDBDataSet, TBDEDataSet TADRDBMSDataSet EDBEngineError EADDBEngineException
  6. 6. Migrando Aplicações para FireDac ↪ Principais dificuldades na migração • Migrando Paradox e dBase Databases • Mudar para um banco de dados relaciona !?!? • Migrando Bancos de Dados Paradox para Interbase • Até quando você vai conseguir manter o BDE?
  7. 7. Migrando Aplicações para FireDac ↪ Migrando Paradox e dBase Databases • Se eu tenho um banco de dados Paradox ou dBase, o que preciso para migrar? • Usar tabelas Paradox / dBase via ODBC. • http://forms.embarcadero.com/RADinAction-FireDACDataConnectivityWebinar10-30 • Vale a pena manter os dados nestes formatos "antigos"? • Migrando Bancos de Dados Paradox para Interbase • clevercomponents.com/products/datapump/dp-tour.asp • clevercomponents.com/products/datapump/
  8. 8. Migrando Aplicações para FireDac ↪ Ferramentas para auxiliar na migração • Refind é um utilitário de linha de comando para a pesquisa e substituição de padrões de texto Perl regex em um arquivo de texto. • Mais informações: • http://docwiki.embarcadero.com/RADStudio/XE5/en/ReFind.exe,_the_Search_and_Repla ce_Utility_Using_Perl_RegEx_Expressions
  9. 9. Migrando Aplicações para FireDac ↪ Ferramentas para auxiliar na migração • BDE Aliases Migration (FireDAC) • Mais informações: • http://docwiki.embarcadero.com/RADStudio/XE6/en/BDE_Aliases_Migration_(FireDAC)
  10. 10. Considerações e dicas para sua migração Dica 1 √ Remover propriedades que não possuem análogos no FireDAC. √ SessionName: deve ser removida completamente, mas cuidado, sua aplicação pode estar usando múltiplas conexões de mesmo nome em diferentes sessões. √ PrivateDir : pode ser removido completamente.
  11. 11. Considerações e dicas para sua migração Dica 2 √ Embora FireDAC possua um análogo do componente TTable do BDE, chamado TFDTable, é fortemente recomendado que você substitua todas as TTables com TFDQuerys
  12. 12. Considerações e dicas para sua migração Dica 3 √ A aplicação BDE com campos persistentes deve ter suas propriedades ProvidersFlags ajustadas manualmente. √ Cuidado ao ajustar a propriedade Origin do DataField. √ Ajuste manual da propriedade UpdateOptions.KeyFields.
  13. 13. Considerações e dicas para sua migração Dica 4 Screen.Cursor := crSQLWait; Try ...... Finally Screen.Cursor := crDefault; End; uses uADStanFactory, uADGUIxIntf; ...... Var oWait: IADGUIxWaitCursor; ...... ADCreateInterface(IADGUIxWaitCursor, oWait); oWait.StartWait; Try ...... Finally oWait.StopWait; end; • Trechos de códigos como • Devem ser substituídos
  14. 14. Considerações e dicas para sua migração Dica 5 √ FireDAC não possue um análogo para o acesso à API do BDE. Assim, cada código deve ser recodificado usando apenas a API FireDAC. √ Não há uma solução direta para este caso. √ Um exemplo básico é a chamada ao método AddAlias ou AddStandardAlias contidos na unit BDE.
  15. 15. Considerações e dicas para sua migração Dica 6 √ Muitos componentes de terceiros requerem adaptadores para interface de comunicação do banco de dados (DataConectors). Ex: UserControl
  16. 16. Considerações e dicas para sua migração Dica 7 √ Tratar Exceptions específicas do FireDac √ EDBEngineError é a classe de exceção específico do BDE. √ FireDAC tem um análogo, EADDBEngineException.
  17. 17. Considerações e dicas para sua migração Dica 8 TBatchMove TADDataMove √ São diferentes em muitos aspectos. √ Será necessário um retrabalho em qualquer código avançado usando o TBatchMove.
  18. 18. Considerações e dicas para sua migração Dica 9 TFDConnection.OnLogin TDatabase.OnLogin √ Embora possuam a mesma finalidade possuem assinaturas diferentes.
  19. 19. Considerações e dicas para sua migração Dica 10 √ Muito cuidado com consultas que utilizem recursos específicos do SGDB. √ Ao invés disso utilize consultas da própria engine de SQL do FireDac, conhecida como “Local SQL engine”.
  20. 20. diego.camposrosa@gmail.com www.facebook.com/diego.camposrosa

×