Projet LuxDeal

63
Projet LuxDeal Mathieu Baeumler, Fabrice Daugan & David Hoeung

description

Projet LuxDeal. Mathieu Baeumler, Fabrice Daugan & David Hoeung. Presentation of LuxDeal. An exchange based service. LuxDeal Features. Login, Logout, User profile and settings Search an offer by : Category City Country Keywords Submit, see an offer Propose a deal with another member - PowerPoint PPT Presentation

Transcript of Projet LuxDeal

Projet LuxDeal

Mathieu Baeumler, Fabrice Daugan&

David Hoeung

An exchange based service

Presentation of LuxDealPresentation of LuxDeal

LuxDeal FeaturesLuxDeal Features

Login, Logout, User profile and settings Search an offer by :

Category City Country Keywords

Submit, see an offer Propose a deal with another member Multi-languages

ProblématiquesProblématiques

ConsiderationsConsiderations

Battery life

Memory

Bandwidth

CPU

Design

SOAPSOAPSimple Object Access ProtocolSimple Object Access Protocol

Based on XML Procedure calls on remote objects Exchange of structured, typed

informations on the Web Support of severals protocols and

internet formats (SMTP, MIME, HTTP…)

SOAPSOAP

Creation of Web-services

Define elements to specify : Method’s name parameters retourned type

Royco minuteRoyco minute SOAP SOAP

SOAPSOAP

SOAP requests: LIEBIG

<soap:Body>

<ns1:login xmlns:ns1="urn:LuxdealService"><username

xsi:type="xsd:string">cedrprus</username><password

xsi:type="xsd:string">newpass</password></ns1:login>

</soap:Body>

Apache SOAPApache SOAP

Popular :

Java

Complet API

Open source

Developed by Apache (project jakarta)

HTTP Server

Servlets Container

ServerServer TomcatTomcat

JerryMouseJerryMouseTomcatTomcat

Two objects :

An initialization class (servlet) Connection to MYSQL, DB’ managing,

authentification

An implementation class Service’s method

JerryMouseJerryMouseTomcatTomcat

Definition of Web-service:

‘web.xml’ Parameters of service (login root, path…)

‘deploymentDescriptor.xml’ Profils of functions

Mysql with Easy-phpMysql with Easy-php

Soap adminSoap admin

SmartphoneSmartphone

Mobile-base smartphone device

Windows CE

Smartphone Toolkit

Smartphone 2002 SDK, eMbedded Visual C++ 3.0

Smartphone 2003 SDK

eMbedded Visual C++4.0 SP2

Visual Studio .NET 2003 CF

Developing the application

Two problems to resolve :

Deals with Windows User InterfaceNo MFC

ATL

Win 32 API

Messaging with SOAPMS Soap Toolkit not available for eMbedded Visual C++

HTTP + XML

HTTP

WinInet API

InternetOpen()

ConnMgrEstablishConnectionSync()

InternetConnect()

HttpOpenRequest()

HttpSendRequest()

InternetReadFile()

XML

Format SOAP message

Parsing XML using MSXML DOM using COM

CSoapConnector

Designing User Interface

With the IDE resource editorDialog

Control

String table

Multi User Language

Message Loop and Callback

Creating CDialogNWT

Architecture

No MVC

No Document/View

A dialog class by Dialog resource

j2mej2me

I About j2Me

II Networking

III Application creation

IV Emulation

j2mej2me

I About j2Me

MIDlet (MID Application)MIDlet (MID Application)

Mobile Information Device Mobile Information Device caracteristics : MIDcaracteristics : MID

MIDP assumptions on MIDsMIDP assumptions on MIDs

MIDP Classes LibrariesMIDP Classes Libraries

MIDP ArchitectureMIDP Architecture

j2mej2me

Non usual life cycle of MIDLet

Life cycleLife cycle

3 statesCreate the MIDLetStart the MIDLet

Pause the MIDLet

Restart the MIDLet

Destroy the MIDLet

MIDP 1.0 & 2.0 UI Class HierarchyMIDP 1.0 & 2.0 UI Class Hierarchy

MIDlet compositionMIDlet composition

JAR fileJAR file

JAD fileJAD file

j2mej2me

I About j2Me

II Networking

SOAPSOAP

