Primary Entry Focus

I was reading the great Neopoleon's Blog last night and realized two things, I should add a bit more "pizzaz" (as they say on Dethklok's Metacalypse) or A.K.A. personal diatribe.  Smile [:)]  I've been just kind of spurting out some overly general, random, off hand things and I'm going to push toward my actual 2 cents on technology, projects, and companies and also try to stick to more in depth articles.

So this stands as a warning!  Surprise [:O]

Thus my recent addition of the "rants" category will probably increase!  My category of "Discussion Points or Ideas" will probably also increase drastically as I have a lot of discussion points that would be interesting to begin.  So hopefully all 3 readers I have currently will enjoy my new directions, if not, my loss.  Sad [:(]

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/29/2007 at 1:10 PM
Categories: Rants | Discussion Points or Ideas
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Windows Workflow Increases Coolness Factor

After making it through about 200+ pages of the book Essential Windows Workflow Foundation by Dharma Shukla and Bob Schmidt I discovered two capabilities that I really like about the Workflow Foundation.  The first is the database tables provided via the Workflow SDK that are used for persistence and tracking.  The second thing that caught my eye, which I had not even really thought about before, was the workflow display engine.  A part of the workflow foundation which provides actual graphical display of the workflow in a Visio Flowchart type fashion directly within an application.  Both of these sections I'm now going to elaborate on a little bit more, namely to show how to setup a basic installation of the database tables and how to put in place a workflow diagram into an application.

Workflow SQL Tracking and Persistence Tables

Most of these steps can be found at the linked MSDN page, but I've extrapolated by own instructions below.  Also this seemed a partial necessity since I couldn't find instructions for setting up the tracking and persistence tables I'm rolling my own.  The MSDN articles for the persistence setup and tracking setup are available if one needs a step by step.  My directions a bit more cut and to the point.

Smile [:)]

First create a database for the tracking and persistence store to use such as "WorkflowStore".  I know, real original.  But anyway, there are more important topics at hand!

Next find the SQL file "open the SQL script c:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\en\SqlTracking_Schema.sql" and then run the "SQL script c:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\en\SqlTracking_Logic.sql" file.  These two files take care of the tracking part of the workflow database.

After setting those up execute the SqlPersistenceService_Schema.sql file and the SqlPersistenceService_Logic.sql file to complete the persistence portion of the setup.

Now that the database is setup the respective web or application config files need to have some particulars added.  In the Services section of the config add the following: 

"<add type="System.Workflow.Runtime.Tracking.SqlTrackingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionString="Initial Catalog=WorkflowTrackingStore;Data Source=localhost;Integrated Security=SSPI;"/>"

for tracking and

"<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionString="Initial Catalog=WorkflowPersistenceStore;Data Source=localhost;Integrated Security=SSPI;" UnloadOnIdle="true"/>"

for persistence.  For hosting the designer in a windows application stay tuned.  Until then, happy coding!

kick it on DotNetKicks.com
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/28/2007 at 10:04 PM
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Reactive Programs and Windows Workflow Ramblings

I've started working heavily with Windows Workflow.  It seems this foundation from Microsoft is being heavily undersold in my opinion.  What one can do with this base is massive, at least for enterprise solutions, and in many a case for almost any type of solution.  This type of graphical design of workflow directly mapped to code has been needed for ages, oft promised, mostly just vaporware until now.

This is an entry documenting some of my first flailing through some samples I've been tossing together.

Sample 1

First I started a basic Sequential Workflow Console Application from Visual Studio by starting a new project.

Once the application is open I renamed the initial workflow file accordingly, since I have an obsessive compulsive issue with the default filenames and such.

Now that I've settled my obsession with things not being "default" I moved on to tossing some cool workflow controls into the SequentialWorkflow.cs file.  The first two I dropped in was a Code Control and a Delay Control.  After dropping these two controls onto the page I ended up with the diagram below.

There was one problem.  I wanted the delay to occur before the Code Control executes.  With the Workflow Extensions Diagramming it is ridiculously easy to change it, by simply dragging and dropping the delay in front of the Code Control I resolved my whole dilemma.

Now that everything in the world was right I tossed some petty Console.Write* code into each of the controls.  The code I entered was super basic for this example.

    1 using System;

    2 using System.Workflow.Activities;

    3 

    4 namespace WorkflowSampeSequential

    5 {

    6     public sealed partial class SequentialWorkflow : SequentialWorkflowActivity

    7     {

    8         public SequentialWorkflow()

    9         {

   10             InitializeComponent();

   11         }

   12 

   13         private void delayFor30Seconds_InitializeTimeoutDuration(object sender, EventArgs e)

   14         {

   15             Console.WriteLine("Pausing for 30 seconds.");

   16         }

   17 

   18         private void CodeActivityNumeroOne_ExecuteCode(object sender, EventArgs e)

   19         {

   20             Console.Write("This is the console writing doing a \"Console.Write\".  ");

   21             Console.WriteLine("This is the \"Console.WriteLine\".");

   22         }

   23     }

   24 }

So with that snippet of code one can see how the example works to step through each part of the Workflow. My next example is going to be a little more elaborate. So now that the simple one is setup, cuz it's always good to have that simple "working" example, my next workflow related entry will have some real meat to it.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/27/2007 at 8:42 PM
Categories: How-To, Samples, and Such
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Ever Use the Application Blocks?

Then ya should definitely check out the Patterns and Practices Guidance Site.  That's it for this entry, just one site.

Smile [:)]

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/26/2007 at 7:38 PM
Categories: Website and Application Write-Ups
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Installing all the .NET Stuff

I've really been doing tons of hard core dev work with some of the newer .NET 3.0 technologies lately.  The project that is underway currently has been utilizing the WCF (Windows Communication Foundation) since it was beta and the SCSF (Smart Client Software Factory) since the first real CTP.  Those two foundations I have felt that the real technology utilization of .NET 3.0 was only halfway completed.  That notion being planted in my head, I've begun a trek to tie together the other parts of .NET 3.0 such as the WPF (Windows Presentation Foundation) and WF (Windows Workflow).  For that trek I use the following development tools, libs, factories, foundations, etc.

The following items are what I have installed for my development efforts:

  1. ReSharper - ReSharper is one of the, if not the most kick ass product for cleaning up, writing solid, keeping things formatting, intellisense enhancing, beautiful code helper application on the market!  This product is produced and sold by JetBrains.  I highly suggest going on getting this product.
  2. EntLib (Enterprise Library) - Application Blocks baby!!!  These rule.  If you're building an application for an environment that could even remotely be considered "Enterprise" you should seriously consider using these.  If you aren't, you're most likely doing something VERY wrong.
  3. WCSF (Web Client Software Factory) - The WCSF is very helpful when building web applications with dedicated horizontally developing teams.  Check it out, you might find it useful for even non-horizontally aligned teams.
  4. Guidance Automation - The Guidance Automation Toolkits assist with templates and such for things like the Smart Client Software Factory, Web Client Software Factory, and other such foundations.  These can be very helpful to reduce those initial setup of code files for the mentioned foundations.
  5. Cropper - Cropper is a screen shot utility, been around for a while, been pointed out by dozens of developers, very helpful little utility with very little overhead!  This is the way helper applications should work!
  6. dotnetfx3 - Download it, code with it, love it.
  7. WPF & WCF Extensions - WF Extensions and WPF/WCF Extensions are rather vital to modern .NET 3.0 Development.  Download and install these already!
  8. WF Extensions - As mentioned above, WF Extensions are vitally important and awesome!
  9. Easymock.NET - Easymock is an easy dll lib that can be added to projects to do mock testing.  If you aren't really familiar with mock testing I'll have some posts on site soon, but until then check out the download and hit up Google with "mock unit tests" and you'll have a plethora of things to read up on.

For Windows XP vs. Vista CTP releases and compatibilities check out the MSDN Site write up.

kick it on DotNetKicks.com
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/23/2007 at 3:03 PM
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Law of Demeter :: Tip O' The Day

An important thing to remember when developing software is that readability and reliability are key to the future use and maintenance of the software.  This is especially true in the code.  One of the key laws that applies to this is the "Law of Demeter".  This key law is simply to assure that object graphs stay reasonable, code is reliable to call, and that friends speak to friends and not strangers.

The Law of Demeter (LoD), or Principle of Least Knowledge is a design guideline for developing software, particularly object-oriented programs. The guideline was invented at Northeastern University in the fall of 1987, and can be succinctly summarized as “Only talk to your immediate friends.” The fundamental notion is that a given object should assume as little as possible about the structure or properties of anything else (including its subcomponents).

It is so named for its origin in the Demeter Project, an adaptive programming and aspect-oriented programming effort. This project was named in honor of Demeter, “distribution-mother” and goddess of agriculture, to signify a bottom-up philosophy of programming which is also embodied in the law itself.

When applied to object-oriented programs, the Law of Demeter can be more precisely called the “Law of Demeter for Functions/Methods” (LoD-F). In this case, an object A can request a service (call a method) of an object instance B, but object A cannot “reach through” object B to access yet another object to request its services. Doing so would mean that object A implicitly requires greater knowledge of object B’s internal structure. Instead, B’s class should be modified if necessary so that object A can simply make the request directly of object B, and then let object B propagate the request to any relevant subcomponents. If the law is followed, only object B knows its internal structure.

More formally, the Law of Demeter for functions requires that a method M of an object O may only invoke the methods of the following kinds of objects:

  1. O itself
  2. M's parameters
  3. any objects created/instantiated within M
  4. O's direct component objects

In particular, an object should avoid invoking methods of a member object returned by another method.

Continuing on in the definition points out the obvious advantages and disadvantages:

The advantage of following the Law of Demeter is that the resulting software tends to be more maintainable and adaptable. Since objects are less dependent on the internal structure of other objects, object containers can be changed without reworking their callers.

A disadvantage of the Law of Demeter is that it requires writing a large number of small “wrapper” methods (sometimes referred to as Demeter Transmogrifiers) to propagate method calls to the components – these increase development time, increase space overhead, increase maintenance cost, and decrease performance. Automated tools exist to at least partially counteract these problems.

The advantages in my opinion far outweigh the disadvantages.  Agree?  Disagree?

kick it on DotNetKicks.com
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/21/2007 at 4:44 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

Software Development Testing :: Tip O' The Day

Know your testing definitions!  Knowing what types of tests there are, what they do, and what they're used for is very important.

Unit Testing from Wikipedia

"In computer programming, unit testing is a procedure used to validate that individual units of source code are working properly. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure etc, while in object-oriented programming, the smallest unit is always a Class; which may be a base/super class, abstract class or derived/child class. Units are distinguished from modules in that modules are typically made up of units.

Ideally, each test case is independent from the others; mock objects and test harnesses can be used to assist testing a module in isolation. Unit testing is typically done by the developers and not by end-users.

Benefit

The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. As a result, it affords several benefits."

Integration Testing from Wikipedia

"Integration testing (sometimes called Integration and Testing, abbreviated I&T) is the phase of software testing in which individual software modules are combined and tested as a group. It follows unit testing and precedes system testing.

Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing."

System Testing from Wikipedia

"System testing is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic. [1]

As a rule, system testing takes, as its input, all of the "integrated" software components that have successfully passed integration testing and also the software system itself integrated with any applicable hardware system(s). The purpose of integration testing is to detect any inconsistencies between the software units that are integrated together (called assemblages) or between any of the assemblages and the hardware. System testing is a more limiting type of testing; it seeks to detect defects both within the "inter-assemblages" and also within the system as a whole."

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/20/2007 at 11:46 AM
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Software Architect?

I got to thinking recently, "what makes a software architect a software architect?"  With that thought I then delved into the various degrees and ideas about what differentiates an architect from a senior developer.  With even more thought I pondered what breaks up architects, where are the separations within the description itself?  While out eating and enjoying a bit of beverage atop the 26th floor of the Sheraton in Tacoma a few coworkers an myself assisted me in furthering my thoughts.  Are there ways to draw borders around a program software architect versus an enterprise architect versus a business technology architect?  Are these even legitimate separations?

I'm going to, for the context of this blog entry, attempt some definitions and maybe even declare some specific "architect" guidelines.  So far I can think of several descriptive adjectives that software architects would fit into;  business, enterprise, and program.  What definitions these would probably have would be somewhere along the following initial rough drafts listed.  Of course keep in mind my actual adjective use is in "draft mode" also!

Business Architect :: A Business Architect would define a resource (contractor, full time employee, or other) that has specialized abilities to define, at an executive level, what tools would work well together to accomplish a business goal.  This person would also know how to get the best use, return on investment, and minimal amount of implementation burden with maximum usefulness of the software to the core business itself.  This person would know what parts of the Java, Web, .NET, or other technology "world" would fit together for a particular business.  This person would see how executive decisions are made, how open or closed source would be best for the business interests, and how these people expect the software to work within their respective business environments.  This architect should be familiar with management methodologies that their suggested software implementations would interface with best during the software development lifecycle.  This architect would most likely work in or come from a small business or fast moving business environment of a few people (3 or more) to a few thousand (1-9 thousand) people.

Enterprise Architect :: A Enterprise Architect would define a resource (contractor, full time employee, or other, in a enterprise usually a full time employee) that has specialized abilities to define at a large scale what a design should look like for a particular corporate environment.  This individual would not particular know management implementation methodologies but would know how to integrate disparate technologies with the highest return and the lowest over head or cost to business flow.  This person would not be particular concerned with the executive attitudes as the primary concern is increased consistency of patterns, methodologies, and repeatable design and development efforts.  This person would understand application design scope within a department, multiple departments, and outside vendors and how these concerns will integrate with the design.  This architect would most likely work in or come from a mid-size to large corporate environment ranging from several thousand (5-10 thousand) to the hundreds of thousands (100-200 thousand) people.

Program Architect :: A Program Architect (or Application Architect) would define a resource (contractor, full time employee, or other, in a Program Architect role usually a contractor) that has specialized abilities to define a small, medium, or large scale application for a medium size business.  This person would know primarily how all layers, servers, and tools used for the application would integrate into an existing business or enterprise environment.  This architect level would be almost 100% technical and not concerned with the business itself so much or the executive attitudes or methodologies.  Of course some concern may be important but the primary focus would be the tools, servers, layers, and integrations.  This architect would most likely work in or come from a small or mid-size to large corporate environment having spent several years contracting and be familiar with a wide range of software servers, tools, development environments, etc.  Generally this architect should be familiar with small (3+) businesses to large corporate environments with thousands (100-200 thousand) people.

This is my initial outline.  If you have anything to add PLEASE comment.  I'd really like to further the details or even break things out into more specific categories and really get to the core of what makes up a real software architect role.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Generics :: Tip O' The Day

Many people find Generics confusing.  I hope that I can add to some confusion reduction with a quick demonstration of some standard Generics usages in the C# .NET 2.0 world.

The type-safety of C# prevents potential errors by catching them at compile time.  Every variable in C# has a defined type.  When you give the object an assignment the compiler checks if it the action is a valid.  If the assignment isn't valid, BOOM, you get a notification.

Now a major problem comes up when you try to use collections in pre-generics C#.  The collection objects in C# are typed to hold actual .NET Framework objects.  Since anything goes in, there is no way to provide type checking.  Compounding this situation is the fact that each object getting pulled out of the collection then needs to be cast.  This creates some nasty, bloated looking code, especially once you start churning out all the collections themselves.

So today's tip is simply to remember that generics are your friend!  No more nasty ole' pre-C# 2.0 collections.  Generics, generics, generics!  To check out more about Generics, get the low down, and see how generics are utilized in .NET Framework for reflection, arrays, collections, serialization, and even remoting check out Microsoft's MSDN Section on Generics.  For more information specifically on what a generic check out this particular MSDN page.

Smile [:)]

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/10/2007 at 6:03 PM
Categories: Tip o' The Day
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Bid Up?

So I was, as I do every week, just looking through the job postings to see the types of things that are posting, what percentages of jobs are out there, and what the rates are.  It is, as a consultant, very important to keep up with all those things.  The reasons range from assuring that I'm not falling behind with technology to seeing who and where pressure is coming from for the project and company that I am currently working for.

Every once in a while I still see these postings that are morbidly outdated and out of touch with reality.  It's almost as if Paris Hilton is out there writing these job descriptions and setting the rates!  I personally am offended to see anyone or any company out there asking for a "Senior" anything software related for $30 bucks an hour.  Now don't get me wrong or out of context.  $30 is a good rate for a lot of developers out there, but for a senior .NET engineer or senior Java engineer is ridiculous.  The current rates in market for an average Senior .NET or Java Engineer is about $40-$47 bucks an hour.  For a company that is serious about longevity, peak performers, and concerned about getting the best of the best, the rates skip up to at least $55-60 an hour.

So to all those guys out in the field looking for work, if there are any left at this particular junction in the industry, don't accept low ball rates.  It does you and the rest of us bad and sets the perception of managers and other artificially low, because I guarantee the movers and industry experts aren't going roll over for these low ball amounts.  If you're faced with this dilemma at this time in the industry please shoot me an e-mail and lets talk, I'm sure I can roll you into one of the friendly and competent recruiters that I know, who I know hire appropriately, scope well, and present honorable and good rates.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 6/9/2007 at 9:53 AM
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed