SlideShare a Scribd company logo
Domain driven web applications made simple
                   IIMS Seminar March 21st 2012
                   Associate Professor David Parsons
   The „Naked Objects‟ pattern was originally
    described by Richard Pawson in his PhD
    thesis
    ◦ Based on earlier work on „Expressive Systems‟
   3 principles:
    1. Business logic should be encapsulated in domain
       objects
    2. The user interface should be a direct
       representation of the domain objects
    3. The user interface should be automatically
       generated from the definition of the domain
       objects


                                                         2
   A faster development cycle
    ◦ There are fewer layers of code to develop
   Greater agility
    ◦ Easier to accommodate future changes in business
      requirements
   A more empowering style of user interface
    ◦ Direct interaction with the domain
   Easier requirements analysis
    ◦ Common domain understanding




                                                         3
“an expressive
system has a „make
it so‟ button”
            ◦ - Richard Pawson




                                 4
   As   1960s   high level languages?
   As   1970s   rapid application development?
   As   1980s   4GLs?
   As   1990s   visual programming?
   As   2000s   web frameworks?




                                                  5
6
   Isn‟t what it
    used to be…




                    7
   A whole bunch of web apps are basically just
    create/read/update/delete (CRUD)
    ◦   Facebook
    ◦   Twitter
    ◦   On-line banking
    ◦   Google Docs
    ◦   YouTube
    ◦   Flickr
    ◦   …
   I could go on, you get the point…


                                                   8
   A simple CRUD application involves four
    views for each domain concept
    ◦   Creating
    ◦   Editing (update/delete)
    ◦   Listing many items (read)
    ◦   Showing single item details (read)
   n entities = 4*n pages
   These views are all very much the same apart
    from the fields being exposed
   Useful if a framework can build these views
    automatically


                                                   9
   Over the last decade or so, the naked objects
    pattern has appeared in a number of tools
   Grails (a Groovy web framework) is one of
    these….




                                                    10
   A dynamic language, compiled to Java
    bytecode, to run on a Java virtual machine
   Uses a Java-like syntax
   Interoperates with other Java code and
    libraries
   Most Java code is also syntactically valid
    Groovy
   Groovy implicitly generates data access
    operations on domain objects


                                                 11
   Grails (formerly Groovy on Rails) is an open
    source web framework built on Spring using
    the Groovy language
    ◦ Spring is a Java web framework that uses other
      frameworks
   Grails takes its architectural style from Ruby
    on Rails
   You can also find this style in other tools
    such as Scala Lift



                                                       12
   Grails includes everything you need
   Integrates several common libraries and
    frameworks
   Developers can focus on business logic rather
    than integration
   You don‟t have to manually glue all the
    different components together




                                                    13
   Grails is based on Spring in order to reuse
    some core services
   Spring uses dependency Injection, a specific
    type of Inversion of Control
   The framework can inject capabilities into
    objects that follow certain rules of coding
   Think of it as being like different lightbulbs
    that have the same fitting




                                                     14
   Execution of repetitive tasks by the
    framework
   Use of scaffolding
   The framework generates artifacts related to
    repetitive tasks
    ◦ views and controllers
   Repetitive tasks are gone
   Developer customizes the artifacts




                                                   15
   You don‟t need configuration files if
    everything is in place
   Grails stipulates conventions that make
    configuration files unnecessary
    ◦ e.g. every controller is stored in a specific directory
   Probably the only configuration file you‟ll
    need will be the one which is for database
    access




                                                                16
   The Boating Lake Management System
    ◦ Captain Bob runs a business hiring out rowing
      boats on boating lakes
    ◦ He wants a system to help him manage his thriving
      business
    ◦ Two of the key concepts in the system are Rowing
      Boat and Lake
    ◦ There is a one to many relationship between them
      (one lake can have many rowing boats)

   Demo uses the SpringSource Toolsuite for
    Grails development


                                                          17
   This is a domain class
   We add a few properties and a relationship (to
    one other object)




                                                     18
   This is also a domain class
   Again we add a few properties and a
    relationship (to many other objects)




                                           19
   e.g. for the Rowing Boat



   To make the controller and views dynamic,
    use a scaffold in the controllers




                                                20
   Web app to go
    ◦ („prod run-app‟ would also persist the data in the
      database)




                                                           21
   Easy to add validation, field ordering and
    visibility, formatting, style sheets etc.
   Most tasks driven from within the domain
    objects
   For further info see http://grails.org/




                                                 22

More Related Content

KEY
Developing Mobile HTML5 Apps with Grails
GR8Conf
 
PDF
Building our App with React Native
Nuxeo
 
PDF
The Heron Mapping Client - Overview, Functions, Concepts
Just van den Broecke
 
PPTX
Getting started vmware apps
rickyelqasem
 
