I am building a new SV application which will be used from the Internet. I am expecting to
have a few users at a time, so I will need good performance.
Which is better to use:
build from 0 WCF RIA services or
use Domain Services?
On WCF RIA I can set up a service behavior for ConcurrencyMode but for Domain Service I couldn't find any info about that.
Also I am a little new to this so be gentle :).
Related
I am starting a new webservice project which will be consumed by multiple consumer applications done in different technology like ASP, ASP.Net and PHP. I am planning to develop this service as a WCF service. I am new to WCF and I understand WCF is like umbrella tech which has all the features for developing a distributed SOA applications.
I would like to get your advice on whether my choice of opting WCF service over classic asmx service is correct. The consumer applications are existing application done different technologies as I said before. This service is a simple service that creates and updates user information in a centralized DB.
If my decision of choosing WCF is correct, then please let me know if there are any specific things I need to consider so that the existing application can consume my WCF service without any hiccups. In other words, I can provide a asmx service for this which they can consume directly without any issues (and currently they are consuming some of our asmx service. Since the current requirement is new I want it to be done with WCF). Likewise, the consumer should be able to consume my service like they consume asmx service.
I am asking this question because WCF provides additional features like security, etc. and hence the consumers should also follow the practice to communicate with the service.
Any advice is highly appreciated.
You probably want to use BasicHttpBinding in your WCF service and, although I'm not a PHP developer, I understand that PHP 5 has a SOAP library that can be used to create a service proxy based on the WSDL document exposed by the WCF service, assuming metadata exchange is enabled.
Where in this pattern I can "place" services, about which I some much hear and want use? What is the purpose of use Services (WCF) in MVVM ?
Which of services: Web Services, WCF or RIA is the best and the easiest for MVVM? I only read about realy simple WCF contracts and RIA which have from start create Update,Insert etc method...
Model-View-ViewModel is a UI separation pattern. It does not specifically address the role of services in your application. But in general, your "Model" will likely have persistence needs that will need to cross out of the UI layer into a service layer and WCF provides a good transport for that.
Using a dependency injection framework (which is common in MVVM) you can register your WCF service interfaces with the container so that you can work with interfaces instead of directly with the WCF client proxies.
With regard to WCF data services vs. RIA services, I don't know the jury is still out on that. WCF data services is released, RIA services is not. RIA does tend to blur the lines between what is client and what is server. This can be both good and bad. It solves a lot of problems with duplicated validation rules and such but I personally get a little nervous about such tight coupling of the client and server.
I'm building a workflow app to investigate the technology. I can't decide whether to go for a web service (and a technology with which I'm basically familiar) with WebServiceInputActivity's or WCF and ReceiveActivity's (and a new technology that I'll have to learn).
Are there any major reasons to go either way?
Clarification:
Are there any major (architectural) reasons relating specifically to WF to go either way? I appreciate the input of the respondants, so far, but they focus on WCF rather than what the implications are for my workflow and its lifetime, maintainability, performance, expandability, etc. if I choose WebServices or WCF.
WF and WCF are very much hand in hand in .net 4. I'd definitely suggest the latter.
No doubt, it is WCF. Migrating ASP.NET Web Services to WCF
SUMMARY: Windows Communication
Foundation (WCF) provides a unified
framework for rapidly building
service-oriented applications that
makes it easy to build and consume
secure, reliable, and transacted Web
services. WCF’s single programming
model unifies the capabilities in
ASMX, WSE, Remoting, COM+, and MSMQ;
therefore developers need to learn
only one programming model.
Agree with the others here that you should go with WCF.
Just thought to add one more point, that just because you use WCF does not mean that you cannot access existing web services. You can use a WCF client with basichttpbinding, to access existing non WCF web services.
You are making a mistake to call ASMX web services "web services" and suggesting that WCF can't be used to make web services. A WCF service using basicHttpBinding is exactly like an old ASMX service.
The best reason to use WCF instead of ASMX is that Microsoft has now stated that ASMX is a "legacy technology", and that they will not be fixing bugs in it.
I am new to WCF and Web Services in general. What are the improvements that WCF brings to the table? Can anyone give a side-by-side example of a traditional web service and the same one written using WCF and point out the differences and advantages?
Duplicate question Moving ASP.net webservices to WCF
EDIT: Think i found the answer you where looking for a side-by-side code based comparison and even better it's from MSDN: Comparing ASP.NET Web Services to WCF Based on Development
There are several related questions:
Difference between aspnet web method and wcf webservice
Benfits of using WCF
Moving aspnet web services to wcf
However you asked for a side by side comparison in which case i think Sam's Wcf vs ASMX blog article is more what you are looking for.
Quoting ad-verbatim (let me know if i should just leave it as a link):
WCF vs. ASMX
Protocols Support
WCF
HTTP
TCP
Named pipes
MSMQ
Custom
UDP
ASMX
HTTP only
Hosting
ASMX
Can be hosted only with HttpRuntime on IIS.
WCF
A WCF component can be hosted in any kind of environment in .NET 3.0, such as a console application, Windows application, or IIS.
WCF services are known as 'services' as opposed to web services because you can host services without a web server.
Self-hosting the services gives you the flexibility to use transports other than HTTP.
WCF Backwards Compatibility
The purpose of WCF is to provide a unified programming model for distributed applications.
Backwards compatibility
WCF takes all the capabilities of the existing technology stacks while not relying upon any of them.
Applications built with these earlier technologies will continue to work unchanged on systems with WCF installed.
Existing applications are able to upgrade with WCF
New WCF transacted application will work with existing transaction application built on System.Transactions
WCF & ASMX Integration
WCF can use WS-* or HTTP bindings to communicate with ASMX pages
Limitations of ASMX:
An ASMX page doesn’t tell you how to deliver it over the transports and to use a specific type of security. This is something that WCF enhances quite significantly.
ASMX has a tight coupling with the HTTP runtime and the dependence on IIS to host it. WCF can be hosted by any Windows process that is able to host the .NET Framework 3.0.
ASMX service is instantiated on a per-call basis, while WCF gives you flexibility by providing various instancing options such as Singleton, private session, per call.
ASMX provides the way for interoperability but it does not provide or guarantee end-to-end security or reliable communication.
WCF is far wider in scope than ASP.Net webservices.
WCF can run in any application. APS.Net webservices only run in IIS.
WCF supports models like ReST, Remoting, SOAP, MSMQ etc. ASP.Net only supports SOAP
WCF is more configurable.
WCF supports a more declarative way of programming. You can get more done with less code.
ASP.NET Web Services are pretty much just that. Web Services. They're SOAP/WSDL based and provide their services only to the web.
WCF Services offer a much more flexible framework. For instance, depending on how the service is defined, it can be a Web Service hosted in IIS which serialized its data via XML and uses the REST model...or it can be a Remote Windows Service that is hosted in it's own process and serializes its data via binary. All of this is achieved using the different Service/Data contracts in WCF.
In short...you can make a WCF service look almost identical to a .NET 2.0 Web Service fairly easily but, with a little work, you can do a WHOLE LOT MORE.
We currently have a Silverlight 2.0 application communicating with a set of WCF web services. These services communicate with other WCF services for business logic.
Client DMZ Intranet
Silverlight -> WCF Web Service Gateway -> WCF Biz service -> DB
The WCF web service gateway resides within the DMZ.
We see that Ria services can replace our WCF web Service gateway, but this means that it will be installed in our DMZ and have access to our database... Is this secure?
We also seem to loose our business logic WCF services... I would need to put the business logic within Ria services (as it has connection to the database and holds the domain...).
What is the recommended patter for Ria services? Where does it fit?
What is the approach for companies that already invested in WCF web services? Can they use RIA?
We are looking at this alternative, were we would expose both web services and Ria...
Silverlight -> WCF web service - > WCF biz service -> DB
-> Ria services -> DB
Any comments? I also wonder if anyone is actually using Ria in production....
Your proposal architecture with the silverlight app calling
both WCF Services and Ria services sounds fair to me.
Suppose your DB has an Employee Entity.
I can get this approach up and running, but have some issues
Suppose "the WCF biz service" accesses and modifies Employee.
does it get this data from the database directly?
(if so, is the EntityFramework edmx model shared between "the WCF biz service" and ria?)
does it in turn uses the RIA layer, and thus the EmployeeRiaProxy?
..?
Suppose you want to use the Employee Entity on your "WCF biz service" operation contract
This should not be possible in a pure SOA architecture?
Use a pure DTO data contract style approach with an EmployeeDto?
Should you use the Employee, or the EmployeeRiaProxy?
Using the Employee is not possible because the silverlight app does not know it
(or would cause another EmployeeWCFProxy type being created on the client)
Using the EmployeeRiaProxy is possible, but ties your operation contract to a
Ria proxy (pretty poor design) and assumes the service uses RIA for data access
Or should everything pass through this RIA layer? from which you call "the WCF biz service" in turn then?
Any opinions welcome!
Koen