Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions _includes/manuals/1.0/en/contents.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@
</div>
<div class="collapse navbar-collapse" id="Navber">
<ul class="navbar-nav mr-auto">
{% assign sidebar_pages = site.pages | get_sidebar_pages: 'en' %}
{% for item in sidebar_pages %}
{% assign manual_pages = site.pages | where: "category", "Manual" | where: "layout", "docs-en" | sort: "path" %}
{% for item in manual_pages %}
{% unless item.path contains "/index.md" or item.path contains "/convention/" or item.path contains "/ja/" %}
{% if item.path contains "/en/" and item.title %}
{% assign item_link = item.permalink | default: item.url %}
<li class="nav-item">
<a class="nav-link {% if page.permalink == item_link %}active{% endif %}"
{% if page.permalink == item_link %}aria-current="page"{% endif %}
href="{{ item_link | relative_url }}">{{ item.title | escape }}</a>
</li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
</div>
</nav>
</nav>
10 changes: 7 additions & 3 deletions _includes/manuals/1.0/ja/contents.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@
</div>
<div class="collapse navbar-collapse" id="Navber">
<ul class="navbar-nav mr-auto">
{% assign sidebar_pages = site.pages | get_sidebar_pages: 'ja' %}
{% for item in sidebar_pages %}
{% assign manual_pages = site.pages | where: "category", "Manual" | where: "layout", "docs-ja" | sort: "path" %}
{% for item in manual_pages %}
{% unless item.path contains "/index.md" or item.path contains "/convention/" or item.path contains "/en/" %}
{% if item.path contains "/ja/" and item.title %}
{% assign item_link = item.permalink | default: item.url %}
<li class="nav-item">
<a class="nav-link {% if page.permalink == item_link %}active{% endif %}"
{% if page.permalink == item_link %}aria-current="page"{% endif %}
href="{{ item_link | relative_url }}">{{ item.title | escape }}</a>
</li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
</div>
</nav>
</nav>
13 changes: 12 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@
The Ontological Programming Framework for PHP
</p>

<a class="btn btn-primary" href="/manuals/1.0/en/index.html">
<a class="intl btn btn-primary" href="/manuals/1.0/en/index.html">
Learn more &raquo;
</a>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
const links = document.getElementsByClassName('intl');
const locale = window.navigator.language;
if (locale.startsWith('ja')) {
for(let i = 0; i < links.length; i++) {
links[i].setAttribute('href', links[i].getAttribute('href').replace('/en/', '/ja/'));
}
}
});
</script>
</div>
6 changes: 5 additions & 1 deletion manuals/1.0/en/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ category: Manual
permalink: /manuals/1.0/en/01-overview.html
---

# Overview: A Different Way to Think About Code
# A Different Way to Think About Code

> "The real voyage of discovery consists not in seeking new landscapes, but in having new eyes."
>
> —Marcel Proust, 'The Prisoner' (In Search of Lost Time, Volume 5) 1923

## First, Look at This

Expand Down
6 changes: 6 additions & 0 deletions manuals/1.0/en/02-input-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ permalink: /manuals/1.0/en/02-input-classes.html

# Input Classes

> "We begin from conditions we did not choose, and from there we build our existence."
>
> —From Heidegger's concept of Geworfenheit (thrownness) in 'Being and Time' (1927)

## The Beginning

Input Classes are the starting point of every transformation in Be Framework.

They contain only what the object itself possesses—no external dependencies. Think of it as the object's identity. These elements exist within the object, forming what we call the object's **Immanent Nature**.
Expand Down
6 changes: 6 additions & 0 deletions manuals/1.0/en/03-being-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ permalink: /manuals/1.0/en/03-being-classes.html

# Being Classes

> "The Tao does nothing, yet nothing is left undone."
>
> —Laozi, Tao Te Ching, Chapter 37 (6th century BC)

## Immanence Meets Transcendence

Being Classes are where transformation actually occurs.

The object's own nature (**Immanent Nature**) meets forces provided from the outside (**Transcendent Forces**), and a new being is born. If Input Classes are the "beginning," Being Classes express the "moment of change."
Expand Down
81 changes: 65 additions & 16 deletions manuals/1.0/en/04-final-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ permalink: /manuals/1.0/en/04-final-objects.html

# Final Objects

> "You are not me. How can you know that I don't know the feelings of fish?"
>
> —Zhuangzi's reply when asked "You are not a fish. How can you know the feelings of fish?" (Zhuangzi, 4th century BC)

## The Destination

Final Objects represent the destination of metamorphosis—complete, transformed beings that embody the user's actual interest. These are what the application ultimately cares about.

## Characteristics of Final Objects
Expand All @@ -17,53 +23,92 @@ Final Objects represent the destination of metamorphosis—complete, transformed

**Rich State**: Unlike Input Classes, Final Objects contain the full richness of transformed data.

## Temporal Completeness

Here's an intriguing question: What if objects had such completeness that they needed no external testing?

The Be Framework captures the temporal existence of objects along two axes:

- **`#[Be]`**: The intended self, the destination (future directionality)
- **`$been`**: The completed self (past perfect self-evidence)

Traditional programming verifies whether objects have been processed correctly through external tests. But what if objects themselves contained evidence of their completion? Instead of external verification, intrinsic self-evidence becomes possible.

## Examples

### Successful Outcomes
### Intrinsic Self-Evidence
```php
final class SuccessfulOrder
{
public readonly string $orderId;
public readonly string $confirmationCode;
public readonly DateTimeImmutable $timestamp;
public readonly string $message;
public readonly BeenProcessed $been; // Self-evidence

public function __construct(
#[Input] Money $total, // Immanent from validation
#[Input] CreditCard $card, // Immanent from validation
#[Inject] OrderIdGenerator $generator, // Transcendent
#[Inject] Receipt $receipt // Transcendent
#[Input] Money $total, // Immanent nature
#[Input] CreditCard $card, // Immanent nature
#[Inject] OrderIdGenerator $generator, // Transcendent force
#[Inject] Receipt $receipt // Transcendent force
) {
$this->orderId = $generator->generate(); // New Immanent
$this->confirmationCode = $receipt->generate($total); // New Immanent
$this->timestamp = new DateTimeImmutable(); // New Immanent
$this->message = "Order confirmed: {$this->orderId}"; // New Immanent
$this->orderId = $generator->generate(); // New immanent nature
$this->confirmationCode = $receipt->generate($total); // New immanent nature
$this->timestamp = new DateTimeImmutable(); // New immanent nature
$this->message = "Order confirmed: {$this->orderId}"; // New immanent nature

// Self-evidence of completion
$this->been = new BeenProcessed(
actor: $card->getHolderName(),
timestamp: $this->timestamp,
evidence: [
'total' => $total->getAmount(),
'payment_method' => $card->getType(),
'confirmation' => $this->confirmationCode
]
);
}
}
```

### Error States as Final Objects
This object requires no external testing. The `$been` property contains complete evidence of completion.

### Error States with Self-Evidence
```php
final class FailedOrder
{
public readonly string $errorCode;
public readonly string $message;
public readonly DateTimeImmutable $timestamp;
public readonly BeenRejected $been; // Self-evidence of failure

public function __construct(
#[Input] array $errors, // Immanent from validation
#[Inject] Logger $logger, // Transcendent
#[Inject] ErrorCodeGenerator $generator // Transcendent
#[Input] array $errors, // Immanent nature
#[Inject] Logger $logger, // Transcendent force
#[Inject] ErrorCodeGenerator $generator // Transcendent force
) {
$this->errorCode = $generator->generate();
$this->message = "Order failed: " . implode(', ', $errors);
$this->timestamp = new DateTimeImmutable();

// Self-evidence of failure
$this->been = new BeenRejected(
reason: 'validation_failed',
timestamp: $this->timestamp,
evidence: [
'error_count' => count($errors),
'error_types' => array_keys($errors),
'error_code' => $this->errorCode
]
);

$logger->logOrderFailure($this->errorCode, $errors); // Side effect
}
}
```

Both success and failure carry their own self-evidence of completion. Instead of external tests, the objects themselves maintain complete records of what occurred.

## Final Objects vs Input Classes

| Input Classes | Final Objects |
Expand Down Expand Up @@ -99,8 +144,12 @@ The path from Input to Final Object represents a complete transformation journey
2. **Being Classes**: Transformation stages ("Here's how I change")
3. **Final Object**: Complete result ("Here's what I became")

Users primarily care about Input (what they provide) and Final Objects (what they get back). The Being Classes in between are the framework's responsibility—the machinery of transformation that creates the bridge between intention and result.
Users primarily care about Input (what they provide) and Final Objects (what they get back). The Being Classes in between are our responsibility as designers. It's crucial to understand the temporal transformation of the domain well and design the mechanisms of that transformation to bridge intention and result.

## Transformation Complete

Final Objects express the state of entelecheia (complete realization). They are fully realized beings that no longer need transformation.

## Natural Completion
The immanent nature that began with Input Classes, through encounters with various transcendent forces and natural transformation, finally reaches this completed form. There is no more "trying to become" or "intending to change." Everything is complete, and the value that users truly sought is realized here. This is the essential value of our system.

Final Objects embody the completion of natural transformation. They don't need to "do" anything more—they simply *are* the result that was meant to emerge from the original input's encounter with the world's capabilities.
This is the destination that Be Framework aims for in programming—existence that embodies not "what to do" but "what to be."
Loading