From: David Webber on


"Bubba" <nickname(a)banelli.biz.invalid> wrote in message
news:Xns9D99AF8B4181Cbubbachipsetone(a)130.133.4.11...
>
> we were given short note for doing a project on college (two days ago, due
> is on Monday), that is related to OOP, or to be exact, MFC library.

Beware: MFC and OOP are not always easy bedfellows.

> Basically, I have to create application with at least two forms or
> dialogues. Application has to be able to show persons in a list, and that
> those persons can be sorted by name or surname. They can also be sorted by
> city or address, but then we have to use tree control.
>
> Person can be removed, added or changed. Each person can get indefinite
> telephone numbers and previous addressee. It also must be possible to save
> data when exiting the application and loading them afterwards.

I concur with Steve that this a stiff task starting from nothing in the time
available. Leave the tree control till last: I always found them fiddly,
haven't used one for ages, and it would probably take me that long just to
revise them!

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: Giovanni Dicanio on
On 16/06/2010 18:26, Joseph M. Newcomer wrote:

> But tossing an assignment like this at a student seems to be gratuitous
> sadism on the part of the instructor. I usually spend a couple hours showing my students
> how to create basic dialog-based apps. It is not trivial to get into, and OO programming
> is a tiny, tiny part of what is going on.

[...]

> First, I consider this assignment grossly unfair. As someone who has taught and sometimes
> continues to teach it, I would consider an assignment like this that did not include
> in-class demonstrations of how to build an app to be impossible. You can convey this to
> your instructor for what little good it would do. Other than annoying him/her.

Joe:

Unfortunately, it seems that not all teachers are of the same high
quality as you.

Giovanni

From: Joseph M. Newcomer on
I've been thinking about this for the last couple hours, and have some further
observations:

The Scribble tutorial is primarily a document/view tutorial. It is not clear that
doc/view buys much here, and it could end up just leading you down a garden path by
focusing on an area that is not really critical. Ultimately, you really do need to
understand doc/view architecture, but I question whether or not it has value for
completing the given assignment.

Scribble will teach you how to use the MFC framework to create handlers for events, and
that is a Good Thing. But it will also suggest that the "view" is responsible for doing
all the display work; this is a Bad Thing. Unless you use a CFormView-derived view, where
you can put a control on a dialog and use this dialog as your view. This leads to a
situation in which there can be serious violence done to the purity of the OO model
because the data is held in both the controls of the CFormView-derived class AND has to be
held by the document, leading to a lot of complexity that inevitably smudges the OO
boundaries between the two.

This assignment has a lot of *deep* problems, but the deep problems are totally masked by
the superfictial problems (as in: "what the f--- am I doing?") Those of us who understand
OO can debate endlessly the variety of approaches to handling this odd split, with no
resolution because all of the approaches violate OO cleanliness and all of them are
equally valid. I use two or three of them interchangeably, myself, depending on my mood,
the amount of time I have for the deliverable, and the budget available. With a one-week
deadline and a complete lack of training, I'd say screw the OO-ness, and build a pure
dialog-based app. If you need serialization, write it yourself; it is easier than trying
to learn doc/view and the horrible MFC serialization support.

And I will add this: as a professional trainer, and as an MFC expert, I will say that
doing this as a 1-week assignment without any lectures or training in MFC is absolutely
insane. Yes, *I* could knock it off in a few hours, perhaps in an afternoon, but I've
been using MFC for 15 years, I've taught it for four or five of those years, and I'm an
MVP in the area. I *know* how hard it is to teach all this, and to be completely blunt, I
see no way a group of untrained beginners can pull off something this complex in a week.

You may *think* the assignment sucks. As a professional in the area, I can offer my
expert opinion that this assignment *totally sucks*. I know this is small comfort to you
and your fellow sufferers, but just know that it is not just your narrow opinion that this
is a bad assignment. It *is* a bad assignment..

I don't know how your school deals with collaboration, but if this were a group
assignment, I'd suggest that one student or team become an expert in using a CListCtrl in
report mode, one become an expert on doing simple edit controls and buttons on a dialog,
one group become expert in reading and writing a file of text, and so on. Maybe, just
maybe, with specialization, you can pull this off, but I think the assignment as related
here is undoable by beginners with no training.
joe

On 16 Jun 2010 15:15:58 GMT, Bubba <nickname(a)banelli.biz.invalid> wrote:

>Greetings,
>
>we were given short note for doing a project on college (two days ago, due
>is on Monday), that is related to OOP, or to be exact, MFC library.
>Unfortunately, we were given literally no documentation, so it's free for
>all.
>
>Basically, I have to create application with at least two forms or
>dialogues. Application has to be able to show persons in a list, and that
>those persons can be sorted by name or surname. They can also be sorted by
>city or address, but then we have to use tree control.
>
>Person can be removed, added or changed. Each person can get indefinite
>telephone numbers and previous addressee. It also must be possible to save
>data when exiting the application and loading them afterwards.
>
>I did some Googleing and got books, but none seems to have systematic for
>my problem, in other words, they seem to be to vast in handling the
>subject, so I'd like to know what's the best way to start doing this type
>of application.
>
>Best regards and thanks in advance!
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Bubba on
Giovanni Dicanio's log on stardate 16 lip 2010

