1 / 37

COLDFUSION AS A DIFFERENT TYPE OF “GLUE”

COLDFUSION AS A DIFFERENT TYPE OF “GLUE”. #SA4A, Architecture & Design in Software. Brian Meloche – brianmeloche@gmail.com www.brianmeloche.com/blog www.clevelandcfug.org twitter.com/coofuushun. Glue? As in Model-Glue?. This is NOT a Model-Glue discussion…

boaz
Download Presentation

COLDFUSION AS A DIFFERENT TYPE OF “GLUE”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COLDFUSION AS A DIFFERENT TYPE OF “GLUE” #SA4A, Architecture & Design in Software Brian Meloche – brianmeloche@gmail.com www.brianmeloche.com/blog www.clevelandcfug.org twitter.com/coofuushun

  2. Glue? As in Model-Glue? • This is NOT a Model-Glue discussion… • I don’t even USE Model-Glue (though it’s a great framework)

  3. No… Enterprise glue!!!

  4. ColdFusion can do more than just intranets in the enterprise… We’ll talk about using ColdFusion as the customer facing front end to an enterprise back end 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

  5. About Me… Brian Meloche • Originally from Windsor, Ontario, Canada • Developer (off and on) since 1986 • Brief attempt at screenwriting; sold an uncredited story premise to Star Trek: DS9 “Broken Link” • Web Designer/Developer since 1996; CF Developer since 1998; for me, it all started with <cfmail>! • Manager, Cleveland CFUG • Former Manager, Cleveland AUG & WV MUG • Adobe Community Expert in ColdFusion since 2007 • Sr. Web Dev’r at a Cleveland wholesaler since 2004 • I’m more Scotty than Spock (real world experience and fundamentals vs. blindly following theory)

  6. ColdFusion as the customer facing “glue” to the enterprise • Enterprise back ends: • ERPs • Accounting systems • Business Intelligence • Data Warehouses

  7. ColdFusion as the customer facing “glue” to the enterprise (Continued) • Integration Strategies • Middleware: Types; Pros & Cons • Direct connectivity with enterprise systems • REST, WSDL, SOAP, COM, Java, XML, JSON, WDDX • Pitfalls • Strategies to overcome them

  8. What is an ERP??? • ERP = Enterprise Resource Planning • Integrates several data sources and processes of an organization into a unified system. • Typical ERP systems use multiple components of computer software and hardware to achieve the integration. • Most ERP systems use a unified database to store data for the various system modules. • http://en.wikipedia.org/wiki/Enterprise_resource_planning

  9. ERPs can include: • Manufacturing: • Engineering, Bills of Material, Scheduling, Capacity, Workflow Management, Quality Control, Cost Management, Manufacturing Process, Manufacturing Projects, Manufacturing Flow • Supply Chain Management: • Inventory, Order Entry, Purchasing, Product Configurator, Supply Chain Planning, Supplier Scheduling, Inspection of goods, Claim Processing, Commission Calculation

  10. ERPs can include (Continued): • Financials:  • General Ledger, Cash Management, Accounts Payable, Accounts Receivable, Fixed Assets • Projects: • Costing, Billing, Time and Expense, Activity Management • Human Resources: • Human Resources, Payroll, Training, Time & Attendance, Rostering, Benefits

  11. ERPs can include (Continued): • Customer Relationship Management: • Sales and Marketing, Commissions, Service, Customer Contact and Call Center support • Data Warehouse: • and various Self-Service interfaces for Customers, Suppliers, and Employees • For the rest of this discussion, accounting systems, business intelligence systems and (obviously) data warehouse integration will be discussed as ERP.

  12. Examples of ERP Systems: • SAP Business Suite, Netweaver • Oracle: • Peoplesoft • Oracle e-Business Suite • JD Edwards EnterpriseOne & World • Microsoft Dynamics • Infor ERP • The Sage Group

  13. Why have an ERP System? • If you have more than typical “e-commerce” website • Multiple warehousing facilities; sourcing an item • Real-time inventory • Complex pricing (not one price for all) • Varying delivery options available (e.g. same day shipping in certain markets; multiple carriers) • Delivery times are sensitive (e.g. B to B, where your customer is selling to their customer) • Supply Chain becomes very important

  14. Characteristics of an ERP backend • Provide access to complex business functions; you don’t have to build out those decisions in your model • Instead, your model needs to be able to interact with the ERP’s API • Have their own database, which you may not have access to directly • May be mainframe based, server based, or some combination

  15. ColdFusion with an ERP • A good choice: • ERPs often have Java compatibility • Great at building a presentation (especially in concert with Flex) and building the model • Web Services, SOAP, XML, WDDX and REST are well supported • If your ERP has a web interface, it may not be suitable for a customer-facing application; CF gives more flexibility • Rapid Application Development

  16. CF/ERP Integration Strategies • You may have several options, depending on the ERP: • Direct access to the ERP’s database(s) • Communicate with the ERP API directly • Use middleware to provide a translation API and provide a buffer between your web applications and your ERP • Data replication • Learn to play the cards you’ve been dealt (make the best of what you have)

  17. Directly connect to the ERP’s DB • If this option is available to you, this may be a good option for some of your needs • But… BE CAREFUL! • You most likely will not have access to the ERP’s business functions if you directly interact with the ERP database • Great if you’re doing simple CRUD without the need for the business functions.

  18. Directly interact with an ERP’s API • This is a good option in many cases • You will have access to the business functions • Depends on the API… • If it’s easy enough to interact with • If it’s extensible enough • Robustness of the ERP to queue requests

  19. Middleware? Huh? • Is ColdFusion middleware? Not this time… • “Middleware is computer software that connects software components or applications.” http://en.wikipedia.org/wiki/Middleware • Provides a common access point for multiple systems • Queue up calls to the system, to avoid flooding the ERP with requests • Can help translate/format the data

  20. Middleware Examples & Types • Examples: • IBM Websphere MQ (a.k.a. MQSeries) • WebMethods • Microsoft BizTalk Server • TIBCO Business Works… (many others) • Types: • Remote Procedure Call • Message based • Object Request Broker

  21. CF/ERP Communication Strategy You’ve got an ERP and an integration strategy… how do you communicate between ColdFusion and your integration point? There are some factors to consider…

  22. CF/ERP Communication Strategy Factors to Consider: • Performance: Speed will become an issue; should be as fast as possible • Availability: Choose a stable strategy • Error Handling: Graceful error handling if the ERP’s unavailable • Transparency: See what’s being sent • Tracking: Track down issues if they occur • Maintainability: You’ll have to maintain it!

  23. Communication Mechanisms • How do you communicate with your integration point? Some possibilities may include: • Web Services – CFINVOKE • WSDL • SOAP • Representational State Transfer (REST) • CFHTTP! “RESTful” apps just use CFHTTP!!! • AJAX – Communicate with your integration point directly on the client and avoid CF

  24. Communication Mechanisms • Recommendation: If not a client or direct solution, pick CFHTTP (REST) over SOAP, WSDL • Why? • Performance! • Some limitations with AXIS in ColdFusion for SOAP • Easy to implement* (more on that later)

  25. Communication Methods • Other than SQL or direct access: • XML • The standard • Most flexible, but also slower than other choices • JSON – JavaScript Object Notation • Binary – A binary format will be the fastest, but also the least transparent • WDDX – The forgotten one…more later! • CSV or TSV – Another standard; EDI

  26. Potential CF/ERP Pitfalls • Regardless of your integration and communication strategies: • You will deal with EXTREMELY complex use cases; difficult to test them all, even difficult to KNOW them all • You can run into phantom issues (can’t replicate them, or they appear and then go away); e.g. bad data in the ERP • Don’t expect SQL-type speeds • Increased points of failure

  27. CF/ERP Pitfalls (Continued) • When you have a dependency on other systems, you can be at their mercy • Slow response times can cause memory spikes, active request spikes, garbage collections, timeouts, deadlocks • Harder to track than slow queries • “Trickle down” issues; e.g. An ERP issue takes down middleware, which takes down the ColdFusion application and the database

  28. CF/ERP Pitfalls (Continued) • An extremely complex object model • If you use direct Java calls, you can have pool size issues, hung threads • Pooling of requests • Performance issues • Other, non-technical issues • “Over the wall” syndrome – “it’s not our fault, it’s the ERP’s fault” or vice versa • ERP may be a black box to the CF developer

  29. Ways to Handle These Pitfalls • Data Replication – Replicate the data from your ERP onto your web database; • Reduces dependency on the ERP availability • Packages (SSIS, DTS, other equivalents) • Triggers, Aggregate tables • Great for reads, not so great for transactions • NOT Business function duplication!!! • Don’t try to make ColdFusion do things it’s not good at!!!

  30. Handling CF/ERP Pitfalls (Cont’d): This may seem controversial!!! • Objects… use sparingly! • In a complex object model, an object with too much flexibility and too much data coming back can really make ColdFusion slow… • Better in ColdFusion 8, but still not great • An array of structures is MUCH faster than an array of objects!!! Important when dealing with large arrays of objects with many getters/setters. • “Sometimes a query should just be a query”

  31. Handling CF/ERP Pitfalls (Cont’d) • ColdFusion is great at some things we forget about… • WDDX: Web Distributed Data eXchange • Created by Allaire (Sim Simeonov) in 1998 • It’s built into ColdFusion • Why use it? FAST!!!! ColdFusion can serialize and deserialize WDDX into native CF arrays, structures, queries & variables at will! • If you can possibly use it within your CF/ERP ecosystem, USE IT!!!

  32. Handling CF/ERP Pitfalls (Cont’d) • And ColdFusion is great at other things we might actually remember… • Gateways – if you can do things asynchronously • Threads – ColdFusion 8 or BlueDragon 7 • If you can fire and forget…or join up with the request later, gateways and threads will help you.

  33. Summary: ERP systems are complex, but help to maintain complex business logic you probably wouldn’t want to replicate in your CF application Middleware vs. direct integration strategy depends on the ability to queue requests, API flexibility and other uses Use CFHTTP (REST) if possible vs. SOAP/WSDL

  34. Summary (Continued): JSON if possible, XML or binary; XML is standard, but the slowest; WDDX!!! Tie into the ERP’s database, if you can If not, replicate data where possible Fine line between data replication and business function replication Expect slower speeds than SQL calls Don’t over design the model Sometimes a query should just be a query!

  35. Q & A

  36. My company is hiring! • We’re looking for two mid-senior CF developers. • Challenging work! • Fast paced, but fun and independent work environment! • You’ll learn more at my company in a month than some places in a year! • Bonus plan! • Good benefit plan! • 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 brianmeloche@gmail.com if you’re interested.

  37. Contact Me: (216) 978-7834 (cell) brianmeloche at gmail dot com

More Related