SlideShare une entreprise Scribd logo
1  sur  102
Web 2.0 and RESTful Applications with WebSphere sMash and PHP  Roland Barcia - STSM,  WebSphere Lab Services, Lead Web 2.0 Architect
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
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]
sMash Core Values ,[object Object],[object Object],Speed ,[object Object],[object Object],Agility ,[object Object],[object Object],Simplicity
Dynamic Scripting ,[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]
Simple Deployment ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scalability ,[object Object],[object Object],[object Object],[object Object],[object Object]
Browser-based Tooling Dynamic Scripting Editor Visual UI Editor Visual Assembly Editor Agility in Dynamic Scripting  – Groovy / PHP Simplicity in constructing web pages  (Javascript) Speed in scripting / assemble activities into a flow
Versions of WebSphere sMash RTE http://projectzero.org (Reliable Transport Extension) (Developer Edition) DE Free download!  WebSphere sMash + development tooling. Restricted production use. The runtime environment. Available under a standard IBM commercial license. Allows sMash apps to communicate with one another using asynch-ronous messages . Project Zero Free download!  Bleeding edge version.
Version History 2008 1.0 1.0.0.1 1.0.0.2 1.0.0.3 1.1 1.1.0.1 June July August October December April 2009
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Events ,[object Object],[object Object],[object Object]
Event Handlers ,[object Object],[object Object],PHP <?php class Employees { function onGET() { echo &quot;Response from a GET request&quot;; } function onPUT() { echo &quot;Response from a PUT request&quot;; } function onPOST() { echo &quot;Response from a POST request&quot;; } function onDELETE() { echo &quot;Response from a DELETE request&quot;; } }?> PHP <?php echo &quot;Response from a &quot;.get('/request/method'). &quot; request&quot;; ?> Groovy println &quot;Response from a $request.method[]&quot; Groovy def onGET() { println &quot;Response from a GET request&quot; } def onPUT() { println &quot;Response from a PUT request&quot; } def onPOST() { println &quot;Response from a POST request&quot; } def onDELETE() { println &quot;Response from a DELETE request&quot; }
Global Context – State Management ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Global Context Zones preserved  State discarded  State preserved  Application  App  discarded  State discarded  State discarded  Application  Tmp  discarded  State discarded  State discarded  Event / Thread Connection preserved State preserved  State preserved  Application  Storage  preserved  State discarded  State preserved  Session denoted by zsessionid  User  discarded  State reloaded from config files  State reloaded from config files  Application  Config  discarded  State discarded  State discarded  Event / Thread  Event  discarded  State discarded  State discarded  Request / Thread  Request  User modified data  User Initiated Restart  Automatic Recycle  Scope  Zone
Accessing the Global Context ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Java String path = GlobalContext.zget(&quot;/request/path&quot;); GlobalContext.zput(&quot;/tmp/cachedData&quot;,someVar); ArrayList config = GlobalContext.zlist(&quot;/config&quot;); PHP <?php // Get the URI from the request. $uri  =  zget(&quot;/request/uri&quot;); echo &quot;<br/>$uri&quot;; // Get the user agent $header =  zget(&quot;/request/headers/in/User-Agent&quot;); echo &quot;<br/>$header&quot;; // List all the parameters. $params =  zlist(&quot;/request/params&quot;,false); echo &quot;<br/>The parameters<br/>&quot;; var_dump($params); // Put the status. zput(&quot;/request/status&quot;,200); // Delete a key. zdelete(&quot;/request/some_unwanted_key&quot;); // Add a header value 'no-cache' zpost(&quot;/request/headers/out/Cache-Control&quot;,&quot;no-cache&quot;); // secured pages only. $remoteU =  zget(&quot;/request/subject#remoteUser&quot;); $group  =  zget(&quot;/request/subject#groups&quot;); $roles  =  zget(&quot;/request/subject#roles&quot;); ?> Groovy Shortcuts def path = request.path[];  // same as zget() user.count[] = i  // same as zput()
Value Pathing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Maps  (PHP Examples) // Create or Replace existing Map zput(&quot;/app/myMap&quot;, $arr) // Add or replace an existing item in a Map zput(&quot;/app/myMap#foo&quot;, &quot;bar&quot;) //Create or Merge into existing Map. zpost(&quot;/app/myMap&quot;, $arr)  //Returns the map $arr = zget(&quot;/app/myMap&quot;) // Returns entry  $key = zget(&quot;/app/myMap#foo&quot;)  //Deletes Map zdelete(&quot;/app/myMap&quot;)  // Removes entry zdelete(&quot;/app/myMap#foo&quot;)  (Groovy Example) app.myMap['foo'] = 'bar' Lists  (PHP Examples) //Set or Replace list element zput(&quot;/app/myList#0&quot;, &quot;bar&quot;) (Groovy Example) app.myList[0] = &quot;bar&quot;
Application Directory Layout This directory is created by the WebSphere sMash runtime on behalf of the application to hold any generated files.  Developers do not need to maintain or edit files in this directory.  .zero The IVY dependency report shows details of the dependencies that you have on extension modules. reports The Web accessible root folder of the application.  Can contain html files, images, dynamic server scripts like .php and .groovy files, JavaScript, etc…  public The log and trace files produced by your running application. logs Additional jar files that are required by your application. lib The Java source files. java The configuration files of your application config The java class files that are part of an application.  classes The scripts and templates for key components app Description Directory
app and config JSON based Resources Models leveraging ZRM. app/models Script implementation of views.  Represents rendering logic. app/views Shared Scripts within an application, not directly accessible via URI. app/scripts Set of RESTful resources for an application.  app/resources Custom error pages that handle specific errors app/errors Description Directory Runtime configuration file for your application.  Populates the config zone of GC.  config/zero.config Configuration for dependency management of your application.  config/ivy.xml Description Directory
Dependencies and Ivy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<ivy-module version=&quot;1.3&quot;>  <info packagingType=&quot;unknown&quot; module=&quot;ConsumerIncentiveApp&quot; organisation=&quot;zero&quot; revision=&quot;1.0.0&quot;>  <license name=&quot;type of license&quot; url=&quot;http://license.page&quot;/>  <ivyauthor name=&quot;author name&quot; url=&quot;http://authors.home.page&quot;/>  <description homepage=&quot;http://module.description.page&quot;/>  </info>  <publications>  <artifact name=&quot;ConsumerIncentiveApp&quot; type=&quot;zip&quot; org=&quot;zero&quot;/>  </publications>  <dependencies>  <dependency org=&quot;zero&quot; name=&quot;zero.core&quot; rev=&quot;[1.0.0.0, 2.0.0.0[&quot;/>  <dependency org=&quot;org.apache.derby&quot; name=&quot;derby&quot; rev=&quot;10+&quot;/>  <dependency org=&quot;zero&quot; name=&quot;zero.data&quot; rev=&quot;[1.0.0.0, 2.0.0.0[&quot;/>  </dependencies>  </ivy-module>
Virtualized Directory ,[object Object],[object Object]
Configuration – zero.config ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],# Value set  /config/http/port = 8080  # List set  /config/resources/defaultExtensions = [&quot;.groovy&quot;]  # List append   /config/bindings/.groovy += [&quot;zero.core.groovysupport.bindings.DefaultBindings&quot;]  # Map set  /config/test/map = { &quot;a&quot; : &quot;b&quot;, &quot;c&quot; : &quot;d&quot; }  # Map append  /config/test/mapappend += { &quot;a&quot; : &quot;b&quot;, &quot;c&quot; : &quot;d&quot; }  /config/test/mapappend += { &quot;x&quot; : &quot;y&quot;, &quot;w&quot; : &quot;z&quot; } # Event handler  /config/handlers += [{  &quot;events&quot; : &quot;GET&quot;,  &quot;handler&quot; : &quot;custom.Handler.class&quot; }]  # Value reference (insert value read at config-load time)  /config/property/myPrefix = &quot;/foo/bar“ /config/test/value = &quot;${/config/property/myPrefix}/bat“ # Variable set/value reference  myPrefix = &quot;/foo/bar&quot;  /config/test/value = &quot;${myPrefix}/bat&quot;  # Include  @include &quot;${/config/dependencies/zero.core}/config/security/form.config&quot; { &quot;formLoginPage&quot; : &quot;/login&quot; }
Web 2.0 Applications?  Simple to use Simple to access ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],* A term coined by Tim O‘Reilly  ( http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html  )
What is REST? ,[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],[object Object],[object Object]
RESTful Web Services  ,[object Object],[object Object],[object Object],[object Object]
REST Misconceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REST Web Services  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Verbs (Actions) ,[object Object],[object Object],Operation HTTP Method API Comments Codes Create Resource POST or PUT HTTP PUT with data to the new resource URI Creates the new resource, does not return the resource 200 (success), 201 (created),400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 410 (gone)‏ Retrieve Resource GET HTTP GET with the resource URI Returns the resource if found 200 (success), 304 (unmodified), 403 (forbidden), 404 (not found), 410 (gone)‏ Update Resource PUT HTTP PUT with data to the existing resource URI Replaces the current resource representation with the data 200 (success), 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 409 (conflict), 410 (gone)‏ Delete Resource DELETE HTTP DELETE with the resource URI Deletes the resource, does not return the resource 200 (success), 204 (no content), 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 410 (gone)‏ Get information about a resource OPTIONS HTTP OPTIONS with the resource URI Returns information about the options or requirements associated with the resource 200 (success), 404 (not found), 410 (gone)‏ Test a resource link HEAD HTTP HEAD with the resource URI Returns same information as a GET without the body.  Used for testing links 200 (success), 304 (unmodified), 403 (forbidden), 404 (not found), 410 (gone)‏
Algorithmic Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Verb Collection  Member GET Returns a list of all previous transfers /Transfer/344 Returns record of specific Transfer POST Executes new Transfer.!! Could retry failed transfer PUT Not Supported Could Change parameters of transfer still in progress.  DELETE Not Supported Cancel/Purge Transfer
Default Handlers ,[object Object],[object Object],PHP <?php class Employee { function onGET() { echo &quot;Response from a GET request&quot;; } function onPUT() { echo &quot;Response from a PUT request&quot;; } function onPOST() { echo &quot;Response from a POST request&quot;; } function onDELETE() { echo &quot;Response from a DELETE request&quot;; } }?> <?php switch (zget('/request/method')) { case 'GET': //GET handling break; case 'POST': //POST handling break; case 'DELETE': // DELETE handling break; case 'PUT': // PUT handling break; } ?>
Custom Handlers ,[object Object],[object Object],[object Object],PHP Resource Handler <?php class Handler  { function onGET() { echo &quot;Response from a GET request&quot;; } function onPUT() { echo &quot;Response from a PUT request&quot;; } function onPOST() { echo &quot;Response from a POST request&quot;; } function onDELETE() { echo &quot;Response from a DELETE request&quot;; } }?> zero.config  # Add a custom handler /config/handlers += [{ &quot;events&quot; : [&quot;GET&quot;,&quot;PUT&quot;,&quot;POST&quot;,&quot;DELETE&quot;], &quot;handler&quot; : &quot;handler.php&quot;, &quot;conditions&quot; : &quot;/request/path =~ /emp(/.*)?&quot;   }]
RESTful Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Delete member /people/1 DELETE Update member /people/1 PUT Retrieve member /people/1 GET Create member /people POST List members /people GET Description URI HTTP Method delete postMember update retrieve Member deleteCollection create putCollection list Collection DELETE POST PUT GET Resource
Resources on the Web ,[object Object],[object Object],[object Object],Delete DELETE Update JSON (object) PUT Retrieve JSON (object) GET /resources/rebate/{id} Specific Rebate Create JSON (object) POST List JSON (array) GET /resources/rebate Rebate list Description Representation Method URI Resource
Resource Handlers in Zero ,[object Object],[object Object],Description Event Method URI pattern Delete member delete DELETE PUT GET POST GET Create member create Replace member update /resources/collection/{id} /resources/collection Retrieve one member retrieve List of all members list
Resource Handlers  Example <?php // Initialization common to all operations $dataManager = data_manager('REBATE_DB'); class rebate { function onList() { global $dataManager; $renderType = $location = zget(&quot;/request/params/format&quot;); $rebateRecords = dataExec ($dataManager,  &quot;select * from rebate&quot;); zput('/request/headers/out/Content-Type', 'text/json');  echo json_encode($rebateRecords); } … http://<host>:<port>/resources/rebate Creates list event onList() handler in employee.groovy handles event
Resource Handlers  Example function onCreate() { global $dataManager; // Convert the raw JSON stream in to a PHP array $er = json_decode($HTTP_RAW_POST_DATA); $result = dataInsert($dataManager,  &quot;INSERT INTO Rebate (name,description,rebatetype,validfrom,validto,website) &quot;.  &quot;VALUES (?, ?, ?, ?, ?, ?)&quot;,  array('rebateid'),array($er['name'], $er['description'],  $er['rebatetype'],  $er['validfrom'], $er['validto'], $er['website'])); $locationUri = zget('/request/path') . &quot;/&quot; . @result; zput('/request/headers/out/Location', $locationUri); zput('/request/status', 204); } app/resources/rebate.php  (continued) Similarly POST to /resources/rebate triggers create event…
Resource Handlers  Example function onRetrieve() {  global $dataManager;  $rebateid = zget(&quot;/request/params/rebateId&quot;);  $rebateRecords = dataQueryFirst($dataManager, &quot;select * from rebate where rebateId = ?&quot;, array($rebateid));  if(isset($rebateRecords)) {  zput('/request/headers/out/Content-Type', 'text/json');  echo json_encode($rebateRecords);  } else {  zput(&quot;/request/status&quot;, 404);  $message = &quot;incentiveid &quot;. $incentiveid . &quot; not found.&quot;;  zput('/request/error/message', $message);  zput('/request/view', 'error');  render_view();  }  }  function onUpdate() {  global $dataManager;  $rebateid = zget(&quot;/request/params/rebateId&quot;);  $er = json_decode($HTTP_RAW_POST_DATA);  $user = zget('/request/subject#remoteUser');  $result = dataExec($dataManager, &quot;UPDATE rebate SET name=?, description=?, &quot;.  &quot;rebatetype=?, validfrom=?, validto=?, website=? WHERE rebateid=?&quot;,  array($er['name'], $er['description'], $er['rebatetype'], $er['validfrom'], $er['validto'], $er['website'], $rebateid));  if ($result != null) zput(&quot;/request/status&quot;, 204);  else {zput('/request/status', 503); echo &quot;Database query execution failure&quot;; }  }  function onDelete() {  global $dataManager;  $rebateid = zget(&quot;/request/params/rebateId&quot;);  $user = zget('/request/subject#remoteUser');  $result = dataExec($dataManager, &quot;DELETE FROM rebate WHERE rebateId=?&quot;, array($rebateid));  if ($result != null) zput(&quot;/request/status&quot;, 204);  else { zput('/request/status', 503); echo &quot;Database query execution failure&quot;; }  }  }  ?> app/resources/rebate.php  (continued) Similarly GET, PUT, and DELETE to /resources/rebate /333
Data formats – JavaScript Object Notation  ,[object Object],[object Object],{ “ name”:”John Smith”, “ id”:”/resources/employee/JohnSmith”, “ mgr”:”/resources/employee/JaneDoe” }
Data Format - XML
Data Format - ATOM
An alternative:  Zero Resource Model (ZRM) ,[object Object],[object Object],[object Object],[object Object],[object Object]
ZRM Development life cycle { &quot;fields&quot; : { &quot;first_name&quot;: {&quot;type&quot;:&quot;string&quot;}, &quot;last_name&quot;: {&quot;type&quot;:&quot;string&quot;}, &quot;location&quot;: {&quot;type&quot;:&quot;string&quot;} } } app/models/employee.json [ { &quot;type&quot;: &quot;employee&quot;, &quot;fields&quot;: { &quot;first_name&quot; :  &quot;Alice&quot;, &quot;last_name“  :  &quot;Rogers&quot;, &quot;location&quot;  :  &quot;Seattle&quot; } }, { &quot;type&quot;: &quot;employee&quot;, &quot;fields&quot;: { &quot;first_name&quot; :  &quot;Bill&quot;, &quot;last_name&quot;  :  &quot;Stevens&quot;, &quot;location&quot;  :  &quot;Seattle&quot; } }, { &quot;type&quot;: “employee&quot;, &quot;fields&quot;: { &quot;first_name&quot; :  &quot;Cathy&quot;, &quot;last_name&quot;  :  &quot;Tomlin&quot;, &quot;location&quot;  :  &quot;Boston&quot; } } ] app/models/fixtures/initial_data.json <?php zrm_delegate(); ?> app/resources/employee.php
Activity flows in a Nutshell Rick builds things for the palette  Rick scripts ad-hoc activities Linda designs the Web UI Frank strings together flow activities into solutions George builds flows, Web UIs and ad-hoc scripts
sMash Features and Services ,[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],[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why PHP? ,[object Object],[object Object],[object Object],[object Object],[object Object],TIOBE Programming Community Index (Sep 2008) ,[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],[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 xdebug 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/Groovy Interaction ,[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 Basic access to Java methods and fields - types are automatically converted at boundary of PHP runtime Static methods and fields are accessible by using the built in JavaClass class Java exceptions can be caught in PHP scripts
PHP- Java Bridge – Iterators and overloads Bridging between PHP and Java iterators Signatures provide explicit control for overloaded constructors and methods
Java Bridge – Importing Java Classes. Importing a Java class creates a PHP class that has the same shape
Java Bridge – Extending Java in PHP Extending a Java class inside PHP is possible but has some limitations Java bean access maps field access onto get/set method calls
Groovy Bridge – Importing Scripts
Other Groovy Bridge Features ,[object Object],[object Object],[object Object]
Invoking PHP - Events ,[object Object],[object Object],[object Object],[object Object],[object Object]
Invoking PHP - Script Activity in Flow
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
PHP Applications that run on sMash Forums CRM wiki Desktop Virtualisation Ajax Debugging Content Management Blogging FirePHP
PHP Applications ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ZSL develops Web 2.0 Assets 3x faster with WebSphere sMash ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Energy Commons Overview www.energycommons.com(Situational  Application) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Energy Commons Architecture Overview
SugarCRM Integration scenario MQ MQ
Demonstrations
Agenda ,[object Object],[object Object],[object Object],[object Object]
 
References ,[object Object],[object Object],[object Object],[object Object]
We love your Feedback! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
© IBM Corporation 2009. All Rights Reserved. The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views.  They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant.  While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way.  Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.  Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment.  The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed.  Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved.  Actual environmental costs and performance characteristics may vary by customer. The following are trademarks of the International Business Machines Corporation in the United States and/or other countries:  ibm.com/legal/copytrade.shtmlAIX, CICS, CICSPlex, DataPower, DB2, DB2 Universal Database, i5/OS, IBM, the IBM logo, IMS/ESA, Power Systems, Lotus, OMEGAMON, OS/390, Parallel Sysplex, pureXML, Rational, Redbooks, Sametime, SMART SOA, System z , Tivoli, WebSphere, and z/OS. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at ibm.com/legal/copytrade.shtml. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office Intel and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Backup
Nested URIs ,[object Object],[object Object],For example:  /resources/employees/Roland/accounts/FooTech def onList() { def empId = request.employeeId[]; def info = request.pathInfo[]; } def onList() { def empId = request.employeeId[]; def acctId = request.accountId[]; }
New Features
In-House Repository ,[object Object],[object Object],[object Object],IBM MyOrganization Repositories Publish
Data support ,[object Object],[object Object],[object Object],def allrows = data.queryList('SELECT_ALL') /config/db/reviewDB/statements = {  &quot;SELECT_ALL&quot;  : &quot;SELECT * FROM table&quot;,  &quot;SELECT_WHERE_IN&quot; : &quot;SELECT * FROM table WHERE id IN (?,?,?)&quot;,  &quot;INSERT&quot; : &quot;INSERT INTO table (col1, col2) VALUES (?,?)&quot;}
Excel Service
Excel Service { &quot;fields&quot;: {  &quot;Firstname&quot;: { &quot;type&quot;: &quot;string&quot; },  &quot;Lastname&quot;: { &quot;type&quot;: &quot;string&quot; },  &quot;Location&quot;: { &quot;type&quot;: &quot;string&quot; },  &quot;Gender&quot;: { &quot;type&quot;: &quot;string&quot; },  &quot;DateofEmployment&quot;: { &quot;type&quot;: &quot;date&quot; } } }  XLS ZRM [  {  &quot;type&quot;: &quot;employees&quot;,  &quot;fields&quot;: {  &quot;Firstname&quot;: &quot;Michael&quot;,  &quot;Lastname&quot;: &quot;Fraenkel&quot;,  &quot;Gender&quot;: “Male”  }  } ] Data
Unit Testing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Parallel Recycle sMash Server Requests X sMash Server sMash Server recyle recyle Without parallel recycle With parallel recycle
Admin Console
sMash in the Cloud ,[object Object],[object Object],[object Object],[object Object]
Samples ,[object Object],[object Object],[object Object]
Tighter integration with IBM Mashup Center ,[object Object],[object Object],[object Object]
iWidget Editor ,[object Object],[object Object]
PHP Applications ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP to Java/Groovy Bridge Access to Java types and methods Automatic conversions Exception handling
Assemble Flow ,[object Object],[object Object],[object Object],[object Object],[object Object]
AppBuilder
Source Editor
Page Editor
Search Dialog
Assemble Flow Editor
Zero Resource Model Editor
Zero Form Editor
Console
Debugger
Import ZIP file
 
 

Contenu connexe

Tendances

Java web programming
Java web programmingJava web programming
Java web programmingChing Yi Chan
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2pyjonromero
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Antonio Peric-Mazar
 
170517 damien gérard framework facebook
170517 damien gérard   framework facebook170517 damien gérard   framework facebook
170517 damien gérard framework facebookGeeks Anonymes
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical OverviewSvetlin Nakov
 
RESTful Web Services with JAX-RS
RESTful Web Services with JAX-RSRESTful Web Services with JAX-RS
RESTful Web Services with JAX-RSCarol McDonald
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 
Annotations in PHP: They Exist
Annotations in PHP: They ExistAnnotations in PHP: They Exist
Annotations in PHP: They ExistRafael Dohms
 
Eclipse Day India 2015 - Rest with Java (jax rs) and jersey
Eclipse Day India 2015 - Rest with Java (jax rs) and jerseyEclipse Day India 2015 - Rest with Java (jax rs) and jersey
Eclipse Day India 2015 - Rest with Java (jax rs) and jerseyEclipse Day India
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About RESTJeremy Brown
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To AntRajesh Kumar
 
Vlada Kulish - Why So Serial?
Vlada Kulish - Why So Serial?Vlada Kulish - Why So Serial?
Vlada Kulish - Why So Serial?OWASP Kyiv
 
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
 

Tendances (19)

Open Social Summit Korea
Open Social Summit KoreaOpen Social Summit Korea
Open Social Summit Korea
 
Java web programming
Java web programmingJava web programming
Java web programming
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2py
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
 
170517 damien gérard framework facebook
170517 damien gérard   framework facebook170517 damien gérard   framework facebook
170517 damien gérard framework facebook
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical Overview
 
Java presentation
Java presentationJava presentation
Java presentation
 
RESTful Web Services with JAX-RS
RESTful Web Services with JAX-RSRESTful Web Services with JAX-RS
RESTful Web Services with JAX-RS
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
Annotations in PHP: They Exist
Annotations in PHP: They ExistAnnotations in PHP: They Exist
Annotations in PHP: They Exist
 
Eclipse Day India 2015 - Rest with Java (jax rs) and jersey
Eclipse Day India 2015 - Rest with Java (jax rs) and jerseyEclipse Day India 2015 - Rest with Java (jax rs) and jersey
Eclipse Day India 2015 - Rest with Java (jax rs) and jersey
 
You suck at Memory Analysis
You suck at Memory AnalysisYou suck at Memory Analysis
You suck at Memory Analysis
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
 
Vlada Kulish - Why So Serial?
Vlada Kulish - Why So Serial?Vlada Kulish - Why So Serial?
Vlada Kulish - Why So Serial?
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
Spring aop
Spring aopSpring aop
Spring aop
 

En vedette

El aguila PEREZ QUIEJ
El aguila PEREZ QUIEJEl aguila PEREZ QUIEJ
El aguila PEREZ QUIEJYulisa Pérez
 
Patterns ofbuildinglegos
Patterns ofbuildinglegosPatterns ofbuildinglegos
Patterns ofbuildinglegosKyle Brown
 
IBM Iot Foundation
IBM Iot FoundationIBM Iot Foundation
IBM Iot FoundationKyle Brown
 
Application Considerations for Cloud
Application Considerations for CloudApplication Considerations for Cloud
Application Considerations for CloudKyle Brown
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service OverviewKyle Brown
 
Bluemix DevOps Meetup
Bluemix DevOps MeetupBluemix DevOps Meetup
Bluemix DevOps MeetupKyle Brown
 
Cloud adoption patterns
Cloud adoption patternsCloud adoption patterns
Cloud adoption patternsKyle Brown
 
Target Corporation - Strategic Analysis
Target Corporation - Strategic AnalysisTarget Corporation - Strategic Analysis
Target Corporation - Strategic AnalysisKyle Brown
 

En vedette (9)

El aguila PEREZ QUIEJ
El aguila PEREZ QUIEJEl aguila PEREZ QUIEJ
El aguila PEREZ QUIEJ
 
Patterns ofbuildinglegos
Patterns ofbuildinglegosPatterns ofbuildinglegos
Patterns ofbuildinglegos
 
IBM Iot Foundation
IBM Iot FoundationIBM Iot Foundation
IBM Iot Foundation
 
Application Considerations for Cloud
Application Considerations for CloudApplication Considerations for Cloud
Application Considerations for Cloud
 
Kyle Brown
Kyle BrownKyle Brown
Kyle Brown
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service Overview
 
Bluemix DevOps Meetup
Bluemix DevOps MeetupBluemix DevOps Meetup
Bluemix DevOps Meetup
 
Cloud adoption patterns
Cloud adoption patternsCloud adoption patterns
Cloud adoption patterns
 
Target Corporation - Strategic Analysis
Target Corporation - Strategic AnalysisTarget Corporation - Strategic Analysis
Target Corporation - Strategic Analysis
 

Similaire à sMash at May NYPHP UG

Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesciklum_ods
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with ExpressAaron Stannard
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformAlfresco Software
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scalajfarcand
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J) Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J) Lars Vogel
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web appsyoavrubin
 

Similaire à sMash at May NYPHP UG (20)

Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devices
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
 
Core Android
Core AndroidCore Android
Core Android
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
AppengineJS
AppengineJSAppengineJS
AppengineJS
 
Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J) Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J)
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
 
WSO2 AppDev platform
WSO2 AppDev platformWSO2 AppDev platform
WSO2 AppDev platform
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web apps
 
A Case for Grails
A Case for GrailsA Case for Grails
A Case for Grails
 

Dernier

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Dernier (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

sMash at May NYPHP UG

  • 1. Web 2.0 and RESTful Applications with WebSphere sMash and PHP Roland Barcia - STSM, WebSphere Lab Services, Lead Web 2.0 Architect
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Browser-based Tooling Dynamic Scripting Editor Visual UI Editor Visual Assembly Editor Agility in Dynamic Scripting – Groovy / PHP Simplicity in constructing web pages (Javascript) Speed in scripting / assemble activities into a flow
  • 11. Versions of WebSphere sMash RTE http://projectzero.org (Reliable Transport Extension) (Developer Edition) DE Free download! WebSphere sMash + development tooling. Restricted production use. The runtime environment. Available under a standard IBM commercial license. Allows sMash apps to communicate with one another using asynch-ronous messages . Project Zero Free download! Bleeding edge version.
  • 12. Version History 2008 1.0 1.0.0.1 1.0.0.2 1.0.0.3 1.1 1.1.0.1 June July August October December April 2009
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Global Context Zones preserved State discarded State preserved Application App discarded State discarded State discarded Application Tmp discarded State discarded State discarded Event / Thread Connection preserved State preserved State preserved Application Storage preserved State discarded State preserved Session denoted by zsessionid User discarded State reloaded from config files State reloaded from config files Application Config discarded State discarded State discarded Event / Thread Event discarded State discarded State discarded Request / Thread Request User modified data User Initiated Restart Automatic Recycle Scope Zone
  • 18.
  • 19.
  • 20. Application Directory Layout This directory is created by the WebSphere sMash runtime on behalf of the application to hold any generated files. Developers do not need to maintain or edit files in this directory. .zero The IVY dependency report shows details of the dependencies that you have on extension modules. reports The Web accessible root folder of the application. Can contain html files, images, dynamic server scripts like .php and .groovy files, JavaScript, etc… public The log and trace files produced by your running application. logs Additional jar files that are required by your application. lib The Java source files. java The configuration files of your application config The java class files that are part of an application. classes The scripts and templates for key components app Description Directory
  • 21. app and config JSON based Resources Models leveraging ZRM. app/models Script implementation of views. Represents rendering logic. app/views Shared Scripts within an application, not directly accessible via URI. app/scripts Set of RESTful resources for an application. app/resources Custom error pages that handle specific errors app/errors Description Directory Runtime configuration file for your application. Populates the config zone of GC. config/zero.config Configuration for dependency management of your application. config/ivy.xml Description Directory
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. Resource Handlers Example <?php // Initialization common to all operations $dataManager = data_manager('REBATE_DB'); class rebate { function onList() { global $dataManager; $renderType = $location = zget(&quot;/request/params/format&quot;); $rebateRecords = dataExec ($dataManager, &quot;select * from rebate&quot;); zput('/request/headers/out/Content-Type', 'text/json'); echo json_encode($rebateRecords); } … http://<host>:<port>/resources/rebate Creates list event onList() handler in employee.groovy handles event
  • 38. Resource Handlers Example function onCreate() { global $dataManager; // Convert the raw JSON stream in to a PHP array $er = json_decode($HTTP_RAW_POST_DATA); $result = dataInsert($dataManager, &quot;INSERT INTO Rebate (name,description,rebatetype,validfrom,validto,website) &quot;. &quot;VALUES (?, ?, ?, ?, ?, ?)&quot;, array('rebateid'),array($er['name'], $er['description'], $er['rebatetype'], $er['validfrom'], $er['validto'], $er['website'])); $locationUri = zget('/request/path') . &quot;/&quot; . @result; zput('/request/headers/out/Location', $locationUri); zput('/request/status', 204); } app/resources/rebate.php (continued) Similarly POST to /resources/rebate triggers create event…
  • 39. Resource Handlers Example function onRetrieve() { global $dataManager; $rebateid = zget(&quot;/request/params/rebateId&quot;); $rebateRecords = dataQueryFirst($dataManager, &quot;select * from rebate where rebateId = ?&quot;, array($rebateid)); if(isset($rebateRecords)) { zput('/request/headers/out/Content-Type', 'text/json'); echo json_encode($rebateRecords); } else { zput(&quot;/request/status&quot;, 404); $message = &quot;incentiveid &quot;. $incentiveid . &quot; not found.&quot;; zput('/request/error/message', $message); zput('/request/view', 'error'); render_view(); } } function onUpdate() { global $dataManager; $rebateid = zget(&quot;/request/params/rebateId&quot;); $er = json_decode($HTTP_RAW_POST_DATA); $user = zget('/request/subject#remoteUser'); $result = dataExec($dataManager, &quot;UPDATE rebate SET name=?, description=?, &quot;. &quot;rebatetype=?, validfrom=?, validto=?, website=? WHERE rebateid=?&quot;, array($er['name'], $er['description'], $er['rebatetype'], $er['validfrom'], $er['validto'], $er['website'], $rebateid)); if ($result != null) zput(&quot;/request/status&quot;, 204); else {zput('/request/status', 503); echo &quot;Database query execution failure&quot;; } } function onDelete() { global $dataManager; $rebateid = zget(&quot;/request/params/rebateId&quot;); $user = zget('/request/subject#remoteUser'); $result = dataExec($dataManager, &quot;DELETE FROM rebate WHERE rebateId=?&quot;, array($rebateid)); if ($result != null) zput(&quot;/request/status&quot;, 204); else { zput('/request/status', 503); echo &quot;Database query execution failure&quot;; } } } ?> app/resources/rebate.php (continued) Similarly GET, PUT, and DELETE to /resources/rebate /333
  • 40.
  • 43.
  • 44. ZRM Development life cycle { &quot;fields&quot; : { &quot;first_name&quot;: {&quot;type&quot;:&quot;string&quot;}, &quot;last_name&quot;: {&quot;type&quot;:&quot;string&quot;}, &quot;location&quot;: {&quot;type&quot;:&quot;string&quot;} } } app/models/employee.json [ { &quot;type&quot;: &quot;employee&quot;, &quot;fields&quot;: { &quot;first_name&quot; : &quot;Alice&quot;, &quot;last_name“ : &quot;Rogers&quot;, &quot;location&quot; : &quot;Seattle&quot; } }, { &quot;type&quot;: &quot;employee&quot;, &quot;fields&quot;: { &quot;first_name&quot; : &quot;Bill&quot;, &quot;last_name&quot; : &quot;Stevens&quot;, &quot;location&quot; : &quot;Seattle&quot; } }, { &quot;type&quot;: “employee&quot;, &quot;fields&quot;: { &quot;first_name&quot; : &quot;Cathy&quot;, &quot;last_name&quot; : &quot;Tomlin&quot;, &quot;location&quot; : &quot;Boston&quot; } } ] app/models/fixtures/initial_data.json <?php zrm_delegate(); ?> app/resources/employee.php
  • 45. Activity flows in a Nutshell Rick builds things for the palette Rick scripts ad-hoc activities Linda designs the Web UI Frank strings together flow activities into solutions George builds flows, Web UIs and ad-hoc scripts
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. PHP – Java Bridge – Basic use Basic access to Java methods and fields - types are automatically converted at boundary of PHP runtime Static methods and fields are accessible by using the built in JavaClass class Java exceptions can be caught in PHP scripts
  • 54. PHP- Java Bridge – Iterators and overloads Bridging between PHP and Java iterators Signatures provide explicit control for overloaded constructors and methods
  • 55. Java Bridge – Importing Java Classes. Importing a Java class creates a PHP class that has the same shape
  • 56. Java Bridge – Extending Java in PHP Extending a Java class inside PHP is possible but has some limitations Java bean access maps field access onto get/set method calls
  • 57. Groovy Bridge – Importing Scripts
  • 58.
  • 59.
  • 60. Invoking PHP - Script Activity in Flow
  • 61.
  • 62. PHP Applications that run on sMash Forums CRM wiki Desktop Virtualisation Ajax Debugging Content Management Blogging FirePHP
  • 63.
  • 64.
  • 65.
  • 69.
  • 70.  
  • 71.
  • 72.
  • 73. © IBM Corporation 2009. All Rights Reserved. The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. The following are trademarks of the International Business Machines Corporation in the United States and/or other countries: ibm.com/legal/copytrade.shtmlAIX, CICS, CICSPlex, DataPower, DB2, DB2 Universal Database, i5/OS, IBM, the IBM logo, IMS/ESA, Power Systems, Lotus, OMEGAMON, OS/390, Parallel Sysplex, pureXML, Rational, Redbooks, Sametime, SMART SOA, System z , Tivoli, WebSphere, and z/OS. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at ibm.com/legal/copytrade.shtml. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office Intel and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
  • 75.
  • 77.
  • 78.
  • 80. Excel Service { &quot;fields&quot;: { &quot;Firstname&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;Lastname&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;Location&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;Gender&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;DateofEmployment&quot;: { &quot;type&quot;: &quot;date&quot; } } } XLS ZRM [ { &quot;type&quot;: &quot;employees&quot;, &quot;fields&quot;: { &quot;Firstname&quot;: &quot;Michael&quot;, &quot;Lastname&quot;: &quot;Fraenkel&quot;, &quot;Gender&quot;: “Male” } } ] Data
  • 81.
  • 82. Parallel Recycle sMash Server Requests X sMash Server sMash Server recyle recyle Without parallel recycle With parallel recycle
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89. PHP to Java/Groovy Bridge Access to Java types and methods Automatic conversions Exception handling
  • 90.
  • 101.  
  • 102.