SlideShare una empresa de Scribd logo
1 de 28
An Introduction to IBM WebSphere sMash for PHP Programmers       Jonathan Lawrence & Robin Fernandes Software Developers, WebSphere Development, IBM projectzero.org
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
What is WebSphere sMash? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is WebSphere sMash? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WebSphere sMash for the application long tail Usage Number of Applications Java Enterprise Edition For business department and mid-market customers looking for rapidly developed agile applications, short implementation cycles and ways to easily reuse existing investments. Time to value is more important than enduring value  Strategic, long-lived applications Dynamic Scripting Application Server
Accelerate business and IT alignment  Speed Simplicity Agility Dynamic scripting languages Templates & pre-built services No-charge, robust browser & Eclipse based tooling Simply create rich Web 2.0 interfaces  Application “is” the server Clean, short-lived runtime
Speed WebSphere sMash is easy for  developers  to access, learn, and use ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simplicity WebSphere sMash makes it simple to “mash-up” services and feeds ,[object Object],[object Object],[object Object]
Agility WebSphere sMash focuses on deploying applications, not servers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dynamic Scripting ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application-centric Runtime ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Modular Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Available Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
WebSphere sMash PHP Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP in WebSphere sMash Java Virtual Machine ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],P8 Runtime Interpreter/Compiler PHP runtime Java  Extensions C Extensions XAPI-J XAPI-C PDT2 Java- Bridge JAR JAR JAR JAR Groovy runtime WebSphere sMash  HTTP server Zero Programming Model DBGp Debug
Benefits of PHP in sMash. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP – Java Bridge – Basic use <?php java_import( &quot;java.util.Date&quot; ); $date  =  new  Date( 81 ,  9 ,  12 ); echo  $date  . PHP_EOL; // prints: Sun Oct 11 00:00:00 BST 1981 java_import( &quot;java.util.HashMap&quot; ); $map  =  new  HashMap(); $map ->put( &quot;stuff&quot; ,  array ( 1 , 2 , 3 , 4 , 5 )); var_dump( $map ->get( &quot;stuff&quot; )); // prints: array(5) { ... Access Java methods and fields from PHP  <?php java_import( &quot;java.lang.System&quot; ); echo  System::currentTimeMillis(); try  { System::getProperty( FALSE ); }  catch  (JavaException  $exception ) { echo  $exception ->getMessage(); } Static methods and fields are accessible too Types are automatically converted at boundary of PHP runtime Java exceptions can be caught and handled in PHP
Java Bridge – Extending Java in PHP <?php java_import( &quot;java.io.File&quot; ); class  SubFile  extends  File { function  SuperFile( $path ) { parent ::__construct( $path ); } function  isThisCool() { return TRUE ;  // Way cool } } $file  =  new  Sub File( &quot;/&quot; ); var_dump( $file ->isDirectory()); var_dump( $file ->isThisCool()); PHP classes can extend Java classes
PHP- Java Bridge – Iterators and Overloads Signatures provide explicit control for overloaded methods <?php java_import( &quot;java.util.ArrayList&quot; ); $list  =  new  ArrayList(); $list ->add( &quot;Hello World!&quot; ); $list ->add( FALSE ); $list ->add( 1234567890 ); foreach  ( $list  as  $key  =>  $value ) { echo  &quot; $key   $value &quot; ; } Java iteration is bridged into PHP <?php java_import( &quot;java.lang.String&quot; ); $signature  =  new  JavaSignature(JAVA_INT); var_dump(String::valueOf( $signature ,  1234567890 ));
Java Bridge – More features… <?php java_import( &quot;java.math.BigDecimal&quot; , NULL,  FALSE ,  &quot;My_BigDecimal&quot; ); $value  =  new  My_BigDecimal( &quot;1.18E+10&quot; ); echo  $value ; Import a Java class under a different name to avoid clashes <?php java_import( &quot;java.lang.Comparable&quot; ); echo (ReflectionClass::export( &quot;Comparable&quot; )); PHP reflection works on Java classes <?php java_import( &quot;java.io.File&quot; ); $file  =  new  File( &quot;/home/robinf&quot; ); var_dump( $file ->Parent); //equivalent to: var_dump( $file ->getParent()); Java bean support provides field access for get/set method calls
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Some PHP Applications that run on sMash Forums CRM wiki Desktop Virtualisation Ajax Debugging Content Management Blogging FirePHP
Features we didn’t cover ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Project Zero –  projectzero.org ,[object Object],[object Object],[object Object],[object Object],[object Object],Visit   http://projectzero.org Project Zero is the development and incubation community around WebSphere sMash  Come to our stand for more demos!
Legal Notices ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

108 advancedjava
108 advancedjava108 advancedjava
108 advancedjavaAnil Kumar
 
Laravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingLaravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingChristopher Pecoraro
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jaojedt
 
sMash at May NYPHP UG
sMash at May NYPHP UGsMash at May NYPHP UG
sMash at May NYPHP UGProject Zero
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Dilouar Hossain
 
Securing Your Web Server
Securing Your Web ServerSecuring Your Web Server
Securing Your Web Servermanugoel2003
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling ResolutionDEEPAK KHETAWAT
 
Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015iScripts
 
AMF Testing Made Easy! DeepSec 2012
AMF Testing Made Easy! DeepSec 2012AMF Testing Made Easy! DeepSec 2012
AMF Testing Made Easy! DeepSec 2012Luca Carettoni
 
Laravel Restful API and AngularJS
Laravel Restful API and AngularJSLaravel Restful API and AngularJS
Laravel Restful API and AngularJSBlake Newman
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationAjax Experience 2009
 
AEM - Binary less replication
AEM - Binary less replicationAEM - Binary less replication
AEM - Binary less replicationAshokkumar T A
 

La actualidad más candente (20)

Getting started with laravel
Getting started with laravelGetting started with laravel
Getting started with laravel
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
 
Laravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingLaravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routing
 
What Is Hobo ?
What Is Hobo ?What Is Hobo ?
What Is Hobo ?
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
 
CakePHP
CakePHPCakePHP
CakePHP
 
sMash at May NYPHP UG
sMash at May NYPHP UGsMash at May NYPHP UG
sMash at May NYPHP UG
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
Securing Your Web Server
Securing Your Web ServerSecuring Your Web Server
Securing Your Web Server
 
Laravel Tutorial PPT
Laravel Tutorial PPTLaravel Tutorial PPT
Laravel Tutorial PPT
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling Resolution
 
Php&amp;yii2
Php&amp;yii2Php&amp;yii2
Php&amp;yii2
 
Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015
 
Tech talk webtech
Tech talk webtechTech talk webtech
Tech talk webtech
 
Laravel Eloquent ORM
Laravel Eloquent ORMLaravel Eloquent ORM
Laravel Eloquent ORM
 
AMF Testing Made Easy! DeepSec 2012
AMF Testing Made Easy! DeepSec 2012AMF Testing Made Easy! DeepSec 2012
AMF Testing Made Easy! DeepSec 2012
 
Laravel Restful API and AngularJS
Laravel Restful API and AngularJSLaravel Restful API and AngularJS
Laravel Restful API and AngularJS
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
AEM - Binary less replication
AEM - Binary less replicationAEM - Binary less replication
AEM - Binary less replication
 

Similar a An Introduction to Websphere sMash for PHP Programmers

PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQLbmani
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the restgeorge.james
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Mixing Java and PHP with Sugar and WebSphere
Mixing Java and PHP with Sugar and WebSphereMixing Java and PHP with Sugar and WebSphere
Mixing Java and PHP with Sugar and WebSpherejdlea
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
A Microsoft primer for PHP devs
A Microsoft primer for PHP devsA Microsoft primer for PHP devs
A Microsoft primer for PHP devsguest0a62e8
 
Survey of restful web services frameworks
Survey of restful web services frameworksSurvey of restful web services frameworks
Survey of restful web services frameworksVijay Prasad Gupta
 
Web forms and server side scripting
Web forms and server side scriptingWeb forms and server side scripting
Web forms and server side scriptingsawsan slii
 
Everyone loves PHP
Everyone loves PHPEveryone loves PHP
Everyone loves PHPAbhijit Das
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Hamed Hatami
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Ido Flatow
 
Unleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformUnleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformSébastien Morel
 

Similar a An Introduction to Websphere sMash for PHP Programmers (20)

Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQL
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Mixing Java and PHP with Sugar and WebSphere
Mixing Java and PHP with Sugar and WebSphereMixing Java and PHP with Sugar and WebSphere
Mixing Java and PHP with Sugar and WebSphere
 
Mashups
MashupsMashups
Mashups
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
A Microsoft primer for PHP devs
A Microsoft primer for PHP devsA Microsoft primer for PHP devs
A Microsoft primer for PHP devs
 
Survey of restful web services frameworks
Survey of restful web services frameworksSurvey of restful web services frameworks
Survey of restful web services frameworks
 
Web forms and server side scripting
Web forms and server side scriptingWeb forms and server side scripting
Web forms and server side scripting
 
Everyone loves PHP
Everyone loves PHPEveryone loves PHP
Everyone loves PHP
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
php
phpphp
php
 
Lamp
LampLamp
Lamp
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Unleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformUnleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ Platform
 

Último

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Último (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

An Introduction to Websphere sMash for PHP Programmers

  • 1. An Introduction to IBM WebSphere sMash for PHP Programmers Jonathan Lawrence & Robin Fernandes Software Developers, WebSphere Development, IBM projectzero.org
  • 2.
  • 3.
  • 4.
  • 5. WebSphere sMash for the application long tail Usage Number of Applications Java Enterprise Edition For business department and mid-market customers looking for rapidly developed agile applications, short implementation cycles and ways to easily reuse existing investments. Time to value is more important than enduring value Strategic, long-lived applications Dynamic Scripting Application Server
  • 6. Accelerate business and IT alignment Speed Simplicity Agility Dynamic scripting languages Templates & pre-built services No-charge, robust browser & Eclipse based tooling Simply create rich Web 2.0 interfaces Application “is” the server Clean, short-lived runtime
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. PHP – Java Bridge – Basic use <?php java_import( &quot;java.util.Date&quot; ); $date = new Date( 81 , 9 , 12 ); echo $date . PHP_EOL; // prints: Sun Oct 11 00:00:00 BST 1981 java_import( &quot;java.util.HashMap&quot; ); $map = new HashMap(); $map ->put( &quot;stuff&quot; , array ( 1 , 2 , 3 , 4 , 5 )); var_dump( $map ->get( &quot;stuff&quot; )); // prints: array(5) { ... Access Java methods and fields from PHP <?php java_import( &quot;java.lang.System&quot; ); echo System::currentTimeMillis(); try { System::getProperty( FALSE ); } catch (JavaException $exception ) { echo $exception ->getMessage(); } Static methods and fields are accessible too Types are automatically converted at boundary of PHP runtime Java exceptions can be caught and handled in PHP
  • 20. Java Bridge – Extending Java in PHP <?php java_import( &quot;java.io.File&quot; ); class SubFile extends File { function SuperFile( $path ) { parent ::__construct( $path ); } function isThisCool() { return TRUE ; // Way cool } } $file = new Sub File( &quot;/&quot; ); var_dump( $file ->isDirectory()); var_dump( $file ->isThisCool()); PHP classes can extend Java classes
  • 21. PHP- Java Bridge – Iterators and Overloads Signatures provide explicit control for overloaded methods <?php java_import( &quot;java.util.ArrayList&quot; ); $list = new ArrayList(); $list ->add( &quot;Hello World!&quot; ); $list ->add( FALSE ); $list ->add( 1234567890 ); foreach ( $list as $key => $value ) { echo &quot; $key $value &quot; ; } Java iteration is bridged into PHP <?php java_import( &quot;java.lang.String&quot; ); $signature = new JavaSignature(JAVA_INT); var_dump(String::valueOf( $signature , 1234567890 ));
  • 22. Java Bridge – More features… <?php java_import( &quot;java.math.BigDecimal&quot; , NULL, FALSE , &quot;My_BigDecimal&quot; ); $value = new My_BigDecimal( &quot;1.18E+10&quot; ); echo $value ; Import a Java class under a different name to avoid clashes <?php java_import( &quot;java.lang.Comparable&quot; ); echo (ReflectionClass::export( &quot;Comparable&quot; )); PHP reflection works on Java classes <?php java_import( &quot;java.io.File&quot; ); $file = new File( &quot;/home/robinf&quot; ); var_dump( $file ->Parent); //equivalent to: var_dump( $file ->getParent()); Java bean support provides field access for get/set method calls
  • 23.
  • 24.
  • 25. Some PHP Applications that run on sMash Forums CRM wiki Desktop Virtualisation Ajax Debugging Content Management Blogging FirePHP
  • 26.
  • 27.
  • 28.