Client-Server & Standalone Using Same Code Base

  • Thread starter Thread starter rob
  • Start date Start date
R

rob

I have to write an app that can be offered as both a client-server
solution as well as a standard solution.

For the server-client solution here are multiple users all of them
working with the same data. The solution might be deployed on an
intranet or internet. The client has some complex functions so I need a
"rich" client.

For the standalone version the user want his personal data on his
computer. He is the only one using the program and he is using it only
from one computer. The user might connect to the server for a data
feed, though.

In both scenarios the users should be able to do some (limited) work
even when they are not connected to the server.

I do not want to write a seperate application for both scenarios. So I
was thinking of simply putting the client and server on the same user
machine. There are a few problems with that, though.

1) The user does not have MSSQL. I might just use MSDE for the
standalone version.

2) The user does not have IIS. This is a problem because I wanted to
use web services on the server to supply the client with data.

3) There might be some problems with authentification, authorization,
etc.

Any inputs on this is highly appreciated.

Regards,
Rob
 
check for "smart clients" (connected and disconnected) and "multi tier" on
msdn - this should help you!

regards
 
I am familiar with what smart clients are and what multi tier is. I
will create a smart client using a multi tier. A smart client, as the
word implies, is for a client-server scenario. My question is regarding
the standalone version where I simply would like to put the client and
server onto the same system. As mentioned there are some problems as
the user might not have MSSql, IIS, etc. So how could I go after
creating both a server-client and a standalone program and use the same
code base for both.

Regards,
Rob
 
Hi rob,

sorry - but I don`t know your scenario! Is it, that your clients might be
connected to a server sometimes and sometimes they are not? if so, check
offline functionalities of smart clients (there are msdn articles about this
issue!)!

If it is the way that you want to create TWO applications - one
client/server, one fat client (no connection available) - it is more
difficult indeed!
In the case you need a fat client without network connection (is it that
way? really?) I`d recommend to write your BusinessLayer capable of different
data sources - in your client case (where you can`t expect MSSQL, nor IIS)
maybe XML or Access...
So you might be able to use your BusinessLogic in both scenarios at least!
 
Yes, basically I will have two applications. The first one is a
server-client app. The second one is a standalone version, i.e. does
not need a server. Since both offer the same functionality I want to
re-use as much code as possible. For the db I will use MSSQL for the
server-client app and most likely MSDE for the standalone as they are
quite similar.

As mentioned for the server-client I was considering using web
services. But since the user's computer might not have IIS (Win XP
Home) I can't just re-use the code. What's the best way to handle this?
Maybe using something else then web services?

What other problem areas do I have to consider for instance regarding
authentification, autherization, security, etc?

Regards,
rob
 
..NET Remoting will be an alternative to WebServices, it's even considered a preferred choice for intranet applications over webservices, and the best part is that it can be hosted outside of IIS which apart from the current scenario that you have, is much more robust, stable and fast. Please look up the documentation on this subject for more information about security and things.

HTH, Metallikanz!
 
Hi rob -

in my opinion your solution could look like this:

DAL
- data access to either SQL-Server (C/S Solution) or whatever (Client-Only
Solution)

Business Logic
- implemented abstract - doing what it has to do...

WebService
- "wrapper" for c/s solution - providing the functionaltites your Business
Logic offers. (maybe you dont need this layer in your scenario at all-think
about it!)

SmartClient
- WebService consumer - your App in a C/S scenario

FatClient
- no network connection - so just beeing able of using your BuisnessLogic /
DAL directly!
 
DAL - able to switch DB. (MS Data Access App Block)
Business Logic
- implemented abstract - doing what it has to do...
WebService - Calls BL (hosted on IIS)

Smart Client always:
Winform is your client always (perhaps) or a Browser.

In case of no Server to host your webservices, you host your web-svc
with in your dotnet app, if winform same exe, else if browser is your
client then perhaps another simple dotnet exe (any kind) hosting
asmx-web services.
Do:
[http://spaces.msn.com/members/habibcs/PersonalSpace.aspx?_c01_blogpart=blogmgmt&_c=blogpart]
Executing ASPX / ASMX pages without a web server
http://radio.weblogs.com/0105476/stories/2002/07/12/executingAspxPagesWithoutAWebServer.html
http://msdn.microsoft.com/msdnmag/issues/04/12/ServiceStation/default.aspx
http://msdn.microsoft.com/msdnmag/issues/03/01/CuttingEdge/
http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp

This is very useful and easily do-able in dotnet 1.1 and 2.

Same Web SvC and stuff behind will work exactly in both IIS and your
custom ASP.Net host app.
 
Back
Top