Monday, August 28, 2006

ETNUG Gets Back in Gear



# 

We took July off, but ETNUG is back on tomorrow evening.

This month, we are pleased to welcome John Kellar to present a session on "Tools, Tips and Best Practices in .NET."  John will also fill us in on DevLink, the FREE developer event he has organized.   Check it out at http://devlink.net/.

When:
Tuesday, August 29, 2006 6:00 pm

Where:
New Horizons Computer Learning Center
9111 Cross Park Drive
Building C Suite 100
Knoxville, TN 37923
http://www.nhknoxville.com/pages/directions.htm

Who:
John is a developer and architect working as a senior consultant with Compuware Corporation. In addition to being Chairman of the devLink Technical Conference, he remains active in the development community as a Board member of the Nashville Visual Studio .NET User Group and speaker.  John has worked on applications in several markets including healthcare, government, financial services, data integration services and most recently consulting services. He was a charter member of the Little Rock .NET User Group and served two years as Vice-President. John also worked on organizing several developer conferences including Tech Expo 2005, Tech Expo 2006 and devLink 2006.

What:
Tools, Tips and Best Practices in .NET

I received a copy of Wally's book to give away, and John is bringing an iPod Shuffle!

Please join us, and bring a friend!
++Alan

 Monday, August 14, 2006

Speaking at AFDUG



# 

I'll be speaking tomorrow, August 15, 2006, at the Asheville FoxPro Developer User Group on integration of Team Foundation Server and the Visual FoxPro IDE.

Meeting is at 6:00 PM at PowerChurch Software offices.

++Alan

VFP | VSTS    Comments [0]
 Thursday, July 27, 2006

"My Big Fat Greek Shredding"



# 

My good friend Wade went to Greece recently. Here's a photo he sent. Mouse over the image to see the outcome. :-)

Uh oh!
++Alan

 Monday, July 03, 2006

ORM and the Fox (Part 1)



# 

I have been moving quickly between tasks since my return from Boston.  I'm finally taking some time off for the Independence Day holiday.  Floating in the pool, I keep finding the subject of Ted Neward's essay coming to mind.  It appears I still have something I want to say about ORM.  In this series of  posts, I hope to explain why Visual FoxPro has more mojo for resolving Object Relational Mapping issues than any other technology, of which I am aware.

At the speaker's dinner for the Atlanta Code Camp, I discussed LINQ with Charlie Arehart, and Wally.  I brought up the doomed Object Spaces project, and quoted Ted Neward's pithy line that "Object relational mapping is the Vietnam of computer science."  It is a good line.  It is also true, as much as a pithy metaphor can be true.

Now that Ted has expanded his metaphor, we can see the limitations of metaphor in general.  I recommend Jeff Atwood's analysis of Ted's essay.  I agree with everything Jeff has written there.  Primarily, I agree that Ted tried too hard to stretch his Vietnam analogy which distracted from his primary, quite sound, thesis that "there is no good solution to the object/relational mapping problem."  Full stop.

Despite any over-reaching in support of his Vietnam analogy,  I must state clearly that Ted Neward is possibly the most qualified person in the industry to make the criticisms he does of ORM.  Here's a short bio with his credentials.  Suffice it to say that he is not arguing from a position of ignorance.  Ted works with many technologies, and has seen the limitations of ORM manifested in different languages and platforms.

To continue with my love letter to Ted, he acknowledged something that few people in the industry are even aware of.  Visual FoxPro eases the dissonance between objects and relational data better than any other technology on the planet.  I first came to this realization upon reading this post by Joel Spolsky in 2004.  Joel identified the impedance mismatch between objects and relational data as a shortcoming in all modern programming languages.  Joel didn't bother listing VFP among "modern high-level programming languages."

I'm not going to bitch and moan about the low profile of VFP.  I know what it can do, and it's been earning me a decent living for years.  I just can't believe other languages have not done a better job of "borrowing" the best of what VFP does.  I'm damn tired of all the LISP articles on Reddit telling me how I'm missing out because my language of choice doesn't have feature foo which LISP has had since the '60's.  I also take issue with Paul Graham's essay about the RAD nature of LISP for startup companies.  Any experienced VFP developer could easily make the same arguments in favor of the Fox.

When I first saw Ted's mojo comment, I felt vindicated.  I made a quick post, and forwarded the link to "the Craigs".  I secretly hoped they would write this argument for me.  Fortunately, I have to sort this one out for myself.  I am currently developing an object interface to encapsulate a VFP cursor.  This is totally unnecessary in Visual FoxPro, but I need to leverage my object model from .NET, so I must encapsulate all the tasty VFP goodness behind a COM interface.  This is the ultimate test of VFP's ORM mojo in my experience to date. 

