Home All Groups Group Topic Archive Search About

Can we seperate the Bussiness Logic and User Interface?

Author
16 Jun 2006 5:13 PM
James MA
I'm going to build a project which contain the business logic only, and it
should be device independent.  And I'll have different program to build the
UI in for different platform using the same library of business logic.

I have created a solution to contain projects for different device (Windows
and SmartDevice), however, I cannot cretae a project for the business logic
which can be shared for different platform.  It seems that VisualStudio does
not support the idea of seperating the Business Logic from UI, all project in
Visual Studio are device dependent.

May I know if there has any alternative that I can have a single source for
bussiness logic, and share the source for different platform?

Author
16 Jun 2006 6:15 PM
David Browne
Show quote Hide quote
"James MA" <Jame***@discussions.microsoft.com> wrote in message
news:E8DE50A6-7DBC-4BA5-B326-F9AAE609C169@microsoft.com...
> I'm going to build a project which contain the business logic only, and it
> should be device independent.  And I'll have different program to build
> the
> UI in for different platform using the same library of business logic.
>
> I have created a solution to contain projects for different device
> (Windows
> and SmartDevice), however, I cannot cretae a project for the business
> logic
> which can be shared for different platform.  It seems that VisualStudio
> does
> not support the idea of seperating the Business Logic from UI, all project
> in
> Visual Studio are device dependent.
>
> May I know if there has any alternative that I can have a single source
> for
> bussiness logic, and share the source for different platform?
>

You can, however, share source code files between projects.  On a project go
to Add/Existing Item and look toggle the "Add" button to "Add as link".

David
Author
19 Jun 2006 3:46 PM
Jim Wooley
Encapsulate your business logic into Class libraries and use those entites
in your presentation/UI tier. This way, the UI layer talks to the BO tier.
The BO tier talks to the data tier. The UI should never talk directly to
the data tier in this architecture. Of course, you can't just use the wizards
and follow the simple samples to build a robust, re-usable architecture.
You may want to look at Rocky Lhotka's books for Business Objects as one
example of what you can do.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx

Show quoteHide quote
> I'm going to build a project which contain the business logic only,
> and it should be device independent.  And I'll have different program
> to build the UI in for different platform using the same library of
> business logic.
>
> I have created a solution to contain projects for different device
> (Windows and SmartDevice), however, I cannot cretae a project for the
> business logic which can be shared for different platform.  It seems
> that VisualStudio does not support the idea of seperating the Business
> Logic from UI, all project in Visual Studio are device dependent.
>
> May I know if there has any alternative that I can have a single
> source for bussiness logic, and share the source for different
> platform?
>