You are on page 1of 12

Instructions

Record your session using Camtasia or similar


https://alternativeto.net/software/camtasia-studio/
Record at 1920x1080 (or as close as you can get)
Be sure to include a link to download source, resources, more info, etc.
Include your contact info
End on a Q&A slide with links and contact info
Some code to start building C++
applications
Francisco Muro A.
francisco@MIPYMEenLinea.pe / @FranciscoMuroA
About Me

Francisco Muro A.
IT Project Manager at CIMA-Software
Developer since 1989
Love to code
Love Peruvian food xD
Owner of t-shirt company -
TEXMECSAC.com
Agenda

1. Set-up local working environment


2. Start RAD Studio
Create a new Multi-Device Application (C++)
Working with DataModule
Working with list
Working with Threads
Some code
3. Test your App
1. Set-up local working environment
WHAT DO WE NEED?
In this example we will use the following components in order to start
working locally.
Install IIS (Ex. version 7.0 default from Windows Features)
Install Microsoft Web Platform Installer
Install PHP (Ex. version 5.6.31)
Install PHP Manager
Install MySQL Windows (Ex. version 5.5)
Install MySQL Workbench
Install RAD Studio
1. Set-up local working environment ... Continue ...

Configure your IIS instalation


Go to server node to the left (localhost)
Look for Handler Mappings:
Right click on ISAPI-dll and right click to select Edit Feature Permissions, check on
Excecute, then Ok.
Double click on PHP_via_FastCGI and Click on Request Restrictions, then enable File
and Folder and Excecute, then ok
Look for PHP Manager: Under PHP Setup section make sure everything is ok, and apply
all recommendations shown.
Now click on Check phpinfo() just to confirm everything is ok
Finally, go to Sites node and right click to create a website called CodeRage
On Connect As button use full user name to connect like: HOSTNAME\username
1. Set-up local working environment ... Continue ...

Configure your MySQL database


Open MySQL Workbench
Connect to the default Local instance MySQL
Create a new database
CREATE SCHEMA `coderage` DEFAULT CHARACTER SET utf8 ;
Create a new user coderage password coderage
CREATE USER 'coderage'@'localhost' IDENTIFIED BY 'coderage';
Grant enough priviliges to the user
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,
INDEX, ALTER, CREATE TEMPORARY TABLES
ON coderage.* TO 'coderage'@'localhost' IDENTIFIED BY 'coderage';
Go to MySQL Workbench Home (upper left home icon)
1. Set-up local working environment ... Continue ...

Create a new connection (+ icon next to MySQL Connections)


On the left panes, name SCHEMAS, double click on coderage
database in order to select it.
Create a table with name user
CREATE TABLE `user` (
`iduser` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`userlastname` varchar(45) DEFAULT NULL,
`userstatus` enum('Active','Inactive') NOT NULL DEFAULT 'Active',
PRIMARY KEY (`iduser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1. Set-up local working environment ... Continue ...
... One more step, seriously ...
Configure your php connection
Note that CodeRage folder
is the website created in step
Configure your IIS
instalation.
Create folder structure under
CodeRage folder.
Under phpfiles folder create
a file name config.php with
<?php
// database settings
the following standar define('HOST',"localhost");
database settings define('USERNAME',"coderage");
define('PASSWORD',"coderage");
define('DATABASE_NAME',"coderage");
define('GMAPS_KEY',"TBD");
?>
If everything is ok
Cross you fingers!
2. RAD Studio: Create a Project

Ok. lets start RAD Studio and then ...


Select Create a new Multi-Device Application (C++)
Create a new DataModule
Run REST Debuger...
Copy Components to DataModule
Create a new Thread
Create your list
Q&A
franciscomuro.blogspot.com