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

thoughts on the generic vs specific tradeoff
SMART_READER_LITE
LIVE PREVIEW

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!


slide-1
SLIDE 1

Thoughts

  • n the

Generic vs. Specific Tradeoff

Stefan Tilkov, innoQ QCon London 2009

http://www.innoq.com

slide-2
SLIDE 2

Phases in a Developer’s Life

slide-3
SLIDE 3
  • 1. The Enthusiastic Developer

“This stuff is cool - let’s build programs! For real people!”

slide-4
SLIDE 4

Boring, boring, boring.

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

slide-5
SLIDE 5
  • 2. The Disillusioned Developer

“Oh. Real people have boring problems.”

slide-6
SLIDE 6

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

slide-7
SLIDE 7

Create Thing Find Thing List Thing Edit Thing Delete Thing

slide-8
SLIDE 8
  • 3. The Enthusiastic Architect

Create Thing Find Thing List Thing Edit Thing Delete Thing

“Generic solutions! Cool!”

slide-9
SLIDE 9

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

slide-10
SLIDE 10

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

slide-11
SLIDE 11

Configuration The Generic Thing Machine

Customer Developer

slide-12
SLIDE 12
slide-13
SLIDE 13
  • 4. The Disillusioned Architect

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

slide-14
SLIDE 14
  • 5. The “Wise” Architect

Answer: It depends. Question: *

slide-15
SLIDE 15

Examples

slide-16
SLIDE 16

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>

slide-17
SLIDE 17

DSM vs. UML

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

Customer name address Order date total 1 n OrderEntry OrderManager

slide-18
SLIDE 18

External vs. Internal DSL

event :cancel do transitions :from => :submitted, :to => :cancelled end event :accept do transitions :from => :received, :to => :accepted transitions :from => :checking, :to => :checked end cancel: transitions from submitted to cancelled, accept: transitions from received to accepted, from checking to checked

slide-19
SLIDE 19

SOAP/WSDL vs. REST/HTTP

slide-20
SLIDE 20

HTTP Verbs vs. POST Tunneling

PUT /xyz HTTP/1.1 <data>...</data> DELETE /xyz HTTP/1.1 PATCH /xyz HTTP/1.1 <diff>...</diff> POST /xyz HTTP/1.1 <update><data>...</data></update> POST /xyz HTTP/1.1 <delete>...</delete> POST /xyz HTTP/1.1 <diff>...</diff>

slide-21
SLIDE 21

Custom Protocol vs. AtomPub

Feed Entry

*

id title updated id title updated

Content Category

*

Individual Order Orders Collection

slide-22
SLIDE 22

Formats Continuum

generic specific R D F H T M L R S S / A t

  • m

C S V T e x t X M L J S O N p r

  • p

r i e t a r y

slide-23
SLIDE 23

RDBMS Tables vs. Metatables

id name address status

Customer

id date amount total cust_id

Order

id name 1 Customer 2 Order

Class

id name type class_id 1 cust_no int 1 2

Attribute

slide-24
SLIDE 24

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)

slide-25
SLIDE 25

Considerations

slide-26
SLIDE 26

Problem/Solution Congruence

slide-27
SLIDE 27

Diversity

slide-28
SLIDE 28

Ramp-up Cost

slide-29
SLIDE 29

Development Performance

slide-30
SLIDE 30

Runtime Performance

slide-31
SLIDE 31

Knowledge

slide-32
SLIDE 32

Skill

slide-33
SLIDE 33

Folklore

slide-34
SLIDE 34

Ecosystem

slide-35
SLIDE 35

XML

  • 1. View it in tree

rendering

  • 2. Check for

wellformedness

  • 3. Run XSLT on it
  • 4. Query with XPath
  • 5. Process with XQuery
  • 6. Validate against

schema

  • 7. Encrypt/Decrypt

parts

  • 8. Sign and verify signature
  • 9. Archive it

10.Process w/ SAX/DOM

slide-36
SLIDE 36

HTTP & URIs

  • 1. Embed links in

representations

  • 2. Drive application flow
  • 3. Expose Multiple

Representations

  • 4. Use curl/wget
  • 5. Control access
  • 6. Get indexed by Google

(public or appliance)

  • 7. Bookmark or email

Links

  • 8. Redirect
  • 9. Use 404, 412, 409
  • 10. Use Caches
slide-37
SLIDE 37

SOAP/WSDL/WS-*

  • 1. ESBs
  • 2. Platforms
  • 3. Tooling
  • 4. Intermediaries
  • 5. Standard software
  • 6. Mainstream choice
  • 7. People
  • 8. Politics
  • 9. Hype
  • 10. Job security
slide-38
SLIDE 38

RDBMS

  • 1. Standard Query

Language

  • 2. Optimized access
  • 3. Parallel processing
  • 4. Scalability &

Performance

  • 5. Metadata management
  • 6. Report generators & BI

Tools

  • 7. Hot backup
  • 8. Portability
  • 9. Program-independent

storage 10.Caching

slide-39
SLIDE 39

Files

  • 1. Search
  • 2. Backup
  • 3. Debug
  • 4. Diff
  • 5. Edit
  • 6. Version control
  • 7. Import/Export
  • 8. Convert
  • 9. Generate
  • 10. Process
slide-40
SLIDE 40

UML

Concepts Diagram types CASE Tools

DSM

Eclipse EMF MS SW Factories

slide-41
SLIDE 41
slide-42
SLIDE 42

Generic Specific

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

slide-43
SLIDE 43

Q&A

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