PHP and LAMP: The Key to Open Source ERP Software
PHP is the scripting language for OpenPro open source ERP
What is the PHP scripting language? Why is it so popular for open source software? How does it work? How can I start using it? These are all questions that the newbie Web professional (and others) ask, especially as PHP becomes the de facto standard rivaling ASP and JSP. OpenPro business software is the first ERP software solution to use PHP scripting language. PHP is in over 85% of Internet applications around the world. There are currently over 1 million PHP programmers available today.
What is PHP?
PHP is the P in the LAMP stack, or Linux, Apache, MySQL and PHP. PHP (Hypertext Preprocessor) is an open source, server-side, HTML embedded scripting language used to create dynamic Web pages. PHP script is embedded within an HTML document; while programmers jump between HTML and PHP seamlessly within the document, the code remains inaccessible to users because it is processed on the server. It combines the power of CGI scripting with the ease of working within HTML.
Why is this important? Well, “way back when,” a form on a Web page was a big deal, and coders across the land struggled with complex CGI scripting to make something as simple as sending the contents of a form to e-mail work reliably. For those of us working on Intranets who were not hardcore coders, it was a hair-pulling affair even when using pre-written freeware scripts.
Why is it Popular?
Part of why PHP is popular is simply because it has become ubiquitous. Hosting companies install it as part of their core package and more and more useful applications for the end user are available. The upsurge in open source usage certainly helps the case for PHP. To get a sense of the trend of popularity and growth of PHP, visit these recent Netcraft survey results at http://www.php.net/usage.php. Clearly PHP has arrived and is here to stay.
Certainly the world didn’t need another scripting language just for the fun of it, so what did PHP do that the others didn’t? Some of the key advantages that PHP offers and why OpenPro uses it:
- Ease of use
- Enhanced security
- Cross-platform operability
- Compatibility with a wide variety of databases
- Support for most current web servers
- Communicates with numerous network protocols
- Not limited to HTML output
- Strong text processing capabilities
- Transparency to the end user
- Support for regular expressions
PHP offers the best of both worlds since it allows access to built-in variables like CGI and can interact with forms and cookies, yet maintains the elegance and simplicity of an easy to learn, easy to use language with a high degree of code reusability.
Once you have an operating system and Web server set up, PHP installation is fairly easy. Essentially, you need to install the PHP processor and have your server associate .php files with it. PHP.net has detailed installation instructions for UNIX/Linux, Windows, and Mac OS on its website.
Once you have PHP installed, all you need to do is place your PHP files in your Web directories and the server will automatically parse them when someone points their web-browser to that page.
The amount of support available for PHP is wide. Don’t think that Open Source means lack of “formal” resources. A quick glance at PHP.Net boasts numerous new “news” items ranging from the new O’Reilly book Mastering Regular Expressions to the announcement of several conferences, expos and learning opportunities.
And, if you prefer working with a third-party that packages everything together nicely for you and offers support, you can take that route with PHP as well. Zend is a company that provides products and consulting to enhance the entire PHP lifecycle within your organization. Zend has taken all the pieces of PHP from the server platform to the developer’s desktop and made it enterprise-ready with less effort and less time on the part of the IT staff.
If certification is a big deal for you and your staff, now you can take that route with PHP as well. Zend announced the availability of PHP certification, enabling developers to test and certify their expertise. As PHP within the enterprise grows, it gives you a way to measure staff and consultant savvy in an objective way.
How Does it Work?
PHP code can be embedded into HTML, XML, or plain text for the purpose of generating dynamic content for a variety of web outputs. As a document is called from a browser, the Web server encounters the PHP code and sends it through the PHP processor for execution. Dynamically generated results are then displayed back to the user in her browser.
Below is a breakdown of what PHP can do for the user:
- Interacting with a database
- Integrating with external libraries to generate PDF documents and parse XML
- Accessing and using built-in variables from both the server side (environmental variables) and the client side (forms, cookies, etc.)
- Memory management
- With the relatively short learning curve for programmers, the widely available open source support community, frequency of new releases, and speed of execution, it makes PHP ideal for web developers.
How Can I Start Using It?
The simple answer? Jump right in! The one thing that holds true regardless of the technology you work with is this: the infamous “hello world” is the way to get started. In PHP, our “hello world” would look as follows: PHP example.
The beauty of PHP is that you can jump in and out of PHP coding using these tags within your HTML. Like with all text-based code, use a text editor (not a word processor) for best results.
As you would expect, PHP has a complete syntax all its own. From variables to operators to built-in functions, it is pretty much the same as anything else – refer to the reference manual until it becomes second nature. If you would like, you can refer to the complete online manual for PHP at: http://us2.php.net/manual/en/index.php
The Bottom Line: Open Source ERP software is more flexible and less costly with PHP.
Hope this page gave you a better understanding of why OpenPro uses PHP and how you can have a complete business system running using the LAMP stack and OpenPro ERP Software.