It is my contention that the "secret sauce" to VFP's ORM mojo is the cursor.  A VFP cursor is a data structure like no other.  Most non-VFP developers associate VFP with the DBF storage format.  People seem to assume that it is "just" a database.  Visual FoxPro does have a very powerful in-process data engine which includes a wickedly fast ISAM storage format, but it can use data from any source as a cursor with that same data engine.  This is where we find the secret sauce. 

Other languages need to map data from relational sources to primitive types such as arrays or dictionaries (collections).  The ADO recordset is actually an object oriented implementation of VFP's cursor engine.  The ADO.NET dataset takes this further to include relations in the definition.  Strongly typed datasets are a particularly easy way to handle data in managed code.  The advantage that VFP has is that it handles data in cursors natively.  That is what it is made to do.  Handling data in a columnar format, and setting relations between these table-like data structures is the core of the VFP mission.

VFP developers use SQL commands as first class citizens of the language.  They are handled by the runtime in the same manner as conditional and looping statements such as IF and FOR.  There is no conceptual difference to a VFP developer between addressing a local variable, a property on an object, or a field in a cursor. 

Let's pause for a moment and refine our terms.  Here is what Whil Hentzen has to say about VFP cursors in his excellent (though out of print) introduction to VFP development Fundamentals: Building Visual Studio Applications on a Visual FoxPro 6.0 Foundation:

We’ve been using the term "result set" to refer to the collection of records created by the execution of a SELECT command. While Visual FoxPro is "record oriented" in that we can move from record to record as we desire, other languages that use SQL do not have this capability and can only address a block of records as a single entity. As a result, all SQL operations are oriented toward manipulating this "set of records." They refer to this block of records as a "cursor," which stands for CURrent Set Of Records. A cursor is a table-like structure held in memory; it overflows to disk as memory is used up. In some cases, such as queries that essentially just filter an existing table (in other words, no calculations or joins), Visual FoxPro opens a second copy of the table in another work area and then applies the filtering condition to present a different view of the table as the query requests it.

Cursors have two advantages. First, they are fast to set up, partly because of the possible filtering of an existing table, and also because of their initial creation in RAM. Second, maintenance is greatly reduced, because when a cursor is closed, any files on disk created due to RAM overflow are automatically deleted.

I hope it is clear from the above that any data that can be understood conceptually as a row/column data source can be handled very elegantly by VFP.  The key point to recognize is that the data runtime and the language runtime are one.  They even share a common garbage collection mechanism, which you can read about here.  VFP developers are able to enumerate, search, sort or perform set based operations against one or more cursors without making a context shift from the surrounding procedural code.

Cursors are not perfect.  They are not objects, and can therefore not be passed around by reference.  There are two workarounds for this conundrum: ADO recordsets, and XML.  I use XML exclusively.  I no longer consider ADO recordsets to be a maintainable solution.  While the shortcomings of XML are well documented, the flexibility is irresistible.  Furthermore, the VFP XmlAdapter class makes it a snap to translate between cursors and XML, and even take and apply diffgrams.  Therefore, I use XML whenever I am passing data across object/process boundaries, and I convert the XML to VFP cursors within my object interfaces. 

In the next installment on this subject, I will address the object component of Object Relational Mapping.  For now, I hope that I have clarified that Visual FoxPro is not "just" a database.  From my perspective, it is primarily a runtime library for the Visual FoxPro language which seamlessly blends typical imperative programming constructs with relational data handling.

++Alan

 Wednesday, June 28, 2006

Visual FoxPro Mojo



# 
I have been trying to formulate a response for the OR/M issue brought up by Ted Neward, but he has done it for me:

“And, although I will likely gather some serious heat for saying this, Visual FoxPro may have some of the most interesting "best of both worlds" mojo in the entire language space on this subject.”

http://blogs.tedneward.com/2006/06/27/Thoughts+On+Vietnam+Commentary.aspx


++Alan
 Saturday, June 17, 2006

Tech Ed 06 Day 5



# 
The last day of Tech Ed is different from all the others.  Many people have left already, and all the big announcments have been made.  They do schedule some excellent presentations for Friday, so it is worth hanging around for.

I did manage to attend another session Thursday afternoon.  Steve Lasker gave a presentation about occasionally connected systems.  This talk covered the current and future technologies available from Microsoft to deal with moving data offline, then syncronizing with the server when after returning online.  Good session on a very relevant topic.

Thursday night's party was great fun.  I skipped the ball park food, and went to the upper levels where they had a buffet, and beer options beyond Budweiser products.  I met up with my buddy Jim Topp, and we took in the concert, as well as a significant number of Samual Adams Boston Lagers, together.

The opening act was fine, but not inspiring.  Train was excellent.  They are definately a party band.  Along with all their own songs, they did two Zepplin covers, and closed with Aerosmith's "Dream On".  I would definately pay to see them again.

By Friday morning, I had answered, or at least addressed all of my TFS issues.  Before leaving for the party on Thursday, I brought Randy Miller a printout of CMMi KPAs not fullfilled by the MSF Guidance that my CMMi manager put together.  Randy's response was, "You rock!"  I'm looking forward to working with Randy, and Kevin Kelly as we move forward.  One member of the team with whom I didn't get to talk to enough was Noah Coad.  Noah was at the BOF sessions on Tuesday, but we only spoke briefly Wednesday morning. 

My first session on Friday was Architecting Your Own Enterprise Framework with Brian Button.  Brian shared the lessons he learned working on the Enterprise framework in the Patterns and Practices group.  I plan to download the slides when I return to my office, so I can review the wisdom contained therein.  Brian shared what worked for his team, and what didn't.  The most prominent idea that I left with was the "Rule of 3".  If you see a solution implemented three times, then it should go into a framework, but not before.  According to Brian, frameworks are not developed in the heads of designers, but should be extracted from working code.  This guidance basically follows the YAGNI principle.

During a half-hour break, I caught up with /\/\o\/\/ again to ask him about PowerShell resources for developers.  He pointed me to  Windows PowerShell Programmer's Guide  Unfortunately, it is not currently available in a printable format, but this is an exciting find. 

My next session was Rapid Development of Data End-to-End Solutions and How They Work in an N-Tier Model given by Jay Schmelzer. This was the most code-intensive session I saw all week.  Jay dispensed with slides, and built a data access compenent and windows form to connect with Northwind.  Next he migrated his DAL to a webservice, and showed the changes required to maintain full functionality in the application.  Jay is very energetic, and this was a fantastic session.

My final session after lunch was Architecting Applications for a Service-Oriented World.  Beat Schwegler did an admirable job making SOA appear to be a real technology/architecture.  In contrast to the previous session, Beat used slides exclusively to walk us through a conceptual scenario focusing on maintaining existing IT systems investments, while adding additional value by connecting legacy systems through service contracts.  This is the first time someone has convinced me that SOA is more than just a marketing term from Microsoft.

Throughout the conference, the continuous themes were quality and value.  Microsoft is providing tools to insure quality in the software I produce, while it is up to me to insure that I am producing the right software.  If I build a quality product that doesn't meet the needs of the user, then I have not added any value.

++Alan
 Thursday, June 15, 2006

Tech Ed 06 Day 4



# 

Rain this morning. :'(  I hope this clears up before the concert at Fenway tonight.  I'm jazzed about seeing Train perform.

Yesterday afternoon was increadably productive.  I attended a session on Developing Custom Process Templates, Work Item Types and Policies by Kevin Kelly.  This session was similar to the presentation by Dennis Minium at Tech Ed 05, but Kevin had some new content when he got the the demos.

Next, I attended a BOF called "Enhance Your Business and Professional Life By Getting The Most Out of the Local Developer Community".  This session totally exceeded my expectations.  The facilitators did an excellent job of correcting my thinking about my user group.  The take-away quote was "running a user group has nothing to do with coding."  The moderators had plenty of tips about how to get people involved in the group, how to vary the agenda, and how to focus on the community building aspects first with technology placing a far second.

My final session of the day was the best so far, and that is saying a lot.  I have found my guru for deploying Team Foundation Server and his name is Sam Guckenheimer.  Sam refers to himself as a coach, but I will be following his sage nuggets of wisdom like a devotee to his master. ;-)

Sam gave me a copy of his book, and I read the first 20 pages last night.  This is the guide I intend to use for our road ahead.  The key piece of wisdom he gave me at the end of his session on "Using Metrics to Manage and Troubleshoot Your Projects" was this:  "The heart of CMMi is process improvement."  Sam totally understood the dissonance between developers trying to implement functionality in an iterative manner, and auditors focused on building to spec.

One of the biggest additions to my understanding of TFS at this conference has been the clarifying the difference between the map and the territory.  The spec is a map.  The MS Project file is a map.  These are maps of where we want to go, but the model needs to reflect reality.  With all the rich access to metrics provided by TFS, we can get a clear picture of the territory and adjust our maps to reflect reality.

++Alan

[Update]  The rain has cleared off, so the concert should be lots of fun. 

My first session today was with Rocky Lhotka.  Rocky was actually very kind to datasets, and didn't harp on the lack of encapsulation.  He showed the advantages of isolating code in partial classes in .NET 2.0.  Of course, this being a Rocky Lhotka session, the ultimate solution was shown to be CSLA.NET.  I asked Rocky if his objects implemented the correct behavior when the user presses the escape key, and he responded that they do.  When he pressed the escape key, the expected behavior didn't happen.  I'm glad to know that these situations still happen to someone of Rocky's stature and experience.

I ate lunch with members of the MOM team, and asked them many questions about connecting MOM and TFS.  They pointed me to AVIcode.  I found the AVIcode booth, and talked with them.  I'll be exploring the resources on their website more upon my return.

I have been haunting the PowerShell booth trying to catch up with /\/\o\/\/.  I went to talk to members of the Visual Studio team about the possiblity of a PowerShell add-in for VS.  They've never heard of PowerShell!  They gave me some good tips on how to follow up through the forums and the feedback site.

While I was talking to a member of the VS team, I asked him about the future of Windows Forms, and he introduced me to CrossBow.  This is exactly the kind of solution I like to see Microsoft producing.  My existing code is not made obsolute by a new presentation technology.  Windows Forms lives!

Probably my last session for today was "Visual Studio 2005 Team System and Microsoft Solution Framework: Implementing an Agile or CMMI Process" with Randy Miller.  This was one of my "must attend" sessions.  My challenges in deploying TFS at this point all revolve around how to make use of the MSF guidance and templates.  Randy gave us the model behind MSF, and offered to email chapters of his MSF book as he writes them.  This was an important session for me.

Upon returning to the Technical Learning Center, I made another stab at talking to someone on the Visual Studio team about PowerShell.  I spoke to Kit George, a Program Manager on the CLR Team, and he had never heard of PowerShell!  He gave me his card, and told me he would follow up on this if I eamil him.

The capstone of the day (so far) was some quality time with Sam Guckenheimer.  I sat down with Sam and reviewed a workflow diagram I made after gathering requirements from my QA department.  Sam had some excellent feedback, and thought through the problem fully.  I made notes to share with my team upon my return.  Sam rocks!

I would be remiss if I did not mention the embarassing situation I went through trying to demo problems I was having with notifications to a member of the VSTS team.  He let me use his laptop to remote into my work desktop and demonstrate the problem.  The real problem turned out to be that the problem no longer exists!  I apparantly had not tried the subscription feature since Beta 3.  When it didn't work, I filed it as an issue in need of further investigation.  The Microsoftie (I didn't get his name) was very gracious, and I was very red faced.  In the end, I'm just happy it works.

 Wednesday, June 14, 2006

Tech Ed 06 Day 3



# 

I attended BOF (Birds of a Feather) sessions until 10:00 last night.  I accidentally attended one on developing on virtual machines, which was actually informative, if unexpected.  Next was a very useful session on MSF, where the moderator directed me to David Anderson's Blog for more information.  He also suggested that I Google for "Agile CMMI"

The final session was on migrating to Team Foundation Server and was moderated by Jean-Luc David.  It turns out that Jean-Luc spoke at the Atlanta Code Camp also.  It is odd that we missed each other there.  There was some lively discussion about branching procedures in this BOF.  I enjoyed it completely, and was reassured that we are adopting TFS in a recommended manner at my employer.

I made it to the jam session last night, and didn't get back to my room until 1:30, but I'm feeling fit this morning and ready to take in more tech goodness.

++Alan

[Update] My first session on "Applying Version Control, Work Item Tracking and Team Build to Your Software Development Project" with Brian Harry, was a big disappointment.  I was expecting some prescriptive guidance for integrating these tools into an existing project.  Instead, I sat through the same presentation I saw last year at Tech Ed.  This introductory/marketing style session are tiresome.  The companion session this afternoon promises to dig into customizing the system.  We shall see, I suppose.

At lunch I finally hooked up with Randy Miller.  We had tried to get together yesterday, but he had a conference call run way late.  Randy was very interested in the issues my company is having in resolving the impedence mismatch between the CMMI KPAs and the MSF process guidance.  He took careful notes, and thanked me frequently for providing detailed feedback.  He promised to put me in touch with David Anderson, who owns the CMMI template in TFS.  Randy assured me that David would be interested in following our progress and assisting us with any problems.  This is why I came to Tech Ed!