28
Stop wasting your time with Java build tools Henning Blohm [email protected] – ZFabrik Software KG

130511 stop wasting_your_time

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: 130511 stop wasting_your_time

Stop wasting your time with Java build tools

Henning Blohm

[email protected] – ZFabrik Software KG

Page 2: 130511 stop wasting_your_time

Part 1:

No need for build infrastructure

In particular not for large projects

Page 3: 130511 stop wasting_your_time

What‘s missing?

Why would you need more than that?

Source code and configuration

Execution Environment

Page 4: 130511 stop wasting_your_time

Just works!

You do not! In fact, this is how

• Large business solutions (SAP ABAP),

• Your favorite scripting language,

• Even stuff like Apache OfBiz

work.

Note: I did not say compile-free!

Page 5: 130511 stop wasting_your_time

This is also how Z2 works!

Z2-Environment:

• Pull from various sources

• Do whatever is needed to run

Page 6: 130511 stop wasting_your_time

Development with Z2

Page 8: 130511 stop wasting_your_time

Benefits

No build engineering

→ No local build config, fast dev setup

Smaller checkouts, no deploy

→ Less re-compiling, faster roundtrips

System-centric

→ Always up-to-date, always integrated

Pull-approach → Easy to scale-out

Page 9: 130511 stop wasting_your_time

Does this work … really?

Can you do normal Java Apps with that?

Absolutely!

Just wait a few minutes…

Page 10: 130511 stop wasting_your_time

Part 2:

Why build tools are actually harmful

Page 11: 130511 stop wasting_your_time

Real world builds

Example: SaaS project in production

• ca. 350 kLoC Java in 15 Maven modules

• Full mvn rebuild (w/o tests) in 4.5 min

• Full deploy and restart in roughly 15 min

• Produces a few Web apps and some

Page 12: 130511 stop wasting_your_time

Development workflow

1. Pull changes / clone the whole project

2. Make sure IDE can deploy & run the apps

3. Change & Commit

4. Rebase, re-build, re-deploy, re-test

5. Push

6. Wait for CI to show a green light

Page 13: 130511 stop wasting_your_time

Lots of frequently broken assumptions:

• Do you have the right runtime config?

• Does you IDE produce the real output?

• Are you changes incorporated elsewhere?

Slow and error-prone!

Gets harder and harder!

What happened?

Page 14: 130511 stop wasting_your_time

What is happening here?

Build tool + IDE + You

vs.

A structural mismatch!

Page 15: 130511 stop wasting_your_time

Yet another case of impedance mismatch

Project Structure

Execution & Deployment Model

Page 16: 130511 stop wasting_your_time

Is that really so bad?

• Problem stays small if projects stay small

• Successful applications however:

• Do not stay small

• Do not de-compose into independently versioned small projects easily

• Productivity goes down

Page 17: 130511 stop wasting_your_time

So Maven does not deliver?

Maven solves an important collaboration problem:

Sharing assets among independent organizations

The re-use mechanisms stop working well at more complex solutions.

It does not scale that well within one organization what works collaboratively on one solution!

Page 18: 130511 stop wasting_your_time

Part 3:

Z2 & a demonstration

Page 19: 130511 stop wasting_your_time

Overcome the impedance mismatch

In Z2:

• Repository structure = runtime model

• Deploy becomes Synchronize

Page 20: 130511 stop wasting_your_time

For example:

A Java component that holds implementation and API types of the module com.zfabrik.sample.digester.admin

A Web app component that will be loaded by the Web container. In this case a Vaadin Application with Spring.

Another Java component. This one holds domain definitions and is re-used from other modules.

Page 21: 130511 stop wasting_your_time

Demo

Now, let’s take a look (demo)

Page 22: 130511 stop wasting_your_time

Is there a technology barrier?

Typically, Java frameworks are coming along nicely with Z2. For example:

• Spring • Spring AspectJ • Hibernate • Hadoop & HBase • Groovy

• Jax-WS • Vaadin • RAP • BIRT • …

Page 23: 130511 stop wasting_your_time

Modes of Operation

• Full-fletched w/ Worker Processes

• Most-flexible, most powerful

• Inside another Web Container

• If that’s a given

• Command line

• Extends solution with CLII

Page 24: 130511 stop wasting_your_time

Summary

Java Build tools for business solutions are a remnant of the past

If you do not need to deploy on Websphere et al, consider leaving that past behind

Page 25: 130511 stop wasting_your_time

Want to be involved?

Z2 is Open-Source Software

If you think this interesting and useful, if you want to participate, adapt, or improve:

Get in touch with us!

Page 26: 130511 stop wasting_your_time

Powered-by

Page 28: 130511 stop wasting_your_time

Where would you rather be?