foobara 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/README.md +37 -4
- data/projects/in_memory_crud_driver_minimal/src/in_memory_minimal.rb +0 -20
- data/projects/persistence/src/entity_attributes_crud_driver.rb +7 -19
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20e1fd1d627256c51ce809f550eec383139b59e29b6d45062deac0f0d3a0b3ec
|
4
|
+
data.tar.gz: 59f5be1a4dbbf0085971965bd23e7f7ff077fd61d18ec0cb903a48e2a4f8196c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8da4d579c0e7b159cb1a4531589f310d52e755312f33fc72195b8e2f64c599d797b2b2329b8bbccc58a42bd2f5640f1a7716e58d5edf158955a4774d4b6a29d
|
7
|
+
data.tar.gz: 9de070ec54db593d33a5234630dc4c8c0ab43e9605dd6630dcde55ee4fc73d51c3469cb8fbb5fe97c03592889e9c787b8450e1a07936977dbc3bfc7bdf13067a
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,42 @@
|
|
1
1
|
# Foobara
|
2
2
|
|
3
|
-
Foobara is a
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
Foobara is a software framework meant to help with projects that have
|
4
|
+
a complicated business domain. It accomplishes this by helping to
|
5
|
+
build projects that are command-centric and discoverable, as well as some other features.
|
6
|
+
|
7
|
+
### Commands
|
8
|
+
|
9
|
+
* Foobara commands are meant to encapsulate high-level domain operations.
|
10
|
+
* They serve as the public interface to Foobara systems/subsystems.
|
11
|
+
* They are organized into Organizations and Domains.
|
12
|
+
|
13
|
+
### Discoverability
|
14
|
+
* This means there is a formal machine-readable description of the systems/subsystems
|
15
|
+
* The implication of this is that integration code can be abstracted away.
|
16
|
+
|
17
|
+
### Implications of command-centric + discoverability
|
18
|
+
* The system better communicates the mental model of the problem and the chosen solution
|
19
|
+
* Engineers are able to spend more time writing code relevant to the domain and less time
|
20
|
+
writing code related to specific tech-stack, software pattern, or architecture decisions.
|
21
|
+
* Engineers can spend more time operating within a specific mental model at a time instead of
|
22
|
+
multiple mental models all at once.
|
23
|
+
|
24
|
+
### Other features for helping with Domain complexity
|
25
|
+
|
26
|
+
* Domain mappers
|
27
|
+
* These can map a concept from one domain to another.
|
28
|
+
* This separation of concerns leads to commands that have code
|
29
|
+
that reflects the domain they belong to as opposed to logic from many different domains.
|
30
|
+
* Remote commands
|
31
|
+
* These have the same interface as commands that live in other systems and act as a proxy to them.
|
32
|
+
* This allows rearchitecting of systems without changing interfaces and so reducing refactoring/testing required.
|
33
|
+
* These currently exist for both Ruby and Typescript
|
34
|
+
* An extract-repo script
|
35
|
+
* Can be used to extract files from one Foobara project to another, preserving history.
|
36
|
+
* Making this easier can help with rearchitecting systems.
|
37
|
+
* Custom crud-drivers (if needed)
|
38
|
+
* You could hypothetically write your own custom CRUD driver that knows how
|
39
|
+
to assemble an entity record with a clean mental model from a mismodeled legacy database.
|
7
40
|
|
8
41
|
## Installation
|
9
42
|
|
@@ -2,26 +2,6 @@ module Foobara
|
|
2
2
|
module Persistence
|
3
3
|
module CrudDrivers
|
4
4
|
class InMemoryMinimal < EntityAttributesCrudDriver
|
5
|
-
# TODO: delete
|
6
|
-
def open_connection(_connection_or_credentials)
|
7
|
-
# TODO: figure out what we expect here when there is no connection necessary
|
8
|
-
Object.new
|
9
|
-
end
|
10
|
-
|
11
|
-
def open_transaction
|
12
|
-
# TODO: figure out what we expect here when there is no native transaction support
|
13
|
-
Object.new
|
14
|
-
end
|
15
|
-
|
16
|
-
def close_transaction(_raw_tx)
|
17
|
-
# can't fail since there's no native transaction support...
|
18
|
-
end
|
19
|
-
|
20
|
-
def rollback_transaction(_raw_tx)
|
21
|
-
# nothing to do... except maybe enter a state where we don't flush anything else
|
22
|
-
# but can just rely on higher-up plumbing for that
|
23
|
-
end
|
24
|
-
|
25
5
|
class Table < EntityAttributesCrudDriver::Table
|
26
6
|
attr_accessor :records
|
27
7
|
|
@@ -8,41 +8,29 @@ module Foobara
|
|
8
8
|
self.tables = {}
|
9
9
|
end
|
10
10
|
|
11
|
-
#
|
11
|
+
# Default behavior is for technologies that don't have a connection concept
|
12
|
+
# in a proper sense
|
12
13
|
def open_connection(_connection_or_credentials)
|
13
|
-
#
|
14
|
-
raise "subclass responsibility"
|
15
|
-
# :nocov:
|
14
|
+
# should we return some kind of Connection object here even if it does nothing interesting?
|
16
15
|
end
|
17
16
|
|
17
|
+
# Default behavior is for storage technologies that don't support proper
|
18
|
+
# transaction support
|
18
19
|
def open_transaction
|
19
|
-
#
|
20
|
-
|
21
|
-
# :nocov:
|
20
|
+
# Should we have some kind of fake transaction object that raises errors when used after rolledback/closed?
|
21
|
+
Object.new
|
22
22
|
end
|
23
23
|
|
24
24
|
def flush_transaction(_raw_tx)
|
25
|
-
# :nocov:
|
26
|
-
raise "subclass responsibility"
|
27
|
-
# :nocov:
|
28
25
|
end
|
29
26
|
|
30
27
|
def revert_transaction(_raw_tx)
|
31
|
-
# :nocov:
|
32
|
-
raise "subclass responsibility"
|
33
|
-
# :nocov:
|
34
28
|
end
|
35
29
|
|
36
30
|
def rollback_transaction(_raw_tx)
|
37
|
-
# :nocov:
|
38
|
-
raise "subclass responsibility"
|
39
|
-
# :nocov:
|
40
31
|
end
|
41
32
|
|
42
33
|
def close_transaction(_raw_tx)
|
43
|
-
# :nocov:
|
44
|
-
raise "subclass responsibility"
|
45
|
-
# :nocov:
|
46
34
|
end
|
47
35
|
|
48
36
|
def table_for(entity_class)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foobara-util
|
@@ -32,6 +32,7 @@ executables: []
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
+
- ".ruby-version"
|
35
36
|
- CHANGELOG.md
|
36
37
|
- LICENSE-MPL-2.0.txt
|
37
38
|
- LICENSE.txt
|
@@ -354,13 +355,13 @@ files:
|
|
354
355
|
- projects/value/src/validator.rb
|
355
356
|
- projects/weak_object_set/lib/foobara/weak_object_set.rb
|
356
357
|
- projects/weak_object_set/src/weak_object_set.rb
|
357
|
-
homepage: https://
|
358
|
+
homepage: https://foobara.com
|
358
359
|
licenses:
|
359
360
|
- MPL-2.0
|
360
361
|
metadata:
|
361
|
-
homepage_uri: https://
|
362
|
-
source_code_uri: https://
|
363
|
-
changelog_uri: https://
|
362
|
+
homepage_uri: https://foobara.com
|
363
|
+
source_code_uri: https://foobara.com
|
364
|
+
changelog_uri: https://foobara.com/blob/main/CHANGELOG.md
|
364
365
|
rubygems_mfa_required: 'true'
|
365
366
|
post_install_message:
|
366
367
|
rdoc_options: []
|