Architecture question...overthinking again :-)



warning ... two part question ahead :-)

....I'll blame it on the fact that I'm again re-reading "Code Complete" <g>

Working on an app, trying to "decompose" it into objects.

I don't think it's germane but it happens to be an axdll run from a std exe.

So I have a class(dll) that manages some other classes(to do various jobs),
we'll call it cManager <g>

If I want a report on a database it creates a cData class to handle
accessing a database and cReport to handle reporting on results.

cManager passes cData to cReport ... Set moReport.DataSource = moData

cReport reads the database (with the help of cData) and then reports it's
findings in a listview on a form(with the help of cListView)

cListView handles formatting headers and entering data into a listview on a
ReportForm

which brings us to the first question <g>...you were beginning to wonder
eh?? ...

question 1)
Is this completely stupid to break this all up like this?
It does seem to be helping me keep track of what i'm doing where(with my bad
memory thats important<g>) compared to when it was just umpteen subs and
functions in one module...but i do wonder if breaking out every little job
into it's own class (like setting up a listview) is overdoing it ???


and for the second question....

while all this is going on, I want to give the user indication that
somethings happening so I have a frmProgBar to show a progress bar

cReport creates frmProgBar, sizes up the quantity of data, sets pb.Max and
increments while it's "Reading Data"

then cReport hands off frmProgBar to cListView
... Set moLv.ProgBar = Me.ProgBar
so cListView can increment pb while it's loading the listview(which for some
unknown reason is not instantaneous??)

When cListView is done with it, it can destroy it and show it's
ReportFormWithListView displaying the results of all those conflumerrations
<g>
Then ReportForm.CmdClose_Click event raises Event Done
clistView receives that event and raises it's event Done
cReport recieves that event and raises it's event Done
cManager receives that event and re-shows it's .MainForm to await further
instructions

question 2)...whew...thought we'd never get there ...<bg>
Is this a reasonable structure or is there a better way for two classes to
share a common form instance?
....or should they not... maybe each should create it's own instance and
show/destroy at will?


any advice for a confused amature?
Thanks
Mark






.



Relevant Pages

  • Re: Architecture question...overthinking again :-)
    ... If I want a report on a database it creates a cData class to handle ... accessing a database and cReport to handle reporting on results. ... cListView handles formatting headers and entering data into a listview on ...
    (microsoft.public.vb.general.discussion)
  • Re: using fujitsu power cobol and crystal reports
    ... > You stated that you're able to put the "embedded designer control onto ... Are you designing the report inside your program? ... Move "CrystalRuntimeApplication" TO WK. ... INVOKE CApplication "OpenReport" USING CReportName RETURNING CReport. ...
    (comp.lang.cobol)
  • CListView listing items in other views but not report view
    ... I'm working on a program that contains a CListView. ... into it, they're visible in all views (icons, list) except in report ... The column headings I created are visible in ... report view though. ...
    (microsoft.public.vc.language)
  • Re: uncleared code
    ... but i cant change the font directly in creport. ... right click the field and format but i cat reflect on report ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: uncleared code
    ... but i cant change the font directly in creport. ... right click the field and format but i cat reflect on report ...
    (microsoft.public.dotnet.languages.csharp)