Parse é um PaaS (platform as a service) que foi criado para auxiliar desenvolvedores a criarem seus aplicativos sem a necessidade de criar um web service para gerenciamento dos dados. Através de sua API, é possível gerenciar dados através de um banco com interface visual (Parse Data), configurar o envio de push notifications (Parse Push), integrar contas de redes sociais (Parse Social) e ainda escrever código para customização e tratamento de seus dados na nuvem (Cloud Code).
Parse is a PaaS (platform as a service) which was created to support developers to build their mobile apps without a web service managing the data. Through its API, it is possible to manage data through a database using a visual interface (Parse Data), configure push notifications (Parse Push), integrate social networks accounts (Parse Social) and write code to customize your requests in the cloud (Cloud Code).
Tecnológico Nacional de México
Ing. en Sistemas Computacionales
Base de Datos para Dispsitivos Móviles
Proyecto integrador con Android, Eclipse, SQLite y archivo de texto
Aplicación en JAVA desarrollada con Netbeans 8.2, Jasper, SQL Server 2012, JDBC. Genera las pantallas para Insertar, Modificar y Eliminar, y el reporte general de turbogeneradores.
My speech at 2011 Liferay Italy Symposium. Talking about AlloyUI (the Javascript library built by Liferay on top of YUI3) and how to use it in Liferay plugins.
Parse é um PaaS (platform as a service) que foi criado para auxiliar desenvolvedores a criarem seus aplicativos sem a necessidade de criar um web service para gerenciamento dos dados. Através de sua API, é possível gerenciar dados através de um banco com interface visual (Parse Data), configurar o envio de push notifications (Parse Push), integrar contas de redes sociais (Parse Social) e ainda escrever código para customização e tratamento de seus dados na nuvem (Cloud Code).
Parse is a PaaS (platform as a service) which was created to support developers to build their mobile apps without a web service managing the data. Through its API, it is possible to manage data through a database using a visual interface (Parse Data), configure push notifications (Parse Push), integrate social networks accounts (Parse Social) and write code to customize your requests in the cloud (Cloud Code).
Tecnológico Nacional de México
Ing. en Sistemas Computacionales
Base de Datos para Dispsitivos Móviles
Proyecto integrador con Android, Eclipse, SQLite y archivo de texto
Aplicación en JAVA desarrollada con Netbeans 8.2, Jasper, SQL Server 2012, JDBC. Genera las pantallas para Insertar, Modificar y Eliminar, y el reporte general de turbogeneradores.
My speech at 2011 Liferay Italy Symposium. Talking about AlloyUI (the Javascript library built by Liferay on top of YUI3) and how to use it in Liferay plugins.
La présentation a pour but de revenir sur différents aspects avancés de Doctrine mis en oeuvre au sein de projets Symfony 2.x/3.
Elle abordera, entre autres, les éléments suivants :
Étendre le vocabulaire DQL (spécifiquement ou à l'aide de bundles existants)
Utiliser les différents listeners existants (annotations, listeners, subscribers, utilisation de l'UOW de Doctrine lors d'un flush, etc.)
Créer des hydrateurs spécifiques ou des entités partielles pour améliorer les performances sur certaines opérations.
Astuces diverses pour améliorer les performances (désactivation des logs, etc.)
This document provides information on building HTML using Ionic components and TypeScript. It lists Ionic's component documentation and Angular's API documentation for TypeScript directives like *ngIf and ngSwitch. It also includes contact information for a representative from Takit.biz regarding these technologies.
La présentation a pour but de revenir sur différents aspects avancés de Doctrine mis en oeuvre au sein de projets Symfony 2.x/3.
Elle abordera, entre autres, les éléments suivants :
Étendre le vocabulaire DQL (spécifiquement ou à l'aide de bundles existants)
Utiliser les différents listeners existants (annotations, listeners, subscribers, utilisation de l'UOW de Doctrine lors d'un flush, etc.)
Créer des hydrateurs spécifiques ou des entités partielles pour améliorer les performances sur certaines opérations.
Astuces diverses pour améliorer les performances (désactivation des logs, etc.)
This document provides information on building HTML using Ionic components and TypeScript. It lists Ionic's component documentation and Angular's API documentation for TypeScript directives like *ngIf and ngSwitch. It also includes contact information for a representative from Takit.biz regarding these technologies.
4. Provider의 사용
ionic g provider serverProvider
Import {Http,Headers} from ‘@angular/http’;
…
export class ServerProvider{
constructor(private http:Http, …){
}
get(url){
return new Promise((resolve,reject)=>{
this.htt.get(url).subscribe((res:any)=>{
resolve(res.json());
},(err)=>{
reject(err);
});
}
post(url,body){
return new Promise((resolve,reject)=>{
let headers = new Headers();
headers.append(‘Content-Type’,’application/json’);
this.http.get(url,JSON.stringify(body),{headers:headers}).subscribe((res:any)=>{
resolve(res.json());
},(err)=>{
reject(err);
});
}
}
import {ServerProvider} from ‘../../providers/server-provider’;
export class Login{
…
constructor(private serverProvider:ServerProvider,…){
}
Login(){
let body={username:this.username,password:this.password};
let url=http://www.takit.biz:8080/login;
this.serverProvider.post(url,body).then((res:any)=>{
if(res.result=”success”){
this.navCtrl.setRoot(TabsPage);
}else{
let alert =this.alertController.create({
title:’로그인에 실패했습니다.’,
buttons:[‘OK’]
});
}
},(err)=>{
….
});
5. 자동 로그인
npm install crypto-js --save
npm install @types/crypto-js —save
ionic g provider storageProvider
ionic platform add android
ionic plugin add cordova-plugin-nativestorage
ionic run android
ionic build ios
6. Promise사용하기
functionName(…){
return new Promise((resolve,reject)=>{
let P1=new Promise(resolve1,reject1)=>{
….
resolve1(…); //함수가 성공적으로 수행된 경우
…..
reject1(err); // 함수 수행이 실패한 경우
});
let P2= new Promise(resolve2,reject2)=>{
….
resolve2(…); //함수가 성공적으로 수행된 경우
…..
reject2(err); // 함수 수행이 실패한 경우
});
Promise.all([P1,P2]).then(()=>{
resolve(); // P1과P2가 모두 성공적으로 수행된 경우
//(resolve1,resolve2) 호출됨.
},(err)=>{
reject(err); // reject1또는 reject2가 호출된 경우
});
});
}
functionName(…){
return new Promise(resolve,reject)=>{
….
resolve(params); //함수가 성공적으로 수행된 경우
…..
reject(err); // 함수 수행이 실패한 경우
}
functionName( ….).then((params)=>{
//성공적으로 수행된 경우 호출됨
},(err)=>{
// 함수 수행에 실패한 경우 호출된
})
7. 자동 재로그인
post(url,body){
return new Promise((resolve,reject)=>{
let headers = new Headers();
headers.append('Content-Type', 'application/json');
console.log("url:"+url+" post:"+body);
this.http.post(url,JSON.stringify(body),{headers:headers}).subscribe((res:any)=>{
console.log("res:"+JSON.stringify(res));
resolve(res.json());
},(err)=>{
if(err.hasOwnProperty("status") && err.status==401){
this.login(this.username,this.password).then((res)=>{
this.http.post(url,JSON.stringify(body),{headers:headers}).subscribe((res:any)=>{
resolve(res.json());
},(err)=>{
reject(err);
});
},(err)=>{
reject(err);
});
}else
reject(err);
});
});
smartphone app의 상태
-foreground, background
https://github.com/raceyi/Ionic2Samples/tree/master/restAPI
8. 서버 버전 확인
login(username, password){
return new Promise((resolve,reject)=>{
let body={username:username,password:password};
let url="http://www.takit.biz:8080/login";
let headers = new Headers();
headers.append('Content-Type', 'application/json');
this.http.post(url,JSON.stringify(body),{headers:headers}).subscribe((res:any)=>{
console.log("res.json().result:"+res.json().result);
if(res.json().result=="success"){
// save id and password
this.storageProvider.saveLoginInfo(username,password);
this.username=username;
this.password=password;
resolve(res.json());
}else{
reject("invalid userInfo");
}
if(parseFloat(res.json().version)>this.version){
console.log("version out-of-date");
this.events.publish('out-of-date');
}
},(err)=>{
reject("network/server err");
});
});
}
ionViewDidLoad() {
console.log('ionViewDidLoad LoginPage');
this.events.subscribe('out-of-date',()=>{
console.log("out-of-date comes in login Page");
let alert = this.alertController.create({
title: '앱을 업데이트 해주시기 바랍니다.'
buttons: ['OK']
});
alert.present();
})
}