By the end of this workshop, you will become familiar with these editors:
Do not use software as Microsoft Word or TextEdit. They are not suitable for programming.
A number of environments automatically generate your PHP code (e.g. Adobe Dreamweaver when using Behauviours).
Never, ever use automatic code generators; automatic code generators make it very hard to mantain the code, or to build on top of existing code.
Instead, you must study the PHP lexical structure and speed up your development using:
Notepad++ is a general-purpose lightweight text editor, that can be used to write code in a number of different programming languages.
Editing features include:
Additional plugins allow to extend the program and integrate further features.
Eclipse is both an editor and a generic platform used to build editors.
The original codebase was developed by IBM, and is now developed and maintained by a large community.
Editing features include:
Aptana Studio is a editor built on top of Eclipse, targeting development using Python and PHP
Aptana Studio is a more complete application compared to all the ones seen in the previous slides
Open Source is software released under a license that guarantees to its users the:
Free to use means that Open Source software can be used without restrictions:
Other editors include:
As part of this module we will be using a number of tools, amongst which:
You can install all of them using the Application Catalogue (at UEL) or downloading them from internet if you are not at UEL.
During Workshop 1 you should have successfully installed Apache and PHP. After our first lesson, for security, maintanance and good practice reasons you will not be running your own version of Apache on your local machine at UEL.
You will instead use a remote installation of Apache and PHP for deployment (and a local installation of PHP for testing basic scripts).
I suggest you store your files on your local documents folder or the desktop for the duration of the class and copy them on a pen drive at the end of each class.
We'll create the file with all our editors and run it from the command line and from the server.
The file should just include the following line:
<?php echo "Hello World"; ?>
Run the the hello.php file from the command line.
Please go back and review Activity #6 in Workshop 1 if you do not remember how to run PHP files.
Notepad++ is available to download from here.
Set up Notepad++ to run PHP scripts using the NppExec plugin:
The start-up string is:
NPP_SAVE cd "$(FULL_CURRENT_PATH)" "C:\Program Files\php\php.exe" "$(FULL_CURRENT_PATH)"
Make sure you include the quotes and update paths as needed to reflect the local folder structure (it will vary depending on your lab).
Remember: CN5109 uses Open Source software only; that means that you can download and use the software at home.
If you are using a Mac or Linux, the good news is that we are against discrimination - even if you use a Mac.
To work from home, you will need to install:
We'll set up and test Aptana as your development environment:
A demo (based on Python! remember: you are using PHP) is available here.
You may find start-up errors when running Aptana Studio; you can normally ignore the start-up errors.
You do not need to configure Git support; please select "Check this if you do not want to be asked again".
Set up Eclipse as you have done with Aptana Studio and:
Make sure that you configure your PHP path. Use Run -> Run to test your script
Share your experience on twitter #uel #cn5109
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License