building a utilities portal with magnolia 5 & sap

43
Building a utilities portal with Magnolia 5 and SAP Magnolia Conference 2014 Matteo Pelucco, Senior Software Engineer Basel, 26th June 2014

Upload: magnolia-cms

Post on 08-May-2015

210 views

Category:

Documents


0 download

DESCRIPTION

Matteo Pelucco from Tinext explains the systems integration of SAP for AIL, a Swiss utility company, showing the benefits of Magnolia's Open Suite approach. Learn how Magnolia can be the central framework for your integration projects and why some Magnolia integration patterns should be your best development friends.

TRANSCRIPT

Page 1: Building a Utilities Portal with Magnolia 5 & SAP

Building a utilities portal with Magnolia 5 and SAPMagnolia Conference 2014

Matteo Pelucco, Senior Software Engineer

Basel, 26th June 2014

Page 2: Building a Utilities Portal with Magnolia 5 & SAP

2

Digital Technology with Emotion

Page 3: Building a Utilities Portal with Magnolia 5 & SAP

3

Tinext integrated offer

Page 4: Building a Utilities Portal with Magnolia 5 & SAP

4

199545+

650+

2 mio 800+

22

3000+ 24x7x365

Our first web project

Employees

Hosted websites

web pages clientsWe are in Switzerland and Italy

Datacenters

Managed mailboxes

Guaranteedassistance

Physical servers

Realized projects

160+

1500+

Facts and figures

Page 5: Building a Utilities Portal with Magnolia 5 & SAP

5

About Tinext

Tinext combines the latest digital marketing expertise together

with the deep technical understanding of a seasoned

enterprise systems integrator. The end results are solid

enterprise web solutions that transform our clients’

businesses.

Since 2001, our teams have conceived, delivered, deployed and maintained more

than 500 successful projects, with clients including Al Arabiya News Channel, Royal

Caribbean International, Whirlpool Europe, City of Lausanne, Generali Group and

Swiss national broadcasters RSI.

With a comprehensive range of digital services delivered through our three core

practices, Tinext can deliver complete projects or flexible services working in

combination with other providers.

Page 6: Building a Utilities Portal with Magnolia 5 & SAP

6

Clients

Page 7: Building a Utilities Portal with Magnolia 5 & SAP

7

Matteo Pelucco, Senior Software Engineer

@matteopelucco

Page 8: Building a Utilities Portal with Magnolia 5 & SAP

8

Aziende Industriali di Lugano (AIL)

CompanyPublic Utility companyProduces electricity & water. Imports gas.Retails electricity, gas & water in Ticino.

ProjectCMS Replacement: Magnolia100k potential users23 business processes to buildSensitive data

Page 9: Building a Utilities Portal with Magnolia 5 & SAP

9

Open Suite Approach

www.royalcaribbean.it

Page 10: Building a Utilities Portal with Magnolia 5 & SAP

25 Business Processes to model

Add a new contract

View billing documents

Communicate meter readings

View technical data

..and many more..

Each of them interacts with SAP in a different way (few common patterns)

Standard form builder was not enough!

Change user data

Page 11: Building a Utilities Portal with Magnolia 5 & SAP

Just an example: what stakeholders think

Page 12: Building a Utilities Portal with Magnolia 5 & SAP

Just an example: how things really are

Page 13: Building a Utilities Portal with Magnolia 5 & SAP

13

USE YOUR HP!

Page 14: Building a Utilities Portal with Magnolia 5 & SAP

Form builder reloaded

Standard Form Builder has been extended, several new features has been introduced:

• SAP-aware validators

• Multistep navigation bar

• Step Validators

• Scriptable default values for input (eval)

• Final summary step

• Dynamic mail processors

• Everything responsive!

Page 15: Building a Utilities Portal with Magnolia 5 & SAP

A business process site tree

Page 16: Building a Utilities Portal with Magnolia 5 & SAP

A business process interface bp#17: change payment method

Page 17: Building a Utilities Portal with Magnolia 5 & SAP

Step validators

Page 18: Building a Utilities Portal with Magnolia 5 & SAP

New form field types

Page 19: Building a Utilities Portal with Magnolia 5 & SAP

Responsive multistep navigation

Page 20: Building a Utilities Portal with Magnolia 5 & SAP

Responsive contextual help (STK)

y

y

Standard STK Components (stkLinkList, stkInternalLink)

Standard STK Components (stkTextImage)

Unobtrusive approach:

$(".ctx-menu-content").load (

$(this).attr("href") + " #mainArea .titleTextButton"

);

Page 21: Building a Utilities Portal with Magnolia 5 & SAP

21

SAP INTEGRATION

Page 22: Building a Utilities Portal with Magnolia 5 & SAP

Legacy SAP integration

Do you remember? We are moving an existing (live!) project, already on SAP.

Legacy SOAP-based SAP integration layer

Refactoring not in project scope!

No documentationOnly WSDL

Page 23: Building a Utilities Portal with Magnolia 5 & SAP

jUnit as reverse engineering tool

Tests to reverse engineer SOAP layerJava WS client: built with jax-ws, filled with jUnit test cases.

Magnolia 5 IoC allowed our team to mock all the remote functionalities, without blocking front-end developers.

SAP URLs in magnolia.properties file No risk of accessing the wrong SAP environment.

Page 24: Building a Utilities Portal with Magnolia 5 & SAP

jUnit as reverse engineering tool

Each jUnit test decomposed in FormProcessor and/or FormStepValidator

Quick debugging: just change few properties and launch the test

Page 25: Building a Utilities Portal with Magnolia 5 & SAP

jUnit as reverse engineering tool

AbstractTest.java

LoginTest.java

ChangeUsernameTest.java

SendMeterReadingsTest.java

Flow simulation, real SAP calls, asserts,utilities tuning, …

Common methods / utilities

Prepares a «logged» context,@before method

Page 26: Building a Utilities Portal with Magnolia 5 & SAP

26

DMS INTEGRATION: ALFRESCO

Page 27: Building a Utilities Portal with Magnolia 5 & SAP

Legacy Alfresco DMS

Customer communications were stored in Alfresco (v. 2.x!)

SAP ask Alfresco to generate PDF, and to serve them to customers

Need to hide real Alfresco URLs..

Page 28: Building a Utilities Portal with Magnolia 5 & SAP

Alfresco API

Used standard Alfresco API to download documents

A dedicated Magnolia «DocumentDownloadServlet» transparently proxies the document download request for a logged user, applying a security layer on top of it.

Page 29: Building a Utilities Portal with Magnolia 5 & SAP

Alfresco API

Page 30: Building a Utilities Portal with Magnolia 5 & SAP

User Document Archive

Search is performed

against SAP

Download links to

Alfresco PDFs

via Magnolia

servlet

yy

Page 31: Building a Utilities Portal with Magnolia 5 & SAP

Authentication and authorization

Users are in SAP

No ACLs: everything is data-driven

Rules not applicable on a hierarchical resource tree

Page 32: Building a Utilities Portal with Magnolia 5 & SAP

Page renderer

Page protection (for each page)

Security layer exposed to freemarkerconditional presentation layer statements user interface personalization

Agile: easy to test and debug[#if …] normal flow [#else] exception [/#if]

Page 33: Building a Utilities Portal with Magnolia 5 & SAP

User Login

Page 34: Building a Utilities Portal with Magnolia 5 & SAP

Freemarker Custom Util

Page 35: Building a Utilities Portal with Magnolia 5 & SAP

Freemarker Security Statements

Page 36: Building a Utilities Portal with Magnolia 5 & SAP

Conclusions

Magnolia «open suite approach» easily allows to «plug» your integration activity• So many «injection points»• Reliable: integration patterns

Form Builder is very powerful and customizable

Mock activity is foundamental in projects like this.

Magnolia IoC helps the project lifecycle and team work

User data security always on top of feature set

Page 37: Building a Utilities Portal with Magnolia 5 & SAP

Future Improvements

Simplify Form building activity Now it is for superusersToo many Magnolia green bars, even for short forms

SAP represents a single point of failureExpose SAP data to a «look-aside» repository, periodically refreshed. This will allow also horizontal scaling..

Heavy usage of Http SessionNo cacheProvide a way to communicate between a form step and another

No single-page appForm builder should be exposed also to JS frameworks (Backbone, Angular..) for a better user experience and performance.

Page 38: Building a Utilities Portal with Magnolia 5 & SAP

38

SVN Sync (app)Allows automatic synchronization of a SVN repository to Magnolia webapp (filesystem)

Bootstrap tasksClone Magnolia standard security, create pages, utilities

Java UtilsHTTP helpers, Calendar, Captcha, Text, Collections, Magnolia, ..

Freemarker UtilsCalendar, Text, Magnolia, STK shortcuts, …

Page Builder APIAllow to create pages simulating user interactions

CaptchaIntegration with Tinext Captcha System

NECTAR: A NEW TINEXT MODULE

That’s CE!

Page 39: Building a Utilities Portal with Magnolia 5 & SAP

Choose a project

(yes, you can configure multiple

projects!)

SVN Sync will load your SVN

repository..

y

Nectar: SVN Sync App

Page 40: Building a Utilities Portal with Magnolia 5 & SAP

Start file

copy

Check project config (path, remote source..)y

y

Nectar: SVN Sync App

Page 41: Building a Utilities Portal with Magnolia 5 & SAP

Progress bar

Visual feedback

y

y

Nectar: SVN Sync App

Page 42: Building a Utilities Portal with Magnolia 5 & SAP

42

Nectar: SVN Sync App

Demo time!y

Page 43: Building a Utilities Portal with Magnolia 5 & SAP

Thank you for your attention.

Tinext SA

Viale Serfontana 7

6834 Morbio

Inferiore

Switzerland

+41 91 612 22 66

[email protected]

www.tinext.com

Tinext Italia Srl

Via Borghi 8

21013 Gallarate

Italy

+39 0331 667

747