What is and IDE?

To develop HTML and CSS you can use an advance notepad as NotePad++ (http://notepad-plus-plus.org/).
A tool like that is very useful for:
– Syntax Highlighting and Syntax Folding
– Auto-completion: Word completion, Function completion and Function parameters hint
– Multi-View

To edit simple PHP code you can use NotePad++ but if you want develop an application with variables and classes you will need an IDE environment. An integrated development environment (IDE) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development.
An IDE normally consists of:
– Syntax Highlighting and Syntax Folding
– Auto-completion: Word completion, Function completion and Function parameters hint
– Multi-View
– Build Automation Tool
– Debugger
– Ready to use code for graphic elements as windows, slides, buttons.
– Project Support to organize files better

Debugger help you to find evil bugs in less time.

Today we will try NetBeans IDE (https://netbeans.org/).
NetBeans IDE is free and by Oracle.

What is a WAMP?

A WAMP (Windows web development environment) allows you to create web applications with Apache, PHP and a MySQL database without installing them in your system. It is a like a magic standalone box :)

I like to use EasyPHP(http://www.easyphp.org/).

Install and Run EasyPHP

1. Go to http://www.easyphp.org/ download ‘E Development Server’ and install

2. Go to your installation folder, usually Programmi(x86)> EasyPHP> data> localweb> www> create the folder ‘test-net-beans’

3. If you have Skype running, drop it because it uses the same port of EasyPHP

4. Run EasyPHP

5. Barra di Windows> icone nascoste> RMB over EasyPHP> Administrator to see versions of Apache PHP and MYSQL

6. Barra di Windows> icone nascoste> RMB over EasyPHP> Local Web> www, to see the root folder of your website

Install and Run NetBean IDE

1. Download the package here http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
This package includes NetBeans 8.0.2 + JDK, one installation, two packages!
Lanch the .exe and install

2. Open NetBeans IDE> MAIN TOP MENU> Tools> Plugins> ‘Available Plugins’ tab> check PHP> ‘Install’ button, then restat IDE

New Project – Hello World!

0. Run NetBeans IDE

1. MAIN TOP MENU> File> New project> PHP Application

2.
Project Name: TestNetBeans
Sources Folder: usually Programmi(x86)> EasyPHP> data> localweb> www> test-net-beans
PHP Version: the same setup in barra di Windows> Icone nascoste> RMB Easy PHP> Administration

3.
Run As: Local Web Site
Project URL: http://localhost/www/test-netbeans/

4. PHP Frameworks: leave blank

NOTICE: inside Programmi(x86)> EasyPHP> data> localweb> www> create the folder ‘test-net-beans’ now there is the folder /nbproject

5. NetBeans> MAIN TOP MENU> File> New File> PHP> PHP File (empty php file)

6.
File Name: index
Folder: Browse the root folder or wherever you want, ‘Finish’, good! We have our first index.php! Congrats!

7. Write inside index.php:


<?php
/* 
 * My first index file
 */
echo "Hello World!";
?>

8. MAIN TOOLBAR> Play!

PHP Application with Existing Sources

0. Run NetBeans IDE

1. MAIN TOP MENU> File> New project> PHP Application with Existing Sources

2.
Project Name: TestNetBeans
Sources Folder: usually Programmi(x86)> EasyPHP> data> localweb> www> my-old-project
Project Name: my-old-project
PHP Version: the same of EasyPHP

3.
Run As: Local Web Site
Project URL: http://127.0.0.1/www/my-old-project/
NOTE: you can modify later at File> Project Properties> Run Configuration> Project URL
Index Folder: index.php or other

Debug

1. NetBeans> MAIN TOP TOOLBAR> Debug Project, it will open a page like this: ‘http://127.0.0.1/www/my-website-folder/index.php?XDEBUG_SESSION_START=netbeans-xdebug

2. MAIN TOOL BAR> ‘Step Into'(F7) to debug step by step

Resume

The combination of tools is simple:

1. Easy PHP acts like a webserver, run Apache, PHP and MySQL in a sandbox and hosts the web site inder /www/mysite folder
2. NetBeans create a project file inside /www/mysite/nbproject and manages/edits .php files inside /www/mysite folder

NeBeans IDE edit -> | /www folder of EasyPHP WAMP |