composition on grails
TRANSCRIPT
![Page 1: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/1.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 1/22
1
Composition on Grails
Sean Doyle, SAP NetWeaver
September 2008
![Page 2: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/2.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 2/22
2
© SAP 2008 / Page 2
1. In troduction1.1 What’s Grails?1.2 What’s Composition on Grails (CoG)?1.3 Why Composition on Grails?1.4 What is CoGSole (CoG web ConSole)?1.5 Why CogSole?
2. Demo2.1 CoGSole wizard2.2 Builder script engine2.3 Web services
3. Future directions3.1 Composition on Grails Enhancements
Agenda
![Page 3: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/3.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 3/22
3
© SAP 2008 / Page 3
SAP Composition on Grails
What’s Grails?What’s Grails?
Grails is an open source web application framework which leverages the Groovyprogramming language (which is in turn based on the Java platform ). Grails is intendedto be a high-productivity framework by following the "coding by convention" paradigm,providing a stand-alone development environment and hiding much of theconfiguration detail from the developer.(i.e. a tool that let’s you build web apps quickly!)
What’s Composition on Grails?What’s Composition on Grails?
A tool (now web based) that enables users to quickly build and run SAP applications(with or without deploying them) by leveraging the Grails framework.
It uses WebDynpro to render the views and has libraries to help consume webservices and BAPIs
![Page 4: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/4.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 4/22
4
© SAP 2008 / Page 4
SAP Composition on Grails
Composition on Grails ArchitectureComposition on Grails Architecture
1. Developer creates domain class models and (optionally) service clients
2. Models are read by groovy script generators-> produce views and controllers
3. Users can access generated application (via web browser)
![Page 5: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/5.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 5/22
5
© SAP 2008 / Page 5
SAP Composition on Grails
Composition on Grails ArchitectureComposition on Grails Architecture
Consists of:
Tools: Developer builds & modifies apps using Eclipse/ NetWeaver IDE & WD generator
Grails/WD bridge: Renders applications in WebDynPro
WebDynPro Runtime: Renders the views and stores variables
Grails Runtime: Interprets groovy code and interfaces with persistence framework
![Page 6: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/6.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 6/22
6
© SAP 2008 / Page 6
Composition on Grails
Why Composi tion on Grails?Why Composi tion on Grails?
Integrating Grails increases productivityand flexibility of SAP NetWeaver Provide a simple to consumecomposition platform for ISVs andcustomersReduce Total Cost of Development(TCD)
© SAP 2008 / Page 6
Flexibility
P r o d u c t i v i t y
VisualModeling &
Pat ter ns Comp osit io nOn Grails
NW JavaPlatform
o Independent software vendors (ISVs) & consultants can quickly create customizedapps; especially useful in the long tail apps i.e. frequently used apps are common tomany business partners but each one has specific needs for customized apps. To avoidthe overhead of building enterprise apps CoG provides a lightweight alternative
![Page 7: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/7.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 7/22
7
© SAP 2008 / Page 7
Groovy and Java
Both compile to JVM bytecode –virtually all java code is compatible with groovy compiler
Groovy is loosely typed & has simpler syntax
Groovy may or may not use classes
![Page 8: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/8.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 8/22
8
© SAP 2008 / Page 8
Grails features
CRUD OperationsCRUD Operations
Grails domain classes use dynamic persistent methods to facilitate CRUD(Create/Read/Update/Delete) operations on persistent classes
These methods are automatically generated so only the domain classes need to becreated by the user
Grails Object Relational Mapping (GORM)Grails Object Relational Mapping (GORM)
Domain classes are core to any business application. They hold state about businessprocesses. They are linked together through relationships, either one-to-one or one-to-
many.
GORM is Grails' object relational mapping (ORM) implementation. Under the hood ituses Hibernate 3 (an extremely popular and flexible open source ORM solution) butbecause of the dynamic nature of Groovy, the fact that it supports both static anddynamic typing, and the convention of Grails there is less configuration involved increating Grails domain classes
![Page 9: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/9.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 9/22
9
© SAP 2008 / Page 9
Real World Rails Applications
![Page 10: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/10.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 10/22
10
© SAP 2008 / Page 10
Eclipse based Composition on Grails
![Page 11: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/11.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 11/22
11
© SAP 2008 / Page 11
CoGSole - Web based Composition on Grails
CoGSole is a 100% web-based system that allows
knowledge workers to createtheir own custom businessapplications, with filemanager , console interface forcompiling and execution ofcode and an editor with syntaxhighlighting , which isaccessed using a browser.
Instant development andcode testingBegin to code without spendingtime with configurations andenvironments;Test your code instantly;
![Page 12: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/12.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 12/22
12
© SAP 2008 / Page 12
Why CoGSole? - Desktop IDE vs Web IDE
DescriptionProblem: Developers spend too muchtime to become productive
Problem: Developers spend too muchtime to become productive
SolutionSolution
Scripting languages & Rails framework growingin popularity with the web developer communitySaaS – not just web services & web based appsbut web based tools for building web based appsSeveral companies are building web IDEs
Technology trendsTechnology trends
Desktop IDE -Download, install, configure,plugins, updates, deployment, etc. (installingserver takes even longer)Grails - command line tools create-domain-class,generate-controllers, etc.Searching for required libs – e.g. testingwebservices in IDE requires several extra jars
Web based IDE –> Composi tion on Grails web Console (CoGSole)
Zero download, install, config, updates, etc. Access your code from anywhereShorter development cycle; changes available upon page reloadedit/compile/deploy/test cycle -> edit/test
![Page 13: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/13.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 13/22
13
© SAP 2008 / Page 13
Technology trends: Heroku.com
Web based ruby on railsapplication tool
Problems:
Unclear where to getstarted building apps
Not downloadable - can’tinstall on intranet
![Page 14: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/14.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 14/22
14
© SAP 2008 / Page 14
Demo
Composition on Grails Demo
Steve MarksDeveloper
Demo Act 1:
Steve writes theInventory modelsand generates the
application
Demo Ac t 2:
Steve tailors thegenerated Web
Dynpro
Demo Act 3:
Steve integratesthe system usingBAPIs and Web
Services
Steve is a developer who’s bui lding an Inventor y Level Replenishment(ILR) composite. ILR allows retailers to resupply by periodicallyreporting t heir inventory levels to t he manufacturer. Themanufacturer's agents then cr eate sales orders to bri ng thecustomer's stock back up to pre-defined levels.
Reportinventory
Customer
Reviewand trigger
replenishment
Sales agent
Salesorder (ERP)
The Company: McGee is a ‘Tier 1’ supplier for US-based automotive manufacturers,including American and Foreign brands manufactured in the US and Mexico. They arebased outside of Cincinnati, OH, and have manufacturing facilities in Ohio and inSouthern Texas. McGee employs 2,300 people across these two locations.
![Page 15: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/15.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 15/22
15
© SAP 2008 / Page 15
Inventory Level Replenishment (ILR)
Customer
Threshold Inventory
Basically user just defines domain classes and relationships
The platform takes care of the rest, i.e. create databaseentries, generate controllers, views & CRUD operations(Create/Read/Update/Delete)
Product
![Page 16: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/16.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 16/22
16
© SAP 2008 / Page 16
CoG as a CoG application
Application
Domains
Controllers
Services
All Grails applications consist of a collection of domains, and services.
Each domain contains set of controllers implementing CRUD operations & views
An alternative to CogSole is CoG built with CoG (CoG 2 )
![Page 17: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/17.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 17/22
17
© SAP 2008 / Page 17
Composition on Grails Summary
Value PropositionValue Proposition
Reduce overall complexity of appdevelopment
Combine productivity of web baseddesign with the flexibility of coding
Rapid web application development;developer changes available instantly
Key InnovationsKey Innovations
Simplified SAP NetWeavertechnologies like Web Dynprothrough Groovy scripting
Easy to use remote connectivity:BAPIs, Enterprise Services
Provided platform as a service bycreating web based developmenttool.
Next Steps / Open PointsNext Steps / Open Points
Deploy to the cloud - no need to install & maintain servers (just need a browser!)
Involve developer community
Project released on SDN for public trial:https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Community/Composition+On+Grails
Questions/comments: [email protected]
![Page 18: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/18.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 18/22
18
© SAP 2008 / Page 18
Grails object relationships
A class can belong to multiple related classes like this:
class Book { static belongsTo = [Author,Publisher]}
class Author { static hasMany = [books:Book] }
In other words:
an owner can have belongings
belongings use the 'belongsTo' property to refer to their owner(s)if an owner dies, all his belongings vanish, if the owner actually has direct referencesor an explicit hasMany relationship.
![Page 19: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/19.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 19/22
19
© SAP 2008 / Page 19
CoG Evolution
Testing web services in NW IDE; required a lot of configuration to generate proxies and callthe web service (See https://wiki.wdf.sap.corp/display/NWI/Composition+on+Grails+-+Webservices )Created web service client code generator in WebDynpro so no configuration and extra libsrequiredWe realized the whole application building tool could be web based.Value prop - just one install
everyone can use itavailable from any web device
![Page 20: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/20.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 20/22
20
© SAP 2008 / Page 20
SAP Composition on Grails
Deployed ApplicationDeployed Application
Resulting applications can be deployed to portal
![Page 21: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/21.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 21/22
21
© SAP 2008 / Page 21
Questions?
Thank you!
![Page 22: Composition on Grails](https://reader031.vdocuments.us/reader031/viewer/2022021318/577cc7151a28aba7119febce/html5/thumbnails/22.jpg)
8/12/2019 Composition on Grails
http://slidepdf.com/reader/full/composition-on-grails 22/22
© SAP 2008 / Page 22
Copyright 2008 SAP AGAll rights reserved
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changedwithout prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned and associated logos displayedare the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This documentcontains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy,and/or development. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, orother items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties ofmerchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitationshall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in thesematerials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages
Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durchSAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.
Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Services sowie diedazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Alle anderen in diesem Dokument erwähnten Namen
von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zuInformationszwecken. Produkte können länderspezifische Unterschiede aufweisen.
Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderenVereinbarung mit SAP. Dieses Dokument enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts und ist für SAP nicht bindend, einen bestimmtenGeschäftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP übernimmt keine Verantwortung für Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht dieRichtigkeit oder Vollständigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewähr, wederausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zwecksowie für die Gewährleistung der Nichtverletzung geltenden Rechts.
SAP übernimmt keine Haftung für Schäden jeglicher Art, einschließlich und ohne Einschränkung für direkte, spezielle, indirekte oder Folgeschäden im Zusammenhang mit der Verwendungdieser Unterlagen. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.
Die gesetzliche Haftung bei Personenschäden oder die Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinkszugreifen, unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen überInternetseiten Dritter ab.
Alle Rechte vorbehalten.