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

Rob Nicholson,   IBM Senior Technical Staf...
Abstract
Commercial Open Source CRM Vendor SugarCRM attributes a large part of
  their considerable success to their custo...
Agenda

• WebSphere sMash
• SugarCRM
• Integration demonstrations.




                                      © 2009 IBM Co...
Agenda

• WebSphere sMash
• SugarCRM
• Integration demonstrations.




                                      © 2009 IBM Co...
WebSphere sMash
Agile development of dynamic Web 2.0 based applications
                                      Introducing
...
WebSphere sMash
             Dynamic scripting languages
Speed        Templates & Pre-built services


             Visual...
WebSphere sMash Tooling
                                       Visual Flow Editor

                    Visual UI Editor


...
WebSphere sMash PHP Support
• PHP runtime built in Java.
  – To PHP.net as Jruby is to Ruby and Jython is to Python

• Sam...
PHP in WebSphere sMash
         Java Virtual Machine
                                                               • Runs...
PHP – Java Interaction
• PHP Java Bridge allows PHP to:
 – Instantiate Java Classes
 – Call static and instance methods
 –...
WebSphere sMash and SugarCRM
Magnify the power of Sugar with WebSphere
     Tools                                       As...
Agenda

• WebSphere sMash
• SugarCRM
• Integration demonstrations.




                                      © 2009 IBM Co...
SugarCRM




                  © 2009 IBM Corporation
                                 13
           © 2009 SugarCRM
What is Customer Relationship Management?
CRM is a system for identifying, acquiring, and retaining
customers. Key functio...
Why SugarCRM?User Experience
          Focus on    Focus on User Experience
                          Smart, Simple, Clean...
Great Functionality in One Application




                                      © 2009 IBM Corporation
                  ...
Create Powerful Business Processes Easily


 Create custom fields,
 objects and modules

 Design workflow
 processes to fi...
Module Builder and Loader
 Module Builder
    Custom Business Objects
    Custom Relationships
 Business Logic Hooks
    M...
Leading Companies Adopting SugarCRM




                                     © 2009 IBM Corporation
                      ...
Why PHP?

                        Designed For The Web
 Ease of Development
                        Secure – Time Tested
 ...
Agenda

• WebSphere sMash
• SugarCRM
• Integration demonstrations.




                                      © 2009 IBM Co...
Integrating SugarCRM using sMash




                          MQ




                           MQ




                  ...
SugarCRM Search using sMash and Java
Libraries
                   • The best from PHP &
                     Java
        ...
Agile workflows to Integrate and extend Sugar
• Quickly build workflows which use REST, Forms and
  email
• Extensible usi...
For More Information…

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


Get involved with the WebSp...
We love your Feedback!
• Don’t forget to submit your Impact session and
  speaker feedback! Your feedback is very
  import...
© IBM Corporation 2009. All Rights Reserved.

The workshops, sessions and materials have been prepared by IBM or the sessi...
Upcoming SlideShare
Loading in …5
×

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

6,954 views

Published on

Session 2024 at IBM IMPACT 2009 Conference.

This is a co-presentation with SugarCRM architect Majed Itani.