PPT
Sgmp Wiki - GenNxt Wiki Concepts
prasadburra
 
PDF
Docker Switzelrand Meetup #18 DockerCon Recap
Brian Christner
 
PPT
Naked Objects
elliando dias
 
PPTX
Javascript frameworks
RajkumarJangid7
 
Developing Mobile HTML5 Apps with Grails
GR8Conf
 
Building our App with React Native
Nuxeo
 
The Heron Mapping Client - Overview, Functions, Concepts
Just van den Broecke
 
Getting started vmware apps
rickyelqasem
 
Sgmp Wiki - GenNxt Wiki Concepts
prasadburra
 
Docker Switzelrand Meetup #18 DockerCon Recap
Brian Christner
 
Naked Objects
elliando dias
 
Javascript frameworks
RajkumarJangid7
 

Similar to Naked Objects and Groovy Grails (20)

PPTX
Cloud development technology sharing (BlueMix premier)
湯米吳 Tommy Wu
 
PPT
A Tour of Ruby On Rails
David Keener
 
PPTX
Lecture android best practices
eleksdev
 
PDF
Docker For Ruby On Rails : Meaning, Benefits, & Use Cases
rorbitssoftware
 
POT
intoduction to Grails Framework
Harshdeep Kaur
 
PDF
Selecting the Best Javascript Web Framework
Rajitha Pathiraja
 
PDF
Adopting Grails - GR8Conf Europe
KlausBaumecker
 
PDF
GR8Conf 2011: Adopting Grails
GR8Conf
 
PDF
Node.js Development Tools
SofiaCarter4
 
PPTX
Custom Runtimes for the Cloud
CloudBees
 
PPTX
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
PDF
The Javascript Toolkit 2.0
Marcos Vinícius
 
PPTX
Java script Session No 1
Saif Ullah Dar
 
PPTX
Accelerate your development with Docker
Andrey Hristov
 
PDF
Accelerate your software development with Docker
Andrey Hristov
 
PDF
Spring Roo Flex Add-on
Bill Ott
 
PPT
Viridians on Rails
Viridians
 
PPTX
From React to React Native - Things I wish I knew when I started
sparkfabrik
 
PDF
Docker Overview - Rise of the Containers
Ryan Hodgin
 
PDF
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
Cloud development technology sharing (BlueMix premier)
湯米吳 Tommy Wu
 
A Tour of Ruby On Rails
David Keener
 
Lecture android best practices
eleksdev
 
Docker For Ruby On Rails : Meaning, Benefits, & Use Cases
rorbitssoftware
 
intoduction to Grails Framework
Harshdeep Kaur
 
Selecting the Best Javascript Web Framework
Rajitha Pathiraja
 
Adopting Grails - GR8Conf Europe
KlausBaumecker
 
GR8Conf 2011: Adopting Grails
GR8Conf
 
Node.js Development Tools
SofiaCarter4
 
Custom Runtimes for the Cloud
CloudBees
 
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
The Javascript Toolkit 2.0
Marcos Vinícius
 
Java script Session No 1
Saif Ullah Dar
 
Accelerate your development with Docker
Andrey Hristov
 
Accelerate your software development with Docker
Andrey Hristov
 
Spring Roo Flex Add-on
Bill Ott
 
Viridians on Rails
Viridians
 
From React to React Native - Things I wish I knew when I started
sparkfabrik
 
Docker Overview - Rise of the Containers
Ryan Hodgin
 
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
Ad

More from David Parsons (15)

PDF
Applying Theories in Mobile Learning Research
David Parsons
 
PPTX
Exploring Mobile Affordances in the Digital Classroom
David Parsons
 
PPTX
Introduction to AngularJS
David Parsons
 
PPTX
A Brief Guide to Game Engines
David Parsons
 
PPTX
Planning Poker
David Parsons
 
PPTX
Creating game like activities in agile software engineering education
David Parsons
 
PPTX
Localizing mobile learning policy for maximum return on investment and stakeh...
David Parsons
 
PPTX
Cloud Analytics - Using cloud based services to analyse big data
David Parsons
 
PPTX
M learning Devices in Education
David Parsons
 
PPTX
Jam today - Embedding BYOD into Classroom Practice
David Parsons
 
PPTX
The Java Story
David Parsons
 
PPTX
An Introduction to MusicXML
David Parsons
 
PPTX
Designing mobile games for engagement and learning
David Parsons
 
PDF
The Impact of Methods and Techniques on Outcomes from Agile Software Developm...
David Parsons
 
PDF
Interaction on the Move
David Parsons
 
Applying Theories in Mobile Learning Research
David Parsons
 
Exploring Mobile Affordances in the Digital Classroom
David Parsons
 
Introduction to AngularJS
David Parsons
 
A Brief Guide to Game Engines
David Parsons
 
Planning Poker
David Parsons
 
Creating game like activities in agile software engineering education
David Parsons
 
Localizing mobile learning policy for maximum return on investment and stakeh...
David Parsons
 
Cloud Analytics - Using cloud based services to analyse big data
David Parsons
 
M learning Devices in Education
David Parsons
 
Jam today - Embedding BYOD into Classroom Practice
David Parsons
 
The Java Story
David Parsons
 
An Introduction to MusicXML
David Parsons
 
Designing mobile games for engagement and learning
David Parsons
 
The Impact of Methods and Techniques on Outcomes from Agile Software Developm...
David Parsons
 
Interaction on the Move
David Parsons
 
Ad

Recently uploaded (20)

PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
The Future of Artificial Intelligence (AI)
Mukul
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Software Development Methodologies in 2025
KodekX
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 

Naked Objects and Groovy Grails

  • 1. Domain driven web applications made simple IIMS Seminar March 21st 2012 Associate Professor David Parsons
  • 2. The „Naked Objects‟ pattern was originally described by Richard Pawson in his PhD thesis ◦ Based on earlier work on „Expressive Systems‟  3 principles: 1. Business logic should be encapsulated in domain objects 2. The user interface should be a direct representation of the domain objects 3. The user interface should be automatically generated from the definition of the domain objects 2
  • 3. A faster development cycle ◦ There are fewer layers of code to develop  Greater agility ◦ Easier to accommodate future changes in business requirements  A more empowering style of user interface ◦ Direct interaction with the domain  Easier requirements analysis ◦ Common domain understanding 3
  • 4. “an expressive system has a „make it so‟ button” ◦ - Richard Pawson 4
  • 5. As 1960s high level languages?  As 1970s rapid application development?  As 1980s 4GLs?  As 1990s visual programming?  As 2000s web frameworks? 5
  • 6. 6
  • 7. Isn‟t what it used to be… 7
  • 8. A whole bunch of web apps are basically just create/read/update/delete (CRUD) ◦ Facebook ◦ Twitter ◦ On-line banking ◦ Google Docs ◦ YouTube ◦ Flickr ◦ …  I could go on, you get the point… 8
  • 9. A simple CRUD application involves four views for each domain concept ◦ Creating ◦ Editing (update/delete) ◦ Listing many items (read) ◦ Showing single item details (read)  n entities = 4*n pages  These views are all very much the same apart from the fields being exposed  Useful if a framework can build these views automatically 9
  • 10. Over the last decade or so, the naked objects pattern has appeared in a number of tools  Grails (a Groovy web framework) is one of these…. 10
  • 11. A dynamic language, compiled to Java bytecode, to run on a Java virtual machine  Uses a Java-like syntax  Interoperates with other Java code and libraries  Most Java code is also syntactically valid Groovy  Groovy implicitly generates data access operations on domain objects 11
  • 12. Grails (formerly Groovy on Rails) is an open source web framework built on Spring using the Groovy language ◦ Spring is a Java web framework that uses other frameworks  Grails takes its architectural style from Ruby on Rails  You can also find this style in other tools such as Scala Lift 12
  • 13. Grails includes everything you need  Integrates several common libraries and frameworks  Developers can focus on business logic rather than integration  You don‟t have to manually glue all the different components together 13
  • 14. Grails is based on Spring in order to reuse some core services  Spring uses dependency Injection, a specific type of Inversion of Control  The framework can inject capabilities into objects that follow certain rules of coding  Think of it as being like different lightbulbs that have the same fitting 14
  • 15. Execution of repetitive tasks by the framework  Use of scaffolding  The framework generates artifacts related to repetitive tasks ◦ views and controllers  Repetitive tasks are gone  Developer customizes the artifacts 15
  • 16. You don‟t need configuration files if everything is in place  Grails stipulates conventions that make configuration files unnecessary ◦ e.g. every controller is stored in a specific directory  Probably the only configuration file you‟ll need will be the one which is for database access 16
  • 17. The Boating Lake Management System ◦ Captain Bob runs a business hiring out rowing boats on boating lakes ◦ He wants a system to help him manage his thriving business ◦ Two of the key concepts in the system are Rowing Boat and Lake ◦ There is a one to many relationship between them (one lake can have many rowing boats)  Demo uses the SpringSource Toolsuite for Grails development 17
  • 18. This is a domain class  We add a few properties and a relationship (to one other object) 18
  • 19. This is also a domain class  Again we add a few properties and a relationship (to many other objects) 19
  • 20. e.g. for the Rowing Boat  To make the controller and views dynamic, use a scaffold in the controllers 20
  • 21. Web app to go ◦ („prod run-app‟ would also persist the data in the database) 21
  • 22. Easy to add validation, field ordering and visibility, formatting, style sheets etc.  Most tasks driven from within the domain objects  For further info see http://grails.org/ 22