49
There Is an App for… Vanity URLs! Magnolia Conference 2014 Technical Track, June 26th, Basel

There is an App for...Vanity URLs

Embed Size (px)

DESCRIPTION

In this talk Jörg von Frantzius explains how and why Aperto built an easy-to-use open source Magnolia App just for managing vanity URLs.

Citation preview

Page 1: There is an App for...Vanity URLs

There Is an App for…Vanity URLs!Magnolia Conference 2014 Technical Track, June 26th, Basel

Page 2: There is an App for...Vanity URLs

2

About me

Jörg von FrantziusSystems Architect

Software-engineering background

Joined Aperto in 2010

Technical supervision for exciting and demanding Magnolia projects since then

E.g. Middle East Broadcasting Company

Dubai http://www.mbc.net/ Kanton Basel-Stadt http://www.bs.ch/

Page 3: There is an App for...Vanity URLs

Some facts about Aperto

Page 4: There is an App for...Vanity URLs

4

Who We Are TodayFacts and Figures

40Million US$Turnover (Gross income) 2013

400Heads at presentGrowing steadily and soundly

International branchesEurope (Germany, Switzerland)Middle East (Dubai) China (Beijing, Shanghai)

10of the largest owner-managed advertising agencies in Germany

Top 3

400Heads at present

Page 5: There is an App for...Vanity URLs

5

We Connect Brands and People

Page 6: There is an App for...Vanity URLs

Aperto And MagnoliaA Strong Partnership Since 2006

6

More than 40 successfully implemented Magnolia projects

High competence in the execution and implementation of large and technologically sophisticated projects, e.g. business integration, high performance and security

Joint product development with Magnolia (STK – Standard Templating Kit)

Over 50 Magnolia-experienced and trained employees in our departments technology, UX Design, Design and Project Management

Experienced with international projects in Germany, China, Dubai, Switzerland and UK

Page 7: There is an App for...Vanity URLs

What are Vanity-URLsanyway?

Page 8: There is an App for...Vanity URLs

Vanity URLs – What Is It?

Antti Hietala‘s great blog post on vanity URLs with Magnolia:

“Vanity URLs are short, easy to remember Web addresses used for campaigns, microsites and landing pages. They are a key Internet marketing tool.”

Mostly used to drive user from some other medium to a web page

E.g. URLs shown on TV, poster campaigns, print advertisement

Just in case you wonder…

Page 9: There is an App for...Vanity URLs

Not Just Short URLs

Vanity URLs: not to be confused with short URLs, e.g.

http://goo.gl/2Yl2J4

• No one can remember that

• No one wants to type it in

Let alone typing this in on a mobile phone!

Must be easy to remember and spell

Page 10: There is an App for...Vanity URLs

An Example

Imagine you are waiting for your train (or in your train)

And you can’t help staring at that poster in front of you.

Imagine now, that poster would really incite your interest in, say, Aperto’s work for the Kanton Basel Stadt ;).

Which URL would you more likely try to type in on your mobile?

(or: shameless plug)

Page 11: There is an App for...Vanity URLs

?http://www.aperto.de/en/press/press-releases-2012/Aperto-rebuilds-Web-portals-of-the-canton-of-Basel-Stadt.html

Page 12: There is an App for...Vanity URLs

?www.aperto.de/basel

Page 13: There is an App for...Vanity URLs

No Need for Typing in on a Mobile Phone

“Drive user from other medium to a web page” …

There is a more fun way of opening a URL from another medium on a mobile phone

QR Codes!

(Alas, only if you have an app for that on your mobile phone…)

Page 14: There is an App for...Vanity URLs

?QR Codes?!?

Page 16: There is an App for...Vanity URLs

Well, Yes, QR Codes.

Obviously, there is a need for creating QR Codes

Wasn’t supported yet directly in Magnolia

(And also we were in need of a nice visual feature to show in our app at the conference!)

Page 17: There is an App for...Vanity URLs

In Summary: A Common Use Case

How often do you remember having seen simple catchy URLs (or QR Codes) outside of the web?

Obviously, creating Vanity URLs is a very common use case

Aperto’s customer projects required it often enough to create a dedicated app

Page 18: There is an App for...Vanity URLs

Why an App?

But why an app for Vanity URLs

If Magnolia supports it anyway?(except for QR Codes)

Let’s see what the caveat is …

Page 19: There is an App for...Vanity URLs

Magnolia and Vanity URLs

Magnolia does support Vanity URLs out of the box(see e.g. again Antti Hietala‘s blog post on how to do it)

We’re going to focus on path-based Vanity URLs

i.e. not involving custom domain names

It‘s supported

Page 20: There is an App for...Vanity URLs

Vanity URL Technically

Usually that’s a permanent 301 redirect to the real page URL, i.e.

• browser will show real URL after redirect

• search engines preserve ranking for real URL

(For SEO reasons that’s usually what you want!)

Just a redirect

Page 21: There is an App for...Vanity URLs

Configuring a Path-Based Vanity URL

1. Go to config app

2. Locate your module

3. Add node “virtualURIMapping”

4. Add configuration like this:

(and use “redirect:” insteadof “forward:”)

i.e. without the app

Page 22: There is an App for...Vanity URLs

?Easy?

Page 23: There is an App for...Vanity URLs

Easy for Techies

Maybe for you

(This is the technical conference track, after all!)

Page 24: There is an App for...Vanity URLs

!But not for page editorswithout technical background!

Page 25: There is an App for...Vanity URLs

Without App: Access to Config Workspace Required

Hard and dangerous to do for page editors without technical knowledge

(Ever locked yourself out of Magnolia with a virtual URL mapping?)

Experienced web admins must do it

Not for average page editor

Page 26: There is an App for...Vanity URLs

?No problem?

Page 27: There is an App for...Vanity URLs

Let‘s Empower Page Editors

Some large companies have large page editor workforce who should be able to create vanity URLs easily

Without the app, editors have to ask web adminsOr they might simply avoid the hassle

Disentangle page editors and web admins for this task

Web admins have better things to do anyway

Page 28: There is an App for...Vanity URLs

!OK, got it.

Now show me the app!

Page 29: There is an App for...Vanity URLs

The app

Page 30: There is an App for...Vanity URLs

Overview of Vanity URLs

Page 31: There is an App for...Vanity URLs

Vanity URL Attributes

(click on top-right“?” to get all help texts at once)

Page 32: There is an App for...Vanity URLs

Actions on Selection

Page 33: There is an App for...Vanity URLs

Actions on Selection II

Page 34: There is an App for...Vanity URLs

View QR Code

Intended for export (right-click „Save image as…“)

Contains URL of the redirect target,not the Vanity URL itself!(avoids redirect on slow mobile)

Page 35: There is an App for...Vanity URLs

?That appdoesn‘t look very special?

Page 36: There is an App for...Vanity URLs

!Yes, and that‘s great!

Page 37: There is an App for...Vanity URLs

Magnolia‘s New Content App Framework Works!

It turns out: Magnolia‘s content app framework is flexible and powerful

Positive for user: they will immediately:

• feel at home

• know how to use it

Positive for Developers: need to customize only details + few custom classes

Page 38: There is an App for...Vanity URLs

The code

Page 39: There is an App for...Vanity URLs

Some Implementation Details

Time to give credits:

All programming + configuration done by Frank Sommer @Aperto

I‘m only doing the talking

Page 40: There is an App for...Vanity URLs

SubappsUsing standard Magnolia classes

Browser: provides list overview

Details: provides editor

Preview: both for link target and QR Code(essentially an iframe)

Page 41: There is an App for...Vanity URLs

Browser SubApp Content ViewsList and search only

Just cut away what we don‘t need

(tree and thumbnail don‘t make sense for this app)

Page 42: There is an App for...Vanity URLs

QR Code Image Generation Happens on form save

Page 43: There is an App for...Vanity URLs

QR Code PreviewStandard app image provider

VanityUrlSaveFormAction saves image to binary node „qrCode“

That‘s where the configured standard image provider picks it up:

Page 44: There is an App for...Vanity URLs

Custom Field for Site Selection

Page 45: There is an App for...Vanity URLs

Custom VirtualURIMapping for Link Evaluation

Incoming requests for Vanity URLs:

evaluated in custom VirtualURIMapping

(looks up Vanity URL + site in vanityUrlworkspace)

Page 46: There is an App for...Vanity URLs

?Can I use it?Where can I get it?

Page 47: There is an App for...Vanity URLs

It‘s Open Source!Free to use

Vanity URL app is released as GPLv3

Find the sourcecode on Github: https://github.com/aperto/magnolia-vanity-url

If you modify the source, please fork us on Github!

Page 48: There is an App for...Vanity URLs

Find it in the Magnolia Forge

Magnolia Jenkins will deploy artifacts to Magnolia Nexus

(even though code is on Github)

Please enter bug reports, enhancement or feature requests:

https://jira.magnolia-cms.com/browse/VANITY

Page 49: There is an App for...Vanity URLs

!Thank you!Jörg von Frantzius Systems Architect

E-Mail [email protected]

Phone +49 (0) 30 – 283 921 – 0

Aperto AG – In der Pianofabrik

Chausseestr. 5

10115 Berlin