Re: OOP/OOD Philosophy



On 9 Jul 2005 05:29:08 -0700, "frebe" <fredrik_bertilsson@xxxxxxxxxxx>
wrote:

>> Now imaging that deep within the database structure we add a new
>> column to a relationship table. This column modifies the way the
>> relationship works.
>
>Your initial statement didn't say anything about modifying primary or
>foreign keys. You said "add a new column". If you change a primary or
>foreign key, the GUI will not be unaffected. Can you give some example
>of primary or foreign key change, that can be isolated to only the
>persitence layer?
>
>> Let's finally say that the GUI code depends deeply on the database
>> schema, but the necessary 'if' statement to check the new field of
>> that relationship table was not put into the GUI code.
>> The GUI crashes.
>
>Can you give an example? I am not sure I understand why the GUI would
>crash.

The new structure of the database introduces a logical flaw in the
calculations within the GUI. The GUI code inadvertently frees an
allocated structure *twice*. The heap gets corrupted. A billion
instructions later the GUI crashes.

However, let me say that when I used the term "crash" in the original
post, I simply meant "malfunction".


-----
Robert C. Martin (Uncle Bob) | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
.



Relevant Pages

  • Re: Data access from multiple code modules
    ... The GUI has to be able to acces the data object, ... GUI code from the code operating on data, ... One way would be to use the database as the point of contact for all ... instantiates an object to interact with the database and performs ...
    (comp.lang.python)
  • Re: Complex Windows Applications in C# -- how high is the bar?
    ... child windows containing various Windows controls, ... application in order to stretch it to handle an enitrely new database ... concern is the GUI -- this is a very complex application in terms of its ... There's nothing wrong with letting the complex GUI stuff remain in the hands of Win32 code and use managed code for the database access, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: porting curses driven to gui application
    ... > more than just replace the curses interface by a GUI. ... > don't have a X server (e.g. because they are just running Windows ... > running on the machine where the database is also running. ... > server and the client on the user side. ...
    (comp.unix.programmer)
  • Re: How to handle mouse events during a long-running database transaction?
    ... isolate your blocking transaction in another thread, ... The application has TCP/IP, UDP/IP connections, local memory database ... and the GUI. ... Do you have any idea how to get mouse motion events from the event ...
    (comp.lang.tcl)
  • Re: The future of Linux
    ... Occasionally, I might use a spreadsheet, wordprocessor, or database. ... depending on the selection of OS your work uses. ... "bash history" that remembers your commands and allows you to search ... talking to remote databases without a GUI overhead across the network. ...
    (comp.os.linux.misc)