dc2012 - first steps with firemonkey and ios apps in delphi xe2

42
Desenvolvimento para iOS com Firemonkey Ricardo Boaro e Victory Fernandes

Upload: vic-fernandes

Post on 04-Jun-2015

1.643 views

Category:

Technology


6 download

DESCRIPTION

During the Delphi Conference Brazil 2012 me and my friend Ricardo Boaro had a really nice time! It was a “hands on” session and a great opportunity to show to the audience some tips and tricks of what Delphi can do for us… live and uncut! A little bit nervous at the beginning but but a few minutes latter we were very comfortable with the mic and we spoke and coded for 2 hours! Wow!

TRANSCRIPT

Page 1: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Desenvolvimento para iOS com Firemonkey

Ricardo Boaro e Victory Fernandes

Page 2: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Ricardo Boaro

• Coordenador do conteúdo do site da ActiveDelphi • Trabalha com desenvolvimento de aplicações com

Delphi a mais de 15 anos• Embarcadero Delphi Developer Certified• Embarcadero Instructor Certified

Edição 101

Page 3: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Victory Fernandes

• Engenheiro, Diretor Técnico da TKS Software• Professor dos cursos de Engenharia da Area1-Devry

• Autor da ActiveDelphi, TheClub e ClubeDelphi• Autor de componentes para• Sintegra, SPED, NFe, CTe, FCONT, SEF...

Edição 102

Page 4: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

AGENDA

Page 5: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Agenda

• Conhecendo a plataforma Firemonkey

• Diretrizes de trabalho com UI em iOS

• Suporte Firemonkey ao iOS

• Por onde começar?

• Exemplos

Page 6: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Não abordaremos...

• Configurando e preparando o ambiente

• Pré-requisitos de instalação: xCode, FPC e Firemonkey

• Configuração do ExportToXCode

• Programa iOS Developer

• Vide palestra "Primeiros passos do desenvolvimento DelphiXE2 e MacX"

Page 7: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Implementou app iOS com Delphi?

Page 8: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

FIREMONKEY

Page 9: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Firemonkey

• FireMonkey é… Plataforma de desenvolvimento de aplicativos

DelphiC++Builder

Windows Mac OS iOS

Page 10: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

CONHECENDO A PLATAFORMA FIREMONKEY

Page 11: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Plataforma do Firemonkey

• Plataforma de aplicações liberada a partir do Delphi XE2, permitindo construir aplicações para Windows, Apple OS X ou iOS.

• O Firemonkey esta separado em duas bibliotecas• FMX - Mac OS X• FMI - iOS

Page 12: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Diferenças entre FMX e FMI

• Cláusula uses em aplicação Firemonkey HD - FMX

• Cláusula uses em aplicação Firemonkey HD iOS - FMI

Page 13: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

O HIG DO IPHONE

Page 14: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

O HIG do iPhone

• O Human Interface Guide, é o guia para desenvolvimento de Apps para iPhone

• Link para download• https://developer.apple.com/library/ios/#documen

tation/UserExperience/Conceptual/MobileHIG

Page 15: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Um pouco mais sobre a HIG

• Botões com bordas arredondadas• Picker com poucos itens na tela• Edits sempre que possível na parte superior da tela

Page 16: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

POR ONDE COMEÇAR?

Page 17: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Por onde Começar?

Page 18: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Fatores a Serem Considerados

• Memória• Velocidade do aplicativo• Preço de Uso• Acesso a Internet• Dimensão de tela• Ferramentas de entrada de dados• Apenas um aplicativo por vez

Page 19: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

SUPORTE DO FIREMONKEY PARA IOS

Page 20: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Suporte do Firemonkey para iOS

• Componentes Embarcadero para acesso ao hardware e outros recursos nativos

Page 21: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

iOSComp.dpk

Page 22: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Instalando iOSComp.dpk

Page 23: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

ACESSANDO O ACELERÔMETRO

Page 24: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

TiOSAccelerometer

• +/- 2g em X, Y e Z com resolução de 0,018g

Page 25: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

ACESSANDO GPS E BÚSSULA

Page 26: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

TiOSLocation

Page 27: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

TiOSLocation

Page 28: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

BANCO DE DADOS SQLITE

Page 29: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Banco de dados SQLite

• O iOS usa o SQLite e pode ser utilizado com Firemonkey trabalhando com o FPC

• SQLite é um BD que não necessita de configurações • BD transacional suportando instruções SQL• Código fonte aberto disponível para download

www.SQLite.org

Page 30: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Hierarquia das Classes DataSet

Page 31: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Tipos de Dados Suportados

• Integer• AutoInc• String• Memo• Boll• Float• Word• DateTime• Date• Time• LargeInt• Currency

Page 32: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Uses para criarmos o Banco de Dados

Page 33: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Criando um Banco de Dados

Page 34: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Conectando a um Banco de Dados

Page 35: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Criando o Banco de Dados, uma Tabela e Inserindo Dados

Page 36: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Obtendo o Resultado de Uma Consulta

Page 37: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

VAMOS PARA A PRÁTICA

Page 38: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Exemplos

• Trabalhando com acelerômetro• Trabalhando com coordenadas GPS• Iniciando uma aplicação com banco de dados• Carregamento de uma página• Acesso ao mapa• Realizando uma ligação• Enviando e-mail• Armazenando dados em arquivos

Page 39: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Exemplos

Page 40: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Referências

• Arquivos de ajuda do Delphi XE2• Livro Firemonkey Development for iOS and OS X

with Delphi XE2 - Graeme Chandler• Livro Delphi XE2 Foundations - Chris Rolliston• 13 iOS COmponents and 8 Demos• http://cc.embarcadero.com/item/28635

Page 41: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Perguntas?

• Portal de Treinamentos e Vagas – http://www.edobrasil.net/treinamentos

• Embarcadero Developer Network - http://edn.embarcadero.com

• Diretório de MVP’s - http://www.embarcadero.com.br/mvp-directory

• Documentação dos Produtos - http://docs.embarcadero.com

• CodeRage 7 - http://www.embarcadero.com/coderage

• YouTube - http://youtube.com/user/embarcaderodobrasil

• Twitter - https://twitter.com/EmbarcaderoBR http://twitter.com/EmbarcaderoTech

• Blogs: http://blogs.embarcadero.com

• Facebook:https://www.facebook.com/pages/Embarcadero-Delphi-Brasil/399151510134179

[email protected]• (11) 5643-1333

Page 42: DC2012 - First steps with Firemonkey and iOS apps in Delphi XE2

Obrigado!

Ricardo [email protected]@rboaro

Victory [email protected]/victory@victoryjorge