Code as philosophy: names that reflect existence, not actions
This document establishes naming conventions that align with Be Framework’s ontological programming principles, ensuring code that expresses being rather than doing.
“Objects don’t do things—they become what they are meant to be”
Our naming reflects this fundamental shift from imperative to existential thinking:
Pattern: {Domain}Input
Purpose: Pure data containers representing the starting point of metamorphosis
// ✅ Correct
final readonly class UserInput
final readonly class OrderInput
final readonly class DataInput
final readonly class PaymentInput
// ❌ Avoid
final readonly class UserData // Too generic
final readonly class CreateUserRequest // Action-oriented
final readonly class UserCommand // Imperative thinking
Pattern: Being{Domain} or {Domain}Being
Purpose: Intermediate transformation stages where objects discover their nature
// ✅ Correct - Being prefix (recommended)
final readonly class BeingUser
final readonly class BeingOrder
final readonly class BeingData
final readonly class BeingPayment
// ✅ Acceptable - Being suffix
final readonly class UserBeing
final readonly class OrderBeing
// ❌ Avoid
final readonly class UserValidator // Action-oriented
final readonly class OrderProcessor // What it does, not what it is
final readonly class DataTransformer // Imperative thinking
Pattern: Domain-specific result names expressing final state Purpose: Complete transformed beings representing successful completion
// ✅ Correct - State of being
final readonly class ValidatedUser
final readonly class ProcessedOrder
final readonly class Success
final readonly class Failure
final readonly class ApprovedLoan
final readonly class RejectedApplication
// ❌ Avoid
final readonly class UserResponse // Implementation detail
final readonly class OrderResult // Generic
final readonly class ProcessingOutput // Action-oriented
Pattern: public {Type1}|{Type2} $being;
Purpose: Carries the object’s destiny through union types
// ✅ Correct
public Success|Failure $being;
public ValidUser|InvalidUser $being;
public ApprovedLoan|RejectedLoan $being;
// ❌ Avoid
public mixed $result; // Not type-specific
public object $outcome; // Too generic
public array $data; // Action-oriented
Pattern: Descriptive names reflecting inherent identity Purpose: What the object already is
// ✅ Correct
public string $email;
public Money $amount;
public UserId $userId;
public \DateTimeImmutable $timestamp;
// ❌ Avoid
public string $inputEmail; // Redundant prefix
public Money $requestAmount; // Action-oriented
Pattern: Match property names for Immanent, descriptive for Transcendent
// ✅ Correct
public function __construct(
#[Input] string $email, // Immanent - matches property
#[Input] Money $amount, // Immanent - matches property
#[Inject] EmailValidator $validator, // Transcendent - capability
#[Inject] PaymentGateway $gateway // Transcendent - external service
) {}
// ❌ Avoid
public function __construct(
#[Input] string $userEmail, // Different from property name
#[Input] Money $inputAmount, // Redundant prefix
#[Inject] object $emailChecker, // Not descriptive
#[Inject] mixed $paymentService // Not type-specific
) {}
Pattern: #[Be(DestinyClass::class)] or #[Be([Option1::class, Option2::class])]
// ✅ Single destiny
#[Be(BeingUser::class)]
final readonly class UserInput
// ✅ Multiple destinies
#[Be([ValidatedUser::class, InvalidUser::class])]
final readonly class BeingUser
// ❌ Avoid
#[Be(UserProcessor::class)] // Action-oriented
#[Be(HandleUser::class)] // Imperative
Pattern: Always include philosophical comments
// ✅ Correct
public function __construct(
#[Input] string $email, // Immanent
#[Inject] EmailValidator $validator // Transcendent
) {}
// ❌ Missing philosophy
public function __construct(
#[Input] string $email,
#[Inject] EmailValidator $validator
) {}
// Input → Being → Final
ProductInput → BeingProduct → [ValidProduct, InvalidProduct]
OrderInput → BeingOrder → [ProcessedOrder, FailedOrder]
PaymentInput → BeingPayment → [SuccessfulPayment, DeclinedPayment]
// Input → Being → Final
UserInput → BeingUser → [RegisteredUser, ConflictingUser]
LoginInput → BeingLogin → [AuthenticatedUser, FailedAuthentication]
ProfileInput → BeingProfile → [UpdatedProfile, InvalidProfile]
// Input → Being → Final
DataInput → BeingData → [ProcessedData, CorruptedData]
FileInput → BeingFile → [ValidatedFile, InvalidFile]
ConfigInput → BeingConfig → [LoadedConfig, MalformedConfig]
// ❌ Action-oriented
ProcessUser, ValidateOrder, TransformData
CreatePayment, HandleRequest, ExecuteCommand
// ✅ Being-oriented
BeingUser, BeingOrder, BeingData
BeingPayment, BeingRequest, BeingCommand
// ❌ Too generic
Handler, Processor, Manager, Service, Util
// ✅ Specific and meaningful
BeingUser, ValidatedOrder, ProcessedPayment
// ❌ Implementation-focused
UserDTO, OrderVO, PaymentPOJO, DataObject
// ✅ Domain-focused
UserInput, BeingOrder, ProcessedPayment
Before naming any class, ask:
As your understanding of the domain deepens, names may evolve:
// Initial understanding
UserValidator →
// Deeper understanding
BeingUser →
// Full ontological clarity
BeingUser // with clear Immanent/Transcendent distinction
“In Be Framework, names are not labels—they are declarations of existence. Choose them as carefully as you would choose words in poetry, for they shape how we think about the reality we create.”