Skip to content
Snippets Groups Projects
Commit 7666545b authored by Hugo CAUPERT's avatar Hugo CAUPERT
Browse files

feat: better starting point

parent fffc1e2e
Branches
No related tags found
No related merge requests found
package io.takima.temporalpractice.bakery;
import io.takima.temporalpractice.bakery.kitchen.KitchenWorkflow;
import io.takima.temporalpractice.bakery.kitchen.KitchenWorkflowImpl;
public class OrderCookiesApp {
public static void main(String[] args) {
KitchenWorkflow kitchenWorkflow = new KitchenWorkflowImpl();
// This app simulates an order of cookies
// It should call the workflow which makes cookies
kitchenWorkflow.makeCookies();
}
}
package io.takima.temporalpractice.bakery.kitchen.bake;
package io.takima.temporalpractice.bakery.bake;
public interface BakeService {
void bake();
......
package io.takima.temporalpractice.bakery.bake;
public class BakeServiceImpl implements BakeService {
@Override
public void bake() {
System.out.println("Now baking those cookies.");
}
}
package io.takima.temporalpractice.bakery.kitchen.batter;
package io.takima.temporalpractice.bakery.batter;
public interface BatterService {
void prepareBatter();
......
package io.takima.temporalpractice.bakery.batter;
public class BatterServiceImpl implements BatterService {
@Override
public void prepareBatter() {
System.out.println("Mixing flour, sugar, and love...");
}
}
package io.takima.temporalpractice.bakery.kitchen;
public interface KitchenWorkflow {
void makeCookies();
}
package io.takima.temporalpractice.bakery.kitchen;
public class KitchenWorkflowImpl {
public class KitchenWorkflowImpl implements KitchenWorkflow {
public void makeCookies() {
// Note: System.out.println is used here for simplicity
// In real applications, you should use proper Workflow-aware logging (we'll cover this in Day 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment