• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Application Architecture in Groovy
 

Application Architecture in Groovy

on

  • 216 views

Speaker: Daniel Woods ...

Speaker: Daniel Woods
Groovy provides flexible and dynamic capabilities for developing modular, maintainable code. With Groovy's extension framework, developers can modularize common application utility functions. Leveraging Groovy's dynamic nature can allow developers to create powerful, easy-to-follow business components. Employing Groovy categories and mixins can help localize and simplify transformation and adaptation logic that would otherwise be verbose and difficult to maintain.
This talk will focus on leveraging the strengths and flexibilities in Groovy to employ a powerful, maintainable, and simple application architecture.

Statistics

Views

Total Views
216
Views on SlideShare
216
Embed Views
0

Actions

Likes
0
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Application Architecture in Groovy Application Architecture in Groovy Presentation Transcript

    •  
    • Applica(on  Architecture  in  Groovy   ABOUT  ME   daniel.p.woods@gmail.com   Principal  Consultant   github.com/danveloper   @danveloper  
    • Applica(on  Architecture  in  Groovy   WHAT  IS  AN  ARCHITECT?   WHAT  IS  ARCHITECTURE?  
    • Applica(on  Architecture  in  Groovy   ARCHITECTURE  IS  NOT  JUST  ABOUT  STRUCTURE  
    • Applica(on  Architecture  in  Groovy   ARCHITECTURE  IS  A  SET  OF  PRINCIPLES  TO  FOLLOW  
    • Applica(on  Architecture  in  Groovy   ARCHITECTURE  SHOULD  BE  ADAPTABLE  &  EASY  TO  MAINTAIN  
    • Applica(on  Architecture  in  Groovy   “ARCHITECT”  HAS  BECOME  A  BUZZ  WORD   I’m  an   Architect!  
    • Applica(on  Architecture  in  Groovy   “THE  BIG  PICTURE”  
    • Applica(on  Architecture  in  Groovy   WHAT  MAKES  APPLICATION  ARCHITECTURE  IN  GROOVY   DIFFERENT?  
    • Applica(on  Architecture  in  Groovy   GROOVY  IS  MORE  THAN  JUST  SYNTAX  SUGAR  
    • Applica(on  Architecture  in  Groovy   GROOVY  IS  MORE  THAN  JUST  SYNTAX  SUGAR  
    • Applica(on  Architecture  in  Groovy   GROOVY  “MAGIC”  IS  EVERYWHERE!  
    • Applica(on  Architecture  in  Groovy   IDIOMATIC  GROOVY  CAN  BE  SCARY  
    • Applica(on  Architecture  in  Groovy   “GOLDILOCKS  GROOVY”   NOT  TOO  GROOVY…   JUST  GROOVY  ENOUGH  
    • Applica(on  Architecture  in  Groovy   PRINCIPLES  OF  APPLICATION  ARCHITECTURE  
    • Applica(on  Architecture  in  Groovy   PREDICTABILITY  PATTERN:   TIGHTLY  COUPLE  FORM  AND  FUNCTION  
    • Applica(on  Architecture  in  Groovy   THE  “FORM”  OF  A  RESOURCE     SHOULD  HINT  TO  ITS  “FUNCTION”   Ü    Ü  LIKE GRAILS: “CONTROLLER”, “SERVICE”, “TAGLIB”! AVOID  NAMES  LIKE  DomainWizardBeanImpl!
    • Applica(on  Architecture  in  Groovy   THE  “FUNCTION”  OF  A  RESOURCE     SHOULD  RESOLVE  ITS  “FORM”   ü  Follow Single Responsibility Principle!
    • Applica(on  Architecture  in  Groovy   MAKE  CODE  “MORE  READABLE”  
    • Applica(on  Architecture  in  Groovy   EVERY  MINUTE  LOST  DECIPHERING…   IS  A  MINUTE  LOST  IMPLEMENTING  
    • Applica(on  Architecture  in  Groovy   BDD  FRAMEWORKS   AIM  FOR  “READABILITY”  
    • Applica(on  Architecture  in  Groovy   IF  (ISUSINGGROOVY())   {  “USE  GROOVY!”()  }  
    • Applica(on  Architecture  in  Groovy   SYNTAX  SUGAR  IS  A  GOOD  THING  
    • Applica(on  Architecture  in  Groovy   CLOSURE  AS  FINAL  VARARG  IN  METHOD   ü  Provides  “Scoped”  Execu(on  Environment     ü  Contains  code  to  enhance  readability   ü  Programma(cally  determine  resolu(on     ü  Shortcut  otherwise  verbose  steps  
    • Applica(on  Architecture  in  Groovy   MAPS  ARE  FIRST-­‐CLASS  CITIZENS   ü    ü    ü    ü  Map-­‐based  constructors  lend  code  to  self-­‐documenta(on   Allow  explicit  named  assignments   Ad-­‐hoc  data  structure  is  great  for  method  method  args   Great  overall  reduc(on  of  code  verbosity  
    • Applica(on  Architecture  in  Groovy   METHOD  MISSING  &  PROPERTY  MISSING   THE  “ALL  ELSE  FAILED”  HANDLERS  
    • Applica(on  Architecture  in  Groovy   FLUENT,  HUMAN-­‐READABLE  DSLS   ü    ü    ü    ü  Dis(ll  reusable  complex  opera(ons  into  a  human-­‐readable  string   Built-­‐in  self-­‐documenta(on  of  intent   A  licle  capital  expense  to  facilitate  low  opera(ng  expense   Great  developers  up  to  speed  very  quickly  
    • Applica(on  Architecture  in  Groovy   FLUENT,  HUMAN-­‐READABLE  DSLS   o  What  should  they  be  used?     o  Who  should  develop  the  DSL?  
    • Applica(on  Architecture  in  Groovy   BE  EXPLICIT  WITH  MAGIC  
    • Applica(on  Architecture  in  Groovy   METACLASS  ENHANCEMENTS  CAN  COME  FROM…   ü  Custom  MetaClasses     ü  Conven(on  MetaClasses  named:   groovy.runtime.metaclass.[package].[class]MetaClass!   ü  Libraries  /  Plugins     ü  Anywhere  at  run(me!!  
    • Applica(on  Architecture  in  Groovy   BUILD  CONVENTION  AROUND     -­‐WHERE-­‐   MAGIC  IS  COMING  FROM  
    • Applica(on  Architecture  in  Groovy   BE  VERY  CLEAR  WHEN  OVERLOADING  OPERATORS     (USE  A  CATEGORY)  
    • Applica(on  Architecture  in  Groovy   USE  CATEGORIES  FOR  ONE-­‐OFF  MIXINS,     OR  CONCEPT-­‐BASED  OVERLOADS  
    • Applica(on  Architecture  in  Groovy   FAVOR  CONVENTION  OVER  CONFIGURATION  
    • Applica(on  Architecture  in  Groovy   GROOVY  ECOSYSTEM  EMBRACES   CONVENTION-­‐OVER-­‐CONFIGURATION  
    • Applica(on  Architecture  in  Groovy   USE  CONVENTION-­‐OVER-­‐CONFIGURATION  TO  BUILD   AN  ADAPTIVE  DEVELOPMENT  ENVIRONMENT  
    • Applica(on  Architecture  in  Groovy   .ALL  DONE.     J   QUESTIONS?