Feature Folders
Anthony Steele

@AnthonySteele
Anthony.Steele@7digital.com
Large projects
Why was it organised this way?
Default ASP MVC organisation isn’t good for large projects.
Organise related...
Uncle Bob Martin

http://blog.8thlight.com/uncle-bob/2011/09/30/Screaming-Architecture.html

“Imagine that you are looking...
What is your architecture making obvious
“I am an ASP MVC app? I have controllers and views!”
Or
“I am an online music cat...
What’s in a screaming name?
I don’t like this name.
The architecture should not be wailing in
pain, it should be running s...
How about…
• Obvious architecture
• Blatant domain
• Lucid domain architecture
• The “what are you making plain?” principl...
Feature folders
This is a broad idea. Narrow our focus!
“obvious architecture” idea implies that code should be arranged
w...
How?
In ASP MVC
You need a custom controller locator and custom view locator.
Good news for the controller locator:
Your I...
In ServiceStack or Nancy
These frameworks support feature folders without customisation.
Just do it.
Demo In Visual Studio
Repositories / Data Stores / Services
• Still have a “data layer” where access to DB/ Web services becomes
the main concer...
In Angular
• Even further integrated by feature:
• 2 levels of tests live in with the js “codebehind” and the html markup....
Conclusion
• Some things can easily be found by the tooling
• But the problem domain can’t
• Make that explicit
• Put conc...
Thank you!
Anthony Steele

@AnthonySteele
anthony.steele@7digital.com
Feature folders
Upcoming SlideShare
Loading in...5
×

Feature folders

1,096

Published on

Related to http://developer.7digital.com/blog/obvious-architecture
and https://github.com/AnthonySteele/FeatureTest

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,096
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Feature folders

  1. 1. Feature Folders Anthony Steele @AnthonySteele Anthony.Steele@7digital.com
  2. 2. Large projects Why was it organised this way? Default ASP MVC organisation isn’t good for large projects. Organise related things together.
  3. 3. Uncle Bob Martin http://blog.8thlight.com/uncle-bob/2011/09/30/Screaming-Architecture.html “Imagine that you are looking at the blueprints of a building. What do these plans tell you? What is your architecture screaming about?”
  4. 4. What is your architecture making obvious “I am an ASP MVC app? I have controllers and views!” Or “I am an online music catalogue, A payroll system, etc“ Make it shout about the problem domain not the framework.
  5. 5. What’s in a screaming name? I don’t like this name. The architecture should not be wailing in pain, it should be running smoothly. Is there a better name for this idea?
  6. 6. How about… • Obvious architecture • Blatant domain • Lucid domain architecture • The “what are you making plain?” principle • Putting related stuff together and naming it well • Feature folders?
  7. 7. Feature folders This is a broad idea. Narrow our focus! “obvious architecture” idea implies that code should be arranged with related code for a feature in the same folder.
  8. 8. How? In ASP MVC You need a custom controller locator and custom view locator. Good news for the controller locator: Your Ioc Container can do it. Not as good news for the view locator. You need some custom code. Demo In Visual studio…
  9. 9. In ServiceStack or Nancy These frameworks support feature folders without customisation. Just do it. Demo In Visual Studio
  10. 10. Repositories / Data Stores / Services • Still have a “data layer” where access to DB/ Web services becomes the main concern. • Split at this boundary where the concerns, dependencies change • Vocabulary of tests change at the boundary too. • But inside that project, still have related stuff together.
  11. 11. In Angular • Even further integrated by feature: • 2 levels of tests live in with the js “codebehind” and the html markup. • The build process does different things with them. Sublime text demo
  12. 12. Conclusion • Some things can easily be found by the tooling • But the problem domain can’t • Make that explicit • Put conceptually related things together
  13. 13. Thank you! Anthony Steele @AnthonySteele anthony.steele@7digital.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×