# Monday, 15 October 2007

Commerce-Server-2007-Logo  We're working on a couple of Commerce Server projects right now and common for both of them is the fact that we need to support multiple currencies and languages. "That's easy", you might think, "you just add additional languages to the catalog and you're done". Indeed that is the case for multiple languages but it turns out that supporting multiple currencies is a little more involved.

Requirements

Of course I need to support multiple currencies and languages but also multiple price groups so I can have different prices in countries using the same currency, say Spain and Holland where both use euro. Also I need to support pretty prices, i.e. the business user can specify the price like $9,99 or kr 5,95. I don't want to link a single currency to a particular country, e.g. I want Danish customers to be able see prices in Danish kroner as well as euro (the Danish euro price and not the Spanish one as they may differ).

Finally I need to support BizTalk integration with an ERP system with an internal category structure which makes sense to the business users and an external category structure for retail customers as defined by marketing. Of course I want all this to fit well in the Commerce Server way of doing this without compromising architecture and maintainability.

Requirements summed up:

  • Multiple languages
  • Multiple currencies
  • Price groups
  • Don't link currency to country
  • Internal hierarchy and completely different external hierarchy
  • Fit into CS way of doing things

Commerce Server Support

There are a number of features in Commerce Server which can help me support my requirements it's just a matter of using them in the right fashion to achieve the desired end result. Multiple languages are supported right out the box simply by specifying on each catalog which language to support. From there on in you can switch language when you're viewing any item in the catalog and edit text in whichever language you want. The catalog schema is fully extendable so you can use that to add a new field for each currency or price group you wan to support. We have virtual catalogs which allow you to move a product from another catalog into the virtual one and override values there. Finally we have catalogsets which is a way to bundle catalogs together and associate them users or groups.

In summary we have the following tools to work with:

  • Multiple language support on catalogs
  • Extendable catalog schema
  • Virtual catalog for overriding field values
  • Catalogsets to associate catalogs to users

What Not To Do

Now you could go ahead and use the multiple language feature to support multiple currencies but there are two problems with that: 1) Numbers are not overridable like text so you can only specify a single value across languages, you can remedy this by creating a text field and override that but then we'd be working with text values instead of decimal values and you would need to make modifications to the standard pipeline components which are looking for the ListPrice field on the products. Additionally you'd have to come up with a naming scheme for languages if you want to support multiple currencies in the same country essentially creating redundant text data because of it.

As a better alternative we could create new fields for each currency but it would break our requirement of maintainability as we'd have to create a new field each time we want to support a new currency. Even worse we'd have to come up with a naming scheme to support the same currency but in different countries, e.g. Spain_EUR_ListPrice, Holland_EUR_ListPrice, and come up with code which can support it in our pipelines. Interestingly this is one of the scenarios Microsoft is pushing needless to say that I don't agree in the least with this recommendation. Also each catalog in Commerce Server has a base currency specified which would be rendered useless or even worse would confuse the business users.

Using multiple fields would however make the integration story very easy because we simply map the fixed fields coming from the external source to Commerce Server.

What To Do

This is how I propose we solve the problem using virtual catalogs. Everything needs to be imported into a single base catalog which won't hold any price information, optionally you could use the base catalog for the currency which the company operates in internally but for our purposes I'll leave it blank as to only have a single model for multiple currencies.

Virtual Catalogs for Currency and Price Groups

Remember that each catalog in Commerce Server has a currency configured we'll leverage that by creating a virtual catalog for each currency we wish to support additionally we'll need to go one step further to support our price groups. In order to do that we'll extend the catalog schema with a field called price group which along with the currency will identify the correct catalog to look for when displaying products to the retail customers and when BizTalk is updating. To make the solution more maintainable we do a single "include all"-rule for each of the price group catalogs which will allow the BizTalk developers to assume that the product will always be present in all currencies, of course you can elect not to this but it will need a higher level support either manually or in the integration piece.

Base catalog - virtual catalog

Now I mentioned include rules in passing above so allow me to elaborate on them here a bit: To include products, variants, or categories from another catalog in a virtual catalog we do it by creating virtual catalog rules. We have four types to choose from: Include everything, include category, include product family, and include variant; for each of those you can specify that we're excluding instead of including. There's a fifth rule type which I'll mention for the sake of completeness though I won't use them in here: pricing rules which is a way of adjusting prices in the catalogs. In summary I chose an "include all"-rule to support my price group catalogs above which will bring in all categories, products, and variants which are imported by BizTalk.

Support for BizTalk Integration

Whenever BizTalk imports a new product it needs to lookup the correct price group catalog for each price group on the product and update accordingly while this makes the integration piece a little more complicated it allows the Commerce Server developers to use the product in the intended way.

Virtual Catalog Considerations

For maintainability it's important to only update price information in the virtual catalogs we've created. Updating anything else will break the override chain which means that future updates to say product description will not populate to the virtual catalogs in which we overrode the value. It may be what you want but you need to be aware of this behavior.

Custom Hierarchy for Retail Customers

Remember that we want to provide the business with the opportunity to completely customize the category hierarchy for the retail customers while maintaining an internal hierarchy which makes sense from a business point of view. Now we have the business view of things in our Import catalog which is reflected in our price group catalogs as well due to the "include all"-rule we've added to the catalogs but we need a way to do a different hierarchy for our retail customers.

Unfortunately we can't do an "include all"-rule because that effectively includes categories as well and once you've included a category you're effectively stuck with it in your virtual catalog, there's no way to remove it without removing the products within as well. This means that we need to do include rules for every product family we want to include which provides the ultimate flexibility but also requires more from the Catalog Manager tool. Basically you can do with Catalog Manager but that doesn't mean that you should :) The workflow for adding an include rule basically involves opening the virtual catalog, clicking rules, then add new rule, search for the product you want, select the product, click next a couple of times, and then you need to add it to your new category in the virtual catalog which is another couple of steps. Imagine doing that for 4000 products :) Obviously some work need to be done on the Catalog Manager to make the workflow more smooth, maybe drag and drop within the catalog hierarchies or some kind of two-pane UI with the two catalogs on either side. In any event something needs to be put into place to handle the workflow but that's for a different post.

With that done we have something like this:

Multi-currency-and-pricegroup-with-commerce-server-2007

Finally we do a catalogset for each required user segment to line up the catalogs for the correct users programmatically. Once that's done we should have all our requirements covered.

In Conclusion

Working with Commerce Server to support our requirements is essential even though it might involve a bit extra work to get there. We could've added an extra field for each currency we needed to support but that would have cornered us and ultimately created a less flexible system which might not support us in the future. We want to work within the restraints of Commerce Server without jeopardizing our systems design which in the end would render the decision to go with Commerce Server useless.

With an integrated solution it's important to keep in mind the opportunity which we have to keep some of the ugliness found in the systems we're integrating with at our system boundary enabling us to stay with a nice and clean design.

As with any standardized product it's important to know the tools available to us and how to use them in the correct fashion. Our little exercise above shows some of the capabilities of the catalog system and how you could leverage them to achieve a flexible solution while not compromising the design.

posted on Monday, 15 October 2007 11:15:56 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Thursday, 11 October 2007

It turns out that I was lying when I proclaimed my upgrade to DasBlog 2.0 a success as I had a small bug. Apparently you need to change a config value in web.config which pertains to how ASP.NET 2.0 handles cookies otherwise you cannot use the Remember Me functionality when you login to view config, referral stats, etc.. It even says so in a friendly comment in web.config but of course you need to look for it :)

Uncomment <httpCookies httpOnlyCookies="false"/> in web.config and you're good to go. Remember this only applies if you're running it under ASP.NET 2.0 which is always the case with DasBlog 2.0 but not so with 1.x.

posted on Thursday, 11 October 2007 14:13:18 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Wednesday, 10 October 2007

You're probably already heard the buzz about Microsoft releasing the code for the .NET Framework. I've held my tongue on this subject for a while because I wanted to formulate my own opinion on it instead of just doing the obligatory YAY-post. My stance on the subject is not as glowing as others I've seen during the past week.

In many ways I'm more excited about the new MVC framework than I am about the release of .NET Framework source code. Sure it's great to be able to step into the implementation of some class from the BCL but we've had that ability forever with Reflector. It's not THAT often I've had to bring out the big guns to debug a problem; in 99,9% of the cases the problem is not with the framework itself it's with our custom code. I fear that some people will start hunting for bugs in the framework instead of sitting back and actually considering the bug they're seeing before trying to debug it.

I'm not sure that the problems with patent infringement as outline in this post will be a problem but it certainly is something to keep in mind with the litigious environment in the United States.

I don't mean to belittle Shawn Burke's effort because he certainly did a very cool thing in getting this thing out there and he's been working on it on and off for a long time. He actually blogged about it the first time back in 2005 albeit in a less ambitious scope also check out his follow-up about the actual release. Much more interesting is the fact that the system they've set up will work for any product group which want to release source for their particular product; we probably won't see the source code for BizTalk floating around out there but there certainly are some interesting implications in this if their idea is carried beyond the framework itself.

