F101 - Behaviors, Configuration, and Runtime
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

F101 - Behaviors, Configuration, and Runtime

  • 1,122 views
Uploaded on

I’m going to drill our entire architecture into your head. I’ll explain this magic BehaviorGraph and Behavior idea that we always talk. By the end of this, you should understand what makes FubuMVC......

I’m going to drill our entire architecture into your head. I’ll explain this magic BehaviorGraph and Behavior idea that we always talk. By the end of this, you should understand what makes FubuMVC different.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,122
On Slideshare
680
From Embeds
442
Number of Embeds
6

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 442

http://lostechies.com 348
http://feeds.feedburner.com 78
http://www.sogroup.com 8
http://www.netvibes.com 5
http://dashboard.bloglines.com 2
http://zhuaxia.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. F101 - Behaviors, Configuration, and Runtime
  • 2. About the Author
    Joshua Arnold
    Chief Software Architect, Perioperative Logistics
    Josh leads the development efforts for the Logistics team and is a principal developer on the Fubu-family of frameworks.
    He is a husband, expectant father, passionate software craftsman, coach, closet musician, and perpetual learner.
    http://www.linkedin.com/in/joshuaarnold
    http://josharnold.lostechies.com
    http://twitter.com/jmarnold
  • 3. Goals
    Understand the underlying model that makes FubuMVC
  • 4. What’s in an Action?
    users/jmarnold
  • 5. What’s in an Action?
    users/jmarnold
    {controller}/{action}
  • 6. What’s in an Action?
    users/jmarnold
    {controller}/{action}
    UsersController.Show(string username)
  • 7. What’s in an Action?
    Routing
    users/jmarnold
    Web Framework
    {controller}/{action}
    Method Invocation
    UsersController.Show(string username)
  • 8. What’s in an Action?
    Web Framework
    Given some {route}:
    1. Locate the Method for that route 2. Invoke that Method
  • 9. What’s in an Action?
    Method Invocation
    Type
    MethodInfo
  • 10. What’s in an Action?
    ActionCall
    Type
    MethodInfo
  • 11. Action Calls
    Analogous to “Controller Actions”
    Can come from anywhere – it’s just a glorified delegate descriptor
    Key Term:ActionCall
  • 12. Request/Response
    Given some {route}:
    1. Locate the Method for that route 2. Invoke that Method
    3. Render the respective view
  • 13. Request/Response
    Routing
    Given some {route}:
    Web Framework
    1. Locate the Method for that route
    Method Invocation
    2. Invoke that Method
    3. Render the respective view
    View Rendering
  • 14. The Pipeline
    Method Invocation
    View Rendering
  • 15. The Pipeline
    ActionCall
    Output
  • 16. The Pipeline
    BehaviorNode
    ActionCall
    Output
    Key Term:BehaviorNode
  • 17. The Pipeline
    “Invoke this method”
    “Render the output”
    ActionCall
    Output
  • 18. The Pipeline
    “Invoke this method”
    “Render the output”
    ActionCall
    Output
    “Get the data from here and…”
    “…and put the return value in here”
    IFubuRequest
  • 19. Configuration Model
    BehaviorChain
    Node 3
    Node 1
    Node 2
  • 20. Behavior Chains
    Essentially a linked list of Behavior Nodes
    Describes the order in which behavior nodes will execute for a given request
    Can be identified by:
    Guid
    Input Model Type
    Key Term:BehaviorChain
  • 21. Request/Response
    Routing
    Given some {route}:
    Web Framework
    1. Locate the Method for that route
    Method Invocation
    2. Invoke that Method
    3. Render the respective view
    View Rendering
  • 22. Request/Response
    Routing
    Given some {route}:
    *
    FubuMVC
    1. Find the BehaviorChain for that route
    Resolve Chain
    2. Invoke that BehaviorChain
    Execute Chain
    *
    Not exactly how we do it, but we’ll clarify later
  • 23. Chain Execution - Configuration
    users/jmarnold
    UsersController.Show(“jmarnold”)
    WebFormOutputNode
  • 24. Chain Execution - Runtime
    UsersController.Show(“jmarnold”)
    Render WebForms View
  • 25. Runtime: Russian Dolls
    Full control over execution of next behavior
    Transactions
    Using statements
    Etc.
    You can decide not to execute the next
    You can even decide to do something else instead
  • 26. Models/Terminology
    Configuration:
    BehaviorChain
    BehaviorNode
    Runtime:
    IActionBehavior
  • 27. One More Time
    Configuration:
    Node 3
    Node 1
    Node 2
  • 28. One More Time
    Node 1
    Runtime:
    Node 2
    Node 3
  • 29. Intermission
    Grab some coffee
    Ask some questions
    Make sure we’re all on the same page here
  • 30. Behavior Chain Construction
    ActionCalls are registered through either of the following:
    Conventional discovery (as stated in your FubuRegistry)
    IActionSource implementations registered in your FubuRegistry
  • 31. Behavior Chain Construction
    FubuRegistry
    BehaviorGraph
    BehaviorChain 1
    Assembly Scanning
    BehaviorChain 2
    IActionSources
    Key Term:BehaviorGraph
  • 32. Routing Integration
    BehaviorChain
    Output
    ActionCall
  • 33. Routing Integration
    Route
    IUrlPolicy
    BehaviorChain
    Output
    ActionCall
  • 34. Request/Response
    Routing
    Given some {route}:
    *
    FubuMVC
    1. Find the BehaviorChain for that route
    Resolve Chain
    2. Invoke that BehaviorChain
    Execute Chain
    *
    Not exactly how we do it, but we’ll clarify later
  • 35. Request/Response
    Routing
    Given some {route}:
    FubuMVC
    1. Find the BehaviorChainfor the route, via the BehaviorGraph, using the configured Guid
    Resolve Chain
    Execute Chain
    2. Invoke that BehaviorChain
  • 36. Who Cares?
    Behaviors seem cool…
    What’s the point?
  • 37. How about an example?
  • 38. …And Again…
  • 39. What if we could…
  • 40. What if we could…
    ActionCall(CreateEntityAction<TEntity>)
  • 41. What if we could…
    {entity}/create
    IUrlPolicy
    ActionCall(CreateEntityAction<TEntity>)
  • 42. Reusable Actions
    Why repeat yourself when you don’t have to?
  • 43. Reusable Behaviors
    Why invoke an ActionCall if the input isn’t valid?
    Use a “Validation Behavior”
  • 44. Question Time
  • 45. Where to go from here…
    …you tell me:
    View Engines & Html Conventions?
    Custom Behaviors?
    FubuRegistry DSL?