To start you will need to install the MySQL database server and execute the following script which creates a database used by the application:
<br /> -- MySQL Administrator dump 1.4<br /> --<br /> -- ------------------------------------------------------<br /> -- Server version 5.1.38</p> <p>/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;<br /> /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;<br /> /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;<br /> /*!40101 SET NAMES utf8 */;</p> <p>/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;<br /> /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;<br /> /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;</p> <p>--<br /> -- Create schema phonebook<br /> --</p> <p>CREATE DATABASE IF NOT EXISTS phonebook;<br /> USE phonebook;</p> <p>--<br /> -- Definition of table `phonebook`.`Listing`<br /> --</p> <p>DROP TABLE IF EXISTS `phonebook`.`Listing`;<br /> CREATE TABLE `phonebook`.`Listing` (<br /> `id` int(11) NOT NULL AUTO_INCREMENT,<br /> `name` varchar(100) DEFAULT NULL,<br /> `phonenumber` varchar(15) DEFAULT NULL,<br /> PRIMARY KEY (`id`)<br /> ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;</p> <p>
You can also download the script from: http://examples.themidnightcoders.com/blog/phonebook.sql
Once the database is created, it is important to create a database user with the username “phonebookuser” and the password set to “password”. Grant all the privileges to the “phonebook” schema to the “phonebookuser” user.
Once the database is setup, you will need to configure your development environment:
- Download and install WebORB
- Install an IDE. For Java developers we recommend IntelliJ IDEA (The Community Edition is free), but you can also use the Eclipse IDE. For .NET developers, Visual Studio is your best option.
The next post will explore the server-side code. You will compile and deploy the backend service and try invoking the methods with the WebORB management console.