Port/Adapter/Simulator and UI

Posted by: Eric Gunnersons C# Compendium, on 12 May 2015 | View original | Bookmarked: 0 time(s)

Ive been working on a little utility project, and Ive been using port/adapter/simulator on both the server-side parts and on the UI parts. It has been working nicely, though it took me a while to get there.

Initially, I started with a single UI class. After a bit of extension, it looked a bit ugly, so I decided to break it apart by functional area theres a main working area, theres a favorites area, theres an executing area, and theres a config area. For each area, it looks something like this:


-> UIFavorites
-> UIFavoritesSimulator (really more of a mock than a simulator)

FavoritesManager(IUIFavorites, IUIStore, etc. )

The UI side handles just that the UI and the manager part handles the business logic. The UI part exposes events for user actions a properties and methods for modification.

There was one slightly sticky part of this. There are times when the working area manager needs to add itself to the favorites. Options I thought of:

1) Passing the UIWorking object to the favorites manager.

2) Passing the working manager to the favorites manager.

3) Hooking the UIworking event to a favorites manager method in the main creation code.

4) Hooking a working manager event to a favorites manager method in the main creation code.

I didnt like #1 or #2, so I ended up doing #4. #3 also seemed okay.

Category: Events | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 558 | Hits: 8

Similar Posts

  • Microsoft StreamInsight and BizTalk Server - Preliminary Thoughts more
  • Custom Panels in Silverlight/WPF Part 2: ArrangeOverride more
  • The Telerik CAB Enabling Kit and SCSF – Tutorial 2: UIExtensionSites more
  • Update to Logging in to DotNetNuke from a Silverlight Application with RIA Authentication more
  • Installing the FTP Service for IIS 6.0 On An Alternate Port Number and Configuring Windows Firewall more
  • The Open Cloud Manifesto - what I think... more
  • Freeing up data and collaboration via the mesh more
  • Mousing Around: Mobile Mouse with Desktop Mouse Radio more
  • Why does the Adapter say Action is not understood even though I am using the binding file generated by the Consume Adapter Service wizard? more
  • Differences between the Windows Communication Foundation (WCF) Line-Of-Business (LOB) Adapter Pack and the BizTalk Adapter Framework more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD