Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Separating Business Logic from User Interaction (Userforms)

Hi everybody !

I want to tidy up an Excel VBA project. The principal interface is a
form with four meaty pages. Being new to all this I initially coded
much of the business logic into the form class module, interacting with
a collection class object which held much of the data. This lead to
several thousand lines of code being housed in the form class module.
This was a prototype and it served its point.

I now wish to develop the code afresh for the full-blown software. I
have read that it is best to separate out the user interaction code
from the business logic, and I certainly agree. I intend placing code
for each form page in separate standard modules, leaving the interface
code in the form class module, and the class object where it is. From
this I have 2 questions I would like a little guidence with.

1. Should I create a User Interface Support (UIS) class module to
handle interaction between the form class and the individual standard
modules, or should I just have the form class and standard modules ?
What are the merits of a UIS layer ?

2. Consider the following. I pass a list box user selection to the
UIS layer and then to the business logic layer, and on interrogation
that layer needs to return more than one value back to the interface
layer to populate more than one control box with return values. How
should I code the Business logic layer to pass these multiple
independent values back through the UIS layer and finally to the
interface layer ? Or should I scrap the UIS layer ?

(My ambling thoughts: would each layer have to use a raise event to
pass upwards an array of values or function return ? Would I have to
pass each value upwards separately ? And if so, how ?)

Thanks in advance for any assistance you can offer.

chatterbox

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Email does not need user interaction ? Koulla Excel Discussion (Misc queries) 4 October 15th 08 02:41 PM
How do I protect my hidden Excel.Application object from unwanted user interaction. wijwoj Excel Programming 0 October 30th 03 04:49 PM
What's the best way to deploy a VB business logic with Excel? Mauricio Villada Excel Programming 0 September 22nd 03 10:16 PM
Pivot tables-controlling user interaction with pivot tables Sindhura Excel Programming 0 August 27th 03 02:10 PM
Modeless form for user interaction Arne[_2_] Excel Programming 6 July 15th 03 02:22 PM


All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"