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.

Technorati Tags: .NET 3.0, dotnetfx3, SDK, CTP, SCSF, WCSF, Smart Client, WCF, WF, WPF, Windows Presentation Foundation, Windows Workflow, Windows Communication Foundation, Application Blocks, Entlib, Enterprise Library, ReSharper, Jetbrains, Web Client Software Factory, Guidance Automation Toolkits, GAX, Cropper, WF Extensions, WCF Extensions, WPF Extensions, Easymock, Mock Testing, Unit Testing

del.icio.us Tags: .NET 3.0, dotnetfx3, SDK, CTP, SCSF, WCSF, Smart Client, WCF, WF, WPF, Windows Presentation Foundation, Windows Workflow, Windows Communication Foundation, Application Blocks, Entlib, Enterprise Library, ReSharper, Jetbrains, Web Client Software Factory, Guidance Automation Toolkits, GAX, Cropper, WF Extensions, WCF Extensions, WPF Extensions, Easymock, Mock Testing, Unit Testing

kick it on DotNetKicks.com

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

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.”

del.icio.us Tags: Integration Test, Unit Test, System Test, Stub Test, Mock Test, Black Box, Test Plan Software Testing

Technorati Tags: Integration Test, Unit Test, System Test, Stub Test, Mock Test, Black Box, Test Plan Software Testing

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.

del.icio.us Tags: Enterprise Library, Enterprise Architect, Software Architect, Program Architect, Business Architect, .NET, DOTNET, Java, Contractor

Technorati Tags: Enterprise Library, Enterprise Architect, Software Architect, Program Architect, Business Architect, .NET, DOTNET, Java, Contractor