>> we were given short note for doing a project on college (two days
>> ago, due is on Monday), that is related to OOP, or to be exact, MFC
>> library. Unfortunately, we were given literally no documentation, so
>> it's free for all.
> Glad that some colleges still teach MFC... :)

That course is at University of Zagreb, Faculty of Mathematics, and is
successor of a "lighter" course in C++ (classes, STL, operators, copy
control, etc.). Basically, on this course, we explore advanced
techniques, such as exceptions, inheritance and templates.

MFC was planned to be even in exam, however, due to the technical issues
(MFC does not work well on all computers we have at disposal; reason,
naturally, unknown), we got this type of "homework" to do instead.

> However, I think you can't do this in a week unless you have previous
> knowledge of C++ and MFC.

I am well acquainted in C++, although my primary interest is C. However,
I have absolutely no clue about MFC and it is not generally clear to
me, in sense of tracking the path of programming and correlation.

> You can learn "building blocks" from the books, but then you have to
> put them together to build your entire app.
> If you want more specific help feel free to post...

I fear there will be my specific posts in next few days, although I tend
not to (ab)use newsgroups unless I really have to.

Thanks for your feedback!

Best regards,

--
"If you lie to the compiler, �|� .-'``'-.,_,.-'``'-.,
it will get its revenge." �|� '-.,_,.-'``'-.,_,.-'
-- Henry Spencer �|� /��\
� http://math2.ath.cx � �|� '-.,_,.-'``'-.,_,.-'
From: Bubba on
Joseph M. Newcomer's log on stardate 16 lip 2010

>>we were given short note for doing a project on college (two days
>>ago, due is on Monday), that is related to OOP, or to be exact, MFC
>>library. Unfortunately, we were given literally no documentation, so
>>it's free for all.
> ****
> Actually, you have thousands of pages of documentation. Which is
> almost worse than having none at all. It comes with your compiler.
> ****

Of course, my remark about lack of documentation was displaced.
Essentially, my remark was rather aimed at lack of "Hello world" type of
documentation...

>>Basically, I have to create application with at least two forms or
>>dialogues. Application has to be able to show persons in a list, and
>>that those persons can be sorted by name or surname. They can also be
>>sorted by city or address, but then we have to use tree control.
> ****
> Sounds to me like a candiate for a dialog-based app. Fortunately,
> these are the easiest ones to write. But tossing an assignment like
> this at a student seems to be gratuitous sadism on the part of the
> instructor. I usually spend a couple hours showing my students how
> to create basic dialog-based apps. It is not trivial to get into,
> and OO programming is a tiny, tiny part of what is going on.

The course itself is so poorly organized that, as I've mentioned in few
posts before. Hey, only few of our computers support MFC properly. Some
can't even run Visual Studio. :)

> First, I consider this assignment grossly unfair. As someone who has
> taught and sometimes continues to teach it, I would consider an
> assignment like this that did not include in-class demonstrations of
> how to build an app to be impossible. You can convey this to your
> instructor for what little good it would do. Other than annoying
> him/her.

Gladly, but with no effect, as you have well presumed. Course is just
poorly organized and there is no particular wish to improve it.

> Second, build a simple dialog-based app. Problem here is you have to
> learn a WHOLE LOT about edit controls, push buttons, list controls,
> etc. before you can begin to make sense of this, and that is a LOT to
> do in a single assignment without training! I'd never give an
> assignment this complex in my classes, and we spend about 30 hours
> just in lectures about how to use MFC. So your problem is NOT just
> "building a dialog" but understanding the sublties of a bunch of
> controls ALL AT ONCE.

Forgive me, but I have to use standard new-kids term - "I LOL'd".

30 hours?! We spent approximately 6 hours, from which we actually did
something (the ones who were happy enough to make Visual Studio work)
for perhaps half of that time. Evidently, insufficient, but thanks for
the reality slap.

> Note: I learned MFC by doing the Scribble tutorial and it took me
> about three days to get competent, and I was *already* a Windows
> programmer and knew all about the controls!

Unfortunately, my point of interest is low level programming and C. I'll
do my best to catch something up in these few days...

> It then took me two years to become an MFC "expert".

I am generally not interested in GUI frameworks, but with proper
training, I believe not only myself but my colleagues would be
interested in harnessing MFC.

> Dialogs are easy. Controls are not hard, there's just a LOT to learn
> about them before you can use them well. You have every right to
> feel overwhelmed, and I don't have much advice except to buckle down
> and try the Scribble tutorial. It's the only thing out there that
> can give you half a chance!

Tell me, I got the impression you are/were holding classes regarding MFC
- do you happen to have slides/books/material from which your students
were learning from (of course, if they are freely available)?

Thank you for your copious post. Best regards!

--
"If you lie to the compiler, �|� .-'``'-.,_,.-'``'-.,
it will get its revenge." �|� '-.,_,.-'``'-.,_,.-'
-- Henry Spencer �|� /��\
� http://math2.ath.cx � �|� '-.,_,.-'``'-.,_,.-'