473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

UI and BL Interface

Hi,

I am designing a 3 tier application (UI, BL, and DAL). My UI takes user
input and populates the BL to store into a db. Currently, I am thinking
about design an interface (service/facade) that the UI interfaces between
the BL. I have seen examples that the UI creates and new business object
and stores data into it and passes the business object to the business
process objects. I am going to databind to my business objects so my UI
needs to reference the BL so what is good practice?

Thanks
Aug 21 '06 #1
1 3142

Thomas wrote:
Hi,

I am designing a 3 tier application (UI, BL, and DAL). My UI takes user
input and populates the BL to store into a db. Currently, I am thinking
about design an interface (service/facade) that the UI interfaces between
the BL. I have seen examples that the UI creates and new business object
and stores data into it and passes the business object to the business
process objects. I am going to databind to my business objects so my UI
needs to reference the BL so what is good practice?

Thanks
If you don't want the UI to have to know specifically what BL objects
it must deal with, you'll have to design a "middleman" that will handle
that for you. This is why you actually don't hear of "3-tier" as a
methodology much in business; it's referred to as "n-tier". Those tiers
could be the UI, service object and business objects, which you could
break down into controls, which must know different things from the
form, which may or may not know about BL objects, which know about DAO
objects, which know about the database. Web server apps are at least 4
layers, requiring a communications layer like a web service. Most
client-server apps are UI, combined business logic/DAO and database.

To answer your question, a simple, relatively static program with
screen layouts defined at runtime should have no trouble calling
business objects from its controls' events, and that's good practice as
long as the control doesn't have to do much else. The amount to deposit
field should know that it sends its value to the Amount property of a
deposit transaction object. However much more flexibility you need in
designing forms and processing records dictates whether you need an
extra layer or two in your model.

For instance, if you want to dynamically populate a screen with
controls rather than have pre-defined pages/forms/whatever, you'd need
some sort of form builder to go find out what fields you'll need and
put them in the right place. If you don't want your controls to have a
reference to the instance of the business object they must update
(instead only knowing maybe their field name), you'll need an object
handler that will take the field name and value, match the name to an
object and property, and store the value in that property. These extra
layers allow 100% separation of different layers of logic, as well as
increased flexibility of the final product, but it also means extra
memory used, a taller call stack, and a performance hit. It's up to you
to find the balance.

Aug 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roy Pereira | last post by:
I have an application that is composed of a set of "Content" dlls and a viewer application. The viewer calls a standard set of functions that are present in all the dlls. I maintain this by...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
4
by: Doug | last post by:
I am working on an existing .NET (C Sharp) component that had a com interface that was used by a VB component. When it was originally written, it had the SSEAssemblyCom class below - minus the two...
3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
6
by: Alex Sedow | last post by:
Example 1 interface I { string ToString(); } public class C : I { public void f() {
20
by: Ole Hanson | last post by:
I am accessing my database through an interface, to allow future substitution of the physical datastore - hence I would like to declare in my Interface that my DAL-objects implementing the...
2
by: Alex Sedow | last post by:
Why interface-event-declaration does not support multiple declarators like event-declaration? Grammar from C# spec: variable-declarators: variable-declarator variable-declarators ","...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
15
by: Xah Lee | last post by:
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs....
8
by: rn5a | last post by:
Suppose I have the following class code: Imports System Imports System.Data Imports System.Data.SqlClient Public Class DBSettings Private sqlCmd As SqlCommand Private sqlConn As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.