SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie Naked Objects and Groovy Grails

Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)湯米吳 Tommy Wu
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On RailsDavid Keener
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practiceseleksdev
 
intoduction to Grails Framework
intoduction to Grails Frameworkintoduction to Grails Framework
intoduction to Grails FrameworkHarshdeep Kaur
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkRajitha Pathiraja
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf
 
Adopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeAdopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeKlausBaumecker
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development ToolsSofiaCarter4
 
Custom Runtimes for the Cloud
Custom Runtimes for the CloudCustom Runtimes for the Cloud
Custom Runtimes for the CloudCloudBees
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To ChooseAlbiorix Technology
 
The Javascript Toolkit 2.0
The Javascript Toolkit 2.0The Javascript Toolkit 2.0
The Javascript Toolkit 2.0Marcos Vinícius
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1Saif Ullah Dar
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
Spring Roo Flex Add-on
Spring Roo Flex Add-onSpring Roo Flex Add-on
Spring Roo Flex Add-onBill Ott
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedsparkfabrik
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersRyan Hodgin
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerAjeet Singh Raina
 

Ähnlich wie Naked Objects and Groovy Grails (20)

Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On Rails
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
 
intoduction to Grails Framework
intoduction to Grails Frameworkintoduction to Grails Framework
intoduction to Grails Framework
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web Framework
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting Grails
 
Adopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeAdopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf Europe
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
Custom Runtimes for the Cloud
Custom Runtimes for the CloudCustom Runtimes for the Cloud
Custom Runtimes for the Cloud
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
 
The Javascript Toolkit 2.0
The Javascript Toolkit 2.0The Javascript Toolkit 2.0
The Javascript Toolkit 2.0
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Spring Roo Flex Add-on
Spring Roo Flex Add-onSpring Roo Flex Add-on
Spring Roo Flex Add-on
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the Containers
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
Js frameworks
Js frameworksJs frameworks
Js frameworks
 

Mehr von David Parsons

Applying Theories in Mobile Learning Research
Applying Theories in Mobile Learning ResearchApplying Theories in Mobile Learning Research
Applying Theories in Mobile Learning ResearchDavid Parsons
 
Exploring Mobile Affordances in the Digital Classroom
Exploring Mobile Affordances in the Digital ClassroomExploring Mobile Affordances in the Digital Classroom
Exploring Mobile Affordances in the Digital ClassroomDavid Parsons
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
A Brief Guide to Game Engines
A Brief Guide to Game EnginesA Brief Guide to Game Engines
A Brief Guide to Game EnginesDavid Parsons
 
Creating game like activities in agile software engineering education
Creating game like activities in agile software engineering educationCreating game like activities in agile software engineering education
Creating game like activities in agile software engineering educationDavid Parsons
 
Localizing mobile learning policy for maximum return on investment and stakeh...
Localizing mobile learning policy for maximum return on investment and stakeh...Localizing mobile learning policy for maximum return on investment and stakeh...
Localizing mobile learning policy for maximum return on investment and stakeh...David Parsons
 
Cloud Analytics - Using cloud based services to analyse big data
Cloud Analytics - Using cloud based services to analyse big dataCloud Analytics - Using cloud based services to analyse big data
Cloud Analytics - Using cloud based services to analyse big dataDavid Parsons
 
M learning Devices in Education
M learning Devices in EducationM learning Devices in Education
M learning Devices in EducationDavid Parsons
 
Jam today - Embedding BYOD into Classroom Practice
Jam today - Embedding BYOD into Classroom PracticeJam today - Embedding BYOD into Classroom Practice
Jam today - Embedding BYOD into Classroom PracticeDavid Parsons
 
An Introduction to MusicXML
An Introduction to MusicXMLAn Introduction to MusicXML
An Introduction to MusicXMLDavid Parsons
 
Designing mobile games for engagement and learning
Designing mobile games for engagement and learningDesigning mobile games for engagement and learning
Designing mobile games for engagement and learningDavid Parsons
 
The Impact of Methods and Techniques on Outcomes from Agile Software Developm...
The Impact of Methods and Techniques on Outcomes from Agile Software Developm...The Impact of Methods and Techniques on Outcomes from Agile Software Developm...
The Impact of Methods and Techniques on Outcomes from Agile Software Developm...David Parsons
 
Interaction on the Move
Interaction on the MoveInteraction on the Move
Interaction on the MoveDavid Parsons
 

Mehr von David Parsons (15)

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

Kürzlich hochgeladen

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Kürzlich hochgeladen (20)

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

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