Published in: Technology, News & Politics
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,954
On SlideShare
0
From Embeds
0
Number of Embeds
295
Actions
Shares
0
Downloads
80
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • <number><number><number>
  • <number><number>
  • <number><number>
  • <number>
  • Java Virtual Machine based runtime supporting PHP and Groovy.NOT a Java EE environmentTargeted at Script developersNot for producing Java code.A Commercial ProjectWith development done in the open and limited no-cost use.A Full Stack RuntimeWith a HTTP server, module system and simple IDE built in.IBM’s Scripting platform.For building Agile Web ApplicationsUsing PHP and GroovyUsing assets from PHP and Java worlds.Built on Java (SE not EE)Uses many LAMP principles.Single threaded application programming model.Shared nothing.Restart-able runtime.<number>
  • WebSphere sMash core values are Speed, Simplicity, and Agility- product elements that support this are:SpeedDynamic scripting languages (PHP and Groovy – with Java as system language)Core application constructs: templates, pre-built servicesSimplicityBuilt-In development tooling: Visual Editors for Web Page Construction and for Flow AssemblyAssemble-style development (Developers can visually mash up services and feeds using a Visual Editor for Flow Assembly)AgilitySimple deployment (application “is” the server)Runtime Characteristics (clean, cost effective, short-lived)<number>
  • Dynamic Scripting Editor – Groovy / PHPVisual UI Editor - Constructing web pages (Javascript)Visual Assembly Editor - Scripting / assembling activities into a flow<number>
  • OK, so PHP is interesting…..but why not use the existing C based implementation. Why implement it on the JVM?Well, we wanted to be able to build sMash using Java but give PHP programmers a first rate programming experience.Since the PHP is build on the JVM PHP, the PHP , Groovy and Java can interact without costly IPC. Interaction on the same callstack.PHP can reach into the Global context without copying.This allows PHP programmers to leverage the power of the Java libraries and Java/Groovy programmers to re-use all the great applications and snippets from the PHP world.It really is the best of both worlds. We have multiple cases of business partners combining PHP assets with new code written in Groovy.We have instances of business partners mixing Java and Groovy programmers on the same project.Its about getting the job done…….fast……using what you have.Add to this all the great Java technology which we’ve invested 100s of PY in. Its pretty exciting to think about the Java JIT being able to chew on PHP code.IBM is not alone in this. At Javaone this year there were multiple presentations on the merits of bringing new languages to the Java Platform. Jruby, Jython, Groovy, Scalaare just a few of the languages with large followings.99
  • The PHP runtime is built on the JVM. It requires Java 5 SE or later from any vendor.The HTTP interface is via Zero. We are not using apache or lightppd here.PHP Scripts are parsed into an intermediate form and then either interpreted or compiled to Java Bytecodes.Java Bytecodes are cached in memory and written to disk as .class files.User experience is one of scripting (compilation is hidden from user).PHP extensions implemented in C from php.net can be attached via XAPI-C which uses JNI.We also attach Java extensions using XAPI-J which is how we interface to Zero and to databases via JDBC.We have a debug port to allow Eclipse PDT to debug PHP scripts.IF anyone asks about performance (suggest not to bring this up)…….PHP performance is great for most sMash use cases. The pathlength is not in the PHP its in the database, webserver and infrastructure.For huge deployments of PHP applications where out and out throughput matters, PHP performance is about 50% of PHP.net default configuration.Its important to say “default configuration” because PHP.net users can download and install a bytecode cache with improves throughput by about 4X.The implementation we have in sMash 1.1 has 2X the pure interpreter thoughout from sMash 1.0.Its still mainly an interpreter. We have designs and work items for sMash 2.0 and beyond to generate much more efficient bytecodes.<number>
  • OK, so what does this PHP to java interaction look like?Well there are really two schemes. For tight coupling we can use the java bridge which allows PHP to instantiate classes, call methods, extend java classes etc.This is appropriate when wanting to re-use java libraries, such as SugarCRM’s desire to use Apache libraries from their PHP application.Also one can leverage the Zero programming models to design handlers that interact using events and the Global Context.This more appropriate for ZSL’s use case where they want to mix PHP code with new handlers written in Groovy.There is also the extension interface we saw earlier of course. This allows the creation of PHP extension functions and object proxies in Java.<number>
  • <number><number>
  • <number><number>
  • <number>
  • CRM is a well established software sector that consists of managing customer relationships before (marketing), during (sales force automation) and after the sale (customer support). These key process – marketing, sales and support – are supported by collaboration technology that helps people share information and by reporting which gives employees a better view into the state of their business. Think of CRM as a way for your company to not only better manage relations with customer but be able to handle more customer relationships than you thought possible. <number><number><number>
  • Now, let’s jump into the actual product. First, I would like to focus on some key areas that we have focused on.User adoption – Most CRM deployments fail because users fail to adopt the CRM system. We place great emphasis on making sure the user interface is as intuitive and as fast as possible so that Sugar helps people be more efficient instead of getting in the way of how they work. This shows itself through UI which presents different themes depending on the user’s tastes and deep personalization capabilities that allow people to change the layout of the application to suit the way they work.A Full CRM Suite – We have built a full CRM suite that touches all customer-facing parts of the business: marketing, sales, support, along with collaboration and reporting functionality. We are backed by one of the largest open source development communities in the world, with over 9,000 developers on SugarForge, our online development environment and over 200 commercial extensions on Sugar Exchange, the online marketplace for SugarCRM extensions. This allows customers to benefit from the innovative work developers from around the world are contributing to SugarCRM.A Flexible Architecture that allows companies to configure and customize Sugar to suit how they do business. This includes designing workflow rules to manage how information moves through your company, creating custom modules, objects and fields and ensuring the security of your application with team security and field-level access controls. <number><number>
  • Here is a quick overview of our CRM functionality. As you can see we over a full suite: marketing, sales, support, collaboration, and reporting – supported by a robust and flexible platform. This allows your company to coordinate interactions across channels, including direct sales, call Center, the Web and partner channels. Sugar is fullt web service enabled which allows you to connect to backend systems, including ERP, Accounting, Billing or other Legacy Systems. <number><number>
  • <number><number>
  • <number><number>Here are a few companies which are already benefiting from the use of SugarCRM.
  • <number><number>
  • <number>
  • <number>
  • <number>
  • <number>
  • <number>
  • <number>
  • IBM IMPACT 2009 Conference Session 2024 - WebSphere sMash Integration, PHP with Java - case study with SugarCRM.

    1. 1. #2024 WebSphere sMash Integration, PHP with Java - case study with SugarCRM. Rob Nicholson, IBM Senior Technical Staff Member Majed Itani, SugarCRM Architect © 2009 IBM Corporation © 2009 IBM Corporation
    2. 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, Sugar announced 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. © 2009 IBM Corporation 2 © 2009 IBM Corporation
    3. 3. Agenda • WebSphere sMash • SugarCRM • Integration demonstrations. © 2009 IBM Corporation 3 © 2009 IBM Corporation
    4. 4. Agenda • WebSphere sMash • SugarCRM • Integration demonstrations. © 2009 IBM Corporation 4 © 2009 IBM Corporation
    5. 5. WebSphere sMash Agile development of dynamic Web 2.0 based applications Introducing WebSphere 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 © 2009 IBM Corporation 5 © 2009 IBM Corporation
    6. 6. WebSphere sMash Dynamic scripting languages Speed Templates & Pre-built services Visual Editors Simplicity Assemble style development Application “is” the server Agility Clean, short-lived runtime © 2009 IBM Corporation 6 © 2009 IBM Corporation
    7. 7. WebSphere sMash Tooling Visual Flow Editor Visual UI Editor Dynamic Scripting Editor © 2009 IBM Corporation 7 © 2009 IBM Corporation
    8. 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 © 2009 IBM Corporation 8 © 2009 IBM Corporation
    9. 9. PHP in WebSphere sMash Java Virtual Machine • Runs PHP 5 scripts • Requires Java 5 SE or later. HTTP server • Extensibility via XAPI Zero Programming Model • XAPI-C for C extensions from php.net • XAPI-J for Java extensions, native libraries invoked over JNI and Project Zero Java- Bridge JAR interface PHP runtime JAR Groovy Debug • Extension language choice opaque to P8 Runtime JAR runtime PHP script Interpreter/Compiler JAR • Java Bridge xd XAPI-J eb • Debug using via xdebug protocol using XAPI-C Java ug C Eclipse with PDT Extensions Extensions WebSphere sMash PDT © 2009 IBM Corporation 9 © 2009 IBM Corporation
    10. 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. © 2009 IBM Corporation 10 © 2009 IBM Corporation
    11. 11. WebSphere sMash and SugarCRM Magnify the power of Sugar with WebSphere Tools Assets Quickly assemble Seamlessly leverage integrated solutions Java from PHP WebSphere sMash Scale up and out Easily connect to with WebSphere Enterprise systems Deployment Integration © 2009 IBM Corporation 11 © 2009 IBM Corporation
    12. 12. Agenda • WebSphere sMash • SugarCRM • Integration demonstrations. © 2009 IBM Corporation 12 © 2009 IBM Corporation
    13. 13. SugarCRM © 2009 IBM Corporation 13 © 2009 SugarCRM
    14. 14. What is Customer Relationship Management? CRM is a system for identifying, acquiring, and retaining customers. Key functional modules include: Software for managing human relationships Marketing Customer Sales Collaborate Sugar BackOffice Increases the number of and depth of human relationships between organizations or individuals and their customers, partners, friends, etc... © 2009 IBM Corporation 14 © 2009 SugarCRM
    15. 15. Why SugarCRM?User Experience Focus on Focus on User Experience Smart, Simple, Clean UI Personalization Change Appearance Add Dashlets Complete CRM Suite Flexible Architecture Marketing Deployment Options Sales Customization Modules Support Objects and Fields Collaboration Business Process Projects Create Workflows Reporting Team Security Sugar Exchange 200+ Commercial Extensions Test and Add New Functionality © 2009 IBM Corporation 15 © 2009 SugarCRM
    16. 16. Great Functionality in One Application © 2009 IBM Corporation 16 © 2009 SugarCRM
    17. 17. Create Powerful Business Processes Easily Create custom fields, objects and modules Design workflow processes to fit your business Control visibility and access at the field level © 2009 IBM Corporation 17 © 2009 SugarCRM
    18. 18. Module Builder and Loader Module Builder Custom Business Objects Custom Relationships Business Logic Hooks Make the app work how you want Studio Modify existing objects Sugar Exchange/ Sugar Forge 100s of Projects Open Source Community Projects Market Place © 2009 IBM Corporation 18 © 2009 SugarCRM
    19. 19. Leading Companies Adopting SugarCRM © 2009 IBM Corporation 19 © 2009 SugarCRM
    20. 20. Why PHP? Designed For The Web Ease of Development Secure – Time Tested Low Barrier of Entry Mother Approved Fast Prototyping Lots of Language extensions/libraries – Easily Scale Out PEAR Designed For The Web Constantly evolving Secure – Time Tested Open Source Mother Approved © 2009 IBM Corporation 20 © 2009 SugarCRM
    21. 21. Agenda • WebSphere sMash • SugarCRM • Integration demonstrations. © 2009 IBM Corporation 21 © 2009 IBM Corporation
    22. 22. Integrating SugarCRM using sMash MQ MQ © 2009 IBM Corporation 22 © 2009 IBM Corporation
    23. 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 Search – Apache POI Java Libraries via Java Bridge • Built in 2 evenings. Java Bridge – ~100 LOC in sugar Custom Directories © 2009 IBM Corporation 23 © 2009 IBM Corporation
    24. 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 © 2009 IBM Corporation 24 © 2009 IBM Corporation
    25. 25. For More Information… Learn how to extend SOA with Web 2.0: ibm.com/soa/soa_and_web_20.html Get involved with the WebSphere sMash community: www.projectzero.org Read about IBM’s view of how Web 2.0 goes to work for business: ibm.com/web20/ © 2009 IBM Corporation 25 © 2009 IBM Corporation
    26. 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 © 2009 IBM Corporation 26 © 2009 IBM Corporation
    27. 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 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. © 2009 IBM Corporation 27 © 2009 IBM Corporation

    ×