SlideShare uma empresa 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]

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante 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
 

Semelhante 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

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
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
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
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
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

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.