473,386 Members | 1,785 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,386 software developers and data experts.

3-tier now and then

Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and host
the com+ app remotely and all client using proxy to access the com+ app
remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as a
way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John
Nov 16 '05 #1
10 1319
John,

I think that taking your COM+ app and then moving it to a web service is
a bad idea. Not everything that is in a web service is portable. For
example, it's easy to map objects that are marked as [Transaction] in COM+
to web services, but if they are not JIT activated (which you have by
default when using the Transaction attribute in COM+), then the model
becomes difficult to port.

Also, thinking long term, using Enterprise Services (COM+) now will
provide the easiest upgrade path later on when moving to Indigo. If you
design properly for COM+, it will be as easy as switching a few attributes.
With web services, it is not going to be anywhere near as easy.

I would recomment keeping your objects in COM+, and then letting COM+
expose the web service (this is possible in the recent versions of COM+ I
believe) if you really need that functionality.

Just remember, if you want a simple mapping from COM+ to web services,
then your objects should keep no state, and be JIT activated (which
re-initializes the object for every call).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all
of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and host
the com+ app remotely and all client using proxy to access the com+ app
remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as a
way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John

Nov 16 '05 #2
John,

It is depends on how you use the web service and what you mean by saying
"use web service replace the com+ app".
The web service was designed for service oriented application. To take
advantage of it you might want to redesign your
COM+ applications in the service oriented way! The service is more usefull
if it is not only doing get/update database but
also perform the business logic of the application.

If your COM+ applications are designed to perform get/update database only
then when you "replace" it with your web service,
the web service will end up with just get/update database nothing more
nothing less.

Duy
CSDP/MCSD
"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all
of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and host
the com+ app remotely and all client using proxy to access the com+ app
remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as a
way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John

Nov 16 '05 #3
John,

Yes a very good idea in my opinion to use that WebService.

This opens the possibility to use your applications in every part of the
world as long as there is an Internt connection. And that either for
webforms applications as for windowforms applications because you can take
the same approach for both.

Assuming you take the right security steps of course.

You would be in my opinion a fool when you don't take that great
opportunity.

Just my 2 eurocents.

Cor
Nov 16 '05 #4
Thanks very much for your reply!!!

the biggest concern is the performance - calling web service method is much
slower than calling a COM+, our Windows apps are all internal inside
firewall, I do not see the benefit web service gives us. How is .net
remoting fits in this scenario?

Thanks!
John

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2***************@tk2msftngp13.phx.gbl...
John,

I think that taking your COM+ app and then moving it to a web service
is a bad idea. Not everything that is in a web service is portable. For
example, it's easy to map objects that are marked as [Transaction] in COM+
to web services, but if they are not JIT activated (which you have by
default when using the Transaction attribute in COM+), then the model
becomes difficult to port.

Also, thinking long term, using Enterprise Services (COM+) now will
provide the easiest upgrade path later on when moving to Indigo. If you
design properly for COM+, it will be as easy as switching a few
attributes. With web services, it is not going to be anywhere near as
easy.

I would recomment keeping your objects in COM+, and then letting COM+
expose the web service (this is possible in the recent versions of COM+ I
believe) if you really need that functionality.

Just remember, if you want a simple mapping from COM+ to web services,
then your objects should keep no state, and be JIT activated (which
re-initializes the object for every call).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all
of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and
host the com+ app remotely and all client using proxy to access the com+
app remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as
a way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John


Nov 16 '05 #5
John,

If everything is internal, then I would definitely keep it as a COM+
application. No need to hack a limb off if you don't have to.

I would not use remoting in this situation either. If you go from COM+
to remoting, you lose authenication, authorization, secure calls,
transaction support, queued calls, object pooling, just in time activation,
etc, etc. Now it might be that all you need is remote object calls, but I
doubt that is the case.

Remoting serves very little purpose IMO, except in very simple, well
defined, static cases where all you need is to have one object talk to
another object in an application domain, period.

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
Thanks very much for your reply!!!

