PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities:



Similar documents
Apache Jakarta Tomcat

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

Effective Java Programming. efficient software development

Build management & Continuous integration. with Maven & Hudson

Glassfish, JAVA EE, Servlets, JSP, EJB

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Java with Eclipse: Setup & Getting Started

Developing modular Java applications

Meister Going Beyond Maven

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

How To Write An Ria Application

WEBLOGIC ADMINISTRATION

Rich Internet Applications

How To Write A Web Framework In Java

BIRT Application and BIRT Report Deployment Functional Specification

CloudLinux is a proven solution for shared hosting providers that:

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

Learning GlassFish for Tomcat Users

Develop Hybrid Mobile Applications with Apache Cordova & PhoneGap Enterprise

Ruby on Rails in GlassFish Sun Microsystems

JRuby Now and Future Charles Oliver Nutter JRuby Guy Sun Microsystems

AJAX Toolkit Framework

Jonathan Worthington Scarborough Linux User Group

Modern Software Development Tools on OpenVMS

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Continuous Integration The Full Monty Artifactory and Gradle. Yoav Landman & Frederic Simon

This presentation will provide a brief introduction to Rational Application Developer V7.5.

Zulu by Azul OpenJDK for Azure

Hudson configuration manual

CS 4240: Principles of Software Design. Course Introduction. Tom Horton

Preface. Motivation for this Book

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

What servlets and JSP are all about

Whitepaper. Rich Internet Applications. Frameworks Evaluation. Document reference: TSL-SES-WP0001 Januar

Nanda Kishor K N. nandakishorkn@gmail.com

Web Development with the Eclipse Platform

Java Platform, Micro Edition (Java ME) Mokoena F.R. The 7046 Team

Rational Application Developer Performance Tips Introduction

Write Once, Run Anywhere Pat McDonough

Java Application Developer Certificate Program Competencies

Web Development News, Tips and Tutorials

THE OPEN SOURCE DEVELOPER REPORT

A review and analysis of technologies for developing web applications

WIRIS quizzes web services Getting started with PHP and Java

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Rapid Application Development. and Application Generation Tools. Walter Knesel

Migrating Applications From IBM WebSphere to Apache Tomcat

Java Mission Control

Eclipse Web Tools Platform. Naci Dai (Eteration), WTP JST Lead

Netbeans 6.0. José Maria Silveira Neto. Sun Campus Ambassador

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Oracle Application Development Framework Overview

System Architecture V3.2. Last Update: August 2015

What means extensibility?

SOFTWARE TESTING TRAINING COURSES CONTENTS

ORACLE MOBILE APPLICATION FRAMEWORK DATA SHEET

Web and Mobile development Engineer

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

CSCI E 98: Managed Environments for the Execution of Programs

ASP.NET: THE NEW PARADIGM FOR WEB APPLICATION DEVELOPMENT

IBM WebSphere Server Administration

QL Integration into Scala and Excel. Martin Dietrich

Web Programming Languages Overview

Ruby on Rails. a high-productivity web application framework. blog.curthibbs.us/ Curt Hibbs <curt@hibbs.com>

2011 Marty Hall An Overview of Servlet & JSP Technology Customized Java EE Training:

Web Development Frameworks

An Oracle White Paper May Oracle Tuxedo: An Enterprise Platform for Dynamic Languages

Credits: Some of the slides are based on material adapted from

<Insert Picture Here> What's New in NetBeans IDE 7.2

Sonatype CLM for Maven. Sonatype CLM for Maven

Oracle WebLogic Server 11g Administration

Converting Java EE Applications into OSGi Applications

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

COURSE CONTENT Big Data and Hadoop Training

SCA & SDO Implementations Open Source and Vendor Products

Deploying and Managing SolrCloud in the Cloud ApacheCon, April 8, 2014 Timothy Potter. Search Discover Analyze

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Introduction to Sun ONE Application Server 7

Application Servers G Session 2 - Main Theme Page-Based Application Servers. Dr. Jean-Claude Franchitti

Openbus Documentation

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

A Performance Comparison of Web Development Technologies to Distribute Multimedia across an Intranet

Course Number: IAC-SOFT-WDAD Web Design and Application Development

GlassFish. Developing an Application Server in Open Source

A Tool for Evaluation and Optimization of Web Application Performance

General Introduction

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Real time vehicle tracking and driver behaviour monitoring using cellular handset based accelerometer and GPS data

