SlideShare a Scribd company logo
1 of 40
UNIVERSITE DE KINSHASA
FACULTE POLYTECHNIQUE
2009

TRAVAIL PRATIQUE DE LANGAGE DE
PROGRAMMATION
Access aux résultats de la délibération des étudiants de la faculté polytechnique
par Client Mobile.

Travail réalisé par : BASHIZI MUTUZI Patrick
Introduction
Sujet :
Access aux résultats de la délibération des étudiants de la faculté
polytechnique par Client Mobile.

Plan de travail
0.
1.
2.
3.

Modélisation et architecture du logiciel
Développement de la partie serveur.
Développement du client mobile
Intégration finale

0. MODELISATION ET ARCHITECTURE DU SYSTEME
0.1.

Capture des besoins et fonctionnalités

Réaliser un service web et un client mobile à ce service pour l’accès aux
résultats de la délibération des épreuves en polytechnique.
Le diagramme UML de cas d’utilisation se résume donc à un
acteur (l’étudiant) et un cas d’utilisation (consulter son relevé).
0.2.

Conception du système

Le système sera composé de deux parties principales :
- Le serveur
- Le client mobile
Les deux devront communiquer et s’échanger les donnés via des web
services.
2
0.3. Conception et implémentation des composants
0.3.1. Le serveur
Base des données Mysql
Technologie : J2EE

Modèle physique des données

Script de la base des données
-- ---------------------------------------------------------------------- MySQL GRT Application
-- SQL Script
-- --------------------------------------------------------------------SET FOREIGN_KEY_CHECKS = 0;
CREATE DATABASE IF NOT EXISTS `delibe`
3
CHARACTER SET latin1;
-- -------------------------------------- Tables
DROP TABLE IF EXISTS `delibe`.`cours`;
CREATE TABLE `delibe`.`cours` (
`idcours` INT(10) unsigned NOT NULL AUTO_INCREMENT,
`intitule` VARCHAR(45) NOT NULL,
`ponderation` INT(10) unsigned NOT NULL,
`titulaire` INT(10) unsigned NOT NULL,
PRIMARY KEY (`idcours`),
INDEX `FK_cours_1` (`titulaire`),
CONSTRAINT `FK_cours_1` FOREIGN KEY `FK_cours_1`
(`titulaire`)
REFERENCES `delibe`.`titulaire` (`idTitulaire`)
ON DELETE RESTRICT
ON UPDATE RESTRICT
)
ENGINE = InnoDB
ROW_FORMAT = Compact
CHARACTER SET latin1 COLLATE latin1_swedish_ci;
DROP TABLE IF EXISTS `delibe`.`epreuve`;
CREATE TABLE `delibe`.`epreuve` (
`idepreuve` INT(10) unsigned NOT NULL
AUTO_INCREMENT,
`session` INT(10) unsigned NOT NULL,
`idcours` INT(10) unsigned NOT NULL,
`idetudiant` INT(10) unsigned NOT NULL,
`cote_annee` DOUBLE(, ) NOT NULL,
`cote_examen` DOUBLE(, ) NOT NULL,
PRIMARY KEY (`idepreuve`),
INDEX `FK_epreuve_1` (`idcours`),
INDEX `FK_epreuve_2` (`idetudiant`),
CONSTRAINT `FK_epreuve_1` FOREIGN KEY
`FK_epreuve_1` (`idcours`)
REFERENCES `delibe`.`cours` (`idcours`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
CONSTRAINT `FK_epreuve_2` FOREIGN KEY
`FK_epreuve_2` (`idetudiant`)
REFERENCES `delibe`.`etudiant` (`idEtudiant`)
ON DELETE RESTRICT
ON UPDATE RESTRICT
4
)
ENGINE = InnoDB
ROW_FORMAT = Compact
CHARACTER SET latin1 COLLATE latin1_swedish_ci;
DROP TABLE IF EXISTS `delibe`.`etudiant`;
CREATE TABLE `delibe`.`etudiant` (
`idEtudiant` INT(10) unsigned NOT NULL
AUTO_INCREMENT,
`nom` VARCHAR(45) NOT NULL,
`postnom` VARCHAR(45) NOT NULL,
`prenom` VARCHAR(45) NOT NULL,
`password` VARCHAR(45) NOT NULL,
`promotion` VARCHAR(5) NOT NULL,
PRIMARY KEY (`idEtudiant`),
INDEX `FK_etudiant_1` (`promotion`),
CONSTRAINT `FK_etudiant_1` FOREIGN KEY
`FK_etudiant_1` (`promotion`)
REFERENCES `delibe`.`promotion` (`idpromotion`)
ON DELETE RESTRICT
ON UPDATE RESTRICT
)
ENGINE = InnoDB
ROW_FORMAT = Compact
CHARACTER SET latin1 COLLATE latin1_swedish_ci;
DROP TABLE IF EXISTS `delibe`.`promotion`;
CREATE TABLE `delibe`.`promotion` (
`idpromotion` VARCHAR(5) NOT NULL DEFAULT '',
`commentaire` VARCHAR(45) NOT NULL DEFAULT '',
PRIMARY KEY (`idpromotion`)
)
ENGINE = InnoDB
ROW_FORMAT = Compact
CHARACTER SET latin1 COLLATE latin1_swedish_ci;
DROP TABLE IF EXISTS `delibe`.`titulaire`;
CREATE TABLE `delibe`.`titulaire` (
`idTitulaire` INT(10) unsigned NOT NULL
AUTO_INCREMENT,
`nom` VARCHAR(45) NOT NULL,
`postnom` VARCHAR(45) NULL,
`prenom` VARCHAR(45) NULL,
PRIMARY KEY (`idTitulaire`)
5
)
ENGINE = InnoDB
ROW_FORMAT = Compact
CHARACTER SET latin1 COLLATE latin1_swedish_ci;

SET FOREIGN_KEY_CHECKS = 1;
-- ---------------------------------------------------------------------- EOF

Architecture MVC (J2EE)
Nous avons usé de la technologie java.
Ainsi :
- Couche d’access aux données (DAL) : entity beans (non standards).
- Couche Business Logic : technologie Web Services SOAP.
- Couche GUI: techologie J2ME (Mobile)

Voici une capture du serveur dans Netbeans.

6
7
- Description du web Service

Type : SOAP.
Fichier WSDL

Vue en mode design dans Netbeans

8
Description : Le service web dispose de le méthode : String[]
getResultats(@WebParam(name = "idEtudiant") ,retournant les résultats d’un
étudiant dans un tableau de String.
Voici son implémentation :

9
Voici aussi ce que fait la méthode getDelibeOfEtudiant de la classe Epreuve :

10
Remarquons bien la requete SQL :

11
select intitule, cote_annee,cote_examen from cours,epreuve,etudiant where
etudiant.idEtudiant=epreuve.idetudiant and epreuve.idcours=cours.idcours
and etudiant.idetudiant=1;

Ce résultat devra donc être reçu par le client mobile.

Ce service étant bien finie et testé, on peut passer au client mobile.

0.3.2. Le client mobile
Techologie J2ME
Machine virtuelle : KVM
Profil : MIDP 2.0
Configuration : CLDC 1.1
Emulateur : DefaultFXTouchPhone1
- Conception et implémentation de la midlet principale : usage du
concepteur graphique de Netbeans pour définir le Flow de des
commandes et des Screans de l’application.

12
Pour accéder au service Web nous avons besoin d’un Stub local.

13
Code d’appel du service dans la midlet

resultatdelibeservice.ResultatDelibeServiceService_Stub stub = new
ResultatDelibeServiceService_Stub();

Code source de la Midlet
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package client;

14
import java.io.IOException;
import java.rmi.RemoteException;
import java.util.Vector;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import org.netbeans.microedition.lcdui.SimpleTableModel;
import org.netbeans.microedition.lcdui.SplashScreen;
import org.netbeans.microedition.lcdui.TableItem;
import org.netbeans.microedition.lcdui.WaitScreen;
import org.netbeans.microedition.util.SimpleCancellableTask;
import resultatdelibeservice.ResultatDelibeServiceService_Stub;

/**
* @author bash
*/
public class MainMidlet extends MIDlet implements CommandListener {

private boolean midletPaused = false;
// delibe.DelibeService_Stub del;
resultatdelibeservice.ResultatDelibeServiceService_Stub stub = new
ResultatDelibeServiceService_Stub();
//<editor-fold defaultstate="collapsed" desc=" Generated Fields ">
private Command exitCommand;
private Command okCommand;
15
private Command okCommand1;
private Command exitCommand1;
private Command okCommand2;
private Command backCommand;
private Command exitCommand2;
private Form loginForm;
private TextField textField;
private TextField textField1;
private ChoiceGroup choiceGroup;
private SplashScreen splashScreen;
private WaitScreen waitScreen;
private Alert alert;
private Form mainForm;
private TableItem tableItem;
private SimpleCancellableTask task;
private SimpleTableModel tableModel1;
//</editor-fold>

/**
* The HelloMIDlet constructor.
*/
public MainMidlet() {

16
}

//<editor-fold defaultstate="collapsed" desc=" Generated Methods ">
//</editor-fold>
//<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize
">
/**
* Initilizes the application.
* It is called only once when the MIDlet is started. The method is called
before the <code>startMIDlet</code> method.
*/
private void initialize() {
// write pre-initialize user code here

// write post-initialize user code here
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Method:
startMIDlet ">
/**
* Performs an action assigned to the Mobile Device - MIDlet Started point.
*/
public void startMIDlet() {
// write pre-action user code here
17
switchDisplayable(null, getSplashScreen());
// write post-action user code here
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Method:
resumeMIDlet ">
/**
* Performs an action assigned to the Mobile Device - MIDlet Resumed point.
*/
public void resumeMIDlet() {
// write pre-action user code here

// write post-action user code here
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Method:
switchDisplayable ">
/**
* Switches a current displayable in a display. The <code>display</code>
instance is taken from <code>getDisplay</code> method. This method is used
by all actions in the design for switching displayable.
* @param alert the Alert which is temporarily set to the display; if
<code>null</code>, then <code>nextDisplayable</code> is set immediately
18
* @param nextDisplayable the Displayable to be set
*/
public void switchDisplayable(Alert alert, Displayable nextDisplayable) {
// write pre-switch user code here
Display display = getDisplay();
if (alert == null) {
display.setCurrent(nextDisplayable);
} else {
display.setCurrent(alert, nextDisplayable);
}
// write post-switch user code here
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Method:
commandAction for Displayables ">
/**
* Called by a system to indicated that a command has been invoked on a
particular displayable.
* @param command the Command that was invoked
* @param displayable the Displayable where the command was invoked
*/
public void commandAction(Command command, Displayable displayable) {
// write pre-action user code here
19
if (displayable == loginForm) {
if (command == exitCommand) {
// write pre-action user code here
exitMIDlet();
// write post-action user code here
} else if (command == okCommand) {
try {
// message.setText(del.test());
} catch (Exception e) {
}
// write pre-action user code here
switchDisplayable(null, getWaitScreen());
// write post-action user code here
}
} else if (displayable == mainForm) {
if (command == exitCommand2) {
// write pre-action user code here
switchDisplayable(null, getLoginForm());
// write post-action user code here
}
} else if (displayable == splashScreen) {
if (command == SplashScreen.DISMISS_COMMAND) {
// write pre-action user code here
switchDisplayable(null, getLoginForm());
20
// write post-action user code here
}
} else if (displayable == waitScreen) {
if (command == WaitScreen.FAILURE_COMMAND) {
// write pre-action user code here
switchDisplayable(getAlert(), getLoginForm());
// write post-action user code here
} else if (command == WaitScreen.SUCCESS_COMMAND) {
// write pre-action user code here
switchDisplayable(null, getMainForm());
// write post-action user code here
}
}
// write post-action user code here
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
exitCommand ">
/**
* Returns an initiliazed instance of exitCommand component.
* @return the initialized component instance
*/
21
public Command getExitCommand() {
if (exitCommand == null) {
// write pre-init user code here
exitCommand = new Command("Exit", Command.EXIT, 0);
// write post-init user code here
}
return exitCommand;
}
//</editor-fold>
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: loginForm
">
/**
* Returns an initiliazed instance of loginForm component.
* @return the initialized component instance
*/
public Form getLoginForm() {
if (loginForm == null) {
// write pre-init user code here
loginForm = new Form("Bienvennu ", new Item[] { getTextField(),
getTextField1(), getChoiceGroup() });
loginForm.addCommand(getExitCommand());
loginForm.addCommand(getOkCommand());
22
loginForm.setCommandListener(this);
// write post-init user code here
}
return loginForm;
}
//</editor-fold>
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
okCommand ">
/**
* Returns an initiliazed instance of okCommand component.
* @return the initialized component instance
*/
public Command getOkCommand() {
if (okCommand == null) {
// write pre-init user code here
okCommand = new Command("Ok", Command.OK, 0);
// write post-init user code here
}
return okCommand;
}
//</editor-fold>

23
//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
splashScreen ">
/**
* Returns an initiliazed instance of splashScreen component.
* @return the initialized component instance
*/
public SplashScreen getSplashScreen() {
if (splashScreen == null) {
// write pre-init user code here
splashScreen = new SplashScreen(getDisplay());
splashScreen.setTitle("splashScreen");
splashScreen.setCommandListener(this);
splashScreen.setText("DELIBE MOBILE.(c)Patrick Bashizi");
// write post-init user code here
}
return splashScreen;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
okCommand1 ">
/**
* Returns an initiliazed instance of okCommand1 component.
* @return the initialized component instance
24
*/
public Command getOkCommand1() {
if (okCommand1 == null) {
// write pre-init user code here
okCommand1 = new Command("Ok", Command.OK, 0);
// write post-init user code here
}
return okCommand1;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
exitCommand1 ">
/**
* Returns an initiliazed instance of exitCommand1 component.
* @return the initialized component instance
*/
public Command getExitCommand1() {
if (exitCommand1 == null) {
// write pre-init user code here
exitCommand1 = new Command("Exit", Command.EXIT, 0);
// write post-init user code here
}
return exitCommand1;
25
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
okCommand2 ">
/**
* Returns an initiliazed instance of okCommand2 component.
* @return the initialized component instance
*/
public Command getOkCommand2() {
if (okCommand2 == null) {
// write pre-init user code here
okCommand2 = new Command("Ok", Command.OK, 0);
// write post-init user code here
}
return okCommand2;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField ">
/**
* Returns an initiliazed instance of textField component.
* @return the initialized component instance
*/
26
public TextField getTextField() {
if (textField == null) {
// write pre-init user code here
textField = new TextField("identifiant", null, 32, TextField.ANY);
// write post-init user code here
}
return textField;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField1
">
/**
* Returns an initiliazed instance of textField1 component.
* @return the initialized component instance
*/
public TextField getTextField1() {
if (textField1 == null) {
// write pre-init user code here
textField1 = new TextField("Mot de passe", null, 32, TextField.ANY |
TextField.PASSWORD);
// write post-init user code here
}
return textField1;
27
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
choiceGroup ">
/**
* Returns an initiliazed instance of choiceGroup component.
* @return the initialized component instance
*/
public ChoiceGroup getChoiceGroup() {
if (choiceGroup == null) {
// write pre-init user code here
choiceGroup = new ChoiceGroup("Promotion", Choice.MULTIPLE);
// write post-init user code here
}
return choiceGroup;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: waitScreen
">
/**
* Returns an initiliazed instance of waitScreen component.
* @return the initialized component instance
28
*/
public WaitScreen getWaitScreen() {
if (waitScreen == null) {
// write pre-init user code here
waitScreen = new WaitScreen(getDisplay());
waitScreen.setTitle("operation en cours...");
waitScreen.setCommandListener(this);
waitScreen.setText("Patientez SVP...");
waitScreen.setTask(getTask());
// write post-init user code here
}
return waitScreen;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: alert ">
/**
* Returns an initiliazed instance of alert component.
* @return the initialized component instance
*/
public Alert getAlert() {
if (alert == null) {
// write pre-init user code here
alert = new Alert("alert");
29
alert.setTimeout(Alert.FOREVER);
// write post-init user code here
}
return alert;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: task ">
/**
* Returns an initiliazed instance of task component.
* @return the initialized component instance
*/
public SimpleCancellableTask getTask() {
if (task == null) {
// write pre-init user code here
task = new SimpleCancellableTask();
task.setExecutable(new org.netbeans.microedition.util.Executable() {
public void execute() throws Exception {
// write task-execution user code here
}
});
// write post-init user code here
}
return task;
30
}
//</editor-fold>
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
backCommand ">
/**
* Returns an initiliazed instance of backCommand component.
* @return the initialized component instance
*/
public Command getBackCommand() {
if (backCommand == null) {
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);
// write post-init user code here
}
return backCommand;
}
//</editor-fold>
//</editor-fold>

31
//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
exitCommand2 ">
/**
* Returns an initiliazed instance of exitCommand2 component.
* @return the initialized component instance
*/
public Command getExitCommand2() {
if (exitCommand2 == null) {
// write pre-init user code here
exitCommand2 = new Command("Exit", Command.EXIT, 0);
// write post-init user code here
}
return exitCommand2;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: mainForm
">
/**
* Returns an initiliazed instance of mainForm component.
* @return the initialized component instance
*/
public Form getMainForm() {
32
if (mainForm == null) {
// write pre-init user code here
mainForm = new Form("form", new Item[] { getTableItem() });
mainForm.addCommand(getExitCommand2());
mainForm.setCommandListener(this);
// write post-init user code here
}
return mainForm;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: tableItem
">
/**
* Returns an initiliazed instance of tableItem component.
* @return the initialized component instance
*/
public TableItem getTableItem() {
if (tableItem == null) {
// write pre-init user code here
tableItem = new TableItem(getDisplay(), "Ru00E9sultats");
tableItem.setModel(getTableModel1());
// write post-init user code here
}
33
return tableItem;
}
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc=" Generated Getter:
tableModel1 ">
/**
* Returns an initiliazed instance of tableModel1 component.
* @return the initialized component instance
*/
public SimpleTableModel getTableModel1() {
if (tableModel1 == null) {
// write pre-init user code here
tableModel1 = new SimpleTableModel(new java.lang.String[][] {
new java.lang.String[] { "LP et CAO", "15", "18" },
new java.lang.String[] { "Math appliquu00E9s", "15", "15" },
new java.lang.String[] { "Electromagnu00E9tisme", "12", "5" },
new java.lang.String[] { "Machines u00E9lectriques", "13", "15" },
new java.lang.String[] { "Centrales et ru00E9seaux", "4", "13" },
new java.lang.String[] { "Gu00E9nie des procu00E9du00E9s", "12",
"" },
new java.lang.String[] { "", "", "" }}, new java.lang.String[] { "Cours",
"Annu00E9e", "Examen" });
// write post-init user code here
}
34
return tableModel1;
}
//</editor-fold>

/**
* Returns a display instance.
* @return the display instance.
*/
public Display getDisplay() {
return Display.getDisplay(this);
}

/**
* Exits MIDlet.
*/
public void exitMIDlet() {
switchDisplayable(null, null);
destroyApp(true);
notifyDestroyed();
}

/**
* Called when MIDlet is started.

35
* Checks whether the MIDlet have been already started and initialize/starts
or resumes the MIDlet.
*/
public void startApp() {
if (midletPaused) {
resumeMIDlet();
} else {
initialize();
startMIDlet();
}
midletPaused = false;
}

/**
* Called when MIDlet is paused.
*/
public void pauseApp() {
midletPaused = true;
}

/**
* Called to signal the MIDlet to terminate.
* @param unconditional if true, then the MIDlet has to be unconditionally
terminated and all resources has to be released.
36
*/
public void destroyApp(boolean unconditional) {
}
}

RESULTATS

Le login

37
Une fois identifié, l’étudiant peut accédé à ses résultats :

38
39
40

More Related Content

What's hot

What's hot (20)

Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic Components
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
 
jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010
 
Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injection
 
Design patterns in Magento
Design patterns in MagentoDesign patterns in Magento
Design patterns in Magento
 
Asynchronous Functions In C++
Asynchronous Functions In C++Asynchronous Functions In C++
Asynchronous Functions In C++
 
AngularJs Crash Course
AngularJs Crash CourseAngularJs Crash Course
AngularJs Crash Course
 
AngularJs
AngularJsAngularJs
AngularJs
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
Solid angular
Solid angularSolid angular
Solid angular
 
IOC + Javascript
IOC + JavascriptIOC + Javascript
IOC + Javascript
 
React & Redux for noobs
React & Redux for noobsReact & Redux for noobs
React & Redux for noobs
 
Using Renderless Components in Vue.js during your software development.
Using Renderless Components in Vue.js during your software development.Using Renderless Components in Vue.js during your software development.
Using Renderless Components in Vue.js during your software development.
 
Dependency injection with koin
Dependency injection with koinDependency injection with koin
Dependency injection with koin
 
Explaination of angular
Explaination of angularExplaination of angular
Explaination of angular
 
AngularJS - Services
AngularJS - ServicesAngularJS - Services
AngularJS - Services
 
Zf2 phpquebec
Zf2 phpquebecZf2 phpquebec
Zf2 phpquebec
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte III
 

Viewers also liked

Comparative study of pizza hut & domino
Comparative study of pizza hut & dominoComparative study of pizza hut & domino
Comparative study of pizza hut & domino
Ranjan Neha
 
대신리포트_모닝미팅_131105
대신리포트_모닝미팅_131105대신리포트_모닝미팅_131105
대신리포트_모닝미팅_131105
DaishinSecurities
 
Лабораторная работа №2
Лабораторная работа №2Лабораторная работа №2
Лабораторная работа №2
Tanya1503
 
Hutan rahmawaty12
Hutan rahmawaty12Hutan rahmawaty12
Hutan rahmawaty12
Debby Ochta
 

Viewers also liked (20)

Calci kracker final
Calci kracker finalCalci kracker final
Calci kracker final
 
3 spørgsmål
3 spørgsmål3 spørgsmål
3 spørgsmål
 
Thinkabout tv sairanen
Thinkabout tv sairanenThinkabout tv sairanen
Thinkabout tv sairanen
 
2. rpp cooperatif
2. rpp cooperatif2. rpp cooperatif
2. rpp cooperatif
 
Darwin zecegreseli
Darwin zecegreseliDarwin zecegreseli
Darwin zecegreseli
 
Comparative study of pizza hut & domino
Comparative study of pizza hut & dominoComparative study of pizza hut & domino
Comparative study of pizza hut & domino
 
대신리포트_모닝미팅_131105
대신리포트_모닝미팅_131105대신리포트_모닝미팅_131105
대신리포트_모닝미팅_131105
 
Bigby Financial Planning, LLC
Bigby Financial Planning, LLCBigby Financial Planning, LLC
Bigby Financial Planning, LLC
 
Šadauskas, Marius „Atvirasis mokymasis eksperimentuojant nuotoliniu būdu“ (VDU)
 Šadauskas, Marius „Atvirasis mokymasis eksperimentuojant nuotoliniu būdu“ (VDU) Šadauskas, Marius „Atvirasis mokymasis eksperimentuojant nuotoliniu būdu“ (VDU)
Šadauskas, Marius „Atvirasis mokymasis eksperimentuojant nuotoliniu būdu“ (VDU)
 
article
articlearticle
article
 
21 januari
21 januari21 januari
21 januari
 
Лабораторная работа №2
Лабораторная работа №2Лабораторная работа №2
Лабораторная работа №2
 
φραγκοκρατία
φραγκοκρατίαφραγκοκρατία
φραγκοκρατία
 
Hutan rahmawaty12
Hutan rahmawaty12Hutan rahmawaty12
Hutan rahmawaty12
 
Level 103.PDF
Level 103.PDFLevel 103.PDF
Level 103.PDF
 
Doc1
Doc1Doc1
Doc1
 
AIESEC certificate
AIESEC certificateAIESEC certificate
AIESEC certificate
 
Wijkkrant nr 13 nov 2013lr
Wijkkrant nr 13 nov 2013lrWijkkrant nr 13 nov 2013lr
Wijkkrant nr 13 nov 2013lr
 
2.j. kelenjar
2.j. kelenjar2.j. kelenjar
2.j. kelenjar
 
Test japones
Test japonesTest japones
Test japones
 

Similar to Projet d'accès aux résultats des étudiant via client mobile

Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Benjamin Cabé
 

Similar to Projet d'accès aux résultats des étudiant via client mobile (20)

Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core concepts
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_application
 
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
 
ITT 2014 - Peter Steinberger - Architecting Modular Codebases
ITT 2014 - Peter Steinberger - Architecting Modular CodebasesITT 2014 - Peter Steinberger - Architecting Modular Codebases
ITT 2014 - Peter Steinberger - Architecting Modular Codebases
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Getting start Java EE Action-Based MVC with Thymeleaf
Getting start Java EE Action-Based MVC with ThymeleafGetting start Java EE Action-Based MVC with Thymeleaf
Getting start Java EE Action-Based MVC with Thymeleaf
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For Managers
 
Hexagonal architecture
Hexagonal architectureHexagonal architecture
Hexagonal architecture
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers MakeTop 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers Make
 
Tech Webinar: Angular 2, Introduction to a new framework
Tech Webinar: Angular 2, Introduction to a new frameworkTech Webinar: Angular 2, Introduction to a new framework
Tech Webinar: Angular 2, Introduction to a new framework
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate Representation
 
Angular 16 – the rise of Signals
Angular 16 – the rise of SignalsAngular 16 – the rise of Signals
Angular 16 – the rise of Signals
 

Recently uploaded

Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
tbatkhuu1
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
nirzagarg
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
amitlee9823
 
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
instagramfab782445
 
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
amitlee9823
 
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
eeanqy
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
tbatkhuu1
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 

Recently uploaded (20)

Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptx
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
 
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
 
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
 
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
 
Hire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
Hire 💕 8617697112 Meerut Call Girls Service Call Girls AgencyHire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
Hire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
 
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
 
HiFi Call Girl Service Delhi Phone ☞ 9899900591 ☜ Escorts Service at along wi...
HiFi Call Girl Service Delhi Phone ☞ 9899900591 ☜ Escorts Service at along wi...HiFi Call Girl Service Delhi Phone ☞ 9899900591 ☜ Escorts Service at along wi...
HiFi Call Girl Service Delhi Phone ☞ 9899900591 ☜ Escorts Service at along wi...
 
Sector 104, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 104, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 104, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 104, Noida Call girls :8448380779 Model Escorts | 100% verified
 
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Real service provider college girl Mira Road 8976425520
Real service provider college girl Mira Road 8976425520Real service provider college girl Mira Road 8976425520
Real service provider college girl Mira Road 8976425520
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 

Projet d'accès aux résultats des étudiant via client mobile

  • 1. UNIVERSITE DE KINSHASA FACULTE POLYTECHNIQUE 2009 TRAVAIL PRATIQUE DE LANGAGE DE PROGRAMMATION Access aux résultats de la délibération des étudiants de la faculté polytechnique par Client Mobile. Travail réalisé par : BASHIZI MUTUZI Patrick
  • 2. Introduction Sujet : Access aux résultats de la délibération des étudiants de la faculté polytechnique par Client Mobile. Plan de travail 0. 1. 2. 3. Modélisation et architecture du logiciel Développement de la partie serveur. Développement du client mobile Intégration finale 0. MODELISATION ET ARCHITECTURE DU SYSTEME 0.1. Capture des besoins et fonctionnalités Réaliser un service web et un client mobile à ce service pour l’accès aux résultats de la délibération des épreuves en polytechnique. Le diagramme UML de cas d’utilisation se résume donc à un acteur (l’étudiant) et un cas d’utilisation (consulter son relevé). 0.2. Conception du système Le système sera composé de deux parties principales : - Le serveur - Le client mobile Les deux devront communiquer et s’échanger les donnés via des web services. 2
  • 3. 0.3. Conception et implémentation des composants 0.3.1. Le serveur Base des données Mysql Technologie : J2EE Modèle physique des données Script de la base des données -- ---------------------------------------------------------------------- MySQL GRT Application -- SQL Script -- --------------------------------------------------------------------SET FOREIGN_KEY_CHECKS = 0; CREATE DATABASE IF NOT EXISTS `delibe` 3
  • 4. CHARACTER SET latin1; -- -------------------------------------- Tables DROP TABLE IF EXISTS `delibe`.`cours`; CREATE TABLE `delibe`.`cours` ( `idcours` INT(10) unsigned NOT NULL AUTO_INCREMENT, `intitule` VARCHAR(45) NOT NULL, `ponderation` INT(10) unsigned NOT NULL, `titulaire` INT(10) unsigned NOT NULL, PRIMARY KEY (`idcours`), INDEX `FK_cours_1` (`titulaire`), CONSTRAINT `FK_cours_1` FOREIGN KEY `FK_cours_1` (`titulaire`) REFERENCES `delibe`.`titulaire` (`idTitulaire`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB ROW_FORMAT = Compact CHARACTER SET latin1 COLLATE latin1_swedish_ci; DROP TABLE IF EXISTS `delibe`.`epreuve`; CREATE TABLE `delibe`.`epreuve` ( `idepreuve` INT(10) unsigned NOT NULL AUTO_INCREMENT, `session` INT(10) unsigned NOT NULL, `idcours` INT(10) unsigned NOT NULL, `idetudiant` INT(10) unsigned NOT NULL, `cote_annee` DOUBLE(, ) NOT NULL, `cote_examen` DOUBLE(, ) NOT NULL, PRIMARY KEY (`idepreuve`), INDEX `FK_epreuve_1` (`idcours`), INDEX `FK_epreuve_2` (`idetudiant`), CONSTRAINT `FK_epreuve_1` FOREIGN KEY `FK_epreuve_1` (`idcours`) REFERENCES `delibe`.`cours` (`idcours`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `FK_epreuve_2` FOREIGN KEY `FK_epreuve_2` (`idetudiant`) REFERENCES `delibe`.`etudiant` (`idEtudiant`) ON DELETE RESTRICT ON UPDATE RESTRICT 4
  • 5. ) ENGINE = InnoDB ROW_FORMAT = Compact CHARACTER SET latin1 COLLATE latin1_swedish_ci; DROP TABLE IF EXISTS `delibe`.`etudiant`; CREATE TABLE `delibe`.`etudiant` ( `idEtudiant` INT(10) unsigned NOT NULL AUTO_INCREMENT, `nom` VARCHAR(45) NOT NULL, `postnom` VARCHAR(45) NOT NULL, `prenom` VARCHAR(45) NOT NULL, `password` VARCHAR(45) NOT NULL, `promotion` VARCHAR(5) NOT NULL, PRIMARY KEY (`idEtudiant`), INDEX `FK_etudiant_1` (`promotion`), CONSTRAINT `FK_etudiant_1` FOREIGN KEY `FK_etudiant_1` (`promotion`) REFERENCES `delibe`.`promotion` (`idpromotion`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB ROW_FORMAT = Compact CHARACTER SET latin1 COLLATE latin1_swedish_ci; DROP TABLE IF EXISTS `delibe`.`promotion`; CREATE TABLE `delibe`.`promotion` ( `idpromotion` VARCHAR(5) NOT NULL DEFAULT '', `commentaire` VARCHAR(45) NOT NULL DEFAULT '', PRIMARY KEY (`idpromotion`) ) ENGINE = InnoDB ROW_FORMAT = Compact CHARACTER SET latin1 COLLATE latin1_swedish_ci; DROP TABLE IF EXISTS `delibe`.`titulaire`; CREATE TABLE `delibe`.`titulaire` ( `idTitulaire` INT(10) unsigned NOT NULL AUTO_INCREMENT, `nom` VARCHAR(45) NOT NULL, `postnom` VARCHAR(45) NULL, `prenom` VARCHAR(45) NULL, PRIMARY KEY (`idTitulaire`) 5
  • 6. ) ENGINE = InnoDB ROW_FORMAT = Compact CHARACTER SET latin1 COLLATE latin1_swedish_ci; SET FOREIGN_KEY_CHECKS = 1; -- ---------------------------------------------------------------------- EOF Architecture MVC (J2EE) Nous avons usé de la technologie java. Ainsi : - Couche d’access aux données (DAL) : entity beans (non standards). - Couche Business Logic : technologie Web Services SOAP. - Couche GUI: techologie J2ME (Mobile) Voici une capture du serveur dans Netbeans. 6
  • 7. 7
  • 8. - Description du web Service Type : SOAP. Fichier WSDL Vue en mode design dans Netbeans 8
  • 9. Description : Le service web dispose de le méthode : String[] getResultats(@WebParam(name = "idEtudiant") ,retournant les résultats d’un étudiant dans un tableau de String. Voici son implémentation : 9
  • 10. Voici aussi ce que fait la méthode getDelibeOfEtudiant de la classe Epreuve : 10
  • 11. Remarquons bien la requete SQL : 11
  • 12. select intitule, cote_annee,cote_examen from cours,epreuve,etudiant where etudiant.idEtudiant=epreuve.idetudiant and epreuve.idcours=cours.idcours and etudiant.idetudiant=1; Ce résultat devra donc être reçu par le client mobile. Ce service étant bien finie et testé, on peut passer au client mobile. 0.3.2. Le client mobile Techologie J2ME Machine virtuelle : KVM Profil : MIDP 2.0 Configuration : CLDC 1.1 Emulateur : DefaultFXTouchPhone1 - Conception et implémentation de la midlet principale : usage du concepteur graphique de Netbeans pour définir le Flow de des commandes et des Screans de l’application. 12
  • 13. Pour accéder au service Web nous avons besoin d’un Stub local. 13
  • 14. Code d’appel du service dans la midlet resultatdelibeservice.ResultatDelibeServiceService_Stub stub = new ResultatDelibeServiceService_Stub(); Code source de la Midlet /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package client; 14
  • 15. import java.io.IOException; import java.rmi.RemoteException; import java.util.Vector; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import org.netbeans.microedition.lcdui.SimpleTableModel; import org.netbeans.microedition.lcdui.SplashScreen; import org.netbeans.microedition.lcdui.TableItem; import org.netbeans.microedition.lcdui.WaitScreen; import org.netbeans.microedition.util.SimpleCancellableTask; import resultatdelibeservice.ResultatDelibeServiceService_Stub; /** * @author bash */ public class MainMidlet extends MIDlet implements CommandListener { private boolean midletPaused = false; // delibe.DelibeService_Stub del; resultatdelibeservice.ResultatDelibeServiceService_Stub stub = new ResultatDelibeServiceService_Stub(); //<editor-fold defaultstate="collapsed" desc=" Generated Fields "> private Command exitCommand; private Command okCommand; 15
  • 16. private Command okCommand1; private Command exitCommand1; private Command okCommand2; private Command backCommand; private Command exitCommand2; private Form loginForm; private TextField textField; private TextField textField1; private ChoiceGroup choiceGroup; private SplashScreen splashScreen; private WaitScreen waitScreen; private Alert alert; private Form mainForm; private TableItem tableItem; private SimpleCancellableTask task; private SimpleTableModel tableModel1; //</editor-fold> /** * The HelloMIDlet constructor. */ public MainMidlet() { 16
  • 17. } //<editor-fold defaultstate="collapsed" desc=" Generated Methods "> //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize "> /** * Initilizes the application. * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method. */ private void initialize() { // write pre-initialize user code here // write post-initialize user code here } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet "> /** * Performs an action assigned to the Mobile Device - MIDlet Started point. */ public void startMIDlet() { // write pre-action user code here 17
  • 18. switchDisplayable(null, getSplashScreen()); // write post-action user code here } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet "> /** * Performs an action assigned to the Mobile Device - MIDlet Resumed point. */ public void resumeMIDlet() { // write pre-action user code here // write post-action user code here } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable "> /** * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable. * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately 18
  • 19. * @param nextDisplayable the Displayable to be set */ public void switchDisplayable(Alert alert, Displayable nextDisplayable) { // write pre-switch user code here Display display = getDisplay(); if (alert == null) { display.setCurrent(nextDisplayable); } else { display.setCurrent(alert, nextDisplayable); } // write post-switch user code here } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables "> /** * Called by a system to indicated that a command has been invoked on a particular displayable. * @param command the Command that was invoked * @param displayable the Displayable where the command was invoked */ public void commandAction(Command command, Displayable displayable) { // write pre-action user code here 19
  • 20. if (displayable == loginForm) { if (command == exitCommand) { // write pre-action user code here exitMIDlet(); // write post-action user code here } else if (command == okCommand) { try { // message.setText(del.test()); } catch (Exception e) { } // write pre-action user code here switchDisplayable(null, getWaitScreen()); // write post-action user code here } } else if (displayable == mainForm) { if (command == exitCommand2) { // write pre-action user code here switchDisplayable(null, getLoginForm()); // write post-action user code here } } else if (displayable == splashScreen) { if (command == SplashScreen.DISMISS_COMMAND) { // write pre-action user code here switchDisplayable(null, getLoginForm()); 20
  • 21. // write post-action user code here } } else if (displayable == waitScreen) { if (command == WaitScreen.FAILURE_COMMAND) { // write pre-action user code here switchDisplayable(getAlert(), getLoginForm()); // write post-action user code here } else if (command == WaitScreen.SUCCESS_COMMAND) { // write pre-action user code here switchDisplayable(null, getMainForm()); // write post-action user code here } } // write post-action user code here } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand "> /** * Returns an initiliazed instance of exitCommand component. * @return the initialized component instance */ 21
  • 22. public Command getExitCommand() { if (exitCommand == null) { // write pre-init user code here exitCommand = new Command("Exit", Command.EXIT, 0); // write post-init user code here } return exitCommand; } //</editor-fold> //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: loginForm "> /** * Returns an initiliazed instance of loginForm component. * @return the initialized component instance */ public Form getLoginForm() { if (loginForm == null) { // write pre-init user code here loginForm = new Form("Bienvennu ", new Item[] { getTextField(), getTextField1(), getChoiceGroup() }); loginForm.addCommand(getExitCommand()); loginForm.addCommand(getOkCommand()); 22
  • 23. loginForm.setCommandListener(this); // write post-init user code here } return loginForm; } //</editor-fold> //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand "> /** * Returns an initiliazed instance of okCommand component. * @return the initialized component instance */ public Command getOkCommand() { if (okCommand == null) { // write pre-init user code here okCommand = new Command("Ok", Command.OK, 0); // write post-init user code here } return okCommand; } //</editor-fold> 23
  • 24. //<editor-fold defaultstate="collapsed" desc=" Generated Getter: splashScreen "> /** * Returns an initiliazed instance of splashScreen component. * @return the initialized component instance */ public SplashScreen getSplashScreen() { if (splashScreen == null) { // write pre-init user code here splashScreen = new SplashScreen(getDisplay()); splashScreen.setTitle("splashScreen"); splashScreen.setCommandListener(this); splashScreen.setText("DELIBE MOBILE.(c)Patrick Bashizi"); // write post-init user code here } return splashScreen; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand1 "> /** * Returns an initiliazed instance of okCommand1 component. * @return the initialized component instance 24
  • 25. */ public Command getOkCommand1() { if (okCommand1 == null) { // write pre-init user code here okCommand1 = new Command("Ok", Command.OK, 0); // write post-init user code here } return okCommand1; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand1 "> /** * Returns an initiliazed instance of exitCommand1 component. * @return the initialized component instance */ public Command getExitCommand1() { if (exitCommand1 == null) { // write pre-init user code here exitCommand1 = new Command("Exit", Command.EXIT, 0); // write post-init user code here } return exitCommand1; 25
  • 26. } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand2 "> /** * Returns an initiliazed instance of okCommand2 component. * @return the initialized component instance */ public Command getOkCommand2() { if (okCommand2 == null) { // write pre-init user code here okCommand2 = new Command("Ok", Command.OK, 0); // write post-init user code here } return okCommand2; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField "> /** * Returns an initiliazed instance of textField component. * @return the initialized component instance */ 26
  • 27. public TextField getTextField() { if (textField == null) { // write pre-init user code here textField = new TextField("identifiant", null, 32, TextField.ANY); // write post-init user code here } return textField; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField1 "> /** * Returns an initiliazed instance of textField1 component. * @return the initialized component instance */ public TextField getTextField1() { if (textField1 == null) { // write pre-init user code here textField1 = new TextField("Mot de passe", null, 32, TextField.ANY | TextField.PASSWORD); // write post-init user code here } return textField1; 27
  • 28. } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup "> /** * Returns an initiliazed instance of choiceGroup component. * @return the initialized component instance */ public ChoiceGroup getChoiceGroup() { if (choiceGroup == null) { // write pre-init user code here choiceGroup = new ChoiceGroup("Promotion", Choice.MULTIPLE); // write post-init user code here } return choiceGroup; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: waitScreen "> /** * Returns an initiliazed instance of waitScreen component. * @return the initialized component instance 28
  • 29. */ public WaitScreen getWaitScreen() { if (waitScreen == null) { // write pre-init user code here waitScreen = new WaitScreen(getDisplay()); waitScreen.setTitle("operation en cours..."); waitScreen.setCommandListener(this); waitScreen.setText("Patientez SVP..."); waitScreen.setTask(getTask()); // write post-init user code here } return waitScreen; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: alert "> /** * Returns an initiliazed instance of alert component. * @return the initialized component instance */ public Alert getAlert() { if (alert == null) { // write pre-init user code here alert = new Alert("alert"); 29
  • 30. alert.setTimeout(Alert.FOREVER); // write post-init user code here } return alert; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: task "> /** * Returns an initiliazed instance of task component. * @return the initialized component instance */ public SimpleCancellableTask getTask() { if (task == null) { // write pre-init user code here task = new SimpleCancellableTask(); task.setExecutable(new org.netbeans.microedition.util.Executable() { public void execute() throws Exception { // write task-execution user code here } }); // write post-init user code here } return task; 30
  • 31. } //</editor-fold> //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand "> /** * Returns an initiliazed instance of backCommand component. * @return the initialized component instance */ public Command getBackCommand() { if (backCommand == null) { // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0); // write post-init user code here } return backCommand; } //</editor-fold> //</editor-fold> 31
  • 32. //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand2 "> /** * Returns an initiliazed instance of exitCommand2 component. * @return the initialized component instance */ public Command getExitCommand2() { if (exitCommand2 == null) { // write pre-init user code here exitCommand2 = new Command("Exit", Command.EXIT, 0); // write post-init user code here } return exitCommand2; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: mainForm "> /** * Returns an initiliazed instance of mainForm component. * @return the initialized component instance */ public Form getMainForm() { 32
  • 33. if (mainForm == null) { // write pre-init user code here mainForm = new Form("form", new Item[] { getTableItem() }); mainForm.addCommand(getExitCommand2()); mainForm.setCommandListener(this); // write post-init user code here } return mainForm; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tableItem "> /** * Returns an initiliazed instance of tableItem component. * @return the initialized component instance */ public TableItem getTableItem() { if (tableItem == null) { // write pre-init user code here tableItem = new TableItem(getDisplay(), "Ru00E9sultats"); tableItem.setModel(getTableModel1()); // write post-init user code here } 33
  • 34. return tableItem; } //</editor-fold> //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tableModel1 "> /** * Returns an initiliazed instance of tableModel1 component. * @return the initialized component instance */ public SimpleTableModel getTableModel1() { if (tableModel1 == null) { // write pre-init user code here tableModel1 = new SimpleTableModel(new java.lang.String[][] { new java.lang.String[] { "LP et CAO", "15", "18" }, new java.lang.String[] { "Math appliquu00E9s", "15", "15" }, new java.lang.String[] { "Electromagnu00E9tisme", "12", "5" }, new java.lang.String[] { "Machines u00E9lectriques", "13", "15" }, new java.lang.String[] { "Centrales et ru00E9seaux", "4", "13" }, new java.lang.String[] { "Gu00E9nie des procu00E9du00E9s", "12", "" }, new java.lang.String[] { "", "", "" }}, new java.lang.String[] { "Cours", "Annu00E9e", "Examen" }); // write post-init user code here } 34
  • 35. return tableModel1; } //</editor-fold> /** * Returns a display instance. * @return the display instance. */ public Display getDisplay() { return Display.getDisplay(this); } /** * Exits MIDlet. */ public void exitMIDlet() { switchDisplayable(null, null); destroyApp(true); notifyDestroyed(); } /** * Called when MIDlet is started. 35
  • 36. * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet. */ public void startApp() { if (midletPaused) { resumeMIDlet(); } else { initialize(); startMIDlet(); } midletPaused = false; } /** * Called when MIDlet is paused. */ public void pauseApp() { midletPaused = true; } /** * Called to signal the MIDlet to terminate. * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released. 36
  • 37. */ public void destroyApp(boolean unconditional) { } } RESULTATS Le login 37
  • 38. Une fois identifié, l’étudiant peut accédé à ses résultats : 38
  • 39. 39
  • 40. 40