2. Summary
∗ MVC
∗ MySQL Workbrench
∗ Example
∗ Advantages
Arnold Boungoungou 2
3. MVC
Model-View-Controller
According to the orders of the
Request HTTP,CLI… user, treat the data through
the model and post the
Response : XML,HTML,CSS
interface built in the view.
Controller
Group the operations of
reading and writing from a
database.
Constructed the
representations of the data
and post tools to pilot the
Model View
application.
Arnold Boungoungou 3
4. Example
Model
Controller 1 <?php
class Employe extends AppModel {
2 var $name = 'Employe';
<?php var $validate = array(
class EmployesController extends AppController { 'groupes_id' => array(
var $name = 'Employes'; 'numeric' => array(
'rule' => array('numeric');
function index() { }
… ?>
}
function add(){
…
} View
function view() {
…
<tr>
}
<th><?php echo $this->Paginator->sort('NOM');?></th>
<th><?php echo $this->Paginator->sort('PRENOM');?></th>
?>
<th><?php echo $this->Paginator->sort('TEL');?></th>
<th><?php echo $this->Paginator->sort('EMAIL');?></th>
<th><?php echo $this->Paginator->sort('SEXE');?></th>
3 <th><?php echo $this->Paginator->sort('GROUPES');?></th>
<th><?php echo $this->Paginator->sort('SERVICES');?></th>
</tr>
Arnold Boungoungou 4
5. MySQL Workbench
Design – Develop - Administer
Arnold Boungoungou 5
6. MySQL Workbench
Design – Develop - Administer
Definition:
Is a visual tool for unified architects.
Developers and database administrators.
MySQL Workbench provides data modeling
SQL development and administration.
Available for Windows, Linux and Mac OS.
Last version 5.2
Arnold Boungoungou 6
7. Visual design of data bases
MySQL Workbench simplifies the design and maintenance of databases
All objects can be modeled and managed in MySQL Workbench including :
Tables
Indexes
Views
Stored procedures
Triggers
and security privileges
Arnold Boungoungou 7
8. MySQL Workbench
Design – Develop - Administer
Design Develop
MySQL Workbench enables can execute and optimize SQL
a database administrator, queries.
developer or architect easily manage connections to the
design data, modeling, database.
generate and visually
Administer
manage databases.
Visual console.
MySQL administration environments.
Configuring servers.
Administering users.
Monitor the integrity of the database.
Arnold Boungoungou 8