IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study...

27
© 2009 IBM Corporation © 2009 IBM Corporation WebSphere sMash Integration, PHP with Java - case study with SugarCRM. Rob Nicholson, IBM Senior Technical Staff Member Majed Itani, SugarCRM Architect #2024

description

Session 2024 at IBM IMPACT 2009 Conference. This is a co-presentation with SugarCRM architect Majed Itani.

Transcript of IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study...

Page 1: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation

WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

Rob Nicholson, IBM Senior Technical Staff MemberMajed Itani, SugarCRM Architect

#2024

Page 2: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 2

Abstract

Commercial Open Source CRM Vendor SugarCRM attributes a large part of their considerable success to their customizable architecture. Clients can quickly tailor Sugar to their business often without writing code. Where programming is required, their partners and clients implement in the simple but powerful scripting language, PHP. Recently, Sugarannounced a RESTFul Web service interface which further simplifies programming interactions with their application. In this talk, hear from SugarCRM and learn the benefits they see from running SugarCRM on the PHP-on-Java environment in IBM WebSphere® sMash. We demonstrate the use of sMash to build integrations both with traditional enterprise assets and with Web 2.0 services from the Internet. We showcase the powerful PHP-to-Java bridge capabilities of IBM WebSphere sMash together with the use if RESTful Web services, Atom and RSS feeds.

Page 3: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 3

Agenda

• WebSphere sMash• SugarCRM• Integration demonstrations.

Page 4: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 4

Agenda

• WebSphere sMash• SugarCRM• Integration demonstrations.

Page 5: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 5

WebSphere sMashAgile development of dynamic Web 2.0 based applications

IntroducingWebSphere sMash

• Improves developer productivity and efficiency through the support of dynamic scripting languages (Groovy and PHP) on Java

• Leverages Web 2.0 technologies for service invocation, service composition and data interchange

• Provides visual tools for developers to build and assemble web2.0 applications

Page 6: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 6

Speed

Simplicity

Agility

Dynamic scripting languagesTemplates & Pre-built services

Visual EditorsAssemble style development

Application “is” the serverClean, short-lived runtime

WebSphere sMash

Page 7: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 7

WebSphere sMash Tooling

Dynamic Scripting Editor

Visual UI Editor

Visual Flow Editor

Page 8: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 8

WebSphere sMash PHP Support• PHP runtime built in Java.

– To PHP.net as Jruby is to Ruby and Jython is to Python

• Same-process interaction between Java and PHP.– Calls without IPC – Efficient.– Data sharing without copies – Access to sMash Global Context.

• Mix Java and PHP assets and programmers– Best of both worlds.– Mix PHP frameworks, applications, extensions with Java libraries.– Allow PHP and Java Programmers to collaborate.

• Benefit from vast investment in Java VM– JIT, Garbage Collector, – Ongoing investment in Java RAS and tools.– Bringing IBM’s best of breed VM technology to bear on PHP.

• JVM Dynamic languages community.– Java world embracing scripting languages such as Jruby, Jython, Groovy, Scala

Page 9: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 9

Java Virtual Machine

PHP in WebSphere sMash

• Runs PHP 5 scripts • Requires Java 5 SE or later.

• Extensibility via XAPI• XAPI-C for C extensions from php.net• XAPI-J for Java extensions, native

libraries invoked over JNI and Project Zero interface

• Extension language choice opaque to PHP script

• Java Bridge• Debug using via xdebug protocol using

Eclipse with PDT

P8 RuntimeInterpreter/Compiler

PHP runtime

Java ExtensionsC

Extensions

Debug

XAPI-JXAPI-C

PDT

Java

-Brid

geJARJAR

JARJAR

Groovyruntime

WebSphere sMash

HTTP server

Zero Programming Model

xdebug

Page 10: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 10

PHP – Java Interaction•PHP Java Bridge allows PHP to:

– Instantiate Java Classes– Call static and instance methods– Access static and instance fields– Extend Java Classes (not abstract)– Implement Java Interfaces.

•Zero programming model allows PHP to:– Interact with other Modules built using Groovy, Java, PHP, Flow by:

• Handle and fire Zero events• Fetch and store to the global context.

•Use cases.– ZSL built “IdeaLab” combining phpBB with sMash security an custom handler in

Groovy. – ZSL combined PHP with the Java version of Lucene.– Interface a PHP application to MQ using JMS.– Create complex Excel spreadsheets using Apache POI java libraries.

Page 11: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 11

WebSphere sMash and SugarCRMMagnify the power of Sugar with WebSphere

Tools Assets

WebSphere sMash

Seamlessly leverage Java from PHP

Easily connect to Enterprise systems

Quickly assemble integrated solutions

IntegrationDeployment

Scale up and out with WebSphere

Page 12: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 12

Agenda

• WebSphere sMash• SugarCRM• Integration demonstrations.

Page 13: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 13

SugarCRM

Page 14: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 14

What is Customer Relationship Management?CRM is a system for CRM is a system for identifyingidentifying, , acquiring, and retaining acquiring, and retaining customerscustomers. Key functional modules include:. Key functional modules include:

CustomerCustomer SalesSales

MarketingMarketing

Sugar Sugar BackOfficeBackOfficeCollaborateCollaborate

Increases the number of and depth of human Increases the number of and depth of human relationships between organizations or relationships between organizations or individuals and their customers, partners, individuals and their customers, partners, friends, etc...friends, etc...

Software for managing human relationshipsSoftware for managing human relationships

Page 15: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 15

Why SugarCRM?Focus on User ExperienceFocus on User Experience

Smart, Simple, Clean UISmart, Simple, Clean UIPersonalizationPersonalization

Change AppearanceChange AppearanceAdd Add DashletsDashlets

Complete CRM SuiteComplete CRM SuiteMarketing Marketing SalesSalesSupportSupportCollaborationCollaborationProjectsProjectsReportingReporting

Flexible ArchitectureFlexible ArchitectureDeployment Options Deployment Options CustomizationCustomization

ModulesModulesObjects and FieldsObjects and Fields

Business ProcessBusiness ProcessCreate WorkflowsCreate WorkflowsTeam SecurityTeam Security

Sugar ExchangeSugar Exchange200+ Commercial Extensions200+ Commercial ExtensionsTest and Add New FunctionalityTest and Add New Functionality

Page 16: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 16

Great Functionality in One Application

Page 17: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 17

Create Powerful Business Processes Easily

Create custom fields, Create custom fields, objects and modulesobjects and modules

Design workflow Design workflow processes to fit your processes to fit your businessbusiness

Control visibility and Control visibility and access at the field access at the field levellevel

Page 18: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 18

Module Builder and LoaderModule BuilderModule Builder

Custom Business ObjectsCustom Business ObjectsCustom RelationshipsCustom Relationships

Business Logic HooksBusiness Logic HooksMake the app work how you wantMake the app work how you want

StudioStudioModify existing objectsModify existing objects

Sugar Exchange/ Sugar ForgeSugar Exchange/ Sugar Forge100s of Projects100s of ProjectsOpen Source Community ProjectsOpen Source Community ProjectsMarket PlaceMarket Place

Page 19: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 19

Leading Companies Adopting SugarCRM

Page 20: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 SugarCRM 20

Ease of DevelopmentLow Barrier of EntryFast Prototyping LanguageEasily Scale OutDesigned For The WebSecure – Time Tested Mother Approved

Designed For The WebSecure – Time Tested Mother ApprovedLots of extensions/libraries –PEARConstantly evolvingOpen Source

Why PHP?

Page 21: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 21

Agenda

• WebSphere sMash• SugarCRM• Integration demonstrations.

Page 22: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 22

Integrating SugarCRM using sMash

MQ

MQ

Page 23: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 23

SugarCRM Search using sMash and Java Libraries

• The best from PHP & Java

• SugarCRM Search Acceleration with

– Apache Lucene Java Library– Using sMash PHP Java Bridge

• Index attachments– Apache POI Java Libraries via

Java Bridge

• Built in 2 evenings.– ~100 LOC in sugar Custom

Directories

Java Bridge

Search

Page 24: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 24

Agile workflows to Integrate and extend Sugar• Quickly build workflows which use REST, Forms and

email• Extensible using in PHP Activities• Create ad-hoc processes and integrations• Example scenario: Gatehouse approval for meetings

Page 25: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 25

For More Information…

Learn how to extend SOA with Web 2.0:ibm.com/soa/soa_and_web_20.html

Read about IBM’s view of how Web 2.0 goes to work for business:ibm.com/web20/

Get involved with the WebSphere sMash community:www.projectzero.org

Page 26: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 26

We love your Feedback!

• Don’t forget to submit your Impact session and speaker feedback! Your feedback is very important to us, we use it to improve our conference for you next year.

• Go to www.impact09guide.com on a smartphone device or a loaner device

• From the Impact 2009 Online Conference Guide;– Select Agenda– Navigate to the session you want to give feedback on– Select the session or speaker feedback links– Submit your feedback

Page 27: IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

© 2009 IBM Corporation© 2009 IBM Corporation 27

© 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 CommerceJava 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 OfficeIntel 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.