Libraries :

KSOAP 1.2

KSOAP 2.0

or

http://ksoap.enhydra.org/

KSOAP 1.2KSOAP 1.2

Libraries :

Use KXML 2.0

http://kxml.enhydra.org/

SSLSSL

Libraries :

KSSL

SSL

or

http://kssl.enhydra.org/

j2mej2me

I About j2Me

II Networking

III Application creation

j2mej2me

SDK’sSDK’s

Beta Release of the J2ME Wireless Toolkit 2.1 (WTK21)

Sprint PCS Java Wireless Toolkit 1.0.3_01

Sony Ericsson SDK 1.2

Siemens Mobility Toolkits (SMTK) for Java™

Motorola SDK v4.0 for J2ME

Nokia Developer's Suite for J2ME(TM) 2.0 (2.6.2003)

Impronto Developer Kit for Linux

Application creationApplication creation

1) Compilation

2) Preverification

3) Obfuscation

4) Jarring and JAD updating5) Deployment

CompilationCompilation

Depending on targeted device

Simple javac

Wireless Tool Kit 2.1 example :

javac -g:none -bootclasspath ..\simulators\WTK21\lib\midp20.zip;..\lib\soap -d ..\tmpclasses ..\src\luxdeal\*.java

Motorola example :

javac -target 1.1 -O -bootclasspath ..\simulators\motorolaA760\lib\midp.zip;..\lib\soap -d ..\tmpclasses -classpath ..\tmpclasses ..\src\luxdeal\*.java

PreverificationPreverification

* Needed to check the forbidden dynamic class loading and many other security actions. * Replace byte code of javac compiled classes and reduce a bit their size. * Depending on targeted device.

Wireless Tool Kit 2.1 example :

..\simulators\WTK21\bin\preverify -classpath ..\simulators\WTK21\lib\fulllib.zip -d ..\classes ..\tmpclasses

Motorola example :

..\simulators\motorolaA760\bin\preverify -classpath ..\simulators\motorolaA760\lib\midp.zip;..\tmpclasses;..\lib -d ..\classes ..\tmpclasses

ObfuscationObfuscation

* Reduces final jar size down to 30% to fit to the device space memory

* Prevents the jar to be decompiled

* Do not depend on targeted device.

RetroGuard obfuscator example :

java -classpath ..\obfuscators\retroguard.jar;..\simulators\WTK21\wtklib\emptyapi.zip;..\lib RetroGuard LuxDeal-org.jar LuxDeal-obf.jar script.rgs

Jaring and updating DescriptorJaring and updating Descriptor

* Reduces final jar size down to 30% to fit to the device space memory

* Prevents the jar to be decompiled

* Do not depend on targeted device.

Jarring :

jar cmf MANIFEST.MF LuxDeal.jar -C ..\classes . -C ..\res .

Updating JAD file (jar size attribute) :

java -classpath . JadUpdater LuxDeal.jar LuxDeal.jad

<?xml version="1.0" ?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml" ><wml><template><do type="codev" label="Back">

</do></template><card id="card1" title="LuxDeal download Page" newcontext="true"><p align="center">LuxDeal download Page <br/><a href="http://192.168.200.108:5555/LuxDeal.jad"> LuxDeal J2Me</a><br/></p></card></wml>

DeploymentDeployment

•Create a WML page

•Upload to web server or localhost

• luxdeal.wml (assuming it’s the name of our created wml file)

•LuxDeal.jad

•LuxDeal.jar

AddType text/vnd.sun.j2me.app-descriptor jadAddType application/java-archive jar for Notes add the following to httpd.cnf:## J2ME Stuff#AddType .wml text/vnd.wap.wml 8bit # WMLAddType .jad text/vnd.sun.j2me.app-descriptor for .jad filesAddType .jar application/java-archive for .jar files.

Configure server for JAD filesConfigure server for JAD files

j2mej2me

I About j2Me

II Networking

III Application creation

IV Emulation

Tested devicesTested devices

SUN devices

Sprint PCS devices

Sony Ericsson : P900

Motorola : A760

Nokia : 60xx

SUNSUN

A760A760

P900P900

Nokia 60xxNokia 60xx

Sprint PCS (Minimal)

ConclusionConclusion