ASP &.NET. Microsoft's Solution for Dynamic Web Development. Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon

JBoss Enterprise Middleware. The foundation of your open source middleware reference architecture

Apache Stratos Building a PaaS using OSGi and Equinox. Paul Fremantle CTO and Co- Founder, WSO2 CommiCer, Apache Stratos

Introduction to Cloud Computing. Lecture 02 History of Enterprise Computing Kaya Oğuz

Transcription:

PHP vs. Java *This document reflects my opinion about PHP and Java. I have written this without any references. Let me know if there is a technical error. --Hasari Tosun It isn't correct to compare Java to PHP. Since PHP is a server-side scripting language whereas Java is a general-purpose language. In other words, PHP is only used as a server-side language where Java is both for server-side and desktop programming language. Moreover, Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language. Hence, only for server-side programming, the comparison between Java and PHP makes sense. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities: Strongly typed languages vs. dynamic Languages or Scripting Ajax vs. Smart Clients Web Architecture Web Architecture for PHP Programmer

Web Architecture for Java Programmer Programmers There are millions of bad programmers: Both Java and PHP programmers. Everybody is a PHP programmer. Even monkeys! Almost all web hosting companies use Apache Server/PHP. Changing or creating a page in PHP is easy: Updating a page: <?php echo Hello Web?> to <?php echo Hello Web 2.0?> Creating a page: Use Drupal, WordPress, Xoops, Php-Nuke etc For JSP (Java) it is also easy to change or create a page. However, for a complex application, monkeys cannot do programming in Java.

Language features & libraries Java is OO. So is PHP now (PHP 5.0). Java Provides reflection (reverse-engineer classes, interfaces, functions). PHP is finally added the same feature in PHP 5.0. Note: Reflection enable you to architecture your application better. Java has a richer set of API. Java provides management API (JMX) for managing and monitoring devices and applications. There thousands of OSS projects for Java (apache.org). Java provides a clean mechanism to combine these libraries (jar) to compose a complex application. Java provides native transaction mechanism. Java has a persistence mechanism to convert Java objects to database table entries and table entries to Java objects. Java has annotations: Annotations can be used for both compile-time and run-time. Java has thread support: Executing tasks in parallel. There are many other languages that can run within Java or on JVM (Ruby, Groovy, Python, JavaFX etc). Language Tools Editors - Java has many fabulous editors: Eclipse, Netbeans and Intellij. For the productivity and the management of big project code, a complex editor is essential. - PHP has a plug-in for Netbeans and Eclipse but very limited. Debugging - All Java editors allow you to debug your project within the editor. - PHP debugging is just print statements. Packaging and Deployment - Java has many packaging and deployment utilities: Ant, Maven, Editors, Web Start etc. - Java has packaging requirements: Web archive Files (war), Java Archive Files (jar). - Compilation/Packaging protects your intellectual properties (IP) - PHP are just files. No packaging concept.

Security Java Application servers enforce security model. Each application runs in its own container. Java/JVM has its own extensive security framework. No security guarantees from PHP: Administrators run PHP in CGI mode in order to avoid security nightmare. That is, PHP engine is forked for each page hit. Even Administrator chroots (each time to you hit a page) for security. Performance JVM is optimized for performance and memory footprint: Just- In-Time-Compilation (JIT). Java compiles JSP files and JITs hot spots automatically. PHP parses the file and output the stream for each call. No compilation. Furthermore, in CGI model compilation doesn t make sense. JVM has garbage collection (Memory Management). JVM has object caching mechanism. In Java Application Server, you could do connection-pooling. That is, a pool of connections can be shared by different client requests. In Java, the session is maintained on the server for the client where in CGI model session is destroyed each time.

Web 2.0+ Language Requirements Feature Java PHP Garbage Collection Object Caching Re-targetable (Mobile, JVM Desktop, Web etc). Massively Distributed There are a few Java OSS: JavaSpace, Hadoop. All application servers support clustering. Persistent Session mod_php in Apache. But, no one tries it for security JIT JVM support Connection Pooling Rich API Too much Very little Security Packaging and deployment Debugging Editors Many Primitive Tools Many Very few Persistence Mechanism Third party libraries Transaction Mechanism Reflection Application Management API OO for a sound Limited Architecture Rich UI support Applet, Swing, JSF, JavaFX but not quite right Annotations Internationalization(i18N)/ Not sure Localization(i10N) Threads