thoughts on the generic vs specific tradeoff
play

Thoughts on the Generic vs. Specific Tradeoff Stefan Tilkov, - PowerPoint PPT Presentation

Thoughts on the Generic vs. Specific Tradeoff Stefan Tilkov, innoQ QCon London 2009 http://www.innoq.com Phases in a Developers Life 1. The Enthusiastic Developer This stuff is cool - lets build programs! For real people!


  1. Thoughts on the Generic vs. Specific Tradeoff Stefan Tilkov, innoQ QCon London 2009 http://www.innoq.com

  2. Phases in a Developer’s Life

  3. 1. The Enthusiastic Developer “This stuff is cool - let’s build programs! For real people!”

  4. Create Customer Create Product Create Order Find Customer Find Product Find Order List Customers List Products List Orders Edit Customer Edit Product Edit Order Delete Customer Delete Product Delete Order Boring, boring, boring.

  5. 2. The Disillusioned Developer “Oh. Real people have boring problems.”

  6. Create Customer Create Product Create Order Find Customer Find Product Find Order List Customers List Products List Orders Edit Customer Edit Product Edit Order Delete Customer Delete Product Delete Order

  7. Create Thing Find Thing List Thing Edit Thing Delete Thing

  8. 3. The Enthusiastic Architect Create Thing Find Thing List Thing Edit Thing Delete Thing “Generic solutions! Cool!”

  9. Configuration 10% Application The (100%) Generic 90% Thing Machine

  10. Functionality: 80% 20% Time/Effort: 80% 320%

  11. Configuration Customer The Generic Thing Machine Developer

  12. 4. The Disillusioned Architect “Some programmers, when faced with a problem, turn to a generic solution … now they have two problems.” KISS YAGNI Working software

  13. 5. The “Wise” Architect Question : * Answer : It depends.

  14. Examples

  15. XML vs. HTML <customer xmlns='http://example.com/schemas/crm'> <id>4711</id> <name>Schulze Systems AG</name> <city>Ratingen</city> <country>Germany</country> </customer> <html> <head> <title>Customer Info</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <div class="customer"> <span class="id">4711</span> <span class="name">Schulze Systems AG</span> <span class="city">Ratingen</span> <span class="country">Germany</span> </div> </body> </html>

  16. DSM vs. UML OrderEntry OrderManager <<ui>> OrderEntry Customer Order <<uses>> 1 n name date address total <<service>> OrderManager submitOrder() cancelOrder() <<manages>> <<manages>> <<entity>> <<entity>> 1 n Customer Order name date address total

  17. External vs. Internal DSL cancel: transitions from submitted to cancelled, accept: transitions from received to accepted, from checking to checked event :cancel do transitions :from => :submitted, :to => :cancelled end event :accept do transitions :from => :received, :to => :accepted transitions :from => :checking, :to => :checked end

  18. SOAP/WSDL vs. REST/HTTP

  19. HTTP Verbs vs. POST Tunneling PUT /xyz HTTP/1.1 POST /xyz HTTP/1.1 <data>...</data> <update><data>...</data></update> DELETE /xyz HTTP/1.1 POST /xyz HTTP/1.1 <delete>...</delete> PATCH /xyz HTTP/1.1 POST /xyz HTTP/1.1 <diff>...</diff> <diff>...</diff>

  20. Custom Protocol vs. AtomPub Orders Individual Collection Order Feed Entry 0 * * Category id id title title updated updated Content

  21. generic T e x t Formats Continuum C S V J S O N X M L R D F H T M L R S S / A t o m p r o p r i e t a r y specific

  22. RDBMS Tables vs. Metatables Customer id name address status Order Class id date amount total cust_id id name 1 Customer 2 Order Attribute id name type class_id 1 cust_no int 1 2

  23. The List Goes on and on … Smalltalk Image vs. Filebased IDEs Custom-built Web App vs. CMS Custom Protocols vs. Standards Maven vs. Ant (vs. scripts)

  24. Considerations

  25. Problem/Solution Congruence

  26. Diversity

  27. Ramp-up Cost

  28. Development Performance

  29. Runtime Performance

  30. Knowledge

  31. Skill

  32. Folklore

  33. Ecosystem

  34. XML 1. View it in tree 6. Validate against rendering schema 2. Check for 7. Encrypt/Decrypt wellformedness parts 3. Run XSLT on it 8. Sign and verify signature 4. Query with XPath 9. Archive it 5. Process with XQuery 10.Process w/ SAX/DOM

  35. HTTP & URIs 1. Embed links in 6. Get indexed by Google representations (public or appliance) 2. Drive application flow 7. Bookmark or email Links 3. Expose Multiple Representations 8. Redirect 4. Use curl/wget 9. Use 404, 412, 409 5. Control access 10. Use Caches

  36. SOAP/WSDL/WS-* 1. ESBs 6. Mainstream choice 2. Platforms 7. People 3. Tooling 8. Politics 4. Intermediaries 9. Hype 5. Standard software 10. Job security

  37. RDBMS 1. Standard Query 6. Report generators & BI Language Tools 2. Optimized access 7. Hot backup 3. Parallel processing 8. Portability 4. Scalability & 9. Program-independent Performance storage 5. Metadata management 10.Caching

  38. Files 1. Search 7. Import/Export 2. Backup 8. Convert 3. Debug 9. Generate 4. Diff 10. Process 5. Edit 6. Version control

  39. UML Concepts DSM Diagram types CASE Tools Eclipse EMF MS SW Factories

  40. Generic Specific Niche needs Useful ecosystem “Obvious” match “Unique” problem Existing skills Performance Static environment Soft environment

  41. Q&A Stefan Tilkov stefan.tilkov@innoq.com http://www.innoq.com/blog/st/ Twitter: stilkov

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend