PHP For the Absolute Beginner: More About PHP


About PHP:
PHP is a programming language designed to generate web pages interactively on the computer serving them, which is called a web server. Unlike HTML, where the web browser uses tags and markup to generate a page, PHP code runs between the requested page and the web server, adding to and changing the basic HTML output. PHP makes web development easy because all the code you need is contained within the PHP framework. This means that there’s no reason for you to reinvent the wheel each time you sit down to develop a PHP program; it comes with web functionality built-in.

The Components of a PHP Application
In order to process and develop dynamic web pages, you’ll need to use and understand several technologies. There are three main components of creating dynamic web pages: a web server, a server-side programming language, and a database. It’s a good idea to have an understanding of these three basic components for web development using PHP. We’ll start with some rudimentary understanding of the history and purpose of Apache (your web server), PHP (your server-side programming language), and MySQL (your database). This can help you to understand how they fit into the web development picture. Remember that dynamic web pages pull information from several sources simultaneously, including Apache, PHP, MySQL, and Cascading Style Sheets (CSS).

PHP 
PHP stands for Hypertext Preprocesor. It can be used for creating robust aplications or for building dinamic websites. 
PHP is server-side programing language.PHP grew out of a need for people to develop and maintain web sites containing dynamic client-server functionality. In 1994, Rasmus Lerdorf created a collection of open source Perl scripts for his personal use, and these eventually were rewritten in C and turned into what PHP is today. By 1998, PHP was released in its third version, turning it into a web development tool that could compete with similar products such as Microsoft’s Active Server Pages (ASP) and Sun’s Java Server Pages (JSP). PHP also is an interpreted language, rather than a compiled one. The real beauty of PHP is simplicity coupled with power.
PHP is ubiquitous and compatible with all major operating systems. It is also easy to learn, making it an ideal tool for web programming beginners. Additionally, you get to take advantage of a community’s effort to make web development easier for everyone. The creators of PHP developed an infrastructure that allows experienced C programmers to extend PHP’s abilities. As a result, PHP now integrates with advanced technologies like XML, XSL, and Microsoft’s Component Object Model Technologies (COM).



Apache
Apache is a web server that turns browser requests into resulting web pages and knows how to process PHP code. PHP is only a programming language, so without the power of a web server like Apache behind it, there would be no way for web users to reach your pages containing the PHP language code. Apache is not the only web server available. Another popular web server is Microsoft’s Internet Information Services (IIS), which is supplied with Windows 2000 and all later versions. Apache has the decided advantages of being free, providing full source code, and using an unrestricted license. Apache 2.0 is the current version you would most likely be using, though 1.3 is often still used. IIS is easier to integrate with Active Directory, Microsoft’s latest authentication system, but this applies mostly to internal company web sites.


SQL and Relational Databases
 Structured Query Language (SQL) is the most popular language used to create, retrieve, update, and delete data from relational database management systems. A relational database conforms to the relational model and refers to a database’s data and schema. The schema is the database’s structure of how data is arranged. Common usage of the term “Relational Database Management System” technically refers to the software used to create a relational database, such as Oracle or Microsoft SQL Server. A relational database is a collection of tables, but other items are frequently considered part of the database, as they help organize and structure the data in addition to forcing the database to conform to a set of requirements.
MySQL MySQL is a free yet full-featured relational database. MySQL was developed in the 1990s to fill the ever-growing need for computers to manage information intelligently. The original core MySQL developers were trying to solve their needs for a database by using mSQL, a small and simple database. It become clear that mSQL couldn’t solve all the problems they wanted it to, so they created a more robust database that turned into MySQL. MySQL supports several different database engines. Database engines determine how MySQL handles the actual storage and querying of the data. Because of that, each storage engine has its own set of abilities and strengths. Over time, the database engines available are becoming more advanced and faster.

Tools to get started

Becouse PHP is server-side programing language it requires a server to run on.You can download virtual server to run on your computer.
For MAC you can instal:
 For Windows you can instal:
 For Linux you can instal:
  • LAMP

For writing your PHP code, you will need text editor like:
  • Notepad++
  • Brackets
  • Sublime Text
  • Dreamweaver 
  • JetBrains PhpStorm 
  • Eclipse PDT
  • NetBeans
  • vim
  • Zend Studio
  • Aptana
  • KomodoIDE
  • Coda
  • Cloud9
  • Geany
  • Gedit
  • Atom
  • CodeLobster
  • Emacs
  • Koding
  • TextMate
  • Visual Studio Code
  • Arachnophilia
  • Programmer's Notepad
  • UEStudio / UltraEdit
  • Bluefish
  • Espresso
  • Kate
  • phpDesigner
  • PSPad
  • TextWrangler 
Nice to have:
How it works:
The role of each web server comes down to a single function -
 acceptance of a certain request from user --> processing that request --> response to request
During this process, web server and client are using same language - communication protocol HTTP (HyperText Transfer Protocol)
PHP is used to translate and start script and then send answer to client.

What does PHP do?
1. Access informations typed into web form and do something with it, like:
  • send email
  • navigate to a specific web page based on user input
  • create user account
  • log in and log out users
2. Find out which browser and operating sistem user is using
3. Display alternative version of a web page to users who are using mobile devices
4. Create global HTML templates 


Next lesson:
Share on Google Plus

About Negmardesign

0 comments :

Post a Comment