Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Dependency injection for reporting user control(solved)

Dependency injection for reporting user control(solved)

Scheduled Pinned Locked Moved Design and Architecture
csharpannouncementdatabasewinformscom
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GuyThiebaut
    wrote on last edited by
    #1

    I am writing an application(C# winforms) that counts calories. One aspect the the application I would appreciate some ideas or suggestions on is the reporting aspect(a user control within the application). The reporting control has a graph and a selection of reports that one can run for selected dates or all of the data. What I am looking to do is to be able to have the report definitions sit outside of the application so that on startup the application fetches the available reports. This will allow me to distribute the application and reports separately - allowing me to release new reports in the future without releasing a new version of the application. The report definitions need to contain the logic for how the data is fetched as well as the definition of the chart. The class holding the data is serialised and loaded on startup and saved to at various points. So I am open to ideas and suggestions on what I could do. In essence I am looking for dependency injection with regards to the reporting user control. Thanks in advance for your ideas [Edit] Having thought this through a bit more, maybe linking to a DLL dynamically at runtime may be a solution clickety[^] - anyone have any experience of this and/or opinions on it? Solution [Edit number 2]I have decided to use a DLL and by making use of reflection query the DLL on the charts available. The DLL will be dynamically loaded at runtime. The sources of my decision were these two excellent codeproject articles: Article 1[^] Article 2[^] The only issue being that I cannot get generic lists of objects from the assembly due to using .Net 4 so I am using arraylists - heck there may even be a tip(article) in this.

    “That which can be asserted without evidence, can be dismissed without evidence.”

    ― Christopher Hitchens

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups