Archives

Archives / 2008
  • Authenticating programmatically to Exchange Server 2003 FBA

    In one of my projects I had to read data from Exchange Server 2003 programmatically. I had access to Outlook Web Access that used Form Based Authentication (FBA). After some hacking and testing I got authentication part of my utility work. The point was easy - before making WebDAV requests to Exchange Server we need authentication cookies, so there is active session we can use.

  • Three signals of death march projects

    Death march projects are standard in software development and they are usually the most complex ones to handle. It seems to me that this is more like question how to handle the chaos and how to survive it with as less losses as prossible. There are some signals of dangers I would like to share with you.

  • TechEd 2008 Developers - Microsoft data center in Chicago

    Although I'm hardware guy I heard some interesting facts about Microsoft data center in Chicago I want to share with you. As I understood this data center will run also Azure services, so it may also be interesting to see some non-official estimates about how much applications can run in this center.

  • TechEd 2008 Developers - How to start testing

    TechEd_EMEA_100_BeThere_DEV (1) I visited Roy Osherove session at TechEd 2008 Developers (EMEA) where he spoke about how and why to test software. There was nothing new to me besides couple of things but I want to give you a little overview about the most painful topic for companies and developers - how to start testing. It was the best part of session I think and that's why I decided to blog about it.

  • Expert .NET 2.0 IL Assembler

    Expert .NET 2.0 IL Assembler
    Expert .NET 2.0 IL Assembler
    If you want to know how .Net Framework works internally then there is very good book by Serge Lidin - Expert .NET 2.0 IL Assembler. Serge Lidin is author of IL Assembler, IL Disassembler. He is also one of those guys who wrote IL Assembler language specification. So I think he knows the topic very well.

  • SharePoint for Developers: 3.3 Hands-on - querying lists

    The best way to get data from SharePoint lists is to query them. Using queries you guarantee that only list items you really need are retrieved from database and constructed to objects by SharePoint. Most of the time you don't need the full collection of list items, so it is not point to ask all the items and then use only few of these. Let's see how we can query SharePoint lists.

  • I am MVP

    MVP Just wanted to let you know that I got phone call yesterday evening by Microsoft representative who was happy to say that I am new MVP (ASP.NET). I also got some e-mails from my region's MVP lead. huh, it is all new to me and I have had no time to check out everything that MVP program has to offer. But there is hell load things learn about new possibilities.

  • ForEach method and blonde me

    I want to tell you about List<T>.ForEach method and one of my famous blonde moments when I was debugging faulty code. LINQ makes it easy to query collections and that's why I like it a lot. Today is friday and weekend is coming. Let's relax and have some fun on me. Here's one proof how n00b I can be :)

  • Professional SharePoint 2007 Web Content Management Development


    Professional SharePoint 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007 (Wrox Programmer to Programmer)
    One great SharePoint book in my company bookshelf is titled as Professional SharePoint 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007. This book is written by famous SharePoint guru Andrew Connell and in my opionion it is one of those very useful books about SharePoint you must have. So, let's see what we can find from this book.

  • Developer bookshelf

    Here you can find the list of books I have read. All these books are recommended ones, here are no titles I don't suggest. Click on book images to read reviews written by me.

  • DocumentShow extension for SharePoint

    We finished today one interesting SharePoint extension. We call it DocumentShow extension and it allows you to show HTML files in document library as slide show. In our case the customer wanted to show some reports on large LCD screen located in one of his office rooms.

  • SharePoint for Developers: 3.1 Hands-on - connecting to SharePoint and using elevated rights

    In previous post of this serie, SharePoint for Developers: 3. Introduction to SharePoint Data Structures, I described some basic points of SharePoint data structures. In this post we will see how to use these data structures and how to create custom field types. The next hands-on post will stop on custom field type and it will give you very good example about how fields work in SharePoint.

  • SharePoint for Developers

    SharePoint for Developers is serie of blog entries that introduces SharePoint development topics to ASP.NET developers. This serie is supposed to be from-developer-to-developer serie and I hope it helps many other developers to get better understanding of SharePoint and its internals.

  • Top Stories

    Here you can find references to most popular content in this blog.

  • SharePoint for Developers: 2. Development Environment

    Before going to deep dive let's put up development environment. In this blog entry I will tell you how to put everything up and what tools we are using for which tasks. Well, if you read further then you have something to do for couple of evenings. Let's start!

  • ASP.NET Dynamic Data

    ASP.NET Dynamic Data is one of those technologies I have been keeping eye on. With .Net 3.5 and Visual Studio 2008 SP1 is fully available. Let's see how it works and how we can use it.

  • Implementation Patterns

    Implementation Patterns at Amazon
    Implementation Patterns (Addison-Wesley Signature Series)
    Another great book to read is Implementation Patterns from famous Kent Beck. I found this book to be good addition to Code Complete 2. Code Complete is mostly about readable and manageable code. Implementation Patterns is about code itself - how we are writing classes, methods, loops and other code constructions everyday and what kind of patterns can be drawn out from there.

  • Professional SharePoint 2007 Development

    pro-sp-2007-dev
    Professional SharePoint 2007 Development (Programmer to Programmer)
    Okay, I'm back in business again after W:O:A 2008 that rocked my brains out  (in a good means, of course). As I can see from comments of my SharePoint series plan there is really hard need for development series, so after the fast start of working period is over I will start writing this serie. But before that I have to do something I promised before - description of great book titled as Professional SharePoint 2007 Development.

  • GridView or Repeater?

    What is the difference between GridView and Repeater? This is one of the most common questions that beginners ask when they are trying to get familiar with data bound controls. Both of these controls have their own using context and I try to explain when one should use GridView and when it is okay to use Repeater.

  • How to become a good developer?

    I was asked through this blog how to become a good developers. I think this is the question that many beginners want to ask. For every question there are throusands of answers. Okay, there are many answers like these but these ones are mine. :)

  • Too-Smart-Business-Object Anti-Pattern

    Building up a good business library is art. Because every bad decision made early will eat project's time later. Bad decisions will also waste many time of developers who have to use this library in their work. One of the most common mistakes made is mixing DAL functionality to business objects. At first it may seems like a good idea - why not have a smart objects? - but as project goes this solution causes more and more problems. And, be warned, each next problem is worst than previous.

  • Avoiding exceptions using list controls

    Avoiding excpetions is always a good practice because exceptions can hurt as when thay occure. They may cause also hard performance loss. Assigning selected value to list controls is one candidate for ArgumentOutOfRange exceptions. Often this problem is solved using unhandled exception:

  • DTO - not only for web services

    Usually developers think that DTO (Data Transfer Object) is something related to web services where data serialization is required to move data from one point of network to another. It is clear that in most cases there is no point to move complex data structures over network when client side needs this data in pretty simple form. That's why DTOs are created - they are simple, easily serializable and there is no data that client side doesn't need. But there are also other DTOs you may find useful.

  • Sometimes integration tests are more important

    There are some cases when integration tests are more protective than unit tests. Of course, there is no reason to compare these two kinds of tests but if we have to write them we have to set priorities and think what problems may arise during development. One special case when it is important to have integration tests early in place is when we are using O/R-mappers.

  • Some extension methods for DateTime

    During one of my current projects I wrote some useful extension methods for DateTime class. I had to write custom calendar component and therefore I needed manipulate dates a little bit. Here is some extensions I would like to share with you. And, of course, comments and suggestions are welcome as always.

  • Domain Driven Design

    domain-driven-design
    Domain-Driven Design: Tackling Complexity in the Heart of Software
    I am sure you have all read this book and this book needs no further introduction - Domain Driven Design by Eric Evans! I readed this book couple of months ago and now I am trying to apply good ideas I got from this book. Instead of writing usual introduction I tell you a little bit about my experiences when applying ideas represented in this book.

  • Silver bullet anti-pattern

    I will continue my little serie about anti-patterns of decisions and activities that may screw up projects and make developers (and why not also others) life hell. Now let's look at silver bullet anti-pattern. It is about using unknown tools and technologies in the place where one shouldn't never do that.

  • How I use Hungarian notation?

    Well, this post is not my attempt to start millionth flae war about variable naming conventions. It is my explanation how I use Hungarian notation and why. By the way I am not dedicated fan of any convention, so starting flaming here has no point. So let's see why and how I use Hungarian notation.

  • var is like (good) wine

    Keyword var is cool thing we can use to make our code more readable for other programmers and why not - reviewers. But var can also be used to make our code difficult to understand. In this case, lte's say, we are overusing var. So, var is like wine - if one takes glass of it then everything is okay in the morning, but if somebody takes it couple of bottles then the morning will be awful. Or let's say - too much var will kill you?

  • I-Don't-Care Anti-Pattern

    It is easy to find articles and blog entries about patterns, design and good practices. But there are not so much information about anti-patterns. One of the worst anti-patterns is what I call I-Don't-Care Anti-Pattern.

  • Code Complete 2

    Code Complete 2
    Code Complete: A Practical Handbook of Software Construction
    Code Complete 2 is very good and must-be book by Steve McConnell for all developers. The book covers many aspcets of coding and gives very good advices about how to organize and write your code, how to comment and document it and how to write code without ruining yourself.

  • Interface for Processes

    I had to write one data import/export utility that moved data from one database to another. Once I was finished the first round of coding I found one thing that needed refactoring - the import/export process wasn't generalized. It was part of importer/exporter utility main class (it was console application). After some refactoring I got some common things to use in other tasks like this.

  • Don't Make Me Think

    Don't Make Me ThinkDon't Make Me Think by Steve Krug is the definitive guide to user friendly web pages. This book doesn't tell you about how to make HTML pages or how to design them. This book tells you what to keep in mind when dealing with web pages and how to make your web pages user friendly.

  • Basic ASP.NET SEO

    SEO is popular topic nowadays and as ASP.NET is growing its popularity also as platform for public systems. Therefore SEO is going to be more important topic also for ASP.NET developers. The world of SEO is always in rapid change - can you imagine that last year Google published 450 updates to it's search engine algorithms? Although the field is changing fast there are some key points that has been fundamental and unchanged this far. Let's see what is the minimum you should do and how you can make your sites more SEO friendly on ASP.NET.

  • GridView and Invalid CurrentPageIndex Value Exception

    There are many developers who have faced the page index problems using GridView. Specially, if GridView supports deleting. Also one may face page index going out of range when there are multiple users managing same data. Here is my little advice about how to avoid page index problems when using GridView.

  • C# and Partial Classes

    .Net 2.0 provided us with new feature called partial classes. Using partial classes we can use multiple files to keep the code of same class. Yes - we can put some methods to one file and the others to another file. Although partial classes may be extremely useful they can be also used to ruin system's technical design if developers don't know what happens behind the compiler.

  • Building Object Applications That Work

    Building Object Applications That Work
    Building Object Applications That Work
    Building Object Applications That Work by Scott Ambler is great book for every developer who is working with object-oriented systems. This book is recommended reading also for system architects, designers and managers to get better understanding of object-oriented world.

  • SharePoint on Vista

    Famous SharePoint features developing company Bamboo Solutions has created installer for Windows SharePoint Services 3.0 SP1 that install WSS3.0 on Windows Vista. The solution allows developers to create SharePoint solutions on their own machines. The need for virtual machine is still there, so don't hope you can avoid them.

  • C# and anonymous types

    One cool feature of C# 3.0 is support of anonymous types. Let's suppose we have to create some data structure and we need this structure in one place in one method. This far we had to create a new private class or structure. With anonymous types we don't have to define new type - we can create it on the run.

  • C# and var keyword

    C# 3.0 introduced us new language feature: type inference using keyword var. Some guys think that var in C# is same thing as var in PHP. That's wrong - var keyword in C# is totally different thing and it doesn't mean that C# has now support for type changing class attributes. Let's prove it.

  • Behind the Compiler

    "What will happen behind compiler?" is my favourite questsion when dealing with technical design and coding. There are many cool and powerful things we can use to be more productive, faster and better. We have automatic properties, extension methods, partial classes, generics and so on. If we don't know what they are and how these things are handled by compiler we may face serious troubles later.

  • Using parent page properties in user control

    There may be situations when we need to use parent page properties from user control. I know, this situations is a warning sign - there's something wrong with UI structure if user controls should know their parents. So, how to get correct reference to parent page so we can use also custom properties defined there?

  • Filtering dropdown by value selected from another dropdown

    This is the first posting of Beginners section of this blog. I will put here code samples that are not advanced enough to put them elsewhere in this blog. First example shows how to filter one dropdown list based on value selected from another.

  • Pager class

    Once I wrote a class to make paging calculations. I had some data bound user controls that had no paging support. So I had to improvise. As it is was pointless to duplicate pager code to every user control where I needed paging I wrote a class to make my life easier.

  • SharePoint: Assigning values to DateTime fields

    SharePoint list items have a tricky way how to assign values to DateTime fields in your code. It is possible to assign value of DateTime type to this field but it also possible to assign a string. This string is a little bit mysterious. You may get errors with one dates but some dates will work perfect. So what's the trick?

  • SharePoint: Half-Initialized Folders

    I discovered something weird when trying to detect document library folder by URL. It is possible to create folder objects that are half initialized. I tried to ask folder by URL and I used URL of documents list view. The result - folder with correct name etc but many parameters were missing.

  • SQL Server 2008 Reporting Services - save your time!

    Some time ago I tried out SQL Server 2008 Reporting Services and I was amazed. I'm serious MS Paint terrorist and nice pictures are not one of my strong skills. So, if something makes things look nice to me I'm very happy.

  • SharePoint: Save performance when getting list items

    Another day, another solved mystery. Developers have interesting lifes as long as there are problems to solve. Another surprise from SharePoint - how to bog server down using only couple of lines of code? Of course, I have solution too that eliminates the issue.

  • Unity and singletons

    I just putted up Unity behind my test project and had some troubles with singletons. There is some misleading information in documentation you should be aware of. I created one class and one interface, both in same project to save some time.

  • SharePoint import ruins create and modification dates

    When exporting and importing data between SharePoint Server 2007 webs I found interesting bug - item creation and last modification dates will be lost during import. Example - document is created at 05.04.2008. After import I checked out data in manifest.xml. Everything seemed to be correct - also modification and creation dates of documents. After export these dates are incorrect. Instead of original dates I can see date and time of export instead of original dates. Dirty guy as I am I also sniffed around in SharePoint database - I saw correct dates there! But when looking my document library through browser I saw incorrect dates. Does anybody know what is the problem? Is it bug and is there any workaround to this problem?

  • How to bulletproof the loops

    Here is one example about how to bulletproof the loops. This example holds well for legacy code and - of course - for hurry-written-code (that might be the current one, unfortunately).

  • Using Version Class

    When dealing with version numbers we often need to convert them to string and vice versa. There is lot of code where versions are handled manually in code. I don't know why. But I know for sure there is class called Version and I'm sure this class will help us a lot.

  • How to Update SharePoint List Items without Creating New Versions

    Migrating data from SP2001 to MOSS2007 is fun - if you know what I mean. During migration we discovered that migration tool has some serious bugs. I wrote some code that fixes some problems after importing process. There I found a problem - I needed to update list items without getting new versions of them after updates. Usually we see samples like this in internet:

  • Is Automatic Property Same as Property?

    I was listening one session on TechEd (night after long party, yeah) and I was thinking about automatic properties - are they really exact equivalent to usual properties? Something made me suspicious, so I opened my laptop at first free moment and checked out what's going on.

  • Windows Installer and Extensibility.dll

    Windows Installer is one of my favorite problem childs - of course, when it has mysteriuos problems. I found a problem when installing Outlook add-in on machine that has no extensibility features installed on it. Something was missing and installer gave me the famous "Unable to get installer types" error. After pointless waste of time tracing installer and checking its logs I checked out what's going on in file system.

  • Some cool SQL Server user names

    One day when I checked SQL Server messages in Event Viewer I found a long series of unsuccessfull attacks. Somebody desperately tried to guess user names and passwords.

  • C# and question marks

    One cool operators that C# offers us is ?? But before ?? we should know what does ? after variable type name. So, let's take both of these question marks and let's see what they are. Also let's jump for a while behind compilator to see IL code that compiler produces.

  • SharePoint: How to display blog feed using XML Web Part?

    I wanted to show our company's blog feed on our intranet first page. There some empty space I wanted to fill somehow. I found a good solution, so there was no need for some third-party Web Parts. Also there was no need to write any additional code.