Sie sind auf Seite 1von 22

1

Composi t i on on Gr ai l s
Sean Doyle, SAP NetWeaver
September 2008
2
SAP 2008 / Page 2
1. Introduction
1.1 Whats Grails?
1.2 Whats Composition on Grails (CoG)?
1.3 Why Composition on Grails?
1.4 What is CoGSole (CoG web ConSole)?
1.5 Why CogSole?
2. Demo
2.1 CoGSole wizard
2.2 Builder script engine
2.3 Web services
3. Future directions
3.1 Composition on Grails Enhancements
Agenda
3
SAP 2008 / Page 3
SAP Composi t i on on Gr ai l s
Whats Grails?
Whats Grails?
Grails is an open source web application framework which leverages the Groovy
programming language (which is in turn based on the J ava platform). Grails is intended
to be a high-productivity framework by following the "coding by convention" paradigm,
providing a stand-alone development environment and hiding much of the
configuration detail from the developer.
(i.e. a tool that lets you build web apps quickly!)
Whats Composition on Grails?
Whats 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 web
services and BAPIs
4
SAP 2008 / Page 4
SAP Composi t i on on Gr ai l s
Composition on Grails Architecture
Composition 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)
5
SAP 2008 / Page 5
SAP Composi t i on on Gr ai l s
Composition on Grails Architecture
Composition 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
6
SAP 2008 / Page 6
Composi t i on on Gr ai l s
Why Composition on Grails? Why Composition on Grails?
Integrating Grails increases productivity
and flexibility of SAP NetWeaver
Provide a simple to consume
composition platform for ISVs and
customers
Reduce Total Cost of Development
(TCD)
SAP 2008 / Page 6
Flexibility
P
r
o
d
u
c
t
i
v
i
t
y
Visual
Modeling &
Patterns Composition
On Grails
NW Java
Platform
oIndependent software vendors (ISVs) & consultants can quickly create customized
apps; especially useful in the long tail apps i.e. frequently used apps are common to
many business partners but each one has specific needs for customized apps. To avoid
the overhead of building enterprise apps CoG provides a lightweight alternative
7
SAP 2008 / Page 7
Gr oovy and J ava
Both compile to J VM bytecode virtually all java code is compatible with groovy compiler
Groovy is loosely typed & has simpler syntax
Groovy may or may not use classes
8
SAP 2008 / Page 8
Gr ai l s f eat ur es
CRUD Operations
CRUD 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 be
created 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 business
processes. 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 it
uses Hibernate 3 (an extremely popular and flexible open source ORM solution) but
because of the dynamic nature of Groovy, the fact that it supports both static and
dynamic typing, and the convention of Grails there is less configuration involved in
creating Grails domain classes
9
SAP 2008 / Page 9
Real Wor l d Rai l s Appl i c at i ons
10
SAP 2008 / Page 10
Ec l i pse based Composi t i on on Gr ai l s
11
SAP 2008 / Page 11
CoGSol e - Web based Composi t i on on Gr ai l s
CoGSole is a 100% web-
based system that allows
knowledge workers to create
their own custom business
applications, with file
manager, console interface for
compiling and execution of
code and an editor with syntax
highlighting, which is
accessed using a browser.
Instant development and
code testing
Begin to code without spending
time with configurations and
environments;
Test your code instantly;
12
SAP 2008 / Page 12
Why CoGSol e? - Desk t op I DE vs Web I DE
Description
Problem: Developers spend too much
time to become productive
Problem: Developers spend too much
time to become productive
Solution Solution
Scripting languages & Rails framework growing
in popularity with the web developer community
SaaS not just web services & web based apps
but web based tools for building web based apps
Several companies are building web IDEs
Technology trends Technology trends
Desktop IDE -Download, install, configure,
plugins, updates, deployment, etc. (installing
server takes even longer)
Grails - command line tools create-domain-class,
generate-controllers, etc.
Searching for required libs e.g. testing
webservices in IDE requires several extra jars
Web based IDE > Composition on Grails web Console (CoGSole)
Zero download, install, config, updates, etc.
Access your code from anywhere
Shorter development cycle; changes available upon page reload
edit/compile/deploy/test cycle ->edit/test
13
SAP 2008 / Page 13
Tec hnol ogy t r ends: Her ok u.c om
Web based ruby on rails
application tool
Problems:
Unclear where to get
started building apps
Not downloadable - cant
install on intranet
14
SAP 2008 / Page 14
Demo
Composi t i on on Gr ai l s Demo
Steve Marks
Developer
Demo Act 1:
Steve writes the
Inventory models
and generates the
application
Demo Act 2:
Steve tailors the
generated Web
Dynpro
Demo Act 3:
Steve integrates
the system using
BAPIs and Web
Services
Steve is a developer whos building an Inventory Level Replenishment
(ILR) composite. ILR allows retailers to resupply by periodically
reporting their inventory levels to the manufacturer. The
manufacturer's agents then create sales orders to bring the
customer's stock back up to pre-defined levels.
Report
inventory
Customer
Review
and trigger
replenishment
Sales agent
Sales
order
(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 are
based outside of Cincinnati, OH, and have manufacturing facilities in Ohio and in
Southern Texas. McGee employs 2,300 people across these two locations.
15
SAP 2008 / Page 15
I nvent or y Level Repl eni shment (I LR)
Customer
Threshold Inventory
Basically user just defines domain classes and relationships
The platform takes care of the rest, i.e. create database
entries, generate controllers, views & CRUD operations
(Create/Read/Update/Delete)
Product
16
SAP 2008 / Page 16
CoG as a CoG appl i c at i on
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
)
17
SAP 2008 / Page 17
Composi t i on on Gr ai l s Summar y
Value Proposition
Value Proposition
Reduce overall complexity of app
development
Combine productivity of web based
design with the flexibility of coding
Rapid web application development;
developer changes available instantly
Key Innovations
Key Innovations
Simplified SAP NetWeaver
technologies like Web Dynpro
through Groovy scripting
Easy to use remote connectivity:
BAPIs, Enterprise Services
Provided platform as a service by
creating web based development
tool.
Next Steps / Open Points
Next 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: sean.doyle@sap.com
18
SAP 2008 / Page 18
Gr ai l s obj ec t r el at i onshi ps
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 references
or an explicit hasMany relationship.
19
SAP 2008 / Page 19
CoG Evol ut i on
Testing web services in NW IDE; required a lot of configuration to generate proxies and call
the 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 libs
required
We realized the whole application building tool could be web based.
Value prop - just one install
everyone can use it
available from any web device
20
SAP 2008 / Page 20
SAP Composi t i on on Gr ai l s
Deployed Application
Deployed Application
Resulting applications can be deployed to portal
21
SAP 2008 / Page 21
Quest i ons?
Thank you!
22
SAP 2008 / Page 22
Copyr i ght 2008 SAP AG
Al l r i ght s r eser ved
No part of this publication may be reproduced or transmitted in any formor for any purpose without the express permission of SAP AG. The information contained herein may be changed
without 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 are
trademarks 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 displayed
are 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 document
contains only intended strategies, developments, and functionalities of the SAPproduct 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, or
other 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 of
merchantability, 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 fromthe use of these materials. This limitation
shall 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 these
materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages
Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchemZweck und in welcher Formauch immer, ohne die ausdrckliche schriftliche Genehmigung durch
SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen knnen ohne vorherige Ankndigung gendert werden.
Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte knnen Softwarekomponenten umfassen, die Eigentumanderer Softwarehersteller sind.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge und andere in diesemDokument erwhnte SAP-Produkte und Services sowie die
dazugehrigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Lndern weltweit. Alle anderen in diesemDokument erwhnten Namen
von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben imText sind unverbindlich und dienen lediglich zu
Informationszwecken. Produkte knnen lnderspezifische Unterschiede aufweisen.
Die in diesemDokument enthaltenen Informationen sind Eigentumvon SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderen
Vereinbarung mit SAP. Dieses Dokument enthlt nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP-Produkts und ist fr SAP nicht bindend, einen bestimmten
Geschftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP bernimmt keine Verantwortung fr Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht die
Richtigkeit oder Vollstndigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewhr, weder
ausdrcklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschlielich, hinsichtlich der Gewhrleistung der Marktgngigkeit und der Eignung fr einen bestimmten Zweck
sowie fr die Gewhrleistung der Nichtverletzung geltenden Rechts.
SAP bernimmt keine Haftung fr Schden jeglicher Art, einschlielich und ohne Einschrnkung fr direkte, spezielle, indirekte oder Folgeschden imZusammenhang mit der Verwendung
dieser Unterlagen. Diese Einschrnkung gilt nicht bei Vorsatz oder grober Fahrlssigkeit.
Die gesetzliche Haftung bei Personenschden oder die Produkthaftung bleibt unberhrt. Die Informationen, auf die Sie mglicherweise ber die in diesem Material enthaltenen Hotlinks
zugreifen, unterliegen nicht demEinfluss von SAP, und SAP untersttzt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewhrleistungen oder Zusagen ber
Internetseiten Dritter ab.
Alle Rechte vorbehalten.

Das könnte Ihnen auch gefallen