Search
Solutions
Services
 
Home
Our Team
Portfolio
India Outsourcing
Technical Expertise
Process
Pricing
FAQ’s
Featured Customers
Downloads
Corporate Profile
Read | Download PDF

Whitepapers
Read | Download PDF

 
 

How does PHP help a web developer?

Archives
> How does PHP help a web developer?

PHP and DynamismOpen Source? PHP Scripting.
Another scripting language? Why? Well, PHP (PHP: Hypertext Processor) currently running over a million web sites speaks for itself, and quite eloquently at that. Mitsubishi Motors, Red Hat and VBWorld.net and a number of other sites use the language.

What is PHP?
An open source server-side HTML-embedded scripting language. The first version of PHP or 'Personal Home Pages' that was written by Rasmus Lerdorf in 1994 has come a long way since then. Israeli developers Zeev Suraski and Andi Gutmans developed the PHP 3 version in 1997 and made it the full-fledged scripting language that it is today.

It runs equally well on Unix and NT and is well documented and capable enough to build complex and dynamic web sites that can run on either platform. Today, it competes with other web scripting tools with the added features of integrating seamlessly with multiple platforms and servers.

What was the need for creating PHP? For one thing it was aimed at being an alternative web development tool - a server-side scripting tool that is ideal for developing web-based sites and applications and was embedded within HTML. In a nutshell, this resulted in quicker response times, improved security and transparency to the end user. It is maintained by a set of developers and a large group of contributors.

What does all this mean? Are we just adding on to a list of scripting languages? To fully understand the language lets talk about open source and dynamic web pages. To quote the Open Source organization - "The basic idea behind open source is very simple: When programmers can read, redistribute, and modify the source code for a piece of software, the software evolves. People improve it, people adapt it, and people fix bugs. And this can happen at a speed that, if one is used to the slow pace of conventional software development, seems Astonishing".

HTML tags are descriptive and create static web pages. To bring in some user interactivity the need for dynamism on a web page is paramount. To handle variability we need a command language that can handle user inputs and react to them. PHP is one such language. It helps create a dynamic page that interacts with the user and displays information customized to the user.

Languages like ASP and JSP (Active Server Pages and Java Server Pages) were created for the same purpose. We shall compare these languages in a moment. But, first let's talk about PHP as an entity and then trace out its core features.

As we just said, PHP is a server-side scripting language that is ideal for developing dynamic Web-based sites and applications.

People who work with PHP praise it for its "easy to work with and easy to pick up" functionality, speed of execution and its ability to reuse code. Being an open source tool it can speed development time and allow the creation of robust and secure applications. Possessing an elegant and simple syntax borrowed from C, Perl, C++ and Java, it also possesses built-in variables that enable access to a CGI environment and form/cookie data. It's cross-platform features offer excellent connectivity to common databases including Oracle, Sybase, MySQL, ODBC and others. Added facilities of integrating with various external libraries enable developers to generate PDF documents and even parse XML.

PHP version 3.0.0 evolved to PHP 4 and Zend - a super version that supports PDF, XML, Oracle, ODBC, Win32 COM and so on. Zend is the engine included in PHP that contains a series of components, one of which is a language parser - the Zend engine. The Zend Optimizer, Zend Cache and Compiler are the others.

Back to top

 

New features in PHP 4

  • Improved execution speed
  • Reduced memory requirements
  • Thread safe
  • A language parser called the Zend engine that is an independent part of PHP 4 thus making it compatible with other applications
  • Web server extraction layers
  • Extensions
  • MySQL Support
  • Can be embedded into an HTML page within XML or even plain text
  • Backwards compatible with PHP 3
  • Scripts are compiled at run time and errors get displayed in the web browser
  • Excellent connectivity to a wide variety of common databases
  • An include () statement allows for shorter code
  • Support for WDDX (Web Development Data Exchange) that allows data exchange between most web programming languages
  • PHP 4 is not a simple upgrade from version 3 but a completely rethought and re-programmed effort.

Back to top

 

And how does this hype translate to actual paybacks?

An excellent solution for dynamic e-commerce sites!

What makes it easy to use are some handy features that allow cross-platform working and database access. Scripts are compiled at runtime and errors get displayed in the web browser.

Let's list out the main advantages that PHP adds to a Web page.

It can be embedded into an HTML page within XML or plain text and functions mainly as a tool that can generate dynamic content to a web page. Such pages are central to commercial sites. Its intuitive interface allows programmers to embed PHP commands right within the page.

  • Its open source and therefore can be rewritten at any time and additional functionalities can be incorporated as add-ons at any time. A scripting language that is evolving radically.
  • Advanced portability features that support Linux, Solaris and Windows NT.
  • Built-in variables that allow access to CGI/server environment variables
  • Integration with various external libraries that help in generating PDF documents and parse XML
  • MySQL support
  • Superior memory management that loads include files when required
  • Shorter code and speed of execution
  • No hidden costs
  • Excellent technical support
  • Short development time
  • Easy to maintain and upgrade
It is an open source alternative to ASP and JSP, but there are a few differences worth noting.
  • PHP is Open source
  • Possesses a simpler syntax
  • JSP is based on Java and ASP on VB Script and Jscript while PHP uses its own programming language syntax derived from Perl, Java and C.

ASP is based on the COM architecture from Microsoft and supports multiple programming languages thus making it slower. Communication with the different COM objects is a difficult, time-consuming and memory guzzling process. PHP works in a robust and free manner and does not require large memory space. Fast mileage and simplicity make it a good alternative to ASP, although its error handling and search capabilities suffer in comparison.

Its open source features allows binary file uploads and retrieval a lot easier. This is because third party communication software that is vital to ASP while sending email from a Web page, is absent in PHP.PHP is the natural choice for developers on Linux machines running Apache server software, but it runs equally well on any other Unix or Windows platform and with Netscape and Microsoft web server software. The most common way to run it is as an Apache module or to build PHP as CGI and configure the Web server to handle .php files with the PHP executable.

Sites like VBWorld.com, iomojo.com and Mitsubishi Motors have proven that PHP is successful. A NetCraft Survey shows that about 6 million domains are currently using PHP and it is growing at a rate of 15% each month and is available over 36% of Apache web servers at the moment.

Back to top

 

 

Related Links on building an Online Community:

 
  Newsletter | Site Map | Development Scenarios | Partners | Careers | Archives
Copyright 2004 Stylusinc.com
  Links | Privacy Policy