-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef1fddf
commit 5d2cb41
Showing
2 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
First unspike attempt to implement a web application further to Uncle Bob's admonitions to approach web design from a DDD-style posture. | ||
I acknowledge and draw inspiration from two particular experiments in this area, and will draw from their approaches. | ||
First unspiked attempt to implement a web application further to Uncle Bob's admonitions to approach web design from a DDD-style posture. | ||
I acknowledge and draw inspiration from two particular experiments in this area: | ||
|
||
Here, I will not undertake to develop a framework for building an application, but rather will simply build an app to shed light what might best be etracted to support future works. | ||
Jason Roelofs' Raidit (https://github.com/jasonroelofs/raidit) | ||
|
||
Raidit is a reasonably complex application built within a rails app, adding an interactors folder and placing entities in | ||
the Rails model directory. Entities are built out in some cases as ActiveModel objects. | ||
|
||
Piotr 'Qertoip' Włodarek (https://github.com/qertoip/guru_watch) | ||
|
||
The application is more modest than Raidit, but the extraction from rails is a tour de force. He uses UseCases in lieu of | ||
Interactors, and some other terminology, but the application builds nicely in rails and runs in memory as well. He retains | ||
ActiveSupport (I approve) and also uses ActiveModel (actually ActiveAttr) in his mainline. Also expressly separates pieces of | ||
rails, using ActiveRecord on the repository side, and ActionPack on the "Web" side. He seems to be building up a more elaborate | ||
persistence framework akin to a full DDD repository. | ||
|
||
First Phase | ||
=========== | ||
Plan for this phase is to implement the interactors, and then attempt to assemble a rudimentary web app based on them, at first | ||
using a memory-based store. Next phase will implement a database-backed store. | ||
Here, I will not undertake to develop a framework for building an application, but rather will simply build an app to shed light on what might best be extracted to support future works. I will try to build with various web tools, including a raw rack app, Sinatra app and Rails. I'll also try a memory, raw Postgres SQL, ActiveRecord and NoSql repository. | ||
|
||
If this goes well, I'll try to extract a model, and perhaps to a few screencasts to show its construction. Please, please, please, communicate if you are interested in this approach -- its time we started organizing our thoughts to see if this makes any sense at all. I'm emotionally committed to this approach as, at least in Greenfield, the initial app development (and TDD!) goes SOOOOO smoothly. | ||
|
||
Andrew Greenberg (wizardwerdna@gmail.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
Global Resources/Classes | ||
Shorthand docs. | ||
|
||
Global Resources/Classes/Boundry Stuff/Etc. | ||
Interactors | ||
Entities | ||
Page | ||
User | ||
Repository | ||
Notifier | ||
Messages | ||
Request | ||
Response | ||
|
||
Use Cases (Interactors instantiated as shown below, and run with #execute) | ||
|
||
Use Cases | ||
Static Text | ||
ConfigStaticText [<name> <citation>] | ||
LookupStaticText <name> | ||
Pages [Page entities comprise <page name> and <page locator>] | ||
Pages::All.new => Response.new(pages: [array of pages]) | ||
Pages::Set.new(name: name, locator: location) => NoResponse | ||
Pages::Get.new(name: name) => Response.new(page: <page corresponding to name>) | ||
|
||
User | ||
Signup <email> <password> | ||
VerifyNotification <email> | ||
Verification <verification-code> | ||
ChangeNotification <email> | ||
ChangePassword <change-password-code> <password> | ||
Login <email> <password> <isPersistent> | ||
Logout | ||
CurrentUser | ||
User [User entities comprise <email> and <password>] | ||
Signup.new(email: email, password, password) => Response.new(user: <user>, errors: <error-object>) | ||
VerifyNotification.new(email: email) => NoResponse | ||
Verification.new(token: token) => Response.new(errors: <error-object>) | ||
ChangeNotification.new(email: str) => NoResponse | ||
ChangePassword(email: email, password: password) => Response.new(user: <user>, errors: <error-object>) | ||
Login(email: email, password: password, persistent: persistent) | ||
=> Response.new(user: <user>, errors: <error-object>) | ||
Logout => NoResponse | ||
CurrentUser => Response.new(user: <user>) | ||
|
||
|