What I like about this new development is the fact it's a manifestation of a more open and transparent Microsoft, we've seen it for a while now that the company is more open via the blogs and more recently with the open source announcements for ASP.NET AJAX Control Toolkit and IronRuby. The idea that Microsoft would release source code a few years back was preposterous but now we're seeing much more effort to support the community around the products which in turn I'm sure will bleed into the community itself and create more open source initiatives on .NET than what we have today.

posted on Wednesday, 10 October 2007 09:30:57 (Romance Daylight Time, UTC+02:00)  #    Comments [3] Trackback

I first heard about the new MVC paradigm for ASP.NET coming form Microsoft at JAOO when Oren Eini mentioned it at the MonoRail talk at JAOO. At the time not much information about the new frontend framework was available but with Scott Guthrie's announcement of it at ALT.NET information is starting to trickle out. Scott Hanselman has even more information on it including full presentations of actual code from the conference (done in Silverlight naturally).

While MonoRail has taken these ideas and run with them for a while it's great to see Microsoft stepping in with their own implementation as I strongly believe that that is the only way to create the adoption rates needed for people who need to get their job done.

I'd like to adopt a framework like MonoRail but in doing so I'd effectively cut customers and team members from access to third party controls built for WebForms and even worse we'd have to invest heavily in training new hires on MonoRail before they can effectively participate in projects when in fact I could spend that time training them on technologies which effectively bring much more value to the table like Commerce Server and SharePoint.

posted on Wednesday, 10 October 2007 09:05:21 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Tuesday, 09 October 2007

VisualStudioLogo Have you ever spent more time looking for the item you wanted to add to your project than actually writing the code for it? I've spent plenty of time not being able to find that particular item in my Add New Item dialog because Microsoft just threw everything in there with a huge pitch fork.

Luckily for us K. Scott Allen found this annoying as well and went digging in the Visual Studio project templates and found that he could sort the list using a little Powershell script he did.

So he went from this to this:

clip_image002image

Download his Powershell script for sorting the Add New Item dialog and remember to grab Powershell as well to make it go. Please note that Powershell has policies in effect which means that you have to allow the script to run. I simply did a Set-ExecutionPolicy Unrestricted and then ran the script. I know I shouldn't be allowing all scripts to run but I don't really use Powershell for anything serious at this point so it doesn't matter.

Thanks to Daniel for this tip.

posted on Tuesday, 09 October 2007 18:23:54 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 08 October 2007

As I mentioned in my summary of the last usergroup meeting we have a little more mainstream topic for the next meeting: Object relational mapping (ORM) and LINQ.

The next meeting will be held October 24th 19:00 at Ditmer A/S. Please note that we're not doing the last Wednesday this time around due to scheduling conflicts with the speaker. As always the meeting is open to anyone who wishes to participate.

Please leave a comment to sign up for this meeting

Practical Information

The meeting will be held:

Wednesday 24/10 at 19:00

at:

Ditmer A/S

Trindsøvej 9

8000 Århus C

Map

Agenda

Usergroup News

To keep everybody inform on the various stuff going on we'll begin with a short update on planned sessions, new initiatives, and so forth. This will also be your chance to give us some feedback on what you would like to see at future meetings or voice your interesting in presenting a subject matter yourself.

Object Relational Mapping and LINQ, Søren Skovsbøll, Ditmer A/S

O/R mapping is a widely used discipline in the .NET world. Only now Microsoft is entering the fray with two O/R mappers: LINQ to SQL and later ADO Entity Framework. LINQ to SQL has garnered a lot of publicity primarily due to the new query language which is available inside C#, VB, and other CLR languages.

Getting started with LINQ to SQL is easy but when your applications become more complex than the samples Microsoft provide you'll need to know what's going on under the hood and what an O/R mapper really is.

We'll dive into which patterns also all O/R mappers use: Identity Map, Unit of Work, Data Mapper, etc.. LINQ to SQL is a simple O/R mapper in that regard but making up for the fact are the rich design time tools which comes with Visual Studio 2008.

Søren Skovsbøll is  a development consultant with Ditmer A/S. He started working with O/R mapping when NHibernate was in its infancy with the 0.3 release. Mappers which will let you keep your domain model nice and clean is in high regard with Søren and he's even built his own O/R mapper from scratch called Matterhorn which was the first to support generics. He publishes a blog at Skarpt.dk.

Break

Tour de Ditmer

Morten Ditmer, the CEO of Ditmer, will do a lap around his company and enlighten us on Ditmer as a company, their values, and how they go about building software in Ditmer.

The Nutcracker

