Logging ADO.NET Data Services Research - Part 2

Building out the Client

(Skip further down in the entry if you don't want to read the rant & just want working code!)

Once I did this I started working on the client piece to consume these services. First start up the Visual Studio Command Prompt.  Unfortunately at this point, it is off to the command prompt for use of the WebDataGen.exe. I looked diligently all over the Internet, then found out on "Making Webdatagen data-binding friendly" that the stupid executable had been renamed to datasvcutil.exe. Thanks for making it all that much more confusing and disorientating. This is starting to remind me of open source - everything is always changing. But I digress. After a quick search I found a good reference use of it in the entry "Visual Studio 2008 SP1: Querying and ADO.NET Data Service via .NET Client".

So I found this tool and used it with the following command.

datasvcutil.exe /uri:http://localhost:50681/Services/ReporterServices.svc/ /out:"C:\Users\Adron\Documents\Visual Studio 2008\Projects\Reporter\ReporterSilverlight\ReporterClientEntities.cs"

This class gives you some nice entities to deal with. Even able to use LINQ to ADO.NET Data Services at this point. Very cool. So now add the file to the project. I ran the command above so it would specifically put the file into the area were the project is located, but I still had to "Add Existing..." file and select it from the folder structure.

I built the project like an idiot at this point thinking it would build.  I didn't realize there was missing assemblies so I went researching again.  I found that I needed to add the reference to the System.Data.Services.Client assembly.  Once I did that the build was clean again.  One other thing I did was clean up the namespace.  When I brought the file into the project the namespace was "FeedCollectorModel" but my project namespace is ReporterSilverlight.  Since I'm sort of a stickler for using namespaces appropriately and in parallel with actual project structure I changed that to reflect the actual location.

Note:  Nasty code... Lots of code...

When I really kind of dug through he generated code that the datasvcutil.exe created I wasn't too happy.  It is generated code so I don't honestly care, but just looking at all this mess, I'd dread needing to actually find something or troubleshoot it.  Overall, for the few basic views and tables above the executable generated 1400+ lines of code.  Not exactly a quick read, but I digress, we'll just pretend like usual to know exactly what all the generated code does.

So now that I have the client side objects I'm ready to do some querying against the services and present the data.  Well, that's what I thought.  I was horribly wrong.  It appears that Microsoft, in their absolute wisdom renamed, removed, and changed a few things around to make this an extremely annoying effort.  Everything up until this point has been fairly smooth, it all changed here.

First I was supposed to be able to use LINQ to query against the data services, that didn't go over too well.  I got continued reports of "ToList()" isn't implemented on this class.  Blagh blag blagh, bunch of crap, I USED the tool that Microsoft provides to make the classes, the "datasvcutil.exe".  Maybe I needed to RTFM again but I just wanted to bloody freaking data and it wasn't working.  So I moved to the next option.

At this point I was so aggravated with the crappy "datasvcutil.exe" that I completely deleted the file.  There HAD to be a better way to do this and if I had to, I'd hand write some code just to assure that I understood what the problem was.

The next option was this WebDataContext.  Well I typed it into Visual Studio thinking I'd have the reference, nope.  Wrong again I was.  Did ReSharper find it?  Nope, it didn't find it either, which really meant there was an issue.  Now keep in mind, I have SP1 for VS.NET 08, SP1 for Vista, and SP1 for .NET 3.5.  I have ALL of the updates one is supposed to have.  But I don't have any references to WebDataContext.  I do a search and find out that there is supposed to be an assembly called Microsoft.Data.WebClient.  I look for it and find nothing.  This doesn't bode well at this point.

I dive back into the web.  After a search for the dll itself, the first item is someone with the same issue, not being able to add the reference, stating it isn't in the list to add.  The second item that returns is a spyware add for the dll.  At this point I'm really thinking this can't be good.  All I want is some freaking data!  I checked out the first link and got nothing useful.  The question was asked a year ago.  This is par for the course with the ASP.NET Forums.  So again, I start diving into the other results.  I also pop up another tab and do a search directly on the MSDN Site.

I finally stumble on this page, after searching on Microsoft's site, that these files have all been renamed.  In all seriousness, I don't care how smart anyone is at Microsoft, this is blatantly STUPID to whimsically rename so many files on such a frequent basis.  STOP RENAMING stuff.  It's annoying and makes me want to go develop Ruby on Rails - right when Microsoft is trying desperately to get back some of that audience.

Anyway, I digress... (Skip to here)

After fighting with these other, misnamed things from Astoria, I finally dug around on the MSDN site and got things straightened out.

At first, since you couldn't in the past, I thought I would not be able to just make a web service reference within the Silverlight Project.  Well as of some point between the past and the deluge of SP1s, you now can.  With that newfound knowledge I went right to making a web service reference and getting the proxy built.  Thank goodness for keeping it simple - I knew that there had to be an easier way.

After adding the web service reference I added a Silverlight DataGrid to the main page.  With the DataGrid the completed XAML looked like this.

 

 

 

 

 

 

   1:  <UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  x:Class="ReporterSilverlight.Page"
   2:      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
   4:      Width="400" Height="300">
   5:      <Grid x:Name="LayoutRoot" Background="White">
   6:          <data:DataGrid x:Name="grid"></data:DataGrid>
   7:      </Grid>
   8:  </UserControl>

I then simply added the following code to the Page.xaml.cs file.  Guess what happened?

   1:  using System;
   2:  using System.Data.Services.Client;
   3:  using System.Linq;
   4:  using System.Windows.Controls;
   5:  using ReporterSilverlight.FeedCollectionService;
   6:   
   7:  namespace ReporterSilverlight
   8:  {
   9:      public partial class Page : UserControl
  10:      {
  11:          private readonly FeedCollectorEntities svc =
  12:              new FeedCollectorEntities(new Uri("Services/ReporterServices.svc/", UriKind.Relative));
  13:   
  14:          public Page()
  15:          {
  16:              InitializeComponent();
  17:   
  18:              var fd = (from f in svc.RssFeeds
  19:                        select f) as DataServiceQuery<RssFeeds>;
  20:   
  21:              if (fd != null) fd.BeginExecute((ar) => grid.ItemsSource = fd.EndExecute(ar).ToList(), null);
  22:          }
  23:      }
  24:  }

You got it, it worked.  Didn't expect that?  I almost didn't either considering the poor fortune I was having trying to get everything working before.  At this point though, everything became smooth sailing.

The data showed up in the grid as expected.

Last Note of the Day...

Also check out this application called Fiddler 2. It allows one to craft web requests and submit them manually. A video on how to use Fiddler is available also.  This comes in really handy when you want to make sure a service is working.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 11/25/2008 at 7:15 AM
Tags: , , , , ,
Categories: How-To, Samples, and Such | WebTrends
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Logging ADO.NET Data Services Research - Part 1

I started digging through ADO.NET Data Services for work related items and this is my research so far. So far setting up a ADO.NET Data Services Service (redundant?) is super easy. There are several "Getting Started with ADO.NET Data Services" write ups out there; "Introduction to ADO.NET Data Services", "ADO.NET Data Services with ASP.NET AJAX Support", and others. One that has given me gruff so far is "Using ADO.NET Data Services" in the MSDN Documentation. It appears that parts of the code are misplaced and commented, in addition it doesn't work. I've tried it on several boxes just as the tutorial states and it just doesn't provide the feed. The error generally seems to be,

Server Error in '/' Application.

The type 'CustomDataService.ContactsListing', provided as the Service attribute value in the ServiceHost directive could not be found.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The type 'CustomDataService.ContactsListing', provided as the Service attribute value in the ServiceHost directive could not be found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

    

[InvalidOperationException: The type 'CustomDataService.ContactsListing', provided as the Service attribute value in the ServiceHost directive could not be found.]

System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +4072062

System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +11656092

System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42

System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

    

[ServiceActivationException: The service '/ContactsListing.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'CustomDataService.ContactsListing', provided as the Service attribute value in the ServiceHost directive could not be found..]

System.ServiceModel.AsyncResult.End(IAsyncResult result) +11527290

System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194

System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176

System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +23

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

    

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

The Astoria Team Blog article "ADO.NET Data Services Concepts", which is generally pretty good so take a read, also has a link to this MSDN and other information. They also have an entry on the upcoming "Astoria Offline" that is coming soon - this should be interesting.

A Tutorial on ADO.NET Data Access Services

Project FilesWithout a working test I went out on my own and did the following. First I created a Visual Studio Solution and added several project types to it;  An ASP.NET MVC Web Application & respective Unit Test Project, a Database Project, and finally a Silverlight 2 Project that I selected the ASP.NET MVC as the host for the Silverlight 2 Page.  Overall the solution looked something like the image to the left.  Click on the image to see a full size and for clarity.

Inside the ReporterMvc Project I created a new folder called Services.  This is the folder I'll actually place the ADO.NET Data Services in to keep the overall project orderly.

After I created the projects I setup the database for use.  I created the database previously so I already had a generation script.  So I went ahead and created the database via the Service Explorer Wizard in Visual Studio and then ran the script I have.  The script is listed separately on the code page.

Next I created an ADO.NET Entity Data Model & associated entity objects.  Create these objects inside the Models directory.  During the course of the wizard be sure to select all of the tables and views.

To update or add tables I just right click on the empty white space around the entities and select the "Update Model from Database..." option. Follow the instructions on the dialog that appears, it will be the same as the wizard shown above.  What I ended up with is as shown.

Next I added the ADO.NET Web Service to the project. With both of those added I now had the following in my project;  FeedCollector.edmx in the models directory and ReporterServices.svc in the Services directory.

I opened up the FeedCollector.edmx.cs file to verify that the class was actually named FeedCollectorEntities.  When you open up the designer code file it will look like the code listed below (I've just cut the first 41 lines of generated code.  I bolded the class name just for familiarity.  If ever in doubt about what type you'll pass in the data services, this is how one can easily find it.

   1:  //------------------------------------------------------------------------------
   2:  // <auto-generated>
   3:  //     This code was generated by a tool.
   4:  //     Runtime Version:2.0.50727.3053
   5:  //
   6:  //     Changes to this file may cause incorrect behavior and will be lost if
   7:  //     the code is regenerated.
   8:  // </auto-generated>
   9:  //------------------------------------------------------------------------------
  10:   
  11:  [assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
  12:  [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("FeedCollectorModel", "FK_RssFeedEntries_RssFeeds", "RssFeeds", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReporterMvc.Models.RssFeeds), "RssFeedEntries", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReporterMvc.Models.RssFeedEntries))]
  13:  [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("FeedCollectorModel", "FK_RssFeedEntryCategories_RssFeedEntries", "RssFeedEntries", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReporterMvc.Models.RssFeedEntries), "RssFeedEntryCategories", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReporterMvc.Models.RssFeedEntryCategories))]
  14:  [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("FeedCollectorModel", "FK_RssFeedEntryTags_RssFeedEntries", "RssFeedEntries", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReporterMvc.Models.RssFeedEntries), "RssFeedEntryTags", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReporterMvc.Models.RssFeedEntryTags))]
  15:   
  16:  // Original file name:
  17:  // Generation date: 11/22/2008 11:27:18 AM
  18:  namespace ReporterMvc.Models
  19:  {
  20:      
  21:      /// <summary>
  22:      /// There are no comments for FeedCollectorEntities in the schema.
  23:      /// </summary>
  24:      public partial class FeedCollectorEntities : global::System.Data.Objects.ObjectContext
  25:      {
  26:          /// <summary>
  27:          /// Initializes a new FeedCollectorEntities object using the connection string found in the 'FeedCollectorEntities' section of the application configuration file.
  28:          /// </summary>
  29:          public FeedCollectorEntities() : 
  30:                  base("name=FeedCollectorEntities", "FeedCollectorEntities")
  31:          {
  32:              this.OnContextCreated();
  33:          }
  34:          /// <summary>
  35:          /// Initialize a new FeedCollectorEntities object.
  36:          /// </summary>
  37:          public FeedCollectorEntities(string connectionString) : 
  38:                  base(connectionString, "FeedCollectorEntities")
  39:          {
  40:              this.OnContextCreated();
  41:          }

After that I opened up the code behind and stuck in a few key elements of code.  This allows the service to be opened up to an requestor of the service.

   1:  using System.Data.Services;
   2:  using ReporterMvc.Models;
   3:   
   4:  namespace ReporterMvc.Services
   5:  {
   6:      public class ReporterServices : DataService<FeedCollectorEntities>
   7:      {
   8:          public static void InitializeService(IDataServiceConfiguration config)
   9:          {
  10:              config.SetEntitySetAccessRule("*", EntitySetRights.All);
  11:          }
  12:      }
  13:  }

The next thing I've tried is the ways to query via REST. I like the "Introduction to ADO.NET Data Services Part 2" entry that Greg Galipeau has written on his blog. For my test I went against some of my work related data. One of the things that bugs me though is the http://somedomain/stuff.svc/ being used for the REST address. I want it to just be http://somedomain/stuff/.

With just these simple actions I then checked the service to assure I was getting back accurate results.  I right clicked on the file and selected Browse.  The following were the results.

<service xml:base="http://localhost:50681/Services/ReporterServices.svc/">
<workspace>
<atom:title>Default</atom:title>
<collection href="RssFeedEntries">
<atom:title>RssFeedEntries</atom:title>
</collection>
<collection href="RssFeedEntryCategories">
<atom:title>RssFeedEntryCategories</atom:title>
</collection>
<collection href="RssFeedEntryTags">
<atom:title>RssFeedEntryTags</atom:title>
</collection>
<collection href="RssFeeds">
<atom:title>RssFeeds</atom:title>
</collection>
<collection href="RssEntriesCategoriesTags">
<atom:title>RssEntriesCategoriesTags</atom:title>
</collection>
<collection href="RssFeedsEntries">
<atom:title>RssFeedsEntries</atom:title>
</collection>
<collection href="RssFeedsEntriesTagsCategories">
<atom:title>RssFeedsEntriesTagsCategories</atom:title>
</collection>
</workspace>
</service>

This was perfect, exactly what I expected.  I did a few further tests.  The URI that I started with was http://localhost:6your6port6here/ResporterServices.svc/ which is what gave me the results above.  If you take any of the <atom:title/> attributes and pass them into the URI you'll get the respective results.  For example I tested out the RssFeeds (http://localhost:6your6port6here/Services/ReporterServices.svc/RssFeeds/) and received the appropriate results.  When checking the results in IE make sure to turn off the feed options.  In Opera you get the straight feed, which is handy.

If you have to pick a browser to test this with, I prefer Opera.  The results are uber clean compared to the other browsers and you don't have to go clicking options or selecting to not feed the atom results.  An example of the results.

 

In part 2 I'll show how to wire up a Silverlight 2 Client to these data services.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Great Customer Service Remarks

Eric (@ericgerhardt on twitter or here) found some broken data and reported the problem.

Dear customer: we were going to deliver your data but we found it melted on the limb of a dead tree in an infinite wasteland.

Just classic, all I can say.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 11/21/2008 at 4:05 PM
Categories: Just Stuff | Memories
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Biscuits & Fried Chicken

So yeah, absolutely pointless title except I'm gettin' me some of that.

In other news, I've reloaded my main workstation.  This workstation is my spiffy 1.5+ year old Dell Inspiron 1720.  It is a fairly decent laptop for a workstation, with 1920x1200 resolution it gives me almost what one has with dual monitor support!

The Tools & Architecture Frameworks Listing

Every few months I end up with a different set of frameworks and applications that I use for development.  Being a developer one has to change frequently and stay updated with the latest and greatest, or risk losing value as a developer and fading into mediocrity.  I don't dig that prospect so I tend to stay close to bleeding edge, without the blood (aka lotsa bugs).

Architectural Pieces - Major 5

  1. entlib - For many of the internal pieces, I'm ramping up on and already using several of the entlib libraries (redundant use of library, eh).
  2. Silverlight 2 - For many of my web efforts, I'll be pushing through some Silverlight Apps for the UI part of my architectural standard.
  3. .NET 3.5 SP1 - Of course, for the framework that binds it all together, it's gonna be .NET 3.5 SP1.
  4. The Cloud / Azure - I'll be working diligently to get some initial cloud & Azure work done to prototype how and where I can place applications into the cloud for various reasons.  I'm actually hoping to avoid local database use in the future with use of SSDS (SQL Server Data Services) or SDS.
  5. SQL Server 2008 - 08' features rock!  Nuff' said.

Architectural Pieces - Minor 4

  1. Spring.NET - The architectural elements put together to make up this framework is awesome.  I dig the pieces and would prospectively use this if there is reason not to use entlib pieces (i.e. performance, existing code base, etc)
  2. Adobe Air App - I'm thinking of doing development against Air instead of Silverlight 2 in numerous places, primarily because it deploys EVERY FREAKING WHERE!!!  Adobe Air is truly amazing, and I'm surprised it hasn't gotten more publicity.  It smokes Java for smoothness, Silverlight for compatibility and gloss, and overall looks pretty easy to develop for.
  3. Java Struts - If need be, there could be future efforts I've seen coming down the pipe that will require Struts n such.  It could be an interesting ride to jump sides and build out some Java App with Struts.  I'd however, rather not, as there is no real reason to use this.
  4. RoR or Ruby on Rails - I'm not explaining this.  If you haven't heard or checked out the phenom that Ruby on Rails is, you're doing yourself a disservice, just go check it out.  It IS worth your time if you build more than one application per year.  :)

Tools / IDEs / Other Things - The 4

  1. Subversion - Just because I have it, it is insanely simple, takes almost no time to use and maintain.  Simply, It aint broke, and I'm not fixing it.
  2. Tortoise & Visual SVN - Total cost is $49 bucks.  It is worth every penny.  Integrates Tortoise into Visual Studio in a more flawless integration than Team Foundation Services source integration from Microsoft itself!
  3. ReSharper - Again, if you don't use it, you probably should.  It's one of the greatest tools on the market.  Personal is $199, company license is like $349 or something.  It's worth it, it is more than worth it.  If you aren't using it you're probably spending too much money on overall development and NOT writing code the way it should be.  I can't rave about the awesomeness of this product enough.
  4. Visual Studio.NET 2008 - Ya gotta have VS is you really want to get hard core with the .NET.  VS.NET Express is available for free.  VS.NET Professional is about $900 or more, but if you check out Microsoft's Biz deals you can get it for free. Also if you are a student you can get it for practically nothing, or for free.  So no real excuse not to use this.  If you work for a company that has in excess of $1 million per year, they better buy you a copy.  If they don't, and they're making you use notepad or something to write code in for .NET, you should quit, because rest assured that company will strangle itself from being so cheap and you'll be out of work anyway.

So that's my list, any questions feel free to contact me or drop a comment.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 11/17/2008 at 7:28 AM
Tags: , , , , , , , , , ,
Categories: IDEs, Software Tools, and Applications | Just Stuff | Keeping Up
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Silverlight 2 Release Party

Gotta say the release party rocked.  It was a good time.  Our gracious hosts, North, provided their work environment for the event.  Their environment looks amazing and I can honestly say, they've got to have a truly awesome work vibe going on.  Several of the North Crew were there.  So seriously, if in need of some beautiful work, check out North.

At the event there was a huge spread of great food, wine, and beer! Everyone, as we nerds do, sat around and talked geek chat.

Speaking at the event was Tim Heuer for the main presentation. After that we had a break out session with Tim, Jason Mauer, Erik Mork, and Ben [? Name might have slipped my mind. :( ]. The presentations covered Silverlight 2 Data Grids, custom creation of controls in Expression, zoom features, and video media. Silverlight 2 is definitely improving on something that is great already. In addition to that actual C# executable code is possible on the client now along with a whole slew of other features.

I discussed with Tim for a few minutes the ins and outs of Linux compatibility too. I had not looked nearly as much as I should have (I kind of just gave up, I'll admit it) when I was working with Ubuntu before. So the slice of it is one has to check out Moonlight if they want Silverlight to work on Linux. Of course, it is totally possible. Currently however, Silverlight is really only supporting Apple & Windows Machines & the primary browsers on each. This amounts to Safari, FireFox, and amazingly Internet Explorer 7 & 8. I think it is supported on IE6, but seriously, I don't know why the hell they continue to support that monstrosity of a browser.

Toward the end of the evening I also won a Silverlight 2 Animation book during the drawing. The book is written by a local Portlander (or Lake Oswegoan - not sure we'd really admit they were Portlanders :o j/k) named Jeff Paries.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 11/12/2008 at 10:46 AM
Tags: , , , , ,
Categories: Just Stuff | Keeping Up
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

Another Day of Troubleshooting

The application I'm working on has Java Back end and .NET Back end code projects. This leaves a lot of little hacks here and there for communication between these two code bases. By mere functional fact, it leaves the entire application connectivity between these two code bases in a weird state of coupling, or lack thereof.

The Java side, anytime something changes, is not particularly propagated to the .NET project side. Thus any changes between either or, leave the unchanged side in a lurch for forward development. There is an easy way to resolve almost all of the issues with this mixed environment of development.

Service Oriented Architecture

A service oriented architecture, not a partial or supposed one, but an honest to goodness business case serving stand alone services oriented architecture that can be used by front end client, applications, or even other services would resolve this odd dependency issue.

Communication

Instead of two varying code bases trying to communicate with differing and often confusing session architecture or passing back and forth query string parameters, with SOA state can be managed in a completely different manner. With the services available to the application the state could even prospectively be managed specific to the services instead of the client. This way WCF or the other slew of service frameworks out there could utilize their built in state management capabilities to enable the clients to perform their workflow or what have you flawlessly between Java, .NET, PHP, or whatever might be on the client side.

Security

Yeah, yeah, yeah, I know, services, at least web services, aren't oriented at all toward security. But with frameworks like WCF the increased ability to lock down, provide authentication, and even authorization is drastically simplified. Not as many "hacks" are needed to secure web services these days. With that an SOA project could easily be setup for strong security, with extensive services and appropriately loosely coupled silos.

Workflow

This is where I need to strengthen my skill sets. I've actively been working with WCF lately and know there is a good bit of integration with workflow that is possible. The problem is, I don't know what or how it works from an integration perspective. This will definitely be on my list of "figure it out". However, even without the dedicated workflow framework, setting up and utilizing the WCF for control of state, the inherent abilities with session control, etcetera, drastically alter the conflicts in autonomous code bases working together in an application environment.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 11/12/2008 at 7:33 AM
Categories: Just Stuff | WebTrends
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Open ID Providers for .NET Part 1

OpenID is sweeping the web. With announcements by Microsoft and Google recently to support the OpenID Framework, things have effectively gotten huge! One of the things I've been wondering about is WCF Security and how one could integrate with OpenID. Here's what I've been able to dig up and implement so far.

First off, it is a good idea to review what OpenID is. Check it out at openid.net for a starting point. A good read is available at the what page for OpenID. However, if you want to get into the nitty gritty internal workings of OpenID, it is a little trickier. The developer page is a good place to start, but it is somewhat minimal. Once jumping out from that page the information gets more useful. Plaxo has an interesting recipe for OpenID and also OpenID for non-Super Users are great. Both get into the grit more.

But skipping past a ton of the existing specifications and documentation might be a better idea once I realized that there truly were some .NET libraries for Open ID.

Out of these two examples ExtremeSwank definitely has the best documentation out. Easy to read code examples are even available. I started to just go with ExtremeSwank, but after looking up integration notes on OpenID support in BlogEngine.NET I decided to download both.

For my pending BlogEngine.NET Integration I found the following articles:

I'll have the follow up to my discoveries soon, so stay tuned!

...and if you do want to read the specifications, feel free.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 11/11/2008 at 7:12 AM
Tags: , , ,
Categories: Highball | How-To, Samples, and Such
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Fixing A Build :: Tip O' The Day

The Scenario

A Continuous Integration (CI) Build, which I'll dub "Cib", takes approximately 1 hr & 30 minutes. The build takes into account various builds from various platform technologies; Java, .NET, and PHP. The emphasis of course being that no single stack is available. To build the end solution all of these stacks need to be rolled into the build.

At a build time of 1 hour and a half, there is little ability to accurately watch the build, assure check ins work, or to be accurately notified of what is or is not being included in the build if numerous check ins are occurring.

What instead needs to occur is a short build. Builds in a CI environment really should not take a long time to compile, if they do, you really lose most of the CI benefit. So how long is acceptable? I'd prefer something around 5 minutes, not much more, and definitely less if possible. In most scenarios, no matter how big the project, this is possible. So what are the solutions?

Just to get a few ideas I spoke to a few guys at work about their ideas. Both Josh W. (Code Recon & System Configuration Guru) and Robert S. (Build Management Ace) gave me some good ideas. A few other conversations were had about what others had done in the past and two solutions came up the most preferred first steps.

The Solutions

  1. Split Em' Up; Functionally, Technically, Departmentally, or However. The first thing in a multi-technology stack environment is to split up the individual builds. If need be split up various solutions into independent development teams functional segments. At some point, the solutions or projects would be broken down enough to have reasonable build times. These smaller segmented pieces are what should be setup for continuous integration. With that completed, then keep a single large, long running build as a daily build. Whatever the case, just leave it solely as a build versus a continuous integration build.
  2. Autonomous Continuous Integration Builds. Setup the builds autonomously on the build server and monitor only the build or build(s) that you need for daily development. On TeamCity this is super easy, probably is easy on VSTS, and I know it can be done with Cruise Control. It is important to monitor and be able to track any error that occurs during the segmented builds, specifically the one pertinent to a particular developers efforts.

Summary

I'm sure there are many other solutions. If you have any, please do leave a comment. Overall, the point is, continuous integration is NOT a long running build. At best, one could call that a scheduled build. A continuous integration build must be efficient and run in a reasonable amount of time. The safest range is between 2-5 minutes. Of course, less time is better.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 11/8/2008 at 2:28 PM
Categories: Tip o' The Day | Discussion Points or Ideas
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Final on PDC 2008

Overall, after reviewing all the PDC 2008 gadgets, tools, software, frameworks, and all that jazz, I'm content. Not particularly wowed or overly enthralled, but content with the results.

There is however one piece that I can't help but feel I should learn a LOT more about. That is Visual Studio Team Server. The reason being, is that there are just too many awesome features that enhance productivity in awe inspiring ways. However, I'm not retracting all of my current complaints about the bugs and failures of VSTS 08. Over the next few weeks I'll probably be working on getting a local copy of VSTS running so that I can experiment with these features, and figure out what the work around are for these other issues. Stay tuned for this, however I hold no promise yet, just the plan to do this.

Also check out The Future of Unit Testing PDC 2008 Video also. This is another area were I'm somewhat interested. I've never been truly impressed by Microsoft's Unit Test Framework, but am very happy with the fact that they've gone forward with pushing unit testing.

Last note related, sort of, to the PDC 2008 slew of events. Google had announced Open ID support around the time Microsoft did. However there is a major catch, Google Forked OpenID. This, in summary, sucks. I'm not real happy about Google doing this. It's possibly going to push me back toward the services that Microsoft offers. Still, Google has a huge lead in services and capabilities, maturity of APIs, and other such things, but I'm thinking Microsoft will be coming up fast and furious.

On another note, there are a number of other blogs that have come to my attention that are great reads. If you intend to keep up with technology of the Microsoft Stack these are must reads. Here are two that I've taken to.

  • Stephanie Saad's Weblog - Stephanie has some great reads, not super frequent, but good entries about how Microsoft dog foods the VSTS product. Pretty interesting stuff.
  • Peter Provost - Peter covers a lot of stuff, including why he hates the term "Unit Testing" because it creates too many arguments (debates, whatever). He has a great approach to things, check it out.
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 11/7/2008 at 1:02 PM
Tags: , , , ,
Categories: Keeping Up
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

WebTrends Connect

I had wanted to go to the WebTrends Connect Seminar Event in Seattle, but since I'm working on future products at WebTrends I assumed I'd get a good read of the materials anyway. Amber Case & Ryan Summers attended the recent WebTrends Connect Seminar Series event in Seattle and I'm glad to see the information she's posted, it's a good read so check it out. It's always good to read reviews like this from Amber, she's really good at digging into parts of data often not treaded upon.

One of the major components of the seminar was "The 2nd Generation is Closed + Proprietary, whereas the 3rd Generation is Open standard-based". I'm super stoked to be working on that 3rd generation and can't wait to start applying what the future will look like when we can get this data together!

The entire industry really has pushed toward this over the last few years and slowly but surely (or maybe quickly depending on your point of view) we're all starting to converge on this fact. XML, Javascript, HTML, RSS, and more are out there to provide us connections to this data. The key problem is getting the data, and when we have the data getting it presented and filtered the way it is useful.

I'll have a lot more on this in the near future and some other unique articles on other blogs I'm writing for so stay tuned and I'll provide links to the topics.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 11/6/2008 at 5:10 PM
Tags:
Categories: Discussion Points or Ideas | Web Analytics
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed