Thursday, October 14, 2010
Since the release of this nice feature for the .NET Framework, many of us are using extension methods to simplify our code. And according to the DRY principle it’s best to not re-invent the wheel. So, you can search for already “invented” extension methods in the site http://www.extensionmethod.net/
ExtensionMethod.NET is a database of C# 3.0 and Visual Basic 2008 extension methods. It contains many user-rated extension methods that will expand your code library immediately.
Extension methods add functionality to existing classes and allow you to expand the .NET framework. This way your favorite functions integrate seamlessly into the framework. For more information about extension methods visit the C# 3.0 and Visual Basic 2008 MSDN Library pages.
Friday, June 05, 2009
Have you heard of Project Natal? If not then you’re definitely sleeping…
Fortunately I hereby provide you a real nice video that should hook you up :)
Until next time ;)
Tuesday, November 25, 2008
Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.
The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.
Tuesday, August 05, 2008
I don't know about you, but I hate ACLs...
For Windows versions prior to Vista and according to this page I've got to do something like this in order to edit an ACL:
httpcfg set urlacl /u {http://URL:Port/ | https://URL:Port/} /aACL
where ACL should a SDDL string. Well, that's the part I HATE. I don't want to be a SDDL expert and I don't even want to understand them! Period!
It seems I'm not the only one who thinks like that. In his post, Paul gives two options how to edit an ACL in a more easier form:
- Read Keith Brown's post how to edit the ACL programmatically; (We could use this option in order to edit the ACL when installing the service)
- Use a little GUI application, called HttpNamespaceManager, that Paul developed. (I've already used it and it works smoothly)
Fortunately, the way how they are edited changed in Vista\Win2k8 OS:
netsh http add urlacl url=http://+:8080/MyUri user=DOMAIN\user
Hope this helps someone
Thursday, January 17, 2008
These past days I have be doing nothing else then writing documentation for several projects that I'm working in. Conclusion? It's like in the title of this post: I hate writing documentation. Why? Well because I'm a developer and not a writer; because it's boring and most of all because it's giving a all lot of work when probably no one will read it.
Finally I got that out of my chest...
If you are just like me then you may like to know that the pattern & practices team released in the CodePlex site a few documentation tools. For now it only includes a Word 2007 template and tools that you can use to convert Word documents to HTML, Help 1.0 (CHM), and Help 2.0 (HxS). It also includes a tool that helps to manage the table of contents for large documentation sets.
Hopefully, in the future, they will manage to develop some kind of a mind-reader-documentation-generator that will put out of my despair :)
Until next time ;)
Tuesday, November 27, 2007
Some point in time, when starting a new project you'll ask some questions:
- "What data access layer library am I going to use?"
- "Should I develop my own?"
- "And how about an O/R mapper?"
These are important questions and you should answer them. But the answer is now a little more simple to find. Since the release of .NET 3.5 last week, we now have built-in the framework a nice feature called LINQ.
LINQ or Language INtegrated Query is a set of language and framework features that allow you to write queries directly in C#. LINQ drastically cuts the plumbing code required for database applications while reducing runtime errors (LINQ queries are statically type-checked by the compiler). LINQ can also query local in-memory collections and XML trees. Framework 3.5 ships with a lightweight new XML DOM designed for this purpose...LINQ and C# 3.0 are set to make a huge impact: LINQ to SQL alone will halve the cost of writing and maintaining a data access layer. Further, a single new query syntax works across databases, local collections, XML documents, datasets, as well as third party products. [via albahari.com]
One example (taken from LINQPad) using the northwind database for LINQ to SQL:
| LINQ | SQL |
| from p in Products let spanishOrders = p.OrderDetails.Where (o => o.Order.ShipCountry == "Spain") where spanishOrders.Any() orderby p.ProductName select new { p.ProductName, p.Category.CategoryName, Orders = spanishOrders.Count(), TotalValue = spanishOrders.Sum (o => o.UnitPrice * o.Quantity) } | SELECT [t0].[ProductName], [t1].[CategoryName], ( SELECT COUNT(*) FROM [OrderDetails] AS [t4] INNER JOIN [Orders] AS [t5] ON [t5].[OrderID] = [t4].[OrderID] WHERE ([t5].[ShipCountry] = @p0) AND ([t4].[ProductID] = [t0].[ProductID]) ) AS [Orders], ( SELECT SUM([t8].[value]) FROM ( SELECT [t6].[UnitPrice] * (CONVERT(Decimal(29,4),[t6].[Quantity])) AS [value], [t7].[ShipCountry], [t6].[ProductID] FROM [OrderDetails] AS [t6] INNER JOIN [Orders] AS [t7] ON [t7].[OrderID] = [t6].[OrderID] ) AS [t8] WHERE ([t8].[ShipCountry] = @p0) AND ([t8].[ProductID] = [t0].[ProductID]) ) AS [TotalValue] FROM [Products] AS [t0] LEFT OUTER JOIN [Categories] AS [t1] ON [t1].[CategoryID] = [t0].[CategoryID] WHERE EXISTS( SELECT NULL AS [EMPTY] FROM [OrderDetails] AS [t2] INNER JOIN [Orders] AS [t3] ON [t3].[OrderID] = [t2].[OrderID] WHERE ([t3].[ShipCountry] = @p0) AND ([t2].[ProductID] = [t0].[ProductID]) ) ORDER BY [t0].[ProductName] |
Now...that's cool :) (I know that you could do the same query with a better SQL...)
But you could probably say that you prefer to stay with your own DAL or even with the one that you bought. But EVERYONE should learn about LINQ before starting a new project. There's no need to invent the wheel over and over. If you're going to develop in .NET (VB, C#, etc) you should consider LINQ, because it's a DAL, an O/R mapper, and it was tuned by a real smart guy that works in a big company. Building your DAL with LINQ also adds the value of technical support and bug fixes with no cost. Keep in mind that LINQ can also be used to query local collections, XML, datasets or anything else that implements extension methods.
If you want to learn how to use LINQ, there's no better way than trying. So, check this out. (I must say that LINQPad rocks. Remember that you need to install .NET 3.5 first)
Friday, October 19, 2007
For those of you that are starting to learn BAM (like me) or are real guru guys, I've found a real nice app, named GenerateTypedBAMAPI. You can find it at Codeplex.
The GenerateTypedBAMAPI is a command-line tool that generates a typed C# API based on a BAM activity(ies) definition file.
Thanks Darren :)
Wednesday, October 17, 2007
Then this is for you. I've found a very cool application that will help you managing all the remote connections (RDP, VNC, Telnet, ...).
It's called Terminals and you can find it here.
Try it.
Monday, June 04, 2007
In my previous post I posted that Windows Live Writer Beta 2 was released. But I've also complain about the spell checker button. From Beta 1 to Beta 2 it simply vanished. And accordingly to the Beta 2 specs there's an inline spell checking. But when I launched the Live Writer I couldn't seem to find that inline spell checking. I wrote some wrong words, on purpose, and there wasn't any warnings, not even when I published.
When I was already in the move back to Beta 1, I discovered that Roy had the same problem. Fortunately, he released an utility to fix this :)
Apparently it's because I don't have the system culture configured to en-US.
Shame on the Live Writer development team, making the Live Writer to depend on the system culture configuration. It should be configurable inside the application, like it happens in the Microsoft Word.