Have a problem or a topic you'd like to discuss? This is your chance to get the opinion from a bunch of intelligent people working with .NET. Would you like to demo a cool tool? Show a web site which has changed your life? It's all up to you, if you find it interesting chances are that others will too. So feel free...

Looking forward to seeing you and remember not to be shy even if this is your first attendance :)

posted on Monday, 08 October 2007 15:59:29 (Romance Daylight Time, UTC+02:00)  #    Comments [30] Trackback

He's no Singing Salesman but he sure got talent. Without further ado I give you hands farting Bohemian Rhapsody. (Blame our sales guy Robert for this one :))

posted on Monday, 08 October 2007 14:03:14 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 01 October 2007

To bring the members of Aarhus .NET Usergroup even more benefit, I've created a group for us on LinkedIn. Feel free to join.

posted on Monday, 01 October 2007 21:27:35 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Sunday, 30 September 2007

jaoo2007_1 JAOO is well over with and I'm just starting to get my head on straight again. I started out with my Going to JAOO 2007 post in which I wrote a little bit about why I was going to JAOO and what I expected to get out of it. In this post I'll try to answer that question and contrast JAOO with Microsoft TechEd the only other conference I've ever attended.

The conference is general felt a lot less cramped than TechEd which makes sense considering that TechEd accommodates around 4000 people while JAOO only does 1200. JAOO has a definite community feel to it, it's hard to explain but everything seems a little less tightly controlled and planned, a little more laid back if you will. Take for example the evaluation of a session: At TechEd you'd go to a computer and enter in a number of criteria to get the job done, at JAOO you place either a green, yellow, or red piece of paper to do the same. You definitely get a little less information per person but I'd wager that the JAOO folks get feedback from a lot more people than they do at TechEd. Same thing goes for the conference web site, the TechEd site is very professionally done with lots of gimmicks while the JAOO site is simple and functional. The two sites compare roughly like Hotmail and Gmail, one is pretty while the other is functional :) Now one is not necessarily better than the other, they are just different conferences with different audiences in mind. I definitely enjoyed both. One thing TechEd has going for it is the fact that they get session slides online immediately after the session is done which is nice for people like me who like to blog about the session. Essentially JAOO requires more from my note taking than TechEd does because I have the notes done for me at TechEd :)

My first reason for attending JAOO was to get a more diversified picture of software development. Naturally JAOO delivered on this in a big way. Simply put a great many of the big thinkers in OO were present at JAOO and I think it's safe to say that most of them are found outside of the .NET space. Don't get me wrong a lot of stuff is going on in .NET and in many cases .NET moves along more quickly as a whole because Microsoft controls the entire stack as it were. It was great to attend a session on enterprise frameworks and have Martin Fowler sitting right behind me asking questions of the panel. I'm glad I wasn't a speaker at that particular track as they must have felt the squeeze of having Martin Fowler present asking critical questions.

The content of the sessions was very different than what you'd get at TechEd. TechEd is basically about selling the latest and greatest Microsoft technology to the development community and while it's great to have one of the guys who actually coded ASP.NET AJAX sitting there answering questions it's still just a sales pitch. Again JAOO feels very different because we have very feel people selling an actual product. In many cases it's more about the ideas behind products than the product themselves making the content much more relevant. I'm convinced that the stuff I take away from JAOO with regards to architecture, frameworks, and methodology will be applicable in three years time while the same cannot be said about my knowledge about SharePoint 2007 and ASP.NET AJAX which I took away from TechEd last year. Technologies simply become obsolete too rapidly for that to be the case.

A couple of sessions stand out from the ones I attended: Hamilton Verissimo and Oren Eine did a couple of sessions together on the Castle project, specifically on MonoRail and ActivePack both of which were very interesting. I really like the alternative way of thinking about creating web applications and doing data access. MonoRail seems very interesting an I'd love to be able to roll it out on a project but I don't see it happening any time soon unfortunately, Active Record on the other hand might be something I can get out there soon but again a product like LINQ is something hard to ignore. The last sessions that stood out was Applying Craftmanship by Pete McBreen simply due to the fact that he presented the topic so well, he was funny and had some great points as well. Of course The Journeyman's Tale stood out as well, unfortunately it stood out like a sore thumb :)

So what is the verdict? I would definitely go to JAOO again and I firmly believe that JAOO is a conference you can attend every year without feeling that content is being repeated. For TechEd I'd say that that is not the case. With a product focus like is the case with TechEd new things need to happen with the products for the content to be different, this year and last years TechEd look pretty similar to me because not much has happened since last year product-wise. One thing I learned this is year is that with the massive amount of content you need to absorb at a conference taking notes on a piece of paper and then converting those notes to blog posts later is close to impossible. I just barely made it last year and this year I got swamped the

posted on Sunday, 30 September 2007 21:15:58 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

We had little over ten people turn up for the meeting and we had great fun. I admit that the topic was rather esoteric as ESB, SOA, and BizTalk just doesn't apply to all that many people out there, especially in Denmark. ESB and BizTalk was the second part of our SOA topic and I think it rounded the topic off in a nice way. For future meeting we'll try to keep to topic of the presentation a bit more mainstream. Also the next time I plan a meeting I'll make sure not to collide with a major conference in town like JAOO. Having a usergroup meeting right after a full day of conference is a tall order, I know I went there straight after JAOO, I might not have been my most coherent self and it might have affected the turnout as well.

A big thank you goes out to Klaus Hebsgaard and Kristelig fagbevægelse for getting a nice space for us to hold the meeting, probably the nicest yet, and some very good sandwiches too.

Like always we started out the meeting by summarizing what the core group has been up to since last time. First of all we've been busy with getting new talks and speakers together and I'm proud to announce that we've got the next couple of rounds together at this point. I expect that we'll announce new meetings much earlier than we've been doing up to this point to allow people more time to sign up for the meetings. The topic of the next meeting is Object Relational Mapping and LINQ by Søren Skovsbøll and will be held at Ditmer A/S at October 24th at 19:00. Please note that we're not doing the meeting the last Wednesday of the month this time around due to scheduling issues. I'll do a separate post on the next meeting when I've got the last couple of details sorted.

We're planning a couple of meetings which are aimed at the inexperienced .NET developer because we do have a number of you attending the meetings and we'd like for the group to bring something to the table for everyone. As a follow up to that the first meeting we're trying to get a code camp together with the intent of teaching you how to create a .NET application from ground up the right way, or at least the way we feel is the right way. This is not only for the inexperienced developer as we need a number of experienced developers who can act as a kind of instructor at the code camp helping out with questions. I'd like to gauge the interest in this concept so please write me an e-mail if you're interested in participating either to learn something as an instructor.

We're still working on the web site for the group. All the technical stuff is basically done, we just need text and the pretty parts to be done as well.

Like previously we did a quick lap around the attendees to get a feel for who was present. We had a couple of new guys, one of whom had asked me before the meeting whether he could attend even though he hadn't been the previously. So I I'd like to take this opportunity to clarify that Aarhus .NET Usergroup is completely open to all who wish to participate regardless of previous attendance. We'd like you to attend every time of course to ensure continuity but it's completely up to you. You simply sign up to the meeting you want to attend and that's it. If you've attended a meeting previously you'll receive an e-mail whenever a new meeting is scheduled so you have the chance to sign up before anyone else.

Troels Riisbrich Underlien gave an interesting presentation on Enterprise Service Bus and BizTalk. The presentation focused on ESB as a technology and less on BizTalk although he gave us insight into some of the inner workings of BizTalk because they were at the heart of the ESB solution he outlined later on. Troels gave us information on how to go about building an ESB on BizTalk, the Microsoft guidance, and probably most interesting of all how Vertica has created and implemented an ESB for Bestseller. Download the slides if you want to either recap or get a feel for the content of the presentation. Essential an ESB is the way to go if you're considering doing SOA that's my personal take away from the presentation anyway. If you what want is a asynchronous, scalable and flexible solution there really is no way around the ESB as a concept.

After a short break and chatting in the hall ways we went back to the regularly planned programming where Holger Brøns Jensen the CIO of Krifa did a brief presentation on the IT organization of Krifa and the challenges they're facing. Krifa is definitely facing some interesting problems at the moment as they're moving their entire platform to a service oriented architecture, of course they have a lot of legacy which still needs to work so the last two meetings have basically been perfect for their needs. Krifa has done some very interesting stuff in the past and was off to the IP telephony races very early on which provided them with a nice head start on the callcenter side of things compared to their competition. Thanks to Holger for a very informing presentation.

Finally we had the unstructured part of the meeting which we call the Nutcracker. People usually refer to this part of the meetings as the most interesting as it opens up for discussion on various topics. we had a couple of good discussions this time around: Klaus had a problem getting their ESB to talk to WCF and we steered him in the direction of a possible solution. We even got Visual Studio fired up to show him the default binding profile for ASMX, of course I couldn't help but get sidetracked just a bit so I demoed a couple of features of ReSharper a couple of which have actually found their way into Visual Studio without my knowledge making for an interesting demo. Following that I wanted to get people's opinion on ORM and which they use themselves. I didn't really get that one off of the ground but the discussion took an interesting twist regardless so all in all a success.

Thank you to all who attended this meeting. As I started out by saying we're aware that the topic was esoteric and we'll try to keep broader topics of interest in mind for future meetings. I'd like people who plan to attend in the future to think about topics for the Nutcracker so we ca get the discussion going, maybe even prepare a short five minute talk to get the topic going.

posted on Sunday, 30 September 2007 13:25:16 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Wednesday, 26 September 2007

jaoo2007_1 When you are communicating with your customers you encounter the fact that you have a completely different meaning for the same words. Software craftsmanship is needed because most software is painful to use. With a few exceptions most software that people have to use as part of their job is abysmal. Corporate applications are in the dark ages and seem to be getting more baroque and unmaintainable. We need to find a better way to deliver working software that is a joy to use. Some progress has been made over the recent years but we still have a long way to go.

The concept of software engineering is nearly 40 years old. It was born in an era of optimism. Man was going to walk on the moon. No matter what the problems there was going to be a technological fix. From manufacturing it was a short step to software factories.  Factories are a great concept but it's not really a place where people need to think. Outsourcing is not successful, we're an industry dominated by anecdotes.

Standard software engineering practices seem to be designed to cause failure. Projects manager do not understand technology. "Senior developer" requires only 5 years of experience. Project plans ignore variability. Waterfall is "ideal". Testing comes last. People forget to think.

Craftsmanship is a necessary because software development is a high skill task. Talent and expertise are require to deliver software. Mechanical metaphors actuvely proven us from delivering great software that user like to use. Craftsmanship is a way to connect passion with excellence. But enthusiasm needs to be guided by experience. Apprenticeship is a traditional way of gaining mastery in many complex fields. A key part of this is to learn from other people typically from learning on the job with an experienced person. This only works for static environments because people need to agree on the content of the teachings while often the companies are pushing to get knowledge on new stuff.

We can still use the ideas from the apprenticeship programs. The basic idea is that a trainee should contribute to a real project. The best place to start out new guys is in maintenance of existing solutions because the turn over time is much shorter. We need a tool changes to allow experienced developers to review the patches before they are committed.

Too much software is  developed without appropriate adult supervision. Alan Cooper hinted at a missing role in projects, there are plenty of workers and managers, no foremen. Supervisors are a key part of most organizations. We need to find a way to retain experience and expertise. We need to encourage senior technical roles that remain active on projects. Skilled developers should not have to transition out of technical roles to advance their careers. Team leads need to take active responsibility for the quality of what their people produce. Team lead need to be very active in coaching their people to improve their skills in all areas.

The sad fact is that many people on projects do not even know the basics of their day job. Small wonder that projects are stressed. Comp sci and sfotware engineering degrees do not seem to be effective. Not a popular sentiment but how else do we explain how bad software is these days? Part of the problem is that academia does not see that is has the responsibility to train the software developers. Amusing as it may be, the open source community is much better at training than most corporations. Once key difference is that corporations do not have known individuals who are responsible.

How can we developers improve ir skills? The pramatic programmers suggested that we all learn a new language every year. Reading books and code is also an effective strategy but you have to have the attention of applying the new skills to a significant project. Working with others however remains the best way to learn new stuff. Another thing that has to change is the way we think about software. We spend too much time writing new stuff instead of improving on the existing stuff.

Software is embodied knowledge and we have to act accordingly but it is really the members on the team that matters. Multi-generational teams are a good starting point. A team of twenty somethings has a great energy but old developers bring a breadth of experience to the task. Handoff to a maintenance team never works well. The team that created the application need to stay together to maintain and create future releases. Documentation is useful but it has to be written by the experts, for the experts. Anything else downs the team in paperwork.

You need senior people in technical roles with the authority to make decisions. Managers without technical skills should be transitioned out of IT roles. Many placed have a high turnover of techical staff. Technically competent line managers provide visible evidence that development career path.

Most projects are badly mismanage. Few projects allow time to think about the issues. Project requirements are rarely questioned. Manu projects are good response to the wrond problem.

WE need project managers to report to the project lead. The person who is responsible for the success of the project needs to lead the project. Admin staff can handle tracking the project schedule. The lead needs to focus on the big picture items and whether the entire team working well?

We need to evolve our designs instead of reinventing designs from scratch. We need more continuity in our teams. That the lead architecture leaves the company should not result in a complete rewrite of the architectures. Improvement comes from spending a lot of times with users. Many ideas that look like neat fail in the real world. Initial failure is OK as long as we learn from it. Better decisions are made by practitioners.

Having deep domain knowledge means you have to ask your users. You are not your user. Especially when you know what your user needs; remember that craftsmanship comes about through humility. We can always learn more from our users. Software is meant to be pleasant to use, if it isn't we are doing something wrong. We need to commit to improve our user's day job.

Classical books that all developers must read:

Mythical Man-Month

Prgrammers at Work

Code complete

The pragmatic Programmer

Agile Software Development

Lessons Learned in Software Testing

About Face

posted on Wednesday, 26 September 2007 16:06:57 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

jaoo2007_1 ActionPack is the frontend part of the Ruby on Rails framework and was derived from a commercial project 37signals did called Backpack. The guys at 37signals had an idea for a commercial project and didn't want to build it on top of the stacks common three years ago. Features are added to Rails as they are needed in commercial projects. A lot of plumbing was required before Rails at the time of its inception. With Rails 50 lines of code is reduced to 3. The change in thinking comes from going from explicit definition of your intent to implicit definition or convention over configuration as is the mantra of Rails.

Routing decides how we get from a URL to a piece of code. Routes are defined in a file called routes.rb which can be edited as you see fit. You don't have to configure routes you can go by convention alone, if you have an action (a method) on a class you can specify the path in the URL and the routing system will figure out which piece of code to execute. URLs are treated as sitename.com/:controller/:action/:id (the : denotes a variable) default and that's make makes the magic happen. Routing is basically URL rewriting. Everything is configured using Ruby, XML is apparently not something they like on the Ruby side, I kind of get where they're coming from too :)

View Context is a lot of different thing, but basically we're talking about how data from the request is accessed in the various parts of the framework. You have view contexts for template params (page scope), variables* (request), flash (something needed for a short time between redirects), cookies, no application scope.

Everything is bound together by name by default but you can override the default behavior by using the redirect_to or render keywords. Redirect sends a 302 to the browser and sends the user to a different form. Render renders a form in the same folder. render :partial is basically server side includes whereby you include one piece of UI into another.

Of course ActivePack has Filters like we were introduced to earlier in the MonoRail talk. Filters are methods that you want to be called prior to or after the action. You can use filters for authentication, authorization, logging, etc.. You defined them on the controller itself by specifying a before_filter :action. You can layer these guys to do different stuff if you need to. verify is a before filter you use to specify that a method can only be accessed through a post for example.

Rendering render :action, render :partial render :template. ERB methods is code you can use inside your templates. @ denotes an instance level property. Instance variables are automatically available to you in the view (HTML). You basically place the code inside <%%> tags like we're familiar with in good old ASP. h() HTML escapes text and u() URL encodes the string.

Formatting helpers are encapsulation of general purpose tags you can use in your HTML. You can use these for formatting dates, numbers, currency, build forms, etc.. Examples of helpers are form_tag which starts a HTML form, text_field which outputs an input, submit_tag which outputs a submit button for the form. They will create both a name and an id for JavaScript compatibility.

Layouts are the Ruby on Rails version of master pages which enabled you to get a unified look and feel for you web application.

posted on Wednesday, 26 September 2007 14:03:29 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

jaoo2007_1 A software practitioner's adventures in pursuit of excellence. Being a personal account of one practitioner's encounters with fellow travelers and what he learned therefrom; claiming no particular authority or qualities, but aiming to arouse his colleague's curiosities on the subject matter. What is our work like? Our skills depend on sophisticated knowledge that your clients usually prefer to remain ignorant of. We've acquired most of your skill and knowledge through practice, imitation or mentoring rather than formal training. We work on complex projects that require a plurality of disciplines working in complementary manner. We have a professional interest in social networks.

Our work, while taken for granted, often forms the very underpinnings of your age's society. Yet we are the subject of great pressure to lower your wages, increase our performance.

What other professions read like that? Cathedrals builders in the 17th century.

Ridiculously brief history of journeyman's organizations: Craftsmen organize in associations (guilds) as early as ancient times (2000BC) in all parts of the work. Form the end of the XIth century, Europe's binge of Crusades and Cathedrals yields a body of knowledge. Trade associations rooted in the cathedral builder lore are suppressed through the Middle Ages, during the rule of associations rules from the top (bosses' associations). Clandestine worker's associations stabilize into the European compagnonnages from the XVIIth century.

Compagnonnage is a traveling worker's associations. Craftsmen pool money as mutual insurance against injuries, illness, lean times. Learning is from each other, and on the job. Societies preserve and pass on traditional skills and knowledge. Rituals , legends, and symbols structure teaching.

Industrialization and war influences compagnonnage is outlawed in France in 1791 (repealed in 1864). In parallel, industrialization and mess education compete effectively with its traditions. The two wars of the XXth century disintegrate the network of societies, leaving only splinters.

With the rapid changes of IT today structuring our like the journeyman form can be a good way to ensure that the fluent body of knowledge is passed onto new members of our profession and indeed keeping up with the changes themselves.

As you can probably gather at this point is that this session was pretty much a self promoting one in which Laurent Bossavit primarily talked about the history of the journeyman history and his own experience with the journeyman concept, getting invited into the organization, and learning how it worked. The journeyman organization to me is something that doesn't apply very much to a country like Denmark. His premise was basically that we are under pressure of lower salaries all the while being more effective is just not as big a problem as in his home country. The journeyman concept to me seems like an archaic way of organizing when we have concepts like usergroups and other community events; basically the journey man stuff seems to be overglorified version of that same concept.

So really not my kind of session and I see a lot of people agreeing with me, there's a lot of voting with the feet going on as I type this.

posted on Wednesday, 26 September 2007 12:45:19 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

jaoo2007_1 I wanted to know more about alternative web frameworks out there. One such framework is MonoRail which is part of the Castle project like ActiveRecord which Oren and Hamilton spoke about yesterday.

MonoRail is a web framework which uses MVC and is built on top on ASP.NET. ASP.NET != WebForms. WebForms technology is built on top of ASP.NET like MonoRail and includes ViewState, life cycle, page structure, etc..

MonoRail was inspired by Ruby on Rails' Action Pack. It's not a direct port, however, it has its own identity and is not opinionated like is the case for Ruby on Rails. The mail goal of MonoRail is to separate concerns and getting rid of repetitive and tedious code. Controller => Model => View => User input => Controller.

Like with ActiveRecord a wizard is triggered when you create a new MonoRail project, also including the test project for TDD purposes. A lot of stuff is generated when you create a new projects just like you'd see in Ruby on Rails. Everything is spliut in Content, Controllers, Models, and Views folders. Content is for CSS, Javascript, stuff like that. The controllers folder is subdivded into a folder for each concrete controller.

All Controllers inherited from BaseController and has a number of Actions which are basically instance methods. View Engines. MonoRail has a number of ways of writing views, the default is NVelocity. You simple and complex ViewEngines, Brail for example allows for Boo code and the full power of .NET in the UI while NVelocity only provides a simple if statement. Layouts are outer views, the inner view is what the controller deails with. You specify the layout by way of attribute. The lauout contains the actual HTML while the inner lauout contains the dynamics parts of the UI. Filters is code than runs before or after specific pieces of code, e.g. you can use filters to change the theme of a site. Again attributes are used for associating the filter. Helpers is something that is made available to your View and abstracts away common HTML snippets, e-g- $Url for creating links. ViewComponents is a more elaborate way of creating stand alone controls.

SmartDispatcher allows you to bind the actions of a form directly to an Action (a method) on the controller, you only have to inherit from a different basecontroller to have this work. FormHelper and the DataBinder are for creating complex forms and you use them to bind to a specific class. You use the an attribute in concert with FormHelper to state what your type is called and to bind to HTML by $Form.TextField("customer.Name") and then you automatically get the customer served up with the correct values once you post back. Automatic Form-Validation is done by decoating the properties of a particular class with validation attributes. To trigger validation you simply say so on the action.

Combining the rest of Castle to Create Enterprise Applications. Castle is full of independent projects you can use the parts you like. The Windsor container is the most advanced of the bunch in comparison to Spring.NET, ObjectBuilder, NInject etc.. Castle Facilities provide integration to other products like IBatus, ActiveRecord, and more.

MonoRail is an organization of services. If you want to change the way MonoRails handles things you can change the corresponding service.

Not as well documented as WebForms. Has a learning curve. No designer support. It is easy to fall into the pit of success because MonoRail leads you in the direction of good design. Microsoft is working on something similar for the future and it should be about to be released in beta.

What does all this boil down to then? to my mind there are a lot of very good ideas in MonoRail but it seems to me that there are a lot of nook sand crannies to know before you get going. Oren's argument against this was that in the long run you will benefit from MonoRail because it makes it easier to fall into the pit of success. I certainly agree with that but there are a number of draw draws that I see. You loose the ability to do anything with SharePoint for example because it operates in the WebForms world, also you loose a lot of third party controls which are also built for the WebForms. It's encouraging to me that Microsoft is working on something similar because that will garner the widespread support needed to grow a third part business around a web framework based on the MonoRail principles.

posted on Wednesday, 26 September 2007 10:38:16 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback

Remember that ANUG is holding a meeting tonight where the topic is BizTalk and Enterprise Service Bus. Read more and sign up.

posted on Wednesday, 26 September 2007 09:13:41 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback