Top Banner
Thoughts on Software Quality and what can we learn from Apache Sling? Bertrand Delacrétaz @bdelacretaz, grep.codeconsult.ch Principal Scientist, CQ/AEM R&D group, Adobe Basel Apache Software Foundation Member and Director June 2015 slides revision 2015-06-23 BETA VERSION
33
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bdelacretaz quality-connectcon-2015

Thoughts on Software Quality and what can we learn from Apache Sling?

Bertrand Delacrétaz@bdelacretaz, grep.codeconsult.ch

Principal Scientist, CQ/AEM R&D group, Adobe BaselApache Software Foundation Member and Director

June 2015slides revision 2015-06-23

BETA VERSION

Page 2: Bdelacretaz quality-connectcon-2015

how can we create a

culture of quality in our teams?

Page 3: Bdelacretaz quality-connectcon-2015

created in 2007 powers “a few” major websites

still going strong something must be right

Page 4: Bdelacretaz quality-connectcon-2015

Quality is usually visible from far away

Engineering culture?

?

Page 5: Bdelacretaz quality-connectcon-2015

Good tools for good craftsmen

?

Page 6: Bdelacretaz quality-connectcon-2015

Defensive & Conservative

?

Page 7: Bdelacretaz quality-connectcon-2015

Avoid broken windows

?

Page 8: Bdelacretaz quality-connectcon-2015

Do one thing and one thing well

?

Page 9: Bdelacretaz quality-connectcon-2015

Cultural traits? you can’t measure those…

automate!

defensive

conservative

no broken windows

do one thing and one thing well

obvious quality, measurable where possible

Page 10: Bdelacretaz quality-connectcon-2015

so, quality is a

cultural thing?

Page 11: Bdelacretaz quality-connectcon-2015

maybe a few

axes will help us measure

Page 12: Bdelacretaz quality-connectcon-2015

Code coverage? Not a silver bullet.

Code coverage: 100% Semantic coverage: zero! A generator with return 42; would pass. Not useless…but just one tool among others.

Page 13: Bdelacretaz quality-connectcon-2015

quality is

much wider than that

Page 14: Bdelacretaz quality-connectcon-2015

Happy users!

?

Page 15: Bdelacretaz quality-connectcon-2015

Happy Developers!

?

Page 16: Bdelacretaz quality-connectcon-2015

Simplicity & adequation

Page 17: Bdelacretaz quality-connectcon-2015

Simplicity & adequation

OSGi framework (Apache Felix)

WebDAV

Felix OSGi

JCRcontent

JSR resourc servlet/

standard custom

Sling Core

Page 18: Bdelacretaz quality-connectcon-2015

Robustness

Page 19: Bdelacretaz quality-connectcon-2015

Robustness[INFO] ------------------------------------------------------------------------[INFO] Building Apache Sling Launchpad Testing 7-SNAPSHOT[INFO] ------------------------------------------------------------------------...Tests run: 529, Failures: 0, Errors: 0, Skipped: 1...[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 02:08 min[INFO] ------------------------------------------------------------------------

?

Page 20: Bdelacretaz quality-connectcon-2015

Security

the best way to avoid risk is to do nothing, of

course. Nobody will steal this picture, but it’s quite a boring slide.

Page 21: Bdelacretaz quality-connectcon-2015

Security Apache culture!

Page 22: Bdelacretaz quality-connectcon-2015

Focus

?

Page 23: Bdelacretaz quality-connectcon-2015

Focus

OSGi framework (Apache Felix)

WebDAV server

Felix OSGiconsole

browserfilesystem

JCRcontent

repository

JCR API

debugger

ECMAscript

JSP

Ruby

Velocity

etc..

JSR 223 scripting

HTTP

resource resolution

servlet/script resolution

standard servlets

custom servletsand components

Sling Core

scarce resources help to focus!

Page 24: Bdelacretaz quality-connectcon-2015

Backwards compatibility Apache culture!

?

Page 25: Bdelacretaz quality-connectcon-2015

Transparency REST culture!

Page 26: Bdelacretaz quality-connectcon-2015

TransparencyREST -> naturally transparent Good names Helpful messages Introspection tools

?

Page 27: Bdelacretaz quality-connectcon-2015

AbstractResource AbstractResourceVisitor AccessSecurityException Adaptable AdapterFactory AdapterManager AttributableResourceProvider Authenticator CompositeValueMap DeepReadValueMapDecorator DynamicResourceProvider ExternalResourceListener HtmlResponse SlingAllMethodsServlet SlingBindings SlingConstants SlingException SlingHttpServletRequest

LoginException ModifiableValueMap ModifiableValueMapDecorator ModifyingResourceProvider NoAuthenticationHandlerException NonExistingResource ObservationReporter ObserverConfiguration OptingServlet ParametrizableResourceProvider PersistableValueMap PersistenceException PropertyBuilder ProviderContext RefreshableResourceProvider RequestDispatcherOptions RequestParameter RequestParameterMap RequestPathInfo RequestProgressTracker RequestUtil

Good names?

Page 28: Bdelacretaz quality-connectcon-2015

Low coupling

Page 29: Bdelacretaz quality-connectcon-2015

Low coupling

OSGi framework (Apache Felix)

WebDAV server

Felix OSGiconsole

browserfilesystem

JCRcontent

repository

JCR API

debugger

ECMAscript

JSP

Ruby

Velocity

etc..

JSR 223 scripting

HTTP

resource resolution

servlet/script resolution

standard servlets

custom servletsand components

Sling Core

sailboats are very cool but we shouldn’t take their high coupling as an example…

Page 30: Bdelacretaz quality-connectcon-2015

quality has

many dimensions often hard to measure

Page 31: Bdelacretaz quality-connectcon-2015

doing?

so, how is

Page 32: Bdelacretaz quality-connectcon-2015

I’d say

not bad thanks to a strong community

with a culture of quality in design, implementation

and testing.

“many eyeballs”

?

Page 33: Bdelacretaz quality-connectcon-2015

Coda You can’t measure it all: quality is multi-dimensional and needs to be part of your team’s culture.

And in the end the only thing that really matters is happy users…

“Thoughts on Software Quality” - Bertrand Delacretaz, Principal Scientist, Adobe (C) Adobe 2015 - these slides are licensed under a Creative Commons Attribution 4.0 International License - images and illustrations are (C) fotolia.com, used with permission, cannot be reproduced separately.

Thinking and reviewing along those axes can help build such a culture.