copy of my presentation from cf.Objective()


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

copy of my presentation from cf.Objective()

  1. 1. COLDFUSION AS A DIFFERENT TYPE OF “GLUE” <ul><li>Brian Meloche – [email_address] </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li>#SA4A, Architecture & Design in Software </li></ul>
  2. 2. Glue? As in Model-Glue? <ul><li>This is NOT a Model-Glue discussion… </li></ul><ul><ul><li>I don’t even USE Model-Glue (though it’s a great framework) </li></ul></ul>
  3. 3. No… Enterprise glue!!!
  4. 4. ColdFusion can do more than just intranets in the enterprise… <ul><li>We’ll talk about using ColdFusion as the customer facing front end to an enterprise back end </li></ul><ul><li>The usual glue, like PDF generation, reports, Outlook integration and a lot of the stuff you see Adobe publicizing about ColdFusion are not a part of today’s discussion </li></ul>
  5. 5. About Me… Brian Meloche <ul><ul><li>Originally from Windsor, Ontario, Canada </li></ul></ul><ul><ul><li>Developer (off and on) since 1986 </li></ul></ul><ul><ul><li>Brief attempt at screenwriting; sold an uncredited story premise to Star Trek: DS9 “Broken Link” </li></ul></ul><ul><ul><li>Web Designer/Developer since 1996; CF Developer since 1998; for me, it all started with <cfmail>! </li></ul></ul><ul><ul><li>Manager, Cleveland CFUG </li></ul></ul><ul><ul><li>Former Manager, Cleveland AUG & WV MUG </li></ul></ul><ul><ul><li>Adobe Community Expert in ColdFusion since 2007 </li></ul></ul><ul><ul><li>Sr. Web Dev’r at a Cleveland wholesaler since 2004 </li></ul></ul><ul><ul><li>I’m more Scotty than Spock (real world experience and fundamentals vs. blindly following theory) </li></ul></ul>
  6. 6. ColdFusion as the customer facing “glue” to the enterprise <ul><li>Enterprise back ends: </li></ul><ul><ul><li>ERPs </li></ul></ul><ul><ul><li>Accounting systems </li></ul></ul><ul><ul><li>Business Intelligence </li></ul></ul><ul><ul><li>Data Warehouses </li></ul></ul>
  7. 7. ColdFusion as the customer facing “glue” to the enterprise (Continued) <ul><li>Integration Strategies </li></ul><ul><ul><li>Middleware: Types; Pros & Cons </li></ul></ul><ul><ul><li>Direct connectivity with enterprise systems </li></ul></ul><ul><ul><li>REST, WSDL, SOAP, COM, Java, XML, JSON, WDDX </li></ul></ul><ul><li>Pitfalls </li></ul><ul><li>Strategies to overcome them </li></ul>
  8. 8. What is an ERP??? <ul><li>ERP = Enterprise Resource Planning </li></ul><ul><ul><li>Integrates several data sources and processes of an organization into a unified system. </li></ul></ul><ul><ul><li>Typical ERP systems use multiple components of computer software and hardware to achieve the integration. </li></ul></ul><ul><ul><li>Most ERP systems use a unified database to store data for the various system modules. </li></ul></ul><ul><ul><li>http:// </li></ul></ul>
  9. 9. ERPs can include: <ul><li>Manufacturing: </li></ul><ul><ul><li>Engineering, Bills of Material, Scheduling, Capacity, Workflow Management, Quality Control, Cost Management, Manufacturing Process, Manufacturing Projects, Manufacturing Flow </li></ul></ul><ul><li>Supply Chain Management: </li></ul><ul><ul><li>Inventory, Order Entry, Purchasing, Product Configurator, Supply Chain Planning, Supplier Scheduling, Inspection of goods, Claim Processing, Commission Calculation </li></ul></ul>
  10. 10. ERPs can include (Continued): <ul><li>Financials:  </li></ul><ul><ul><li>General Ledger, Cash Management, Accounts Payable, Accounts Receivable, Fixed Assets </li></ul></ul><ul><li>Projects: </li></ul><ul><ul><li>Costing, Billing, Time and Expense, Activity Management </li></ul></ul><ul><li>Human Resources: </li></ul><ul><ul><li>Human Resources, Payroll, Training, Time & Attendance, Rostering, Benefits </li></ul></ul>
  11. 11. ERPs can include (Continued): <ul><li>Customer Relationship Management: </li></ul><ul><ul><li>Sales and Marketing, Commissions, Service, Customer Contact and Call Center support </li></ul></ul><ul><li>Data Warehouse: </li></ul><ul><ul><li>and various  Self-Service  interfaces for Customers, Suppliers, and Employees </li></ul></ul><ul><li>For the rest of this discussion, accounting systems, business intelligence systems and (obviously) data warehouse integration will be discussed as ERP. </li></ul>
  12. 12. Examples of ERP Systems: <ul><li>SAP Business Suite, Netweaver </li></ul><ul><li>Oracle: </li></ul><ul><ul><li>Peoplesoft </li></ul></ul><ul><ul><li>Oracle e-Business Suite </li></ul></ul><ul><ul><li>JD Edwards EnterpriseOne & World </li></ul></ul><ul><li>Microsoft Dynamics </li></ul><ul><li>Infor ERP </li></ul><ul><li>The Sage Group </li></ul>
  13. 13. Why have an ERP System? <ul><li>If you have more than typical “e-commerce” website </li></ul><ul><ul><li>Multiple warehousing facilities; sourcing an item </li></ul></ul><ul><ul><li>Real-time inventory </li></ul></ul><ul><ul><li>Complex pricing (not one price for all) </li></ul></ul><ul><ul><li>Varying delivery options available (e.g. same day shipping in certain markets; multiple carriers) </li></ul></ul><ul><ul><li>Delivery times are sensitive (e.g. B to B, where your customer is selling to their customer) </li></ul></ul><ul><ul><li>Supply Chain becomes very important </li></ul></ul>
  14. 14. Characteristics of an ERP backend <ul><li>Provide access to complex business functions; you don’t have to build out those decisions in your model </li></ul><ul><ul><li>Instead, your model needs to be able to interact with the ERP’s API </li></ul></ul><ul><ul><li>Have their own database, which you may not have access to directly </li></ul></ul><ul><ul><li>May be mainframe based, server based, or some combination </li></ul></ul>
  15. 15. ColdFusion with an ERP <ul><li>A good choice: </li></ul><ul><ul><li>ERPs often have Java compatibility </li></ul></ul><ul><ul><li>Great at building a presentation (especially in concert with Flex) and building the model </li></ul></ul><ul><ul><li>Web Services, SOAP, XML, WDDX and REST are well supported </li></ul></ul><ul><ul><li>If your ERP has a web interface, it may not be suitable for a customer-facing application; CF gives more flexibility </li></ul></ul><ul><ul><li>Rapid Application Development </li></ul></ul>
  16. 16. CF/ERP Integration Strategies <ul><li>You may have several options, depending on the ERP: </li></ul><ul><ul><li>Direct access to the ERP’s database(s) </li></ul></ul><ul><ul><li>Communicate with the ERP API directly </li></ul></ul><ul><ul><li>Use middleware to provide a translation API and provide a buffer between your web applications and your ERP </li></ul></ul><ul><ul><li>Data replication </li></ul></ul><ul><li>Learn to play the cards you’ve been dealt (make the best of what you have) </li></ul>
  17. 17. Directly connect to the ERP’s DB <ul><li>If this option is available to you, this may be a good option for some of your needs </li></ul><ul><ul><li>But… BE CAREFUL! </li></ul></ul><ul><ul><li>You most likely will not have access to the ERP’s business functions if you directly interact with the ERP database </li></ul></ul><ul><ul><li>Great if you’re doing simple CRUD without the need for the business functions. </li></ul></ul>
  18. 18. Directly interact with an ERP’s API <ul><li>This is a good option in many cases </li></ul><ul><ul><li>You will have access to the business functions </li></ul></ul><ul><li>Depends on the API… </li></ul><ul><ul><li>If it’s easy enough to interact with </li></ul></ul><ul><ul><li>If it’s extensible enough </li></ul></ul><ul><ul><li>Robustness of the ERP to queue requests </li></ul></ul>
  19. 19. Middleware? Huh? <ul><li>Is ColdFusion middleware? Not this time… </li></ul><ul><ul><li>“ Middleware  is computer  software  that connects  software components  or applications.” http:// /wiki/Middleware </li></ul></ul><ul><ul><li>Provides a common access point for multiple systems </li></ul></ul><ul><ul><li>Queue up calls to the system, to avoid flooding the ERP with requests </li></ul></ul><ul><ul><li>Can help translate/format the data </li></ul></ul>
  20. 20. Middleware Examples & Types <ul><li>Examples: </li></ul><ul><ul><li>IBM Websphere MQ (a.k.a. MQSeries) </li></ul></ul><ul><ul><li>WebMethods </li></ul></ul><ul><ul><li>Microsoft BizTalk Server </li></ul></ul><ul><ul><li>TIBCO Business Works… (many others) </li></ul></ul><ul><li>Types: </li></ul><ul><ul><li>Remote Procedure Call </li></ul></ul><ul><ul><li>Message based </li></ul></ul><ul><ul><li>Object Request Broker </li></ul></ul>
  21. 21. CF/ERP Communication Strategy <ul><li>You’ve got an ERP and an integration strategy… how do you communicate between ColdFusion and your integration point? </li></ul><ul><li>There are some factors to consider… </li></ul>
  22. 22. CF/ERP Communication Strategy Factors to Consider: <ul><li>Performance: Speed will become an issue; should be as fast as possible </li></ul><ul><li>Availability: Choose a stable strategy </li></ul><ul><li>Error Handling: Graceful error handling if the ERP’s unavailable </li></ul><ul><li>Transparency: See what’s being sent </li></ul><ul><li>Tracking: Track down issues if they occur </li></ul><ul><li>Maintainability: You’ll have to maintain it! </li></ul>
  23. 23. Communication Mechanisms <ul><li>How do you communicate with your integration point? Some possibilities may include: </li></ul><ul><ul><li>Web Services – CFINVOKE </li></ul></ul><ul><ul><li>WSDL </li></ul></ul><ul><ul><li>SOAP </li></ul></ul><ul><ul><li>Representational State Transfer (REST) </li></ul></ul><ul><ul><ul><li>CFHTTP! “RESTful” apps just use CFHTTP!!! </li></ul></ul></ul><ul><ul><li>AJAX – Communicate with your integration point directly on the client and avoid CF </li></ul></ul>
  24. 24. Communication Mechanisms <ul><li>Recommendation: If not a client or direct solution, pick CFHTTP (REST) over SOAP, WSDL </li></ul><ul><ul><li>Why? </li></ul></ul><ul><ul><ul><li>Performance! </li></ul></ul></ul><ul><ul><ul><li>Some limitations with AXIS in ColdFusion for SOAP </li></ul></ul></ul><ul><ul><ul><li>Easy to implement* (more on that later) </li></ul></ul></ul>
  25. 25. Communication Methods <ul><li>Other than SQL or direct access: </li></ul><ul><ul><li>XML </li></ul></ul><ul><ul><ul><li>The standard </li></ul></ul></ul><ul><ul><ul><li>Most flexible, but also slower than other choices </li></ul></ul></ul><ul><ul><li>JSON – JavaScript Object Notation </li></ul></ul><ul><ul><li>Binary – A binary format will be the fastest, but also the least transparent </li></ul></ul><ul><ul><li>WDDX – The forgotten one…more later! </li></ul></ul><ul><ul><li>CSV or TSV – Another standard; EDI </li></ul></ul>
  26. 26. Potential CF/ERP Pitfalls <ul><li>Regardless of your integration and communication strategies: </li></ul><ul><ul><li>You will deal with EXTREMELY complex use cases; difficult to test them all, even difficult to KNOW them all </li></ul></ul><ul><ul><li>You can run into phantom issues (can’t replicate them, or they appear and then go away); e.g. bad data in the ERP </li></ul></ul><ul><ul><li>Don’t expect SQL-type speeds </li></ul></ul><ul><ul><li>Increased points of failure </li></ul></ul>
  27. 27. CF/ERP Pitfalls (Continued) <ul><li>When you have a dependency on other systems, you can be at their mercy </li></ul><ul><ul><li>Slow response times can cause memory spikes, active request spikes, garbage collections, timeouts, deadlocks </li></ul></ul><ul><ul><li>Harder to track than slow queries </li></ul></ul><ul><ul><li>“Trickle down” issues; e.g. An ERP issue takes down middleware, which takes down the ColdFusion application and the database </li></ul></ul>
  28. 28. CF/ERP Pitfalls (Continued) <ul><li>An extremely complex object model </li></ul><ul><li>If you use direct Java calls, you can have pool size issues, hung threads </li></ul><ul><li>Pooling of requests </li></ul><ul><li>Performance issues </li></ul><ul><li>Other, non-technical issues </li></ul><ul><ul><li>“ Over the wall” syndrome – “it’s not our fault, it’s the ERP’s fault” or vice versa </li></ul></ul><ul><ul><li>ERP may be a black box to the CF developer </li></ul></ul>
  29. 29. Ways to Handle These Pitfalls <ul><li>Data Replication – Replicate the data from your ERP onto your web database; </li></ul><ul><ul><li>Reduces dependency on the ERP availability </li></ul></ul><ul><ul><li>Packages (SSIS, DTS, other equivalents) </li></ul></ul><ul><ul><li>Triggers, Aggregate tables </li></ul></ul><ul><ul><li>Great for reads, not so great for transactions </li></ul></ul><ul><ul><li>NOT Business function duplication!!! </li></ul></ul><ul><li>Don’t try to make ColdFusion do things it’s not good at!!! </li></ul>
  30. 30. Handling CF/ERP Pitfalls (Cont’d): This may seem controversial!!! <ul><li>Objects… use sparingly! </li></ul><ul><ul><li>In a complex object model, an object with too much flexibility and too much data coming back can really make ColdFusion slow… </li></ul></ul><ul><ul><li>Better in ColdFusion 8, but still not great </li></ul></ul><ul><ul><li>An array of structures is MUCH faster than an array of objects!!! Important when dealing with large arrays of objects with many getters/setters. </li></ul></ul><ul><ul><li>“Sometimes a query should just be a query” </li></ul></ul>
  31. 31. Handling CF/ERP Pitfalls (Cont’d) <ul><li>ColdFusion is great at some things we forget about… </li></ul><ul><ul><li>WDDX: Web Distributed Data eXchange </li></ul></ul><ul><ul><li>Created by Allaire (Sim Simeonov) in 1998 </li></ul></ul><ul><ul><li>It’s built into ColdFusion </li></ul></ul><ul><ul><li>Why use it? FAST!!!! ColdFusion can serialize and deserialize WDDX into native CF arrays, structures, queries & variables at will! </li></ul></ul><ul><ul><li>If you can possibly use it within your CF/ERP ecosystem, USE IT!!! </li></ul></ul>
  32. 32. Handling CF/ERP Pitfalls (Cont’d) <ul><li>And ColdFusion is great at other things we might actually remember… </li></ul><ul><ul><li>Gateways – if you can do things asynchronously </li></ul></ul><ul><ul><li>Threads – ColdFusion 8 or BlueDragon 7 </li></ul></ul><ul><ul><li>If you can fire and forget…or join up with the request later, gateways and threads will help you. </li></ul></ul>
  33. 33. Summary: <ul><li>ERP systems are complex, but help to maintain complex business logic you probably wouldn’t want to replicate in your CF application </li></ul><ul><li>Middleware vs. direct integration strategy depends on the ability to queue requests, API flexibility and other uses </li></ul><ul><li>Use CFHTTP (REST) if possible vs. SOAP/WSDL </li></ul>
  34. 34. Summary (Continued): <ul><li>JSON if possible, XML or binary; XML is standard, but the slowest; WDDX!!! </li></ul><ul><li>Tie into the ERP’s database, if you can </li></ul><ul><li>If not, replicate data where possible </li></ul><ul><li>Fine line between data replication and business function replication </li></ul><ul><li>Expect slower speeds than SQL calls </li></ul><ul><li>Don’t over design the model </li></ul><ul><li>Sometimes a query should just be a query! </li></ul>
  35. 35. Q & A
  36. 36. My company is hiring! <ul><li>We’re looking for two mid-senior CF developers. </li></ul><ul><li>Challenging work! </li></ul><ul><li>Fast paced, but fun and independent work environment! </li></ul><ul><li>You’ll learn more at my company in a month than some places in a year! </li></ul><ul><li>Bonus plan! </li></ul><ul><li>Good benefit plan! </li></ul><ul><li>If you’re a skilled CF developer and are willing to relocate to Cleveland (must be onsite, although working from home is allowed, and paid relocation is offered), email me at [email_address] if you’re interested. </li></ul>
  37. 37. Contact Me: (216) 978-7834 (cell) brianmeloche at gmail dot com