Saturday, December 6, 2008
First Chapter in PHP tutorials for dummies - What Is New in PHP 5.0?
1 Better object-oriented support built around a completely new object model (see Chapter 6,“Object-Oriented PHP”)
2 Exceptions for scalable, maintainable error handling (see Chapter 7,“Exception Handling”)
3 SimpleXML for easy handling of XML data (see Chapter 33,“Connecting to Web Services with XML and SOAP”)
Other changes include moving some extensions out of the default PHP install and into
the PECL library, improving streams support, and adding SQLite.
Generally, this sites is divided into five main parts:
Part I,“Using PHP,” provides an overview of the main parts of the PHP language with examples. Each example is a real-world example used in building an e-commerce site rather than “toy” code.We kick off this section with Chapter 1,“PHP Crash Course.” If you’ve already used PHP, you can whiz through this chapter. If you are new to PHP or new to programming, you might want to spend a little more time on it. Even if you are quite familiar with PHP, you will want to read Chapter 6,“Object-Oriented PHP,” because the object-oriented functionality has changed significantly in PHP5.
Part II,“Using MySQL,” discusses the concepts and design involved in using relational database systems such as MySQL, using SQL, connecting your MySQL database to the world with PHP, and employing advanced MySQL techniques, such as security and optimization.
Part III,“E-commerce and Security,” covers some of the general issues involved in developing an e-commerce site using any language.The most important of these issues is security.We then discuss how you can use PHP and MySQL to authenticate your users and securely gather, transmit, and store data.
Part IV,“Advanced PHP Techniques,” offers detailed coverage of some of the major built-in functions in PHP.We have selected groups of functions that are likely to be useful when building an e-commerce site.You will learn about interaction with the server, interaction with the network, image generation, date and time manipulation, and session variables.
Part V,“Building Practical PHP and MySQL Projects,” is our favorite section. It deals with practical real-world issues such as managing large projects and debugging, and provides sample projects that demonstrate the power and versatility of PHP and MySQL.
We will discover all these chapter in next posting..
First Chapter in PHP tutorials for dummies - PHP’s Attributes
Some of PHP’s main competitors are Perl, Microsoft ASP.NET, JavaServer Pages (JSP), and ColdFusion. In comparison to these products, PHP has many strengths, including the following:
1 High performance
2 Interfaces to many different database systems
3 Built-in libraries for many common web tasks
4 Low cost
5 Ease of learning and use
6 Strong object-oriented support
7 Portability
8 Availability of source code
9 Availability of support
A more detailed discussion of these strengths follows.
Performance
PHP is very efficient. Using a single inexpensive server, you can serve millions of hits per day. If you use large numbers of commodity servers, your capacity is effectively unlimited. Benchmarks published by Zend Technologies (http://www.zend.com) show PHP outperforming its competition.
Database Integration
PHP has native connections available to many database systems. In addition to MySQL, you can directly connect to PostgreSQL, mSQL, Oracle, dbm, FilePro, Hyperwave, Informix, InterBase, and Sybase databases, among others. PHP 5 also has a built-in SQL interface to a flat file, called SQLite. Using the Open Database Connectivity Standard (ODBC), you can connect to any database that provides an ODBC driver.This includes Microsoft products and many others.
Built-in Libraries
Because PHP was designed for use on the Web, it has many built-in functions for performing many useful web-related tasks.You can generate GIF images on the fly, connect to web services and other network services, parse XML, send email, work with cookies, and generate PDF documents, all with just a few lines of code.
Cost
PHP is free.You can download the latest version at any time from http://www.php.net for no charge.
Ease of Learning PHP
The syntax of PHP is based on other programming languages, primarily C and Perl. If you already know C or Perl, or a C-like language such as C++ or Java, you will be productive using PHP almost immediately.
Object-Oriented Support
PHP version 5 has well-designed object-oriented features. If you learned to program in Java or C++, you will find the features (and generally the syntax) that you expect, such as inheritance, private and protected attributes and methods, abstract classes and methods, interfaces, constructors, and destructors.You will even find some less common features such as built-in iteration behavior. Some of this functionality was available in PHP versions 3 and 4, but the object-oriented support in version 5 is much more complete.
Portability
PHP is available for many different operating systems.You can write PHP code on free Unix-like operating systems such as Linux and FreeBSD, commercial Unix versions such as Solaris and IRIX, or on different versions of Microsoft Windows. Well-written code will usually work without modification on a different system running PHP.
Source Code
You have access to PHP’s source code.With PHP, unlike commercial, closed-source products, if you want to modify something or add to the language, you are free to do so. You do not need to wait for the manufacturer to release patches.You also don’t need to worry about the manufacturer going out of business or deciding to stop supporting a product.
Availability of Support
Zend Technologies (www.zend.com), the company behind the engine that powers PHP, funds its PHP development by offering support and related software on a commercial basis.
For next lesson in PHP tutorials for dummies, we will learn about What Is New in PHP 5.0?
First Chapter in PHP tutorials for dummies - What Is PHP?
PHP was conceived in 1994 and was originally the work of one man, Rasmus Lerdorf. It was adopted by other talented people and has gone through four major rewrites to bring us the broad, mature product we see today. As of August 2004, it was installed on more than 17 million domains worldwide, and this number is growing rapidly.
You can see the current number at http://www.php.net/usage.php
Introduction 1
PHP is an Open Source product, which means you have access to the source code and can use, alter, and redistribute it all without charge. PHP originally stood for Personal Home Page but was changed in line with the GNU recursive naming convention (GNU = Gnu’s Not Unix) and now stands for PHP Hypertext Preprocessor.
The current major version of PHP is 5.This version has seen a complete rewrite of the underlying Zend engine and some major improvements to the language. The home page for PHP is available at http://www.php.net/ The home page for Zend Technologies is http://www.zend.com/