Open Source Programming PDF

Summary

These lecture notes cover open-source programming concepts and topics such as PHP, Apache, MySQL, and various open source software applications.

Full Transcript

Open Source Programming 11/5/2024 1 Unit – I Introduction Open source Programming PHP, Apache, MySQL, Postgress, SQL and Perl- Overview of PHP – Variables, operators, Constants, control structures arrays, Functions, classes – Handling files....

Open Source Programming 11/5/2024 1 Unit – I Introduction Open source Programming PHP, Apache, MySQL, Postgress, SQL and Perl- Overview of PHP – Variables, operators, Constants, control structures arrays, Functions, classes – Handling files. 11/5/2024 Open Source Programming 2 What is Open source By allowing the open exchange of information, programmers from all over the world contribute to make a truly powerful and efficient piece of software without royalties or fees. 11/5/2024 Open Source Programming 3 Why OSP ROCKS? They are free. They are cross-platform and “technology-neutral.” They embrace diversity. 11/5/2024 Open Source Programming 4 OSP Software - OS  Linux — operating system kernel based on Unix  GNU OS — a complete Unix-like operating system  OpenBSD — produces a FREE, UNIX-like operating system.  FreeBSD — operating system derived from Unix an advanced operating system for modern server, desktop, and embedded computer platforms  OpenSolaris — Unix Operating System from Sun Microsystems  Symbian — real-time mobile operating system designed for smartphones. 11/5/2024 Open Source Programming 5 OSP Software - Server Apache — HTTP web server Tomcat web server — web container Mediawiki — wiki server software Alfresco, TYPO3 — content management system RenovatioCMS — content management system Joomla — content management system Drupal — content management system provides a collaborative environment for social networking sites, corporate Web sites, intranets, e-commerce applications and discussion sites. 11/5/2024 Open Source Programming 6 OSP Software WordPress — blog software MongoDB — document-oriented, non-relational database Eclipse — software development environment comprising an integrated development environment (IDE) Moodle — course management system or virtual learning environment openSIS — open source Student Information System 11/5/2024 Open Source Programming 7 OSP Software osCommerce — allows store owners to setup, run, and maintain online stores with minimum effort and with no costs PeaZip — File archiver Mozilla Firefox — web browser Mozilla Thunderbird — open source, cross-platform e- mail and news client e-mail client OpenOffice.org — office suite Stockfish — chess engine series, one of the strongest chess programs 7-Zip – File Archiever 11/5/2024 Open Source Programming 8 OSP Software (Others) PHP — Hypertext Preprocessor PERL & Python — Interpreted Dynamic Language MySQL — Data Base 11/5/2024 Open Source Programming 9 Intro to AMP Package  AMP is an acronym formed from the initials of Apache, MySQL and PHP or Python or Perl.  Apache: It acts as Web server. Its main job is to parse any file requested by a browser and display the correct results according to the code within that file.  PHP: PHP is a server-side scripting language that allows your Web site to be truly dynamic.  MySQL: It enables PHP and Apache to work together to access and display data in a readable format to a browser. 11/5/2024 Open Source Programming 10 AMP as Restaurant  Apache – This is the Chef. Whatever people ask for, prepares it without complaint. She is quick, flexible, and able to prepare a multitude of different types of foods. 11/5/2024 Open Source Programming 11 AMP as Restaurant  PHP – This is the Waiter, gets requests from the patron and carries them back to the kitchen with specific instructions about how the meal should be prepared. 11/5/2024 Open Source Programming 12 AMP as Restaurant MySQL – This is Stockroom of ingredients. 11/5/2024 Open Source Programming 13 LICENSES License that are popular and widely used or with strong communities ::. Apache License, 2.0 (Apache-2.0) BSD 3-Clause "New" or "Revised" license (BSD-3-Clause) BSD 3-Clause "Simplified" or"FreeBSD" license (BSD-2-Clause) 11/5/2024 14 GNU General Public License (GPL) GNU Library or "Lesser" General Public License (LGPL) MIT license (MIT) Mozilla Public License 2.0 (MPL-2.0) Common Development and Distribution License (CDDL-1.0) Eclipse Public License (EPL-1.0) 11/5/2024 15 Apache Introduction Appache is a Web server Responds to client requests by providing resources URI (Uniform Resource Identifier) Web server and client communicate with platform- independent Hypertext Transfer Protocol (HTTP) 11/5/2024 Open Source Programming 16 HTTP request types Request methods – get – post – Retrieve and send client form data to Web server – Post data to a server-side form handler 11/5/2024 Open Source Programming 17 System Architecture Multi-tier application (n-tier application) – Information tier (data or bottom tier) Maintains data for the application Stores data in a relational database management system (RDBMS) – Middle tier Implements business logic and presentation logic Control interactions between application clients and application data – Client tier (top tier) Application’s user interface Users interact directly with the application through the client tier 11/5/2024 Open Source Programming 18 Overview of Php PHP Hypertext Preprocessor. – Other Names : Personal Home Page, Professional Home Page PHP is a server side scripting language. – Capable of generating the HTML pages HTML generates the web page with the static text and images. However the need evolved for dynamic web based application, mostly involving database usage. 11/5/2024 Open Source Programming 19 Features of PHP There are no. of server side scripting available like ASP, SSJS, JSP….. PHP involves simplicity in scripting (..generally using the database) platform independence. PHP is primarily designed for web applications well optimized for the response times needed for web applications Is an open source. 11/5/2024 Open Source Programming 20 How it works? WEB Gets Page SERVER HTTP Request (url) Interprets the PHP code Server response Hello CLIENT Browser creates the web page 11/5/2024 Open Source Programming 21 PHP with HTML  PHP programs are written using a text editor, such as Notepad or WordPad, just like HTML pages.  PHP pages, for the most part, end in a.php extension. This extension signifies to the server that it needs to parse the PHP code before sending the resulting HTML code to the viewer’s Web browser. 11/5/2024 Open Source Programming 22 PHP with HTML  What makes PHP so different is that it not only allows HTML pages to be created.  It is invisible to your Web site visitors. The only thing they see the resulting HTML output. This gives you more security for your PHP code and more flexibility in writing it.  HTML can also be written inside the PHP section of your page.  PHP can also be written as a standalone program, with no HTML 11/5/2024 Open Source Programming 23 PHP Syntax PHP is denoted in the page with opening and closing tags as follows: 11/5/2024 Open Source Programming 24 PHP Programs Code Result My First PHP Program 11/5/2024 Open Source Programming 25 PHP Programs Code Result 11/5/2024 Open Source Programming 26 Data Type PHP Datatypes String “ghghhghj” or ’ghgjhjlkl’ $a= “gshdgsjhdj” Integer 10 20 40 2323232323 $a= 10 Float (floating point numbers - also called double) $b=10.5 Boolean True or False , 1 or 0 Array $a= 10 20 30 40 Object(class concept) NULL(Null is a special data type which can have only one value: NULL. A variable of data type NULL is a variable that has no value assigned to it.) Resource – link (The special resource type is not an actual data type. It is the storing of a reference to functions and resources external to PHP.) PHP is an untyped language – variables type can change on the fly. 11/5/2024 Open Source Programming 27 Constants Constants are defined in PHP by using the define( ) function. define(name,value);  constant() function This function will return the value of the constant. define(“NCST”, “National Centre for Software Technology”)

Use Quizgecko on...
Browser
Browser