Friday, 22 February 2008

VISUG event : Web service Software factory

Hello ,


The Belgian Visual Studio User group (VISUG) invited yesterday (21/02/2008) Olaf Conijn to give a presentation about Software Factories and the Web service Software factory modelling edition.

Olaf has worked together with Microsoft patterns & Practices group on the Web service Software factory modelling edition (WSFm) where he was responsible for the extensibility part of the WSFm. Later he implemented Software Factories in the Netherlands (Capgemini BV). So you could not image a better person to give this presentation. Currently Olaf is trying to make the world a safer place as he's implementing software to alert the world in case of outbreaks of pandemics.( http://instedd.org/).

Olaf’s presentation was divided in several logical parts

  • The “What” of Software factories
  • The “Why” of Software factories
  • The “How” of software factories in the form of demo’s of the WSFm

Some key point I got from the presentation and the talk with Olaf afterwards:

  • There are many definitions of Software factories : some are more academic, some are more pragmatic and more tool-focused. Like the one Microsoft is using for example (MS SF). (http://msdn2.microsoft.com/en-us/library/bb871630.aspx) Although the differences, they all share some common motivator : helping the developer (or designer/architect) to get the job done in a more efficient way (time-to-market) and more with more quality. (http://appdevchronicles.blogspot.com/2007/10/software-factory.html)
  • MS SF is about guidance. It should feel having an experienced person next to you and advising you what you should , when you should do it and how you should do it .
  • MS SF is also about automation. Capturing this expertise/best practices/guidance into integrated, automated features of Visual Studio and letting Visual Studio do some tasks in a consistent (so less error-prone) way , takes away some chores from the developer. You could say SF are about re-use but not only code but also expertise.
  • MS SF is now also geared towards abstraction: This was very apparent in the WSFm (hence the name of course). The patterns and best practices to build a web service are not directly translated into code but there’s is an intermediary step: You model all the different parts of a web service like the MS engineers envision them. This gives you an opportunity to delay certain implementation decisions. It enforces you to think about it first. So the model is not the code but a very visual abstraction of what you’re trying to establish.
  • The models are visualized with special “shapes” and their corresponding properties. The look&feel is like the Class diagram tool in Visual Studio. So it is not UML (too generic) . The designers that enable the modelling features are actually build with the DSL toolkit. For each of the three model (service, data and hosting) you get different designers. From the demo it looked very slick.
  • There are several key technologies that make MS SF possible : GAX/GAT is about leveraging the automation possibilities of Visual Studio in the field guidance. DSL are geared toward modelling and code generation.
    MS Software factories come in different forms and shapes (Web client SF, Smart Client SF , Web Service SF, etc). So there isn’t a general SF that can encompass all types of applications. The main reason for this specialisation is that the more focused you are on a domain, the more specific you can make the abstractions and the better you can generate code from this models. Note that domain is not necessarily technical but also can be created for a particular sector like healthcare or finance.
  • Extending the WSFm is possible . P&P identified some 11 scenarios. Some of them , like changing something in the exiting code Text templates are very easy , while other require you the download the source code for the WSFm and modify (and maintain ) it yourself.
  • You can even build your own SF. Olaf figures , based on own experiences in the Netherlands, that make a SF is 2 to 3 times more expensive than building the product that the SF has to build (if I understood him correctly).
  • So building a SF only makes sense if you build multiple applications based on the same architectural principles that the SF enforces. Olaf estimates that you earn the SF build back if you “sell” 5 project build with SF. So you only should invest in SF you expect “economies of scale”
  • If you embark on a “journey/ordeal” to make your own SF , be sure to have “domain” experts at hand, be technical or functional in nature.
  • But building a SF doesn’t have to automate everything . You can also make more “pragmatic” SF that only focus on very explicit stuff your trying to implement. For example creating a skeleton for a solution with the GAX/GAT

Some concerns ( expressed in the form : “I wish I knew how to …”)

  • H2 assess the adoption grade of MS SF in organization…. And this is not the same as announcing the number of downloads :-)
  • H2 assess the importance in MS SF in the big scheme of development tools at MS. MS SF came out of the P&P group. One of the key technologies GAX/GAT) has been a CTP for a long time (sine 2005) . It just recently got the label release. As far I can tell the DSL (another key technology) is maintained by another group. Why are these technologies not in the Visual Studio release cycle?
  • H2 integrate VB.NET into the WSFm. In the version (I presume the latest at the time) we show you could not select VB.NET as your language. When Olaf added a WCF implementation in created a c# project. According to him , you only need to translate the text templates. If it is so easy , why didn’t P&P do it for us?
  • H2 find proper “guidance” to build “guidance tools” with GAT and DSL besides books and blogs.
  • H2 cope with generated code, your own code and the model (keeping it synchronized).
  • H2 position agile techniques with model-driven development. Are they opposites or do the complemented each other ?
  • H2 interpret the disappearance of the data access wizard in the previous versions of the WSF (at least I didn’t see it in the demos). These wizards enabled you to generate data access code and business entities. Maybe the advent of Linq to SQL an the Entity data framework have something to do with it.

