Similar Threads
1. Architecture to separate Business Logic and GUI
I am designing an application that has (surprise surprise) two parts:
Business Logic (BL) and GUI. It is actually a control application
(connected to some embedded equipment) so I would like the BL to load
and run as a system service. The GUI on the other hand can be opened
and closed as needed.
My question is, what type of technology to use for the BL, and what
type of IPC/API to use for connecting it to the GUI? The GUI will I
guess be VB (most logical). Is it logical to have a COM API between
them? Another question is, should both of them (BL and GUI) talk to the
DB directly or should all DB access be done through the BL.
By the way, the technology used for the BL needs to be able to use
ActiveX components (MFC COM objects).
Ideas? Comments?
Thanks
2. Business Logic Layer - VB.Net
3. Implement business logic layer
4. Web service and business logic - VB.Net
5. Business Logic Layer - Design
Hi, I need some advise on creating a general Business Logic Layer for
my applications.
The approach I use today is to create a class with the same name as
the table, create a property for each field in the table, write
constructors, to create a new row, and a constructor to open an
existing row, write update, delete functions, write a static get
method, to get a list of all the rows in the table..
I have created a Code generator to write the class based on the
database table.
Do anyone of you have any advises/links to resources which describes
how this layer should be designed?
Thanks..
To illustrate my model I can give an example:
Table: Customer
Field: CustomerID int
Field: GivenName Char(50)
Field: LastName Char(50)
Class:
Imports System
Imports System.Configuration
Imports MS.DataAccessLayer
Namespace MyCompany.BusinessLogicLayer
Public Class Customer
Private _customerid As System.Int32
Private _givenname As System.String
Private _lastname As System.String
Public Property CustomerID() As System.Int32
Get
Return _customerid
End Get
Set(Byval Value As System.Int32)
_customerid = Value
End Set
End Property
Public Property GivenName() As System.String
Get
Return _givenname
End Get
Set(Byval Value As System.String)
_givenname = Value
End Set
End Property
Public Property LastName() As System.String
Get
Return _lastname
End Get
Set(Byval Value As System.String)
_lastname = Value
End Set
End Property
Public Sub New()
End Sub
Public Sub New(ByVal CustomerID As System.Int32)
Dim _ds as dataset =
sqlhelper.ExecuteDataset(ConfigurationSettings.AppSettings("connectionstring"),
_
"Customer_Select_BY_CustomerID", _
CustomerID)
Dim _row as DataRow = _ds.tables(0).Rows(0)
_CustomerID = _row("CustomerID")
_GivenName = _row("GivenName")
_LastName = _row("LastName")
End Sub
Public Sub Update()
if _CustomerID = 0 then
CustomerID = sqlhelper.ExecuteScalar(ConfigurationSettings.AppSettings("connectionstring"),
_
"Customer_Insert", _
_GivenName, _
_LastName)
else
sqlhelper.ExecuteNonQuery(ConfigurationSettings.AppSettings("connectionstring"),
_
"Customer_Update", _
_CustomerID, _
_GivenName, _
_LastName)
End if
End Sub
Public Sub Delete()
sqlhelper.ExecuteNonQuery(ConfigurationSettings.AppSettings("connectionstring"),
_
"Customer_Delete", _
_CustomerID)
End Sub
Public Shared Function Get_All_Of_Customer() as CustomerCollection
Dim _ds as dataset =
sqlhelper.ExecuteDataset(ConfigurationSettings.AppSettings("connectionstring"),
_
"Customer_Select_All")
Dim _col as new CustomerCollection
For each _row as datarow in _ds.tables(0).Rows
Dim _Customer as new Customer(_row("CustomerID"))
_col.Add(_Customer)
Next _row
Return _col
End Function
End Class
Public Class CustomerCollection
Inherits ArrayList
End Class
End Namespace
6. call Visual basic gui or function from matlab gui - MATLAB
7. What's the best way to deploy a VB business logic with Excel?
Let me describe the template file from which many copies will be created:
- Excel 2000 workbook with
- some macros that in turn delegate most of the business operations to a
- COM DLL (built using VB6)
At any given time, multiple copies from this same template could be runnning
on the same PC.
How should I deploy this business logic: as a DLL (I currently do this)?
- turn the VB6 code into macros?
- create an COM Add-in? (if so, how do I do it as I don't have the Office
Developer CD)
- other alternatives
Also consider that it is possible that In the future I'll have to deal with
versioning issues like, templatev11.xls using dllv1.dll running on the same
computer as templatev12.xls using dllv2.dll. In other words, how do I
achieve side-by-side execution
I'm deploying this COM as a .CAB (Internet Setup package) downloaded using
IE6.
Thanks,
MV
8. client/server architecture vb6