Could anyone point me to a resource that explains WCF with pictures and simple code snippets. I am tired of googling and finding the same "ABC" articles in all search results.
WCF is a very complex technology that in my opinion is very poorly documented. It is incredibly easy to get up and running with, but the performance tuning to run a large scale app can be incredibly complicated and a lot of trial and error. One day everything is working fine and then you find out that only a single Channel is kept waiting for a new connection and that there is a config setting that you need to adjust on a custom binding to allow more channels to be waiting so that calls don't fail inbetween when a channel is used and the next channel is spun up.
In general Nicholas Allen's blog is a gold mine of information. However Windbg has been my best friend in trying to explain some very bizarre behavior coming from WCF.
Here's a really simple example. It's specific to CE/Mobile devices, but the concept is no different PC to PC.
I found the following two books to be really good for getting up to speed on WCF:
Programming WCF Services (Lowy - O'Reilly)
Pro WCF (Peiris, Mulder - Apress)
They both start with more of a conceptual description of WCF, so you understand the concepts and terms. This is really useful, because it allows you to narrow any google searches to more specific concepts.
And this is an article that breaks down understanding WCF and why it was developed in a simple, bulleted list.
Related
Is it even possible more or less natively consume WCF service from Go application?
I can imagine it should be possible to execute SOAP calls in Go, but WCF is a bit more than that only, for example authorization will probably be a problem also...
Have anyone at least approached this area, or maybe someone can give useful me advice in this "wheel reinvention task"?
Thank you in advance for all your input, ideas and suggestions.
I think you should expose a RESTful Service. I myself have the problem with exposing a WCF Service too many clients using PHP, Go, Ruby and all kind of languages. We never ever got it right, to automatically generate a proxy.
The maybe simplest way is to use WCF, like described in this example:
https://www.codeproject.com/Articles/105273/Create-RESTful-WCF-Service-API-Step-
By-Step-Guide
But I recommend to switch to ASP.NET Core (Migration is not that hard) or if you have the budget I would consider https://servicestack.net/
It may be well beyond the wait time for this. However, here is something really interesting that could help. The situation the authors found themselves is relevant even today in some organizations.
https://github.com/khoad/msbingo
Here's the motivation provided by the authors:
Application/soap+msbin1 encoding was a blocking issue for modernizing services from WCF to platform-agnostic technologies such as Go. We needed to be able to make calls to dependency services that spoke msbin1 and were not going to be updated or even reconfigured, but we did not want to introduce unnecessary complexity such as workarounds like .NET-based WCF request translator proxies or deploying Mono with our service instances. Initially we tried the Mono deployment route, which, while it would have worked well enough, significantly complicated our deployment pipeline, thus erasing one of the major advantages of golang.
I found it a useful starting point to begin experimentation.
Is there any site from where I can get the most of the information about WCF configuration settings e.g. keyEntropyMode,maxStatefulNegotiations,sessionKeyRolloverInterval, negotiationTimeout etc.
I have started recently working in wcf but is facing many troubles in understanding the terms. There are to be honest huge. And whenever I get stuck, it takes a long time for me to solve it (searching and searching in google and after spending sometime hours I may get the solution).
Henceforth, I think it is better to know if not all astleast some of the terms and their usage and what they means.
It would be great help if anyone can point such a link. I searched in the net with " wcf configuration file elements" but with not much luck.
Thanks
That would be a very very large page! All the WCF settings..... don't know if you could have that "at a glance"....
WCF is a big beast - it has a ton of options and settings, and they do get almost overwhelming. Point is: do not try to know and master all of them - you won't be able to do that. Get to know what you need to know, build a solid foundation, and then go from there and learn more as you need to.
Also - do you know about the visual WCF Service Config Tool in Visual Studio?? Extremely helpful indeed! Invoke it from the Tools > WCF Service Configuration Editor menu or right-click on a app.config in your solution explorer and pick Edit WCF Configuration. You'll get something like this:
The great thing about this is:
it gives you dropdown lists for lots of stuff, like the bindings - you can pick your binding, so you always see your valid options
it will show you the properties on each item, so you can fill them out as needed (or even discover new properties)
it gives you nice tasks you can perform, like adding a new service or a new endpoint
That's probably as close as it gets to a "complete overview" of WCF. Other than that - check out the great books Learning WCF by Michele Leroux Bustamante for intro to intermediate level, and Programming WCF Services by Juval Lowy for really advanced stuff. Great references and great places to look up stuff!
Learning WCF http://ecx.images-amazon.com/images/I/41wYa%2BNiPML._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg
Exactly what problem are you trying to solve? You don't really need to learn all WCF config settings. There are a lot of settings, some are specific to hosting methods, concurrency (or lack thereof), session management, instancing, bindings, behaviors, etc...
I am needing to create a web service, so the first thing I did of course was go to google
If you look in those results, you'll see nothing but things about ASMX, which apparently is dubbed legacy technology to be replaced by WCF. Why is it that ASMX is still so vastly popular compared to WCF? (of course, on SO WCF is way more popular.. hmmm)
Because it's older and more established. Therefore there are more pages on the Interwebs referring to it.
It also uses different terminology (because WCF is more than just web services) so you're not going to see it show up in Google as often for a search on "Web Services".
It used to be the case that if you searched on MSDN for "web service security", you'd find articles on WSE. That doesn't mean that WSE is not obsolete, and that nobody should use it unless they have no choices.
It just means that poor suckers who don't check the dates on articles and don't do good research from search results wind up creating new projects using WSE. I see it several times a month.
Search engines are quite as capable of returning you excellent results for five years ago as they are of returning excellent results for today.
Because WCF is referred to as such on the web, seeing as it is not just web services. Note the second letter in the TLA. :)
I work for a large state government agency that is a tad behind the times. Our skill sets are outdated and budgetary freezes prevent any training or hiring of new employees/consultants (firing people is also impossible). Designing business objects, implementing design patterns, establishing code libraries and services, unit testing, source control, etc. are all things that you will not find being done here. We are as much of a 0 on the Joel Test as you can possibly get. The good news is that we can only go up from here!
We develop desktop CRUD applications (in C++, C#, or Java) that hit the Oracle database directly through an ODBC connection. We basically have GUI's littered with SQL statements and patchwork code. We have been told to move towards a service-oriented n-tier architecture to prevent direct access to the database and remove the Oracle Client need on user machines.
Is WCF the path we should be headed down? We've done a few of the n-tier application walkthroughs (like this one) and they seem easy to implement, but we just don't know enough to understand if we are even considering the right technologies. Utilizing the .NET generated typed DataSets seems like a nice stopgap to save us month/years of work (as opposed to creating new business objects from the ground up for numerous projects). Is this canned approach viable for a first step?
I recently started using WCF services for my Data Layer in some web applications and I must say, it's frustrating at the beginning (the first week or so), but it is totally worth it once the code is deployed.
You should first try it out with a small existing app, or maybe a proof of concept to make sure it will fit your needs.
From the description of the environment you are in, I'm sure you'll realize the benefit almost immediately.
The last company I worked for chose WCF for almost the exact reason you describe above. There is lots of good documentation and books for WCF, its relatively easy to get working, and WCF supports a lot of configuration options.
There can be some headaches when you start trying to bend WCF to work in a way not specifically designed out of the box. These are generally configuration issues. But sites like this or IDesign can help you through those.
First of all, I would definitely not (sorry for the emphasis) worry about the time you'll save using typed DataSet's versus creating your own business objects. That is usually not where you will spend most of your development time. I prefer using business objects myself.
In you're situation I would want to implement a proof-of-concept first. One that addresses all issues you may encounter. This proof-of-concept should implement an entire use case, starting on the client, retrieving data from the database and returning it to the client. You should feel confident about your implementation before continuing.
Then about choice of technology. WCF is definitely a good choice for communication between your client applications and the service layer. I suppose that both your clients as well as your service layer will become C# applications? That makes things a lot easier since interoperability between different platforms (Java/C# for example) is still not trivial although it should work in most cases.
Take a look at Entity Framework (as there are a couple Oracle providers available for it already) in conjunction with .NET 3.5 SP1 which enables built-in WCF serialization of your EF generated classes.
Here is a good blog to get started: http://blogs.msdn.com/dsimmons
CSLA might be a good fit for your N-Tier desktop apps. It supports WCF, has a large dev community, and is well documented. It is very object oriented.
we're developing a web app to cover all aspects of a printing company from finances, to payroll, to job costing. Its important to be able to control who can access what parts of these applications. Don't want a line employee giving himself a raise, etc...
I've heard of the concept of ACL & ACO, but haven't found a good example that we could adapt to our project.
Anyone know where I can find good information to work from?
A brief rundown on ACLs, where they should be used and how they should be structured and implemented for various applications and user levels can be found here:
LINK
I've had to implement that type of security a couple of times. Unfortunately I don't know of any really good articles that provide examples. My implementations were mainly piecing together the parts through trial and error.
However, I did come across this link on MSDN:
http://msdn.microsoft.com/en-us/library/52kd59t0(VS.71).aspx
It has some of the concepts.
After my original post, I did some more research. I found this article:
http://www.aspfree.com/c/a/C-Sharp/Implementing-Role-Based-Security-using-CSharp/
it seems pretty promising, I didn't go through all the details, but it at least guides you through the high-level topics.
If you're using .NET/Windows you might want to look into Windows Authorization Manager (AzMan). There are support for AzMan in Enterprise Library but there are other ways of using it as well.
http://msdn.microsoft.com/en-us/library/ms998336.aspx
http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsAuthorizationManager.html