The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

seperate content from logic with tools that make your interface

How do you separate logic and layout when you do the layout in tools like VB.Net?

Probably the form-event code that is created by the VB.Net wizard cant take any logic that's not presentation based.

I'm looking for some direction on this... thanks.
Saturday, May 19, 2007
Many people consider the code behind the form's controls to be part of the view.  And so it's very minimal, with most code in either the model class or the controller (depending on your flavor of MVC)
xampl Send private email
Saturday, May 19, 2007
Just encapsulate specific actions to be performed on the model in abstract classes and feed the forms with concrete implementations of those classes to use them in event handlers (take into account the interface segregation principle when designing those). Thus you'll achieve the so called dependency inversion and you'll have mutators for the model which you can reuse in other forms.
Hope it helps.
Radu Chindris Send private email
Saturday, May 19, 2007
Google for "Model-View-Controller" or "MVC". In a nutshell, the view presents information to the user and accepts user actions/input. The model contians the actual data that your program is concerned with. The controller mediates between the model and view, manipulating the model in response to user actions and displaying model data in the view.

The user-interface design tool you are using constructs the view portion. You need to write controller and model portions. The code in the view will only call methods on the controller, not on the model. Only the controller will interact with the model. The controller will also interact with the view in order to display data from the model.
Jeffrey Dutky Send private email
Saturday, May 19, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz