| Sergey's profileSergey ShishkinBlogLists | Help |
Sergey Shishkinsoftware + people 6/8/2009 Architecture.NET Open SpaceThe last weekend I participated in my first open space (anti)conference – Architecture.NET Open Space in Düsseldorf. And I must say: It was my best conference experience ever! There are some results in the conf’s wiki in German. Here I just want to write down some of my observations. A couple of things came up in almost every session:
Discussions were sometimes heated and controversial, but always very inspiring and thought-provoking. I already count days till Archnet Open Space next year. Technorati Tags: archnet09 5/5/2009 Intentional Software DemoI just watched a great demo of Intentional Domain Workbench presented at DSL DevCon about a month ago. Beside the fact that the demoed software frightengly looks like a “silver bullet”, "The Holy Grail” or at least “the future” of software development, it is the first demo of a RAD tool I saw that mentioned automated tests integration. See for yourself, it looks a lot like FIT acceptance tests: Enjoy the full video at MSDN. It’s just awesome! 4/8/2009 Messaging Talk @DNUG CologneYesterday I gave a talk on asynchronous messaging at .NET User Group Cologne. It was a lot of fun for me to speak about one of my favorite topics, and I would like to thank Albert Weinert for this opportunity. The audience was great, we got an interesting discussion afterwards. Unfortunately, I could not manage to attend the “after-party” and continue the discussion ;) I know the topic is very hot now, so feel free to ask your questions and give me your feedback in comments. Here are the slides: Asynchronous Messaging @DNUG Cologne, 07.04.2009 View more presentations from guestfb013b. And a couple of references: Demoed StockTrader news module with messages (see revision 12) Original composite WPF guidance aka “Prism”, StockTrader RI Some OSS messaging frameworks Fallacies of distributed computing Four tenets of service orientation Enterprise integration patterns Technorati Tags: usergroup presentation messaging publish/subscribe rpc 12/3/2008 Data Access Patterns @DNUG CologneYesterday, during the 30th meeting of .NET UG Cologne, I gave a mini demo-talk on the Repository and Specification patterns for Data Access. There were no slides, just code. What Is It All About? I like to write as little code as possible and be able to write as simple code as possible. Especially when it comes to Data Access. This is what I want my Data Access code looks like: var price = new ProductPriceRangeSpecification(300m, 500m); var name = new ProductNameSpecification("Road Frame");
var products = (from p in repository.FilterBy(price.And(name.Negate())) orderby p.Name select p) .ToList(); How It Works? The main character here is the Repository. I tried to keep its interface as small as possible (and it is still the biggest interface in the system): public interface IRepository<T> { void Save(T entity);
void Delete(T entity);
T Get(object key);
IQueryable<T> AllEntities(); } That's really it. The rest of querying functionality will be added through extension methods. Here is where the FilterBy method comes from: public static IQueryable<T> FilterBy<T>( this IRepository<T> repository, ISpecification<T> specification) { return specification.Filter(repository.AllEntities()); } I use extension methods extensively and don't think I abuse them. In this case I clearly separated the contract needed to be implemented and the publicly available functionality built on top of it. Extension methods basically help to build a DSL around a very simplistic object model. And whenever I wonder where a method comes from, I hit F12. Specifications appear on scene in supporting roles every here and there: public interface ISpecification<T> { Expression<Func<T, bool>> GetPredicate(); }
{ private readonly string query;
public ProductNameSpecification(string query) { this.query = query; }
public override Expression<Func<Product, bool>> GetPredicate() { return p => p.Name.Contains(query); } } The beautiful thing in this design is the fact that Specifications are not coupled to the database. They are expressed in terms of the Domain Model and belong to the Domain Model as well. And of course they can be tested against an in-memory implementation of the Repository. Onion Or Cake? All the code sits in a single C# project for simplicity, though is layered well. In classic Domain-Driven Design the Repository abstraction belongs to the Domain layer. I however separate one additional Framework layer, which is a reusable part of the Domain layer across multiple applications and multiple Domains. Both Domain and Framework are kept clear of any infrastructure concerns. The Infrastructure layer is where all that dirty NHibernate details are hidden. But the IRepository interface and Linq do a very good job to protect the application from NHibernate leaking into the Domain layer. Here is what NDepend has to say on that matter: Notice that Unit and Integration tests are separate. Unit tests don't require any infrastructure to be in place, they can be run against pure Domain code. What About Transactions? I intentionally left the Unit Of Work out of the talk. Two reasons for that are the limited time of the talk and some technical problems that I have with the current implementation. So you also won't find UoW and transactions in this code sample. I'm going to make transaction work in the next version. Stay tuned ;) Requirements The code sample is built against the AdventureWorks database. I use NHibernate as an O/R Mapper and Linq to NHibernate for queries. To make NHibernate mappings a bit simpler Fluent NHibernate is used. xUnit.Net is my testing framework of choice. What About Feedback? Download the code and tell me what you think. 11/18/2008 TechEd 2008 EMEA RetrospectiveI'm now back from TechEd 2008 EMEA Developer at Barcelona. TechEd for me is always great experience and Barcelona is probably the best place in Europe to be at in November. This was my third TechEd and, although it wasn't the best one I've been at, I must disagree with people who say this year's TechEd was bad. TechEd vs. PDC This year was special because Microsoft held PDC earlier this year. Although TechEd and PDC overlap in content their goals are different. PDC is primarily for Microsoft to get feedback from the developer community about their new product evolution wave. TechEd on the other hand is aimed to help developers build on Microsoft platform. Taking that into account TechEd is a wrong conference to learn what's new in the Microsoft ecosystem. To learn new buzz-words you should be attending PDC, or just glance over recorded PDC sessions as I did. TechEd is there to get a pragmatic look at Microsoft's landscape from industry leading experts. But anyway PDC steeled from TechEd in terms of content, speakers and attendees. Choose Sessions Wisely When I asked some people at TechEd how do they like it, many have said they could not find interesting sessions to go to, or were disappointed after attending such. Well, that differs from my own experience and would answer: "Choose sessions wisely!" Here is a list of some of my tips to choose a session to go to:
Here is what I've attended (except the keynote and lunch sessions):
Drawbacks In general, this year's TechEd looked a bit cheaper, either because of PDC or the economy situation in the world, I don't know exactly why. Less well-known names, boring exhibition and ask-the-experts booth, poor lunches, etc. Another drawback is communication. For some reason all the portal and communication tools MS builds for TechEd fail. Attendee search was counter-productive. Almost nobody used community groups. There were thousands of interesting people and no way to find somebody you would like to talk to. Some additional Open Space-alike activities would bridge the gap, I think. The German Country Drinks party on Wednesday was my worst time at TechEd. It was a buffet in a bar with very loud dancing music so that everyone had to shout. There was no introduction, no activities. German Microsoft just brought a lot of German-speaking people in one place and provided some food and drinks. Maybe it was a cultural impedance mismatch, but I would expect some networking out of such event, and not just drinking with people you already know. Not surprisingly most of the people gone before 22:00. Summary Anyway, the week at TechEd was great. I learned a lot, talked to many interesting people, and had fun! |
|
|||
|
|