October 2007 - Posts
Oslo - Future Direction of Microsoft BPM Platform
During the keynote of the SOA & Business Process Conference, Microsoft has announced the future directions in its BPM strategy with Oslo - a multi-release set of technology investments across Application Platform for building service oriented and model driven applications.
There are five primary areas of investment targeted by “Oslo”:
- Server. Microsoft BizTalk Server “6” will continue to provide a core foundation for distributed and highly scalable SOA and BPM solutions, and deliver the capability to develop, manage and deploy composite applications.
- Services. BizTalk Services “1” will offer a commercially supported release of Web-based services enabling hosted composite applications that cross organizational boundaries. This release will include advanced messaging, identity and workflow capabilities.
- Framework. The Microsoft .NET Framework “4” release will further enable model-driven development with Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF).
- Tools. New technology planned for Visual Studio “10” will make significant strides in end-to-end application life-cycle management through new tools for model-driven design of distributed applications.
- Repository. There will also be investments in aligning the metadata repositories across the Server and Tools product sets. Microsoft System Center “5,” Visual Studio “10” and BizTalk Server “6” will utilize a repository technology for managing, versioning and deploying models.
For us Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) developers, this means that Microsoft sees a great part of these technologies in its BPM platform vision, and will continue to add features to enable more scenarios can be tackled with them. Personally, I think that my own investment in these technology over the last couple of year was worth it!
[from: Directions on Microsoft - Messaging, Workflow Roadmap Announced]
Enjoy!
Acropolis Out, WPF Composite Client Applications in!
Back in June 2007, during Teched Orlando, Microsoft has announced the new Client Application Framework: "Acropolis". In the mean time, the patterns & practices team has announced that there are no plans for future releases of CAB and the Smart Client Application Block, and the support for WPF in CAB will be limited to Winforms Interop scenarions only (covered in SCSF May 2007 release).
As many incubation project in Microsoft, some are decided to be closed, as well as the Acropolis project. Yesterday, The Acropolis team has announced that the core Acropolis concepts will be rolled into future .NET Framework releases.
So, how will we build WPF Composite Client Applications?
Well, until the next version of the .Net Framework will contain its Client Application Framework that supports WPF composite applications, the patters and practices team has been working on a new initiative called "WPF Composite Client", which is not a new version of CAB, since CAB cannot take full advantage of WPF capabilities. Therefore the "WPF Composite Client" is a new project, build from the ground up, that will allow building composite application and using the best of WPF.
read more about it in here.
enjoy!
Israeli Bloggers on Codeproject
If you don't already know, the Israeli Bloggers community has published several articles to codeproject over the last few years. Here is a short summary of the Israeli bloggers and thier articles.
Articles by Leon Langleyben (6 articles found)
Articles by Ayende @ Rahien (5 articles found)
Articles by Roy Osherove (3 articles found)
Articles by Guy Kolbis (2 articles found)
- Code Review Add-In - Code Review Add-In helps the process of reviewing code and publishing the results as work items to the Team System Server for review by team members
- Designing an Object Model Layer - The Object Model is a must layer in every application. This article explains how to implement an OM for your application.
Articles by Shahar Gvirtz (2 articles found)
Articles by Guy Burstein (2 articles found)
Articles by Kim Major (2 articles found)
Articles by Ken Egozi (1 article found)
Articles by Omer van Kloeten (1 article found)
Articles by Doron Goldberg (1 article found)
Articles by Tamir Khason (1 article found)
- Pelco P and D protocol implementation in C# - This is a full C# classes to control a PELCO PTZ cameras, matrix switching systems, reciever devices and more via RS422/485 'P' and 'D' protocol. It supports all of the commands including UP, DOWN, IN, OUT, LEFT
Did I miss anyone?
Enjoy!
תותח - רוצה שיכירו אותך?
מוקדם יותר היום, פרסמתי את ההודעה הבאה בתפוז:
אני מניח שכולכם מכירים את אתר הבלוגים של מיקרוסופט ישראל (למי שלא מכיר, זה הזמן...)
באתר יש כמה עשרות בלוגרים בתחומי עניין מגוונים (למפתחים,ל ארכיטקטים, IT Pro's והרבה נוספים), וביניהם לא מעט MVP's.
אני רוצה לנצל הזדמנות זו ולספר מה פתיחת הבלוג הייתה עבורי:
לפני כשנה וחצי התחלתי לייעץ לפרוייקט שהתעסק בטכנולוגיות שהיו אז מאד חדשות ובתחילת דרכן (WF, WCF וכו'), והיה מעט מאד תיעוד בנושא. פתחתי את הבלוג גם כדי לתעד את מה שאני מוצא תוך כדי לימוד הטכנולוגיות, בעיות שנתקלתי ופתרתי אבל גם כי רציתי מאד להיות מוכר ולפתח מוניטין כמומחה בטכנולוגיות מיקרוסופט.
מספר חודשים אח"כ כבר הייתי אחד הבלוגרים הפופולאריים באתר, התחלתי להרצות ב- User Groups והוזמנתי להרצות בכנסים של מיקרוסופט (Developer Academy). לאורך הזמן כמות המבקרים בבלוג שלי עלתה באופן הסטרי והתחלתי לקבל המון תגובות ושאלות מאנשים בכל העולם (אני כותב את רוב הפוסטים בבלוג באנגלית), וגם לא מעט הצעות עבודה.
לאחרונה קיבלתי גם תואר MVP ממיקרוסופט, והדרך סלולה בפני לעוד הרבה הזדמנויות שעוד לא הגיע הזמן לשתף.
אם אתם מתחברים לסיפור הזה, שתוך כדי שאני כותב אותו אני מבין שלפני שנתיים זה נשמע כמו חלום, ומעוניינים לשמוע פרטים נוספים, שיצור איתי קשר במסרים / במייל או דרך הבלוג. לאלו מכם שרוצים לכתוב בבלוג אבל חוששים (לא יהיה לי על מה לכתוב, אין לי זמן לזה ושאר שיקולים), שיפנו אלי גם :)
סופ"ש נעים,
גיא בורשטיין
קיבלתי כבר מספר תגובות על ההודעה, ביניהן התגובה של ליאור (שם בדוי, הפרטים שמורים במערכת):
Hi Guy (you get that a lot?)
My name is Lior, and i realy wanted to write to you about the post you wrote on tapuz. first of all I read your blog all the time and got a lot of knowledge even in subjects I don't deal with (yet...). The post really talked to me mainly because I want to be recognized as a source of knowledge but I feel my short experience (one year of c# programming a stock market winform based application) doesn't give me the "right" to write a blog.
Anyway, my main target at the moment is to learn WCF as good as it gets from web sources, and your blog really helps.
thanks,
Lior
ליאור היקר,
אותו פרוייקט שהזכרתי שהתחלתי לייעץ בו לפני שנה וחצי, גם הוא היה פרוייקט פיננסי מבוסס Winforms! ועם זאת, היו בו לא מעט אתגרים טכנולוגיים שלאו דווקא היו קשורים לטכנולוגיה חדשה כלשהי. זכור לי שאחד הפוסטים הראשונים שלי היה על איך ממומשת הפקודה Lock. הנקודה היא, שלא משנה באיזו רמה אתה וכמה ניסיון יש לך, הרי שאחד היתרונות בתחום שלנו הוא שכל יום לומדים דבר חדש, ותמיד יהיה מישהו שיקרא את הפוסט שלך וילמד גם הוא משהו חדש ומכאן מגיע הסיפוק האמיתי. בנוסף, הרבה מהפוסטים שכתבתי היו הדגמה של נושא מסויים, ודווקא מתוך השאלות שהופיעו בתגובות לפוסטים, למדתי הכי הרבה ונדרשתי לבדוק את הפינות החשוכות ביותר!
אז אני מזמין אותך, ליאור, לפתוח בלוג באתר, ולצאת לדרך מרתקת שאין לי ספק שרק תגדל ממנה. שלח לי לינק?
MVP's on Facebook
If you're an MVP, and you have a Facebook account, you can join the following groups:
Microsoft MVPs
MVPs
If you're an Israeli MVP, you can join this one:
MVPs in Israel
Enjoy!
Israeli Bloggers on Facebook
With the Facebook social network site keep on growing, you can see more and more activities in it. Particularly, activities that relates to the Israeli online community and Israeli bloggers community:
and I'm sure you'll have more in the near future.
If you aren't already my friend, you can find my Facebook profile at: http://profile.to/bursteg.
Enjoy!
Entity Data Model Designer - What came out of it in Visual Studio 2008
Back in March, the Data Programmability Team showed off with some New Data Tools in Visual Studio "Orcas". Most interesting was the Future EDM Designer video by Noam Ben Ami. This video shows working with the Database Designer and dragging tables to the Entity Modeler in order to create entities, and later on shows how to refactor the entities and the mapping when the schema changes over time. For me, after giving a presentation about the Entity Framework when there was only a prototype for the designer, this video was a promising success for the new Entity Framework.
Since this promise, we heard that the ADO.Net Entity Framework will not ship with Visual Studio "Orcas", and today, I downloaded a Data Programmability Team new video (available here) by the that shows the Entity Data Model Designer as it is in the current release.
Although I've been spending only limited time on the latest release of Entity Framework, while working on my Linq to SQL presentation for the Developer Academy Conference, I must say that it is not so convenient to work with. For example, the mapping is done by selecting tables from a list, and mapping column by column, instead of dragging entities on the designer and mapping them graphically.
I am really hoping to see how the Entity Model Designer will turn out to in the upcoming release and what are the future directions of it.
Enjoy!
Linq to SQL Session @ Developer Academy 2
Over the last months I've been using Linq to SQL in Visual Studio 2008 through its various releases. In the next Developers Conference here in Israel - Developer Academy 2, I will be giving a session that's all about Linq to SQL.
Next Generation Relational Data Access with LINQ to SQL
In Visual Studio 2008, Microsoft brings Next Generation Data Access with LINQ to SQL , a part of the LINQ project. LINQ to SQL is designed to integrate relational data and queries easily into applications, without sacrificing high-performance SQL-based approaches. In this session we will deep dive into LINQ to SQL, explore both the features and limitations of the new technology, and see how it can help us face the challenges in the data access area. You'll walk away from this session with many insights about adopting LINQ to SQL in your next generation application.
NOTE: Since LINQ to SQL is built on LINQ, I recommend that you also attend the session: "Discover .NET Language Integrated Query (LINQ) Framework".
This is the current agenda:
Introducion: Why Do I Need Linq to SQL for? What daily problems does it help me to solve? - Linq to SQL Basics
- Basic Queries
- Inserts, updated, deletes
- Using the Designer
- Exploring the generated code
- Inheritance
- Stored Procedures and User Defined Functions
- Multi-Tier Applications
- Advanced Features
- Change Tracking
- Object Identity
- Concurrency
- Performance
- Compare with ADO.Net Entity Framework (Linq to Entities)
- Future Roadmap
- Additional Resources
Did I miss anything?
The registration for this event is not open yet, but you can start preparing some questions...
See you There!
All About ObjectDumper
Why do I need it for?
In many demos, we print objects to the Console window. If the object is a very simple one, like:
public class Vehicle
{
public string VehicleID { get; set; }
public int Year { get; set; }
public string Model { get; set; }
}
than it is very easy:
Vehicle v = new Vehicle { VehicleID = "30-804-15", Model = "Mazda 3", Year = 2006 };
Console.WriteLine("VehicleID = {0}, Model = {1}, Year = {2}", v.VehicleID, v.Model, v.Year);

But what if the object has many properties? What if we want to print only the properties that contain values that are not null? What if the object is not flat, but a collection of objects, or an object graph with depth of more than 1?
During demos, writing the appropriate code can be time-consuming.
What is ObjectDumper?
ObjectDumper can be very useful in those situations. It can print simple to complex objects and object graphs in a single line of code.
For exmaple, the above simple object:
Vehicle v = new Vehicle { VehicleID = "30-804-15", Model = "Mazda 3", Year = 2006 };
ObjectDumper.Write(v);
It can print a list of objects:
Vehicle[] v = new Vehicle[]
{
new Vehicle { VehicleID = "30-804-15", Model = "Mazda 3", Year = 2006 },
new Vehicle { VehicleID = "29-123-43", Model = "Subaru B4", Year = 2005 },
new Vehicle { VehicleID = "83-844-11", Model = "Honda Civic", Year = 2007 },
};
ObjectDumper.Write(v);
It can also print an object with inner collections, up to a given depth:
class Company
{
public Vehicle[] Vehicles { get; set; }
}
...
Vehicle[] v = new Vehicle[]
{
new Vehicle { VehicleID = "30-804-15", Model = "Mazda 3", Year = 2006 },
new Vehicle { VehicleID = "29-123-43", Model = "Subaru B4", Year = 2005 },
new Vehicle { VehicleID = "83-844-11", Model = "Honda Civic", Year = 2007 },
};
Company c = new Company { Vehicles = v };
ObjectDumper.Write(c, 0);
or when using:
ObjectDumper.Write(c, 1);
Great, now where can I grab it?
The ObjectDumper is one of the projects that ships as part of the Linq Samples. You can find the samples download page here, and after you download and install them, you can find them in the CSharpSamples.zip file in C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033\ directory.
Enjoy!
Linq to SQL Features in RTM
Dinesh Kulkarni, the current program manager of Linq to SQL, has lately posted in the Linq Project MSDN Forum about the key changes moving from Visual Studio 2008 Beta 2 to RTM. The list of changes contain some changes and features, as well as change in the behavior of the Attach method.
Today, Dinesh has posted about the list of features which will not be in Linq to SQL v1. From his post:
- Support for other databases with or without a public provider model.
- Out-of-the-box multi-tier story. Yes, we do have good Attach() APIs but we don't yet have a simple roundtripping and change tracking on the client.
- Handling schema changes. Schemas change and designer and SqlMetal should provide reasonable ways to respond to the changes.
- Support for specific mappings: containment (e.g. Address is a non-entity type and should be mappable differently for Customer.Address vs Employee.Address), pure many-to-many with no non-FK data in the middle table.
- Small differences between designer, SqlMetal and run-time: external mapping file and SSC support in designer
- LINQ to SQL in compact framework.
Looking forward for v2!
Enjoy!
Influence the Roadmap of Windows Workflow Foundation vNext
The Windows Workflow Foundation Team is conducting a survey about your current and future usage of the technology in order to get feedback needed to prioritize the features and directions of Windows Workflow Foundation vNext.
So, If you're using Windows Workflow Foundation, and you can allow the time to participate in this survey, you can influence then next version of the technology.
Enjoy!
Enterprise Library 3.5 for Visual Studio 2008
After releasing Enterprise Library 3.X last May, and starting the Enterprise Library Contrib project, the team is currently working on porting Enterprise Library to work with Visual Studio 2008. According to Grigori Melnik, this includes improving existing application blocks as well as guidance on how to use them. Melnik also mentions, that moving to Enterprise Library 3.5 does not include introducing new application blocks. No official date was provided, but we can expect the release to be available after February 2008, after Visual Studio 2008 is officially launched.
Together with this release we can also expect to find updated Hands On Labs that will also include labs for the Validation Application Block and Policy Injection Application Block that were introduced in Enterprise Library 3.0.
Enjoy!
Linq to SQL Like Operator
As a response for customer's question, I decided to write about using Like Operator in Linq to SQL queries.
Starting from a simple query from Northwind Database;
var query = from c in ctx.Customers
where c.City == "London"
select c;
The query that will be sent to the database will be:
SELECT CustomerID, CompanyName, ...
FROM dbo.Customers
WHERE City = [London]
There are some ways to write a Linq query that reaults in using Like Operator in the SQL statement:
1. Using String.StartsWith or String.Endswith
Writing the following query:
var query = from c in ctx.Customers
where c.City.StartsWith("Lo")
select c;
will generate this SQL statement:
SELECT CustomerID, CompanyName, ...
FROM dbo.Customers
WHERE City LIKE [Lo%]
which is exactly what we wanted. Same goes with String.EndsWith.
But, what is we want to query the customer with city name like "L_n%"? (starts with a Capital 'L', than some character, than 'n' and than the rest of the name). Using the query
var query = from c in ctx.Customers
where c.City.StartsWith("L") && c.City.Contains("n")
select c;
generates the statement:
SELECT CustomerID, CompanyName, ...
FROM dbo.Customers
WHERE City LIKE [L%]
AND City LIKE [%n%]
which is not exactly what we wanted, and a little more complicated as well.
2. Using SqlMethods.Like method
Digging into System.Data.Linq.SqlClient namespace, I found a little helper class called SqlMethods, which can be very usefull in such scenarios. SqlMethods has a method called Like, that can be used in a Linq to SQL query:
var query = from c in ctx.Customers
where SqlMethods.Like(c.City, "L_n%")
select c;
This method gets the string expression to check (the customer's city in this example) and the patterns to test against which is provided in the same way you'd write a LIKE clause in SQL.
Using the above query generated the required SQL statement:
SELECT CustomerID, CompanyName, ...
FROM dbo.Customers
WHERE City LIKE [L_n%]
Enjoy!
Developer Academy 2 - רשימת ההרצאות
ההכנות לכנס המפתחים הגדול הבא נמשכות, כבר יש תאריך, מקום והצעה לרשימת הרצאות.
רוצים לוודא שהרשימה קולעת לטעם שלכם? שהיא מכסה את הנושאים שחשוב לכם לשמוע עליהם? שלא מכילה את הנושאים שאין לכם כוח יותר לשמוע עליהם?
אתם מוזמנים להכנס לסקר התכנים של הכנס ולתת את הפידבק שלכם. יש עדיין מספיק זמן לכנס וניתן להשפיע!

תודה!
Linq to SQL Deferred Loading - Lazy Load
Consider the Blog Site database I used in previous posts about Linq to SQL:
Linq to SQL Deferred Loading
If we query for the available blogs in the site using Linq to SQL, the query should look like this:
BlogDataContext ctx = new BlogDataContext(...);
var query = from b in ctx.Blogs
select b;
foreach (Blog b in query)
{
Console.WriteLine("{0}", b.BlogName);
}
This Linq query will result in the following SQL statement being sent to the DB:
SELECT [t0].[BlogID], [t0].[BlogName], [t0].[Owner]
FROM [dbo].[Blogs] AS [t0]
and the output will be:
Now, if we change the statement that outputs the name of the blog, and let it also print the number of posts in the blog:
foreach (Blog b in query)
{
Console.WriteLine("{0} has {1} posts", b.BlogName, b.Posts.Count);
}
This time, the output will be:
What Linq to SQL does is whenever it runs into the expression b.Posts.Count, it knows that the Posts collection of the blog was not yet retrieved, so it automatically generates the appropriate select statement and gets the posts. For example:
SELECT [t0].[PostID], [t0].[BlogID], [t0].[Title], [t0].[Body], [t0].[PublishDate]
FROM [dbo].[Posts] AS [t0]
WHERE [t0].[BlogID] = 'bursteg'
The problem is that a similar query is executed for each blog instance. So if we have a long list of blogs, than this simple loop can be a performance hit.
This behavior is called Linq to SQL Deferred Loading, and it is turned on by default. In order to turn it of, you can set the DeferredLoadingEnabled property to false.
BlogDataContext ctx = new BlogDataContext(...);
ctx.DeferredLoadingEnabled = false;
var query = from b in ctx.Blogs
select b;
foreach (Blog b in query)
{
Console.WriteLine("{0} has {1} posts", b.BlogName, b.Posts.Count);
}
Now, this query returns 0 as the number of posts of each blog.
Using DataLoadOptions to Control Deferred Loading
If you still want to query the posts list for every blog that is queried, no matter if it is queries by primary key or as a result of a query, you can use DataLoadOptions.
BlogDataContext ctx = new BlogDataContext(...);
ctx.DeferredLoadingEnabled = false;
DataLoadOptions dlo = new DataLoadOptions();
dlo.LoadWith<Blog>(b => b.Posts);
ctx.LoadOptions = dlo;
var query = from b in ctx.Blogs
select b;
foreach (Blog b in query)
{
Console.WriteLine("{0} has {1} posts", b.BlogName, b.Posts.Count);
}
Using DataLoadOptions, Linq to SQL will execute only a single SQL Statement to the database, getting both the list of blogs, and the list of posts for each blog:
SELECT t0.BlogID, t0.BlogName, t0.Owner,
t1.PostID, t1.BlogID AS BlogID2, t1.Title, t1.Body, t1.PublishDate,
( SELECT COUNT(*) FROM Posts AS t2
WHERE t2.BlogID = t0.BlogID ) AS count
FROM Blogs AS t0
LEFT OUTER JOIN Posts AS t1 ON t1.BlogID = t0.BlogID
ORDER BY t0.BlogID, t1.PostID
Enjoy!
More Posts
Next page »