the biggest concern is the performance - calling web service method is
much slower than calling a COM+, our Windows apps are all internal inside
firewall, I do not see the benefit web service gives us. How is .net
remoting fits in this scenario?

Thanks!
John

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2***************@tk2msftngp13.phx.gbl...
John,

I think that taking your COM+ app and then moving it to a web service
is a bad idea. Not everything that is in a web service is portable. For
example, it's easy to map objects that are marked as [Transaction] in
COM+ to web services, but if they are not JIT activated (which you have
by default when using the Transaction attribute in COM+), then the model
becomes difficult to port.

Also, thinking long term, using Enterprise Services (COM+) now will
provide the easiest upgrade path later on when moving to Indigo. If you
design properly for COM+, it will be as easy as switching a few
attributes. With web services, it is not going to be anywhere near as
easy.

I would recomment keeping your objects in COM+, and then letting COM+
expose the web service (this is possible in the recent versions of COM+ I
believe) if you really need that functionality.

Just remember, if you want a simple mapping from COM+ to web services,
then your objects should keep no state, and be JIT activated (which
re-initializes the object for every call).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all
of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and
host the com+ app remotely and all client using proxy to access the com+
app remotely ...

now, we just the use web service to replace the com+ app, so every
single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as
a way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John



Nov 16 '05 #6
SOAP Web Services are pretty much as you describe -- all the
maintenance difficulty of tight coupled com+ and all the security and
state issues of the Web in one package! As Nicholas Paldino says, if
everything is internal, just use com+. If you need to "Web enable" the
app, you might want to consider ReST (Representational State Transfer)
over HTTP as the architecture instead of SOAP.

Using ReST at least gives you the maintainability of loose-coupling.
http://webservices.xml.com/pub*/a/ws...2/06/rest.html is
a good intro to the architecture.

Nov 16 '05 #7
Thanks very much, Nick!

Is there any performance issue if I put the .NET Serviced Component on
application server and access remotely from .net client? (in COM world you
would create a proxy and then distribute the proxy lib to client to access
COM+ app remotely - how would we do in .NET? is it .NET remoting?)

Another issue is the transaction attribute can only be defined as class
level so for every class I have split into 2 (one for transaction and one
for non-transaction) - this issue will be gone with .NET 2.0 though because
of the System.Transaction namespace. Web Service allows you to define
transaction attribute on method level - how it works internally? Can we
mimic that behavior using System.Enterprises?

Thanks again!
John

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eB*************@TK2MSFTNGP15.phx.gbl...
John,

If everything is internal, then I would definitely keep it as a COM+
application. No need to hack a limb off if you don't have to.

I would not use remoting in this situation either. If you go from COM+
to remoting, you lose authenication, authorization, secure calls,
transaction support, queued calls, object pooling, just in time
activation, etc, etc. Now it might be that all you need is remote object
calls, but I doubt that is the case.

Remoting serves very little purpose IMO, except in very simple, well
defined, static cases where all you need is to have one object talk to
another object in an application domain, period.

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
Thanks very much for your reply!!!

the biggest concern is the performance - calling web service method is
much slower than calling a COM+, our Windows apps are all internal inside
firewall, I do not see the benefit web service gives us. How is .net
remoting fits in this scenario?

Thanks!
John

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2***************@tk2msftngp13.phx.gbl...
John,

I think that taking your COM+ app and then moving it to a web service
is a bad idea. Not everything that is in a web service is portable.
For example, it's easy to map objects that are marked as [Transaction]
in COM+ to web services, but if they are not JIT activated (which you
have by default when using the Transaction attribute in COM+), then the
model becomes difficult to port.

Also, thinking long term, using Enterprise Services (COM+) now will
provide the easiest upgrade path later on when moving to Indigo. If you
design properly for COM+, it will be as easy as switching a few
attributes. With web services, it is not going to be anywhere near as
easy.

I would recomment keeping your objects in COM+, and then letting COM+
expose the web service (this is possible in the recent versions of COM+
I believe) if you really need that functionality.

Just remember, if you want a simple mapping from COM+ to web
services, then your objects should keep no state, and be JIT activated
(which re-initializes the object for every call).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want
all of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and
host the com+ app remotely and all client using proxy to access the
com+ app remotely ...

now, we just the use web service to replace the com+ app, so every
single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used
as a way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John



Nov 16 '05 #8
Hi John,

As far as I know, I don't think there will be any performance issue. A .NET
Serviced Component is same used as a common COM component on COM+ server.
We also need to get an .msi file from the server. However, we also need to
export a tlb library for the assembly to do interop. For more information,
please check tlbexp.exe for more information.

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrftypelibraryexportertlbexpexe.asp

As a support engineer, I'm not quite sure how does System.Transaction
namespace work internally. Also, since it is not released yet, we cannot
ensure any feature of it. Sorry that I cannot help on the second question.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #9
Hi John,

Here's a good article on this issue. HTH.

http://msdn.microsoft.com/library/de...us/dndotnet/ht
ml/comwscheckb.asp

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #10
John,

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:O8**************@TK2MSFTNGP09.phx.gbl...
....
Another issue is the transaction attribute can only be defined as class
level so for every class I have split into 2 (one for transaction and one
for non-transaction) - this issue will be gone with .NET 2.0 though
because of the System.Transaction namespace. Web Service allows you to
define transaction attribute on method level - how it works internally?
Can we mimic that behavior using System.Enterprises?


Not with attributes, but with code inside methods, yes we can. .NET 1.1 on
XP or 2003 Server (i.e. COM+ 1.5) provides you with ServiceDomain class.
Look it up in the documentation.

I use it for rolling back my NUnit tests automatically:

[SetUp]
public void StartTransaction()
{
ServiceConfig cfg = new ServiceConfig();
cfg.Transaction = TransactionOption.Required;
cfg.TrackingEnabled = true;
cfg.IsolationLevel = TransactionIsolationLevel.RepeatableRead;
cfg.TrackingAppName = "BusiDO Tests";
cfg.TrackingComponentName = "BusiDO Tests";

ServiceDomain.Enter(cfg);
}

[TearDown]
public void RollBackTransaction()
{
ContextUtil.SetAbort();
ServiceDomain.Leave();
}
HTH,
Alexander
Nov 16 '05 #11

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

Similar topics

7
by: Bob | last post by:
ok i have a program tah randomizes number adn signs (+,-). i made it so little kids can learn math easily and i wouldn't have to write each question out. when the plus sign is used, eveyrthing...
1
by: avital | last post by:
Hi, I have a sql query with cases. I need to add a condition that if hasamafactor=5 then display only cases m11-m14 else display the rest. Of course sum ( kamut) as total4mosad has to be only...
19
by: GMKS | last post by:
Hello all, I have 13 check boxes on a form. I am trying to check all the check boxes to determine if they are true or false when I close the form. At present only the first IF...Then...Else...
2
by: misscrf | last post by:
I have a search form that is great. I have modified it in such a way, that when search results come up I can bring it back to a useful spot, say an entry form or a report. Here is my lemon (...
1
by: Dan H. | last post by:
Hello, I have an application that requires a collection that is sorted by a double field first, and then by a long field. So, lets say I have an class that has 2 fields called time, priority. I...
11
by: Kai Bohli | last post by:
Hi all ! I need to translate a string to Ascii and return a string again. The code below dosen't work for Ascii (Superset) codes above 127. Any help are greatly appreciated. protected...
9
by: Barton | last post by:
Hello, I just made to move to ASP. I have been developing in PHP the past two years. I must say that I'm a little disappointed in the quality of the beginners tutorials. They don't go further...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
14
by: lawjake | last post by:
I am having a dispute at work over endifs, and cannot find any treatise on this. So I am hoping that I can get a lot of correspondece confirming my belief. Here it is: I believe the following:...
15
by: jzakiya | last post by:
I'm translating a program in Python that has this IF Then chain IF x1 < limit: --- do a --- IF x2 < limit: --- do b --- IF x3 < limit: --- do c --- .----- ------ IF x10 < limt: ---...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.