Top Banner
Luckiest developers with Django and Phonegap Joelmir Ribacki [email protected]
25

Luckiest developers with Django and Phonegap

Jan 18, 2017

Download

Mobile

Joelmir Ribacki
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Luckiest developers with Django and Phonegap

Luckiest developers with Django and Phonegap

Joelmir [email protected]

Page 2: Luckiest developers with Django and Phonegap

Python tem a melhor comunidade do universoPython Brasil 10 - Porto de Galinhas - PE

Page 3: Luckiest developers with Django and Phonegap

Python é legal, acredite!

$python

>>> import __hello__

Hello world…

>>> print 'Hello world…'

Hello world…

Page 4: Luckiest developers with Django and Phonegap

Diferentes formas de não ganhar um sorteio (Python)$python

>>> numeros = range(10)>>> print numeros[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]>>> eu = 4>>> import random>>> while 1:

sortudo = random.choice(numeros)if sortudo != eu:

print sortudobreak

Page 5: Luckiest developers with Django and Phonegap

Framework Django

Page 6: Luckiest developers with Django and Phonegap

Framework web Django

● Django é um framework web de alto nível escrito em Python que estimula o desenvolvimento rápido e limpo

● MVC / MTV ( somente nomes dos bois )

Page 7: Luckiest developers with Django and Phonegap

Estrutura de arquivos no Djangomyproject/ manage.py myproject/ __init__.py urls.py wsgi.py settings.py

core/ __init__.py models.py views.py urls.py templates/ core/ index.html static/ … tests/ __init__.py test_models.py test_views.py

Page 8: Luckiest developers with Django and Phonegap

Views

Page 9: Luckiest developers with Django and Phonegap

Template

Page 10: Luckiest developers with Django and Phonegap

Diferentes formas de não ganhar um sorteio (Django)

Page 11: Luckiest developers with Django and Phonegap

Consumindo webservices

$python

>>>from suds.client import Client

>>>web_service = Client('https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl')

>>>web_service.service.consultaCEP('90010170')

enderecoERP){

bairro = "Centro Histórico"

cep = "90010170"

cidade = "Porto Alegre"

complemento = None

complemento2 = None

end = "Praça Montevidéo"

id = 0

uf = "RS" }

Consulta de endereços pelo CEP

Page 12: Luckiest developers with Django and Phonegap

Criando webservices

Page 13: Luckiest developers with Django and Phonegap

Criando webservices

GET => Navegador Requisição AJAX

Page 14: Luckiest developers with Django and Phonegap

Aplicativos Hibridos

● Possuem caracteristicas de apps nativas

● Acesso ao hardware ( câmera, sensores … )

● "Multi plataforma"● Phonegap => WebView com

acesso a funçoes do SO nativo

Page 15: Luckiest developers with Django and Phonegap

Diferentes formas de não ganhar um sorteio (JS)

Page 16: Luckiest developers with Django and Phonegap

AngularJS

Page 17: Luckiest developers with Django and Phonegap

Agular JS

Page 18: Luckiest developers with Django and Phonegap

Service & Factory

Page 19: Luckiest developers with Django and Phonegap

$http ( Angular JS )

Page 20: Luckiest developers with Django and Phonegap

Acessando o serviço do sorteador com AngularJS

Page 21: Luckiest developers with Django and Phonegap

Comunicação de Aplicativos hibridos / WS

Page 22: Luckiest developers with Django and Phonegap

Comunicação - AngularJS / Django

Page 23: Luckiest developers with Django and Phonegap

Diferentes formas de não ganhar um sorteio (APP+JS)

Page 24: Luckiest developers with Django and Phonegap

Considerações finais

● Python é legal● Django é facil● Webservices não é um bicho de 7 cabeça ( SOAP arrrrgggg :| )● JavaScript da pra fazer o que tu imaginar● AngularJS é uma mão na roda● Aplicativos Hibridos são mais simples do que se pensa● Integrar Webservices é mamão com açucar

Page 25: Luckiest developers with Django and Phonegap

Obrigado

Luckiest developers with Django and Phonegap

Joelmir [email protected]