World Library  
Flag as Inappropriate
Email this Article

Project Zero

Article Id: WHEBN0012212167
Reproduction Date:

Title: Project Zero  
Author: World Heritage Encyclopedia
Language: English
Subject: PHP/Java Bridge, PHP, HipHop for PHP, Hack (programming language), HipHop Virtual Machine
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Project Zero

WebSphere sMash
WebSphere sMash Screenshot running
Developer(s) IBM
Stable release 1.1.1 / June 1, 2009 (2009-06-01)
Written in Java
Type Application Server
License Proprietary
Website .org.projectzerowww

WebSphere sMash is a development and runtime environment from IBM for the creation of dynamic web applications using the scripting languages Groovy and PHP. It contains a PHP runtime written in Java. Project Zero is the experimental software development community in which new versions of WebSphere sMash are incubated.

WebSphere Smash integrates with Eclipse and produces REST-style services on top of Groovy or PHP .[1]

Architecture

There are a number of distinguishing aspects to the architecture of WebSphere sMash.

Event-driven programming model

WebSphere sMash uses an event-driven programming model. Applications are typically composed of a number of small modules which communicate with each other by firing events which are then caught by other handlers that have registered to catch the events. The code firing the event does not have any knowledge of the code that will handle the event. This architecture allows application to be built up from a mixture of code written using PHP, Java, Groovy or the Flow language.

Global context

Since events are stateless, a mechanism is required to share data between event handlers. This mechanism is the Global Context. The Global context functions basically as a large map of data divided up into various zones with different lifetimes, properties and persistence.

Repository management system

sMash makes use of the Ivy dependency manager. sMash applications are composed of models which can specify dependencies on other modules which may be present in a local Ivy repository or which can be fetched from a remote repository. IBM maintains a repository of useful modules at projectzero.org and dependencies can also be specified on the maven2 repository.

PHP support

The PHP support in WebSphere sMash is provided by a PHP runtime implemented in Java.[2] PHP scripts are compiled into Java bytecode which then run on the Java Virtual Machine (JVM). This is similar in concept to the approach taken by other projects such as JRuby and Jython, which run the Ruby and Python languages, respectively, against the JVM. Running on the JVM allows direct, same process calls between PHP, Java and Groovy code allowing applications to be assembled using a variety of languages.

In contrast to the approach taken by Quercus, the other JVM based PHP implementation, sMash is able to re-use existing PHP extensions from PHP.net attaching them to the Java virtual machine via the Java Native Interface (JNI) and an API layer called XAPI-C.

The runtime has a DBGp debug port allowing debug access from IDEs and debuggers which support the DBGp protocol such as the Eclipse PDT project.

The PHP runtime does not have an identity outside of sMash so it is simply referred to as the "WebSphere sMash runtime for PHP."

As of October 2008 WebSphere sMash is capable of running several well-known PHP applications on a Java Virtual Machine. These include SugarCRM,[3] phpBB,[4] WordPress [5] and MediaWiki.[6]

The PHP runtime supports close integration with the Java and Groovy languages through its Java/Groovy bridge. This allows PHP scripts to use libraries written in Java and Groovy through a lightweight and extremely fast interop layer. The Groovy bridge allows advanced features from Groovy to be accessed directly from PHP. Examples include closures and Groovy metaobjects.

See also

References

  1. ^ "About Project Zero". Project Zero Site. Retrieved 2008-06-23. 
  2. ^ "Project Zero PHP page". Project Zero PHP page. Retrieved 2009-02-02. 
  3. ^ "Smash4Sugar project at SugarForge". Smash 4 Sugar. Retrieved 2008-06-30. 
  4. ^ "PhpBB running on Project Zero". phpBB on PZ. Retrieved 2008-06-30. 
  5. ^ "Try out PHP Application WordPress on sMash". WordPress on PZ. Retrieved 2008-10-09. 
  6. ^ "Try out PHP Application MediaWiki on sMash". MediaWiki on PZ. Retrieved 2008-10-19. 

External links

  • OSS Developers: Project Zero Aims for Next-Gen Web Applications
  • IBM WebSphere sMash V1.1.0 brings smart application development to businesses
  • sMash data access with pureQuery
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.