Some references mentioned (or I heard from other participants)

Maybe you some own thoughts or opions? Be sure to drop a line ....

Thanks to VISUG for inviting people like Olaf to Belgium. Be sure to keep an eye on the VISUG site (http://www.visug.be/) because the one of the next speaker will be none less than Juval Lowy. Keep up the good work.



Best regards,


Alexander

Thursday, 14 February 2008

Stay in the comfort zone with OBA

Hello,

Yesterday (13/02/2008) I attended a MSDN evening organised by Microsoft Belgium about Office Business Applications (OBA). Serge Luca from U2U and MVP for Connected Systems gave an overview about OBA from a development perspective . He had also plenty of demo’s available. Too bad his time was limited.

This is what I remembered from it.

OBA are applications that leverage the Office Suite applications beyond their out-of-the box capabilities and integrate them with other systems in your organisation (Line-Of-Business Apps).

The key driver for leveraging Office is to let users stay in their “comfort zone”. While organisations have invested large amounts in the user experience in packaged and custom applications , users still like to work in their familiar Office tools. Even the advent of web-enabling all the LOBs didn’t stop users from for example pumping SAP data into Excel and use it from there on. The user-experience the people get from Office tools is unbeatable.

That’s why Microsoft made Office 2007 System a truly development platform to enable developers to create OBA. The technology enablers are not only situated on the client side (i.e. Office Apps themselves) but also on the server side. For example you can extend the Office user interface (ribbon extension, task panes, Outlook from region) . Thanks to the Office open XML format you can intervene in the documents at file-level . This open possibility to programmatic creation of for example word documents. You even don’t need a Word instance on the server. Infopath enable the creation of electronic forms. Sharepoint and related technologies are the enablers to create workflow oriented applications and extend the content document capabilities of Sharepoint. The Business data Catalog makes it easier to retrieve and search information that is already available in ERP systems or databases.
And all this technology can be unleashed through one development environment ; Visual Studio 2008.

In final part of his presentation Serge mentioned 6 basic OBA patterns or scenario’s if you will. Unfortunately he didn't have the time to go through them but the demo’s he showed , were actually implementation of these 6 patterns. A book he highly recommends in that respect is 6 Microsoft Office Business Applications for Office SharePoint Server 2007 from Microsoft Press .

So if you think Office Development is only about VBA (which is still possible by the way) , think again and check out http://www.obacentral.com/. Or like Serge said : "Let's Rock 'n' Roll (with OBA)"


Best regards,


Alexander

Wednesday, 13 February 2008

Don’t bother System testers with programming errors.

Hello ,



Suppose you're a team lead on a project and you take a look in your bug tracking tool one fine morning. You see that the tester on the team has filled some bugs.







Here are some details of it:



Bug ID: 6
Short desc: Conversion from string "r" to type 'Double' is not valid.

Last changed by FuncTest
Reported By FuncTest
Reported On 2008-02-13 2:32
Project Petshop Redux
Organization Omega
Category bug
Priority high
Assigned developer
Status new



comment 6 posted by FuncTest on 2008-02-13 2:32

test case # 5487 Enter new Order



Entering the non-number quantity for a certain product resulted in an error after filling out the order form. The error message was : Conversion from string "r" to type 'Double' is not valid.



There is no check for numbers ?




Bug ID: 5
Short desc: Could not find a part of the path 'c:\PetShopRedux\orders.xml'

Last changed by FuncTest
Reported By FuncTest
Reported On 2008-01-31 11:09
Project Petshop Redux
Organization Omega
Category bug
Priority high
Assigned developer
Status new



comment 5 posted by FuncTest on 2008-01-31 11:09

test case reference (#4531) : Export Open orders to xml file.



I wanted to export the open oders. Unfortunately I received the follwing error message Could not find a part of the path 'c:\PetShopRedux\orders.xml'.



When I look at my c drive I can not find a folder named PetShopRedux.



Can you fix this?



Bug ID: 3
Short desc: Index was outside the bounds of the array.

Last changed by FuncTest
Reported By FuncTest
Reported On 2008-01-31 10:38
Project Petshop Redux
Organization Omega
Category bug
Priority high
Assigned developer
Status new



comment 2 posted by FuncTest on 2008-01-31 10:38

test case reference (#5781) : Show overview Orders to be saved.



When i press the nenu to show me the orders that i have entered until a certain point , I get a message saying Index was outside the bounds of the array.



Can you fix this? I need to test this feauture before Wednesday.



Bug ID: 2
Short desc: Object reference not set to an instance of an object.

Last changed by FuncTest
Reported By FuncTest
Reported On 2008-01-31 10:25
Project Petshop Redux
Organization Omega
Category bug
Priority high
Assigned developer
Status new



comment 1 posted by FuncTest on 2008-01-31 10:25

Test case reference (#4578) ; Create Order with no products.



I get this strange message saying "Object reference not set to an instance of an object." But I have not made a reference to an order yet ??



Can you check this? Urgent, is blocking me.


Ok , you say :

"The tester is doing a great job ! I'll quickly instruct the developers to fix
these errors. "

Or .... you could take a step back and analyze the type of bug the tester has found. You shoudl may be take a look at the test cases result of the tester . You might find out that the tester wasn't able to do a lot of testing after all because he was blocked by the bugs...

The Bug list (artifical) shows a high digree of programming errors . There are no real findings of missing functionality, wrongly interpreted specifiaction. In other words the function tester has been able to do his/her thing. The tester got hold up by types of errors that are more technical in nature. Now the functional tester is somehow blocked until the corrected version is released again in QA. Your project manager will not be happy to see his/her people being idle.

It's time to revise your development process , educate your developers and give them the means to conduct testing themselves : enter development testing and test automation.

Maybe your developers will answer :

  • What are you talking about, we already do testing! : Maybe that is true . For example making a Form with 23 buttons and text boxes that test some piece of code they have written. The trouble with this approach is that it a custom implementation. Each developer can do what he likes. It can not be (easily) automated : you must click on the buttons and verify the result in a file or through the textboxes.
  • We don't have time to do testing! : Yes testing is hard and does take time. But finding a bug early on is "cheaper" than when some poor tester finds it after a candidate release . Or even worse when the customer/end-user finds it. It will avoid long cycles of develop-test-correct-retest. When a developer finds a bug , he/she knows the context and can more easily hunt down the bug and eliminate it.
  • It is not our job , we have testers on the team. Why do it twice?: The developer testing is is somewhat different from functional testing (or non-functional testing like performance). In developer testing you primarly want to eliminate the any programming errors. Sure you have some clue how and end-user will use the application, but you're master of the code and therefore have more insight then, anyone where problems lure. So your entry point is the code itself . A functional tester looks at application from the outside (white-box vs. black-box). He doesn't see the code in motion. He only sees the interface of the system. The functional tester will concentrate more end-to-end scenario's that are possible (or that should not be possible) . Also testing throughout the process avoid big bang testing . When you test the smallest parts and continue testing by putting the tested parts together, the chance of (programming) errors coming up later in the process are reduced.

Introducing developer testing and preferably also test automation (for example Visual Stuid Test framwork or NUnit) is not soley a technical matter. You should get the developers to test that their code meets the "their" intentions . There will always be a loss infomation before a letter of code is typed. So system testing remains necessary . Developers should think about what can go wrong with what they're coding, as they're coding it or even before they start coding (TDD). Early detection of errors cost less in the construction phase. System / acceptance test never can reach same coverage of testing. Developers should control quality before shipping next phase (minor for example at check-in or major : release to QA) .

Of course testing alone won't cut it. Testing does not put quality into the code. It just gives insight in the quality of the code (application). You will still need tons of other measures to assure quality code...But that's for another post.

Best regards,

Alexander

Friday, 8 February 2008

GAT : Skeleton Pattern

Hello,

This entry describes another typical scenario where you can use GAT to automate certain VS Solution creation activities.

Driving forces
When developers in your organization want to create a new VS solution for an application , you want to help them in creating a typical structure of a multiple-project solution. You don’t want a describe everything in detail in a document but you want to automate as much as possible and make it available within the VS environment. You want also to add some possibility for customization of namespace and project naming.

Solution
Use the GAT to make a Guidance package that unfolds the “Skeleton” structure. Add some recipe wizards to collect initial information from the user. Install the Guidance Package on the developers machine to make the Guidance Package available in Visual Studio 2008. The developer can choose the “skeleton” from the Visual Studio 2008 new project–dialog to unfold the initial structure of the solution after entering initial values to create the skeleton.

Structure




Attention

  • Guidance package ,GAT template for making Guidance Packages should be stripped to bare minimum before proceeding with own package creation
  • References to assemblies, must exist on target machine (GAC or same folder : Hintpath !!!)
  • Take care of parameter replacements ; In project files (references) and import statements in any code.


Alternatives

  • Copy-paste a skeleton available in a source control system
  • “Pure” VS2005 templates solution with parameter replacement and Wizard extension mechanism

Best regards,

Alexander



Thursday, 7 February 2008

GAT : StarterKit Pattern

Hello,



Making guidance packages GAT (Guidance Automation toolkit) is also making knowledge available for novice users regarding certain processes or technology. This entry I will discuss a typical scenario of how you can make an example application available through GAT in Visual Studio 2008.

Driving forces
You want to make a working example of how a typical Winforms application is made in your organization available for your developers. The developers must be able to run it , learn from it and make changes to it if they want to.

Solution
Use the GAT to make a Guidance package that unfolds the “Starterkit” application. Install the Guidance Package on the developers machine to make the Guidance Package available in Visual Studio 2008. The developer can choose the Starterkit from the Visual Studio 2008 new project–dialog to create the example application.

Structure



Attention

  • GAT template for making Guidance Packages should be stripped to bare minimum before proceeding with own package creation
  • References to assemblies, must exist on target machine (GAC or same folder : Hintpath !!!)

Alternatives



  • Installed example application a demo box
  • Example application in SourceSafe
  • Setup package (msi) of the application with all the sources
  • “Pure” VS2005 templates solution

Best regards,

Alexander

Wednesday, 6 February 2008

First steps with the Guidance Automation Toolkit (GAT)

Hello,


I recently tried out the Guidance Automation Toolkit and its "run-time" companion Guidance Automation Extensions (GAX/GAT - July 2007 CTP) on VS Rosario November CTP image.




The GAT enables you to extent the Visual Studio 2005/2008 experience. Extensibility comes in different forms and shapes but the GAT is geared helping the developer when creating a VS solution. It gives "guidance" in the form VS project or item templates combined with automation hooks (recipes) that can collect information from the developer (wizards) while the solution structure is being created (un-folded).


GAT find it's origin in the Microsoft Software Factory Initiative. The Software Factories provide you with a set of proven practices for building distributed applications. These practices are exposed through architectural overviews, patterns, how-to topics, reference implementations, automated guidance packages, and application blocks. There are several SW factories you can download today ( Web Service (WSF), Smart Client(SCSF), web client (WCSF))

The idea behind GAT is not completely new. A previuos technology in VS2003, the Enterprise Templates was also an effort for rapidly defining the initial structure of applications and to minimize the need to read through a bunch of of white papers, standards, and policies documents.


In VS2005 we've got the new template mechanism (Visual Studio Templates) . The Export template makes is fairly easy to make shareable templates. Actually GAT uses these exported template. What makes GAT different is the way you can hook automation to these templates.


Wojtek Kozaczynski (http://blogs.msdn.com/wojtek/archive/2005/05/02/414129.aspx) has a nice blog-entry describing the origins of GAT.

Yet another technology, called Domain Specific Languages (DSL), is available to extent VS. The DSL Toolkist (in the SDK) allows you to build visual interaction component that can be used from with in VS just like you would for example use a Winform Form designer. You drag & drop the visual elements on the form and code is generated for you. An example in the SDk is a DSL that enables you to visually build a Wizard-like application. So you get a special toolbar and drag & drop the visual elements on your "canvas" and "model" your wizard application. The model then is used by a code generator to produce executable code.

So GAT and DSL Tools both build on top of existing VS extensibility featueres but with more possibility in guidance experience or modelling experience.

Daniel Cazzulino has some thought about the status of developer guidance in realm of GAT, DSL and Software Factories (http://www.clariusconsulting.net/blogs/kzu/archive/2007/01/08/BuildingSoftwareFactoriesToday.aspx)

So I see certainly advantages


  • Productivity can be increased : It includes automation for Visual Studio: with this automation, de-velopers can easily apply guidance in consistent and repeatable ways.
  • Adaptable : It is open and customizable.development leads can customize the factory to meet specific needs.
  • Accelerated start. It provides an effective way for architects and developers to create a high-quality starting point for their application. This means that projects begin with a greater level of maturity than applications developed from scratch.
  • Enforce standards : to enforce standards independent of the solution domain

But I have also some concerns

  • Support : I don’t think so. Is not an official product of MS. It’s from the Patterens & practices group. It is still CTP ... since July 2005. Forum exists but I haven't seen any MS employee replying to questions...(http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=78&SiteID=1)
  • Some (steep) learning curveExamples only on blogs (http://jelle.druyts.net/CategoryView.aspx?category=Blog%7CProgramming%7C.NET%7CGuidanceAutomation) or you have to dissect the WSF/SMSF/SCSF or you have to study the default Guidance package that is produced when you create a new guidance package project.
  • Support for next versions of GAT/GAX once an application has been built with a version of GAT/GAX
  • Mistakes are severely punished :-). You can easily scr*w up your registry (like I did) without a warning. Re-installing GAX/GAT can result in something like this
In that respect Victor Garcia Aprea from Clarius Consulting made a GaxTroubleshooter (http://weblogs.asp.net/vga/archive/2007/12/28/troubleshooting-gax-gat-installation-issues.aspx) but I wasn't able to repair my mistakes with it though. Clarius has also a Software Factory Toolkit (http://www.softwarefactoriestoolkit.net/) but I dare not to re-install it because it is rather invasive . It seems to intervene in the default GAX/GAT installation.

Does someone actualy used al these specific VS features to create a custom Guidance package ? What were your experiences? Like to hear from you.


Best regards,


Alexander