$30 off During Our Annual Pro Sale. View Details »

Detecting and Reporting Object-Relational MappingProblems: An Industrial Report

Gustavo Pinto
September 19, 2019

Detecting and Reporting Object-Relational MappingProblems: An Industrial Report

Gustavo Pinto

September 19, 2019
Tweet

More Decks by Gustavo Pinto

Other Decks in Research

Transcript

  1. Detecting and Reporting
    Object-Relational Mapping Problems:
    An Industrial Report
    Marcos Nazário
    @gustavopinto
    Gustavo Pinto
    Rodrigo Bonifácio
    Eduardo Guerra

    View Slide

  2. @gustavopinto
    ORM
    Application
    Code
    Database

    View Slide

  3. @gustavopinto
    @Entity
    public class Color {
    private String code;
    private String name;
    private Boolean enable;
    }

    View Slide

  4. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    private String code;
    private String name;
    private Boolean enable;
    }

    View Slide

  5. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Column
    private String code;
    @Column
    private String name;
    @Column
    private Boolean enable;
    }

    View Slide

  6. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  7. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  8. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  9. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  10. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Id
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  11. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Id
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  12. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color {
    @Id
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  13. @gustavopinto
    @Entity
    @Table(schema = "public", name = "COLOR")
    public class Color implements Serializable {
    @Id
    @Column(name = "CODE", nullable = false)
    private String code;
    @Column(name = "NAME", length = 80, nullable = false)
    private String name;
    @Column(name = "ENABLE", nullable = false)
    private Boolean enable;
    }

    View Slide

  14. @gustavopinto
    We catalogued
    12
    ORM-related
    problems

    View Slide

  15. @gustavopinto
    We implemented
    this catalog in a
    static analysis
    tool

    View Slide

  16. @gustavopinto
    We implemented
    this catalog in a
    static analysis
    tool
    Finds the problems
    Suggests the fix

    View Slide

  17. @gustavopinto
    We implemented
    this catalog in a
    static analysis
    tool
    We are using this
    tool for over
    5 years
    now
    Finds the problems
    Suggests the fix

    View Slide

  18. @gustavopinto
    Could
    others take
    advantage
    of our tool?

    View Slide

  19. @gustavopinto

    View Slide

  20. @gustavopinto
    We conducted a
    developer
    experience (DX)
    study with 13
    developers

    View Slide

  21. @gustavopinto
    We conducted a
    developer
    experience (DX)
    study with 13
    developers
    3 students,
    10 from industry
    6 with 7+ years with
    ORM experience
    2 with no previous
    ORM experience

    View Slide

  22. @gustavopinto

    View Slide

  23. @gustavopinto
    6 ORM tasks

    View Slide

  24. @gustavopinto
    6 ORM tasks

    View Slide

  25. @gustavopinto
    6 ORM tasks

    View Slide

  26. @gustavopinto
    All participants completed the
    experiment

    View Slide

  27. @gustavopinto
    eases ORM modeling
    Every day I do object-relational
    mapping, and this tool
    could help me to remember
    what is missing


    View Slide

  28. @gustavopinto
    eases ORM modeling
    the tool is precise
    forces best practices

    View Slide

  29. @gustavopinto
    Little docs
    I found it quite difficult to
    find help in the
    documentation. There is
    nothing on the web


    View Slide

  30. @gustavopinto
    Little docs
    Custom annotations
    were not intuitive
    The tool poses many
    constraints

    View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide