Monday, September 4, 2017

Saturday, September 2, 2017

Microsoft 70-487: Configure WCF services by using the API

Exam Objectives

Configure service behaviors; configure service endpoints; configure binding; specify a service contract; expose service metadata (XSDs, WSDL, and metadata exchange); WCF routing and discovery features


Quick Overview of Training Materials

Exam Ref 70-487 - Chapter 3.3
[Book] Programming WCF Services (in particular, Appendix C: Discovery)
[MSDN] Configuring WCF Services in Code (.NET 4.5+)


Friday, August 25, 2017

Microsoft 70-487: Configure WCF services by using configuration settings

Exam Objectives

Configure service behaviors; configure service endpoints; configure bindings including WebSocket bindings; specify a service contract; expose service metadata (XSDs, WSDL, and metadata exchange endpoint); configure message compression and encoding


Quick Overview of Training Materials


Friday, July 28, 2017

PluralSight WCF Library

PluralSight has a pretty robust collection of WCF related courses.  I decided it would be useful to index the concepts covered in the courses I watched (as part of putting together to 70-487 study guide).

Thursday, May 18, 2017

How To Create an On-Prem Windows Build Agent for Visual Studio Team Services

Motivation


I've been working on migrating our code repositories from CVS into git hosted on Visual Studio Team Services (VSTS)... formerly Visual Studio Online.  While I've reduced the CVS migrations to running a single script, I also wanted to start exploring some of the other CI functionality VSTS offers.  Many of our projects are Maven projects, and while Maven builds are supported, I ran into a snag trying to connect to our on-prem Nexus repository.  Using the VSTS "hosted" build agents would involve one of a couple of bad work arounds:

  • expose an endpoint in IIS to talk to the Nexus repo outside our firewall.  While a one-off point to point fix might solve this issue... the scenario is likely to recur, especially when I start looking at deployments
  • open a vpn connection from the hosted build agent to the network.  Eww.  This would feel like a clunky solution, assuming I could get it working at all.  I could see authentication being a real obstacle for this route

The obvious solution was a private (i.e. on-prem) build agent running within our network.  I shied away from this approach at first because I didn't want to deal with the server configuration (rightly so, yuck!), but it rapidly became clear that this actually was the simpler solution. The final straw was after I tried to create a Hudson job and ended up fighting with git the whole time (couldn't find the installed binary, installed it again, long file names choked, couldn't get authentication working... quelle nightmare!)



Sunday, May 7, 2017

LINQ Basics by Example

While working on my 70-487 study guide I wrote up a looong section on basic LINQ operators that, while certainly germane, was not really the subject at hand.  So I'm refactoring that stuff into it's own post.  I look at the LINQ extension methods provided by Enumerable and Queryable (basically the same operations, just different underlying behavior), with lots of example code and console screenshots.  All the code samples can be found on my Github page for the study guide examples.

Friday, April 28, 2017

Microsoft 70-487: Query and manipulate data by using Data Provider for Entity Framework

Exam Objectives

Query and manipulate data by using Connection, DataReader, and Command from the System.Data.EntityClient namespace; perform synchronous and asynchronous operations; manage transactions (API); programmatically configure a Data Provider


Quick Overview of Training Materials

Tuesday, April 25, 2017

MIT 6.005 - Software Construction (edX)

The resources for MIT's "Software Construction" class are distributed between several disparate sources.  There is an entry for 6.005 on the MIT Open Courseware page, where it is called "Elements of Software Construction", and there are two classes on edX: 6.005.1x "Software Construction in Java" and 6.005.2x "Advanced Software Construction in Java".

I'm hoping that working through this class will sharpen my understanding of general software engineering concepts.  The emphasis of the class is writing bug free code that is easy to understand and easy to change, which is certainly something you can never be too good at, am I right?

Monday, April 24, 2017

Microsoft 70-487: Create an Entity Framework data model

Exam Objectives

Structure the data model using table per type, table per class, table per hierarchy; choose and implement an approach to manage a data model (code first vs. model first vs. database first); implement POCO objects; describe a data model by using conceptual schema definitions, storage schema definition, mapping language (CSDL, SSDL, MSL), and Custom Code First Conventions

Thursday, April 20, 2017

Instantiating an object in Java without calling a constructor

The Scenario


This isn't a cliche...


I was working on a Java project that talks to a web service with a custom "Client" class that was written internally.  In my project, the client is pulled in from a hosted maven repo as a dependency, so I didn't have access to the source (at least not from this project).  I'm trying to be better about writing characterization tests for existing code before I go in and change anything (if nothing else it's a good way to feel out the code). But I had a problem...

The Client has a single constructor, which takes an endpoint, a username, and a password. Calling this constructor tries to connect to the endpoint (and crashes if it fails).  Because this was the only defined constructor, subclassing wasn't going to help me.  It doesn't implement an interface, so that avenue was also closed down.

So there was no obvious way for me to create a test double to pass in to the code I was actually interested in testing.  How in the hell was I going to get around this???

Wednesday, April 19, 2017

Proxy Windows Authentication with a WCF Relay Service

Motivation

The problem I'm going to address here is pretty specific, and the solution I came up with isn't terribly intuitive, but it works.  I ran into a situation where we were trying to integrate web services with a vendor product.  This is a .NET app running on IIS, and we wanted to authenticate using Active Directory by passing in a username and password to a "UserLogin" soap action (this action returns a security token that is used to make other calls).  While initially we thought this worked, it turned out that it wasn't behaving the way we thought it should.  Any request was getting a security token, even if the username and password were garbage.

Yeah... not what we were going for...

Sunday, April 16, 2017

MIT 6.046 - Design and Analysis of Algorithms

6.046 is described by Eric Demaine as the final undergraduate algorithms class, with more advanced and more specialized algorithms classes being at the graduate level.  I've had my eye on the advanced data structures and advanced algorithms classes for a while, and this class is a fundamental prerequisite for those.  Now, being that it's my MO to totally overdo it, naturally I had to find overlapping classes from some of my other favorite providers and watch everything.  Had I limited this to one overlapping class it probably wouldn't have been that bad... but I found three other classes: Berkeley CS170, Georgia Tech CS6505, and Stanford CS261.  All four classes are what I would call "intermediate" level algorithms courses, with significant overlap in concepts covered:


I probably would have been done a month ago if I hadn't gone so crazy with watching everyone's lectures...