Archives
-
Using NHibernate order-by attribute to sort names history
I am writing application that besides other cool things lets users insert information about business contacts. My system is able to keep names history of contacts. In this posting I will show you how to use NHibernate mappings to keep names ordered logically.
-
Using LINQ and reflection to find matching properties of objects
As a side product of some experiments I wrote simple LINQ query that matches properties of two objects and returns these properties as list. The code I wrote is pretty simple and I packed it for you as method.
-
Windows Azure
Here you can find list of my Windows Azure postings.
-
Using Windows Azure BLOB storage with PHP
My last posting described how to read and write files located in Windows Azure cloud storage. In this posting I will show you how to do almost same thing using PHP. We will use Windows Azure SDK for PHP. The purpose of this example is to show you how simple it is to use Windows Azure storage services in your PHP applications.
-
Windows Azure – Using DataSet with cloud storage
On Windows Azure CTP some file system operations are not allowed. You cannot create and modify files located on server hard disc. I have small application that stores data to DataSet and I needed place where I can hold this file. The logical choice is cloud storage service of course. In this posting I will show you how to read and write DataSet to your cloud storage as XML-file.
-
ASP.NET MVC: Creating reports using Chart control
ASP.NET Chart control is powerful control you can use to add charting support to your web applications. Although chart controls are mainly used with ASP.NET forms it is not very hard to use them also in ASP.NET MVC applications. In this posting I will show you how to use ASP.NET Chart control in ASP.NET MVC application and I will illustrate how to do it easily so you don’t mess up your views.
-
Visual Studio 2010: Generating sequence diagrams on the fly
One nice feature that Visual Studio 2010 provides is generating sequence diagrams on the fly. Just point out method and choose diagram generating option from context menu. In this posting I will show you how to generate sequence diagrams on the fly.
-
ASP.NET 4.0: Writing custom output cache providers
Until now we can use ASP.NET default output cache. We don’t have any option to write our own output cache mechanisms. ASP.NET 4.0 introduces extensible output cache – programmers can write their own output cache providers. In this posting I will show you how to write your own output cache provider and give you my sample solution to download.
-
Loading Enterprise Library validation rules from external file
Keeping validation rules in web.config may grow it pretty long and it is not convenient to make changes there anymore. Developers can manage validation rules easily by using Enterprise Library Configuration tool and therefore there is no good reason to handle validation rules manually. In this posting I will show you how to load validation rules from external configuration files.
-
ASP.NET MVC: Validating objects using Enterprise Library validation application block
Data validation is important topic in applications. There are many validation frameworks available and there should be one that you are happy with. I am currently playing with Enterprise Library 4.1 Validation Application Block and I am integrating it to my ASP.NET MVC application. In this posting I will show you how to use validation block in your ASP.NET MVC application.
-
Visual Studio 2010: Visualizing dependencies
Visual Studio 2010 introduces new and cool feature – architecture diagrams that visualize dependencies between assemblies, namespaces and classes. In this posting I will show you how these diagrams look like and provide some explanations about how to read them.
-
Adding uberVU badge to your blog
uberVU is service that monitors how your blog entries (or other web resources) are performing in different social networks. You can integrate uberVU reaction count badge to your blog and monitor popularity of your blog entries right in your blog. In this posting I will show you how to add uberVU badge to your blog without any server-side coding.
-
Visual Studio 2010: UML modeling projects
Visual Studio 2010 introduces modeling projects that bring UML diagrams to Visual Studio. Currently it is not possible to generate classes from diagrams automatically but I don’t think it is a problem – good UML diagrams visualize different aspects of system short and clearly and they usually don’t document everything you can find in system. In this posting I will show you how to use modeling projects in Visual Studio 2010.
-
Visual Studio 2010 Beta 2 downloads
Here are some download links to Visual Studio 2010 Beta 2 and related technologies.
-
Using ASP.NET and Jcrop to crop images online
Cropping images in ASP.NET is easy task to do if you use right tools. In this posting I will introduce how to crop images using Jcrop and System.Drawing namespace classes. What we are building is simple and user-friendly image cropping interface that also demonstrates some simple features of Jcrop. Believe me, your users will love it!
-
.Net Framework 4.0: VB.NET supports automatic properties
Next version of .Net Framework brings some new features also to VB.NET. One of those new features is support for automatic properties. C# automatic properties are here from .Net Framework 3.5 and now are them also in VB.NET. In this posting I will show to VB.NET users how to use automatic properties and explain why to use them.
-
Writing cache based repositories for web application prototyping
When I started building in-house demo application I thought about how to solve temporary data layer so I don’t have to use real database and object mappings for it. Playing with new object model and new components I move way faster if I don’t have any additional ballast that I can avoid. So I wrote simple cache based repository mechanism I can use to imitate real repositories that I will write in the future.
-
.Net Framework 4.0: Enumerating file system objects
In my last posting I introduced new ReadLines() method and new overloads for WriteAllLines() method of File class. But there are more new stuff in System.IO namespace. In .Net Framework 4.0 Directory and DirectoryInfo class are able to enumerate files, directories and file system entries. In this posting I will show you these new features.
-
.Net Framework 4.0: System.IO.File supports now IEnumerable<string>
.Net Framework 4.0 adds also some new and cool features to file system objects. File class has now ReadLines() methods that returns IEnumerable<string>. WriteAllLines() methods has two overload methods that accept IEnumerable<string> instead of strings array that was also supported in previous versions of .Net Framework. This posting introduces ReadLines() and WriteAllLines() methods and gives you some ideas how to use these methods in your applications.
-
.Net Framework 4.0: string.IsNullOrWhiteSpace() method
.Net Framework 4.0 Beta 2 has new IsNullOrWhiteSpace() method for strings generalizes IsNullOrEmpty() method to incluse also other white space besides empty string. In this posting I will show you simple example that illustrates how to use IsNullOrWhiteSpace() method.
-
.Net Framework 4.0: Complex numbers
.Net Framework 4.0 Beta 2 introduces new class in System.Numerics namespace: Complex. Complex represents complex numbers and enables different arithmetic operations with complex numbers. In this posting I will show you how to use complex numbers in .Net Framework 4.0 applications.
-
My MVP continued!
Couple of days ago I got e-mail with good news: my ASP/ASP.NET MVP status continues! I am really glad because Microsoft finds my public activities good enough and it gives me certainty that I am moving the right way.
-
IIS won’t start – Error 13: The data is invalid.
After restarting my virtual development machine IIS was not able to start anymore. I checked out if there is something reported to Event Viewer and I found the following error message – Error 12: The data is invalid. It turned out that during shutdown of my virtual machine IIS config file was ruined. Solution to my problem was very simple.
-
Creating squared avatar images
In one of my current projects I needed something that takes image uploaded by user and converts it to avatar image. There is requirement for avatar images: they must be 32x32 pixel squares. Here is my solution.
-
Using LINQ to query object hierarchies
I used LINQ to solve the following problem: find all titles of objects at hierarchy level X when you know object ID in hierarchy level Y. I cannot imagine if there is some other solution that is same short and clear as one that LINQ provides. Take a look and decide by yourself.
-
GetValue<T>() extension method for RegistryKey class
I needed some elegant method to read registry values in my Live Writer Delicious bookmarks plug-in. RegistryKey has GetValue() method but it returns values as object. I wrote generic version of GetValue() as RegistryKey extension method. It returns you specified value from key and converts it to type you ask. If conversions are not successful then default value of given type will be used.
-
Bookmarks2LiveWriter: Live Writer plug-in for serious bloggers
Bookmarks2LiveWriter is Windows Live Writer plug-in that is targeted to serious bloggers who also publish bookmarks postings. Bookmarks2LiveWriter lets you download bookmarks for given date range from Delicious and inserts them to current posting. Users can remove unwanted bookmarks and format bookmarks list before inserting it. Bookmarks2LiveWriter is released under GPL. Installer and source code are freely available to everybody.
-
Links 2009-08-19
JQuery and web development
- Limit Number of Characters in a TextArea using jQuery
- Find out which Key was pressed using jQuery
- jQuery Superfish Menus Plug-in
- Make website images look like a video with this CSS effect
- CSS2 – opacity
Mobile
- 55 per cent of subscribers think content is too expensive
- RIM Files Patent for Merged Capacitive and Resistive Touchscreen
- HTC patents magnetic stylus for capacitive screens
Sharepoint
- Programmatically creating Wiki Pages
- Presenting MOSS Support Explorer (Not even Beta Yet)
- "This week in Pictures" web part in Sharepoint 2007 and Time Interval
- #SharePoint Site Collections and 100Gb Content Database guidance
Social Networks
- Facebook spam
- Twitter Co-Founder Evan Williamsā€™ Wife Tweets to the World While in Labor
- Twitter-Written Opera Will Debut at Royal Opera House
- Stop the Presses! 40% of Tweets Are 'Pointless Babble'
- Twitter Used to Manage Botnet, Says Security Expert
Software
- DB Schema Viewer
- Game program for kids less than 2 years :)
- Using TCP Analyzer to Debug TCP Performance
- O3D:- Google Releases 3D support open api for web browsers
- Community Clips
- Remote Server Administration Tools RSAT for Windows 7 Released
Programming
- Multimethods in C# 4.0 with 'dynamic'
- Implementing Parallel While with Parallel.ForEach
- Instantiating interfaces
- Using Linq with Microsoft Word and Excel
- 20 tips to write a good stored procedure (is really just 12)
- Using the innerText Property in Firefox
Other stuff
- How to reset regional language to English in Windows Live Writer (Live Writer)
- Nhibernate and the Null object pattern (programming)
- Preparing Today for SharePoint 2010 Q&A (SharePoint 2010)
- What is a Smart Client anyway? (varia)
- WER Services : The Three Cs of Response Satisfaction (Windows)
- Download details: Virtual Hard Disk Getting Started Guide (virtual-pc)
- Creating Visual Guidelines inside Visual Studio (Visual Studio)
- Google’s Decision to Launch the Chrome Operating System Reflects the Growing Importance of Web Applications (Google)
- Google Services for Websites Adds New Tools (Google)
-
Follow me @ Twitter
I exist also in Twitter. For some time already. My username is gpeipman. You can find my account here:
-
.Net Framework 4.0: C# and optional arguments and named parameters
C# 4.0 supports optional method arguments. Related to this is support for named parameters in function calls. For us it makes easier to use methods which have long argument list. It also introduces some new dangers which may lead us to messy and hard to understand code. In this code I will show how to use optional arguments and give some hints how to avoid messy code.
-
Developing Delicious applications
I am developing a little piece of software that interacts with Delicious through HTTP API. Using Delicious API puts you one responsibility – use their service carefully. Don’t flood it and don’t stress it some other way. In this posting I will show you how to get bookmarks from Delicious and how to use their service without stressing it pointlessly.
-
Displaying custom HTML in WebBrowser control
I am using WebBrowser control to show preview of automatically generated HTML. Users can select options and preview pane reflects those changes automatically. WebBrowser control has some problems that have been here for years already. Here is my example about how to show custom HTML in WebBrowser control.
-
SPGenerateFileDefinitions – create XML-definitions for files fast
I wrote simple utility that generates File and ElementFile blocks for images that are included in site definition. I am programming nicely designed community portal on SharePoint and there are so much files that it is easier to automate XML definitions creation process, at least partly. I am also pretty sure that image files may come and go during project and we have to modify or recreate those definitions. So here is my simple utility that makes dirty work for me.
-
SharePoint problem: moderation comment is not saved
I solved last week one pretty cool mystery in SharePoint. I have form that users use to make some specific changes to list items. When all the fields on form are filled then user clicks save button. Changes are saved to list item and list item is automatically accepted. Status change is made through ModerationInformation property of SPListItem. Everything seemed to work except one little thing – moderation status comment was not saved.
-
Windows 7: Links for developers
As Windows 7 is now available to MSDN and TechNet users it is time to give some references for developers who are interested in Windows 7 software development.
-
Creating vCard with image in .Net
vCard is popular format for exchanging contacts. Besides e-mail clients also modern mobile phones are able to read and send contacts as vCard. This posting introduces same ideas how to implement vCard support in your applications and how to add images to vCards.
-
Documenting source code
Source code documenting is very important task. Code documentation servers as persisted communication between developers who are using same code. Undocumented or poorly documented code may be hard to understand to other developers who have then waste their valuable time to struggling through the code they don’t understand well. In this posting I introduce you some code documenting tips.
-
LINQ To Entities, SQL and performance
I have introduced my photo gallery building process in couple of postings. As my gallery uses Entity Framework 4.0 it is good source for some internal processing that takes place inside Entity Framework. In this posting I will show you some LINQ To Entities queries and SQL that is generated for them. I added also some thoughts about performance.
-
ASP.NET MVC 2 Preview 1 is released!
ASP.NET MVC 2 first preview is released to public now and you can download it from Microsoft download site. Here is short overview of technical requirements and main new features of ASP.NET MVC 2 Preview 1.
-
Fighting against GhostDoc abusing
GhostDoc by SubMain is great tool for documenting source code. It is able to generate documentation from methods and properties names. It analyzes names and then offers appropriate description. GhostDoc is also able to use description of interface member that current property or method implements. And it takes only one simple key press.
-
Modeling people and organizations: Class Party
Classes for people and organizations are often modeled incorrectly in object models. These faults cause heavy implementation problems. In this posting I will analyze some legacy models, introduce class Party as generalization of people and organizations and provide some implementation details. Information here is based on my own experience, like always.
-
Visual Studio 2010: Database projects
Visual Studio 2008 introduced us database projects. These projects are also present in Visual Studio 2010. I noticed some differences already when building my photo gallery application. Let’s see how these projects work under Visual Studio 2010.
-
Agile Principles, Patterns, and Practices in C# – book review
-
Blogging Heroes: Interviews with 30 of the World's Top Bloggers
-
ASP.NET MVC Calendar component
I am writing simple ASP.NET MVC system that I plan to publish with source code pretty soon. I needed some simple calendar component that doesn’t require ASP.NET server-side form to work. I found different JavaScript based calendars and only one pretty old calendar that was specially written for ASP.NET MVC. I updated it and here is the source and binary downloads for Visual Studio 2008 and ASP.NET MVC 1.0.
-
NHibernate Linq 1.0 is here!
-
OpenForum – new ASP.NET MVC based forum
There is new project in CodePlex called OpenForum. With source code you get also some samples you can run on your machine. OpenForum is pretty new and simple. There are no advanced forum features and currently it is suitable for smaller forums. You can change the look of OpenForum and write your own user repositories. Let’s see how OpenForum looks like.
-
Packaging my gallery code
In this posting I describe how I prepare my gallery application for automated testing. As a first thing I plan to write some unit tests because some of my classes have now logic to be tested. The other thing is database that is living outside my Visual Studio solution. Let’s make now first steps in my gallery code packaging.
-
ExpectedException attribute in Visual Studio 2008 and Visual Studio 2010
Today I tried to write my first unit tests under Visual Studio 2010. Just to see if Visual Studio testing system can now also be used for unit tests. Visual Studio 2008 had some annoying problems with test and I preferred to use nUnit instead. Visual Studio 2010 brings some good news – tests work. Take a look at my example.
-
MyGallery2010
MyGallery2010 is my simple photo gallery system built on Visual Studio 2010 and .Net Framework 4.0 technologies. I don't have currently any public release of gallery but I hope that one day it is ready to release. Until this day you find here references to my postings where MyGallery2010 is mentioned. Those postings illustrate pretty well how I am building the gallery, how I design it and what decisions I make.
-
Analysis Patterns: Reusable Object Models
-
SharePoint: Creating HttpHandler for user profile images
I have custom authentication and user profiles solution where user profiles are stored in list. This list is directly accessible only to administrators. Users can register to site and modify their profiles through special pages that run profile operations under elevated privileges. Users have three versions of their avatar: 64x64, 32x32 and 16x16. These avatars are saved as user profile attachments when user uploads his or her avatar. Because avatars are used at almost every page in portal I wrote IHttpHandler that provides avatars based on user profile ID.
-
Entity Framework 4.0: Generating SQL script from model
Entity Framework 4.0 is able to generate database schema based on model. If you built your model first and you now want to create database for it you can use new Generate Database Script from Model feature. Let’s see how it works.
-
Reordering invoice lines using jqGrid and TableDND extension
In one of my ASP.NET MVC applications I needed flexible interface for inserting invoice lines. Sometimes invoice lines are inserted in incorrect order and it saves accountants some time if they are able to change the order of invoice lines quickly. In my application I used jqGrid with TableDND extension. Here’s how I got it work.
-
Attaching SQL Server database without log file
I needed to attach SQL Server 2008 database to server. There was no log file, just mdf. I don’t know why but it is not very easy to get this database online. After some digging in internet I found solution.
-
What do you think of my ASP.NET MVC gallery layouts?
To try out Visual Studio 2010 and .Net Framework 4.0 I decided to write simple gallery application based on ASP.NET MVC Framework. In this posting I show you my very first layouts I created for gallery. These layouts are modifications of ASP.NET MVC default blue-white-black layouts. I also added some photos of my first layout drafts. My question is – what do you think about my first draft-level layouts (I am not designer)?
-
Last screen of Windows 7 beta
My Windows 7 Beta is expired. After about two hours of work computer restarts. During restart it shows me the following BSOD.
-
Entity Framework 4.0: On the way to Composite Pattern
In my last posting about Entity Framework 4.0, Entity Framework 4.0: POCOs and table-per-type inheritance mapping, I made first generalization to my photo gallery model. I introduced GalleryItem class that is base class for all that can be added to gallery: new albums, photos and maybe videos too. Although everything works as expected my model needs some modifications because it is not very foolproof.
-
Entity Framework 4.0: POCOs and table-per-type inheritance mapping
In my previous posting Entity Framework 4.0: How to use POCOs I introduced how simple it is to use POCOs with Entity Framework 4.0. In this posting I will refactor my photo gallery model a little bit and introduce you how to implement table-per-type inheritance mapping on Entity Framework 4.0.
-
Entity Framework 4.0: How to use POCOs
Entity Framework 4.0 will provide us with POCO support. That’s good because Entity Framework supports more inheritance mapping strategies than LINQ To SQL but currently it doesn’t support POCOs. To try out Visual Studio 2010 and ASP.NET 4.0 new features I started writing simple photo gallery web application. Today I got my first simple POCOs work with Entity Framework 4.0.
-
Windows Workflow Foundation 4.0: Hello, workflow!
With Visual Studio 2010 we can also try out Windows Workflow Foundation 4.0. This posting introduces simple workflow with one new activity and provides you with some tips how to get Training Kit example running. Also I prepared some screenshots for you to show how new workflow designer looks like. I have also a little gift for you – Visual Studio 2010 solution with example shown here.
-
ASP.NET MVC: How to combine scripts and other resources
ASP.NET pages that use AJAX components make usually many requests to server per one page to load all required JavaScript and CSS files. Connections, like all other real time resources, are most expensive to create and keep. If we can somehow decrease the number of requests per page load then we need less server resources for same amount of users. For ASP.NET forms we can use script combining, for ASP.NET MVC applications we can use ASP.NET MVC Client-side Resource Combine.
-
Microsoft forums – where they are?
Microsoft has a lot forums in different (community) sites with a lot of topics. In this posting I listed up Microsoft forums, their locations and forum groups (categories under which forums belong). The purpose of this posting is to provide you with important information – where you get help when you have technical problems.
-
Vacation 2009/1 (23.06-01.07)
I am at vacation from 23.06-01.07. This time I am Italy again and besides hanging around in different nice places I visit also their yearly heavy-metal pearl: Gods of Metal festival!
-
.Net Framework 4.0: Using memory mapped files
.Net Framework 4.0 introduces memory mapped files. Memory mapped files are useful when you need to do in-memory data manipulation and your data structures are large. For large in-memory data the performance of memory mapped file is the best. It is much faster than MemoryStream. And like files on hard disc, memory mapped files can be shared between different programs. MemoryMappedFile and other classes for memory mapped files can be found from System.IO.MemoryMappedFiles namespace.
-
Visual Studio 2010: Brief view at debug history
Visual Studio 2010 introduces also some new debugging features. One of them is debug history. Debug history enables you to track all the points on track of control flow and it also monitors activities that you cannot see otherwise. It makes debugging of hard to find problems much easier, I think. Of course, there are many other new and cool debugging features available.
-
The Data Model Resource Book – Universal Data Models
Couple of years ago I brought two books for my company. Today I can say that I made a small investment that still works pretty well. These books are titled as The Data Model Reosurce Book and author of these books is Len Silverston.
-
Visual Studio 2010: Web application packaging and publishing
Visual Studio 2010 has very powerful web application packaging and deployment system. When deploying your web application you create the deployment package and then publish it to web server. After configuring it is one-click action to get current version of application up to target server. Let’s see how it works.
-
SharePoint: Using classes for workflow association data
I am using workflow with association form in one of my current SharePoint projects. When workflow is added to list there are some parameters that user must insert. Workflow instances are able to persist association data and to be more flexible the association data is saved as XML string. But in the code it is more convenient to use object instead of XML strings. I will show you how I solved the situation.
-
Visual Studio 2010: Web.config transforms
Recently I wrote about Visual Studio 2010 and multiple web.config files support. Let’s see now how to play with web.config transformation so we can use one configuration on development environment and the other for production environment.
-
Visual Studio 2010 and .Net Framework 4.0 downloads
-
ASP.NET MVC installer for Visual Studio 2010 Beta 1
Phil Haack announced Tuesday availability of ASP.NET MVC installer for Visual Studio 2010 Beta 1. Referenced blog entry contains also some bits of information about ASP.NET MVC roadmap that is also interesting reading. Installer is available in CodePlex ASP.NET project. In the case of troubles you can find some help from Jacques Eloff’s blog posting Troubleshooting the MVC installer for Visual Studio 2010 Beta 1.
-
Links 2009-06-13
NB! This blog is moved to gunnarpeipman.com
-
SharePoint: Internal developer portal – first thoughts
My file system has one bad tumor – it is called over 6 months old My Documents. I have there a lot of stuff, it is somehow organized but it is still more like chaos. Most of these files are materials about different technologies and so on and also some business papers. Another chaos is my bookmarks collection… I thought about these files and links and suddenly I made conclusion – why not build separate SharePoint site to my company’s SharePoint server and publish all useful stuff there? I am sure that other guys have also stuff that may be interesting to others. So, here’s my first thoughts about developer info site on SharePoint server.
-
IIS SEO Toolkit: Sitemaps overview (illustrated)
IIS SEO Toolkit provides us besides site analysis also with sitemaps management. We can create sitemaps, sitemaps indexes, add URLs to sitemaps and sitemaps to sitemap indexes. Sitemap indexes are useful when you have more complex sitemaps structure (by example, you may have multiple sitemap files for different modules in you system).
-
IIS SEO Toolkit: Site analysis overview (illustrated)
As new IIS SEO Toolkit is here it is time now to make some tests with it. And what can be better test material than Microsoft own produced HTML documents? Well, I have my simple and primitive training web site running on my laptop and I think ASP.NET MVC Training Kit is perfect candidate for SEO tests. So, let’s see what SEO Toolkit thinks about it.
-
SharePoint: Customizing DispForm.aspx and EditForm.aspx through browser
DispForm.aspx that displays detail view of list item and EditForm.aspx that displays edit view of list item are not customizable by default. You can move to these pages but there is no Edit option in Site Actions menu. But it still possible to customize these pages, add new web parts there and so on. All you need is your web browser.
-
List of Microsoft training kits
Microsoft training kits are pretty good things to explore when you start learning some new technology. Here are links to some training kits I found to be interesting and useful. Some of these live also in my laptop and when I have free moments I explore them to learn more about these technologies. So, the list of training kits is here:
-
New IIS SEO toolkit launched
ScottGu just blogged about the new IIS SEO Toolkit that brings some new SEO features to IIS. You can download it from IIS Toolkit homepage or install it using Microsoft Web Platform Installer.
-
Visual Studio 2008: No ASP.NET MVC items shown in Add New Item dialog
Today I found something weird. I tried to add some new views to my ASP.NET MVC solution but there were no ASP.NET MVC items in new items dialog. All the other ASP.NET MVC projects had no problem like this. Solution is simple.
-
Visual Studio 2010: Multiple web.config versions
Visual Studio 2010 has support for multiple web.config files. It is one feature of new web application packaging and deployment system. We can create now separate web.config files for each configuration we have for application.
-
Windows 7: Cannot modify some DCOM services settings – help!
I have Windows 7 beta running on my machine. I need to change some settings of IIS WAMREG admin service. Although I am logged in as administrator and I started dcomcnfg under administrative permissions I am not able to modify security settings. What may be the problem?
-
SharePoint: Some users doesn’t receive alerts
I struggled with a weird problem today. I have pages library where users can insert pages through custom forms (it is public facing site, so I really don’t want to expose system pages to everybody). When new page is inserted to library then also alert will be created so user who owns the page gets e-mail when administrator approves or declines the page. Some users were not able to receive e-mails. There were no errors, no warnings – everything seemed to work normally.
-
Free ASP.NET 4.0 beta hosting available
Guys from ORCS Web are offering free ASP.NET 4.0 beta hosting until the end of October. Hosting plan is called “VS2010 and Web Deployment Tool Beta Program”. If you are interested in it then please feel free to sign up.
-
.Net Service Bus: How to make training kit examples authenticate without problems
I’m trying out Azure Training Kit examples to study cloud stuff that should hit the streets (or sky) later this year. I faced some trouble when trying to connect with .Net Service Bus using settings mentioned in examples (netTcpRelayBinding and CardSpace). I tried hard but CardSpace authentication failed every time. My final solution was simple: I moved to username and password authentication scheme.
-
ASP.NET 4.0: Modifying ClientID of controls
Client-side ID-s of ASP.NET controls have been problem for a long time. They are hard to predict and guess. Fool-proof method that uses JavaScript block that defines client-side ID-s as variable values is not very elegant. Today’s web applications use client-size scripting heavily and now ASP.NET 4.0 provides us with elegant features to handle client-size ID-s of controls to make client-side scripting easier for us. Let’s see quick example.
-
Reading embedded files at runtime
I have class library that contains some XML-files as embedded resources. Reading these files at runtime is very easy. It takes only couple of lines of code.
-
ASP.NET 4.0 SEO features: Description and keywords
Another new SEO feature that ASP.NET 4.0 introduces is support for meta description and keywords. I think these are the most abused SEO features ever and search engines are very careful when considering these meta tags but I am very sure that there are still engines that respect those tags and that’s what makes these new features very useful.
-
ASP.NET 4.0 SEO features: Response.RedirectPermanent()
ASP.NET 4.0 introduces some SEO improvements. Response has now new method called RedirectPermanent(). This method performs same redirect as Response.Redirect() but it uses response code 301. You can find more information about HTTP response codes from HTTP 1.1 specification, chapter 10. Status Code Definitions.
-
Visual Studio 2010: How to crash Windows 7
During Visual Studio 2010 testing I found interesting way how to crash Visual Studio 2010 so bad that my Windows 7 needs restart. Just follow these steps.
-
Visual Studio 2010 and .Net Framework 4.0
Here are my postings about Visual Studio 2010 and .Net Framework 4.0 that may be interesting to my readers.
-
.Net Framework 4.0: Introducing BigInteger
My previous posting was about performance of Fibonacci numbers algorithms. In this posting I will introduce you some problems related to limits of our usual integers and introduce you new feature in .Net Framework 4.0 – big integers. Big integers are useful when solving different mathematical problems. Also they are used in cryptography.
-
Performance of Fibonacci numbers algorithms
Performance of algorithms is important topic if you want to write programs that work fast and doesn’t eat too much resources. In this example I will show you two implementations of famous Fibonacci numbers algorithm and let you compare how these two implementations perform. This posting will be also introduction to my next posting to keep it smaller and to keep focus on point.
-
SharePoint: SPList.Clear() extension method
Currently there is no good method in SharePoint for deleting all items from list. But there are solutions that need this kind of functionality. During one of my projects I wrote extension method for SPList that removes all items from it.
-
.Net Framework 4.0: System.Linq.Parallel
.Net Framework 4.0 has parallel computing extensions for LINQ. Previously it was possible to download parallel extensions for LINQ separately from CodePlex. Of course, you can still use these extensions if you have older version that 4.0. I wrote a little, simple and pretty pointless example that illustrates how parallel queries work in .Net Framework 4.0.
-
.Net Framework 4.0: Using System.Lazy<T>
.Net Framework 4.0 provides us with a new class called Lazy<T>. As documentation sais then Lazy<T> provides support for several common patterns of lazy initialization, including the ability to initialize value types and to use null values. So it is construct that helps us implement lazy loading.
-
Free Typemock licenses
Guys from Typemock are giving away some free licenses. The text below is taken from their web site. I hope I get some licenses too. :)
-
Links 2009-05-15
NB! This blog is moved to gunnarpeipman.com
-
string.Repeat() – smaller and faster version
Yesterday I wrote about Repeat extension method for strings. Today I offer you shorter and faster version of it.
-
SharePoint: SPList.HasView() extension method
One quick posting. I wrote yesterday extension method for SharePoint that checks if view exists. I think it is far better for performance if I don’t live on try…catch to find out if view exists or not. Extension method that you have to put in static class is here.
-
string.Repeat() extension method
I needed str_repeat() functionality in one of my C# methods. As .Net currently doesn’t offer it I wrote my own Repeat() extension method for strings. Here you can find C# and VB.NET versions. Make sure you put the method inside static class.
-
Invalid postback or callback argument. Event validation is enabled using in configuration …
I wrote web part that uses Repeater control to create some repeating blocks of output. Each of these blocks has Button control in it. When I ran web part under SharePoint I got the following error: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Here is the solution.
-
SharePoint: COMException 0x81020069
A little mystery when updating publishing pages: page is checked out, some attributes are changed and now I want to update this page. All I get is error that even Google has never seen before: System.Runtime.InteropServices.COMException (0x81020069). As I got error message in my own language I try to translate it: Attributes of checked out and orphan regime document cannot be edited. To edit attributes you have to use special software for this type of file.
-
SharePoint: DCOM Error 10016
I you get Access Denied errors in SharePoint then take a look at Event Viewer to see if there are some DCOM 10016 Event Errors in System log: The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool. If there is such error then follow the steps below to get this error fixed.
-
Running SharePoint on Windows 7
I tried to put up SharePoint development environment on Windows 7 and guess what – I succeeded. I took smaller challenge and installed WSS 3.0 SP2. Of course, you can also install SharePoint Server instead of WSS. On my machine WSS 3.0 uses SQL Server 2008 Express edition as database. For MOSS 2007 you should have SQL Server 2008 Developer edition.
-
Why we should attack our own systems?
Web page that is not attacked by security team or developers and testers before going to live can be considered as unsecure because nobody knows how it behaves under attacks. Unfortunately there are many web pages that are not secure and not event tested with security in mind. If some of these web pages happen to be a e-commerce sites then it is not hard to guess what kind of data attacker may find in this system about us. How can we be sure that our systems are protected against attacks?
-
SharePoint: Exercise to Redmond guys
Those who have read Shvejk adventures may find this exercise a little bit familiar.
-
SharePoint: The security validation for this page is invalid
Another day, another lesson. This time I struggled with the following error: “The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.” This error occurs when you are on a custom form and try to save list item. I am sure that one can find many more scenarios where this error occurs. As usual, log contains error but not information.
-
SharePoint: Customizing standard forms
I needed a little bit customized forms that look similar to standard ones for one SharePoint solution. I have list with many fields and it is very inconvenient for users to fill these fields if they are following one after another. As there is no simple solution for this I created my own custom solution.
-
Links 2009-04-16
NB! This blog is moved to gunnarpeipman.com
-
Nz() function
NB! This blog is moved to gunnarpeipman.com
-
Azure Developer Portal: some screenshots
I am writing currently one simple web application that runs on usual hosting environment and also on Azure environment. Web application is already hosted in CodePlex and during next two months I will publish application binaries and also source code. I tested my application in Azure environment and here are some screenshots I made.
-
Tracer Bullet Development
After reading the books Ship it! and The Pragmatic Programmer, I suggest you to read both of them, I got some proof that I am right and the fast way I sometimes like to move is not my personal bad behaviour but suggested way to develop software. Officially it is called tracer bullet development. This method suggest you to write some code to make system work for customer so they can see how the system is planned. But this is not a usual prototyping procedure but involves some real coding work too.
-
Removing SPAN-tags around server control
I had to write some ASP.NET server controls for our current SharePoint portal project. We have very nice DIV-based layout and using standard components that generate table and a lot of JavaScript seems to me like an bad idea. I found out that server controls put container tags around their mark-up. I needed my own tags around output and I found a way how to achieve it.
-
The changes you have made require the following tables to be dropped and re-created
When changing tables in SQL Server Management Studio 2008 you may get the following error: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. I was surprised when I saw this message first but there is very simple solution.
-
The Pragmatic Programmer: From Journeyman to Master
-
SharePoint: Clean code for sequential workflow
I put up here SharePoint workflow code for the next times when Visual Studio screws some workflow up. It is easy for me to take working code here and it is easy for you too. To make code more clean I removed unused namespaces and refactored code so it is a little bit easier to read.
-
Links 2009-04-06
NB! This blog is moved to gunnarpeipman.com
-
SharePoint: How to find DispForm.aspx toolbar
I needed list item display view toolbar on one of the custom forms. It wasn’t very easy to find it from many files but I found it. Here it is.
-
Writing rich logging solution
Tests tell us if our software works as expected. But they tell us almost nothing about side effects of technical environment where system lives. We can face different problems when test users start testing system in their environment and we want to be ready to react fast to all problems. To get information about system’s work we need advanced logging.
-
SharePoint: Custom property of web part doesn’t show up
SharePoint usually surprises me on the most busiest moments. I wrote web part that has some custom properties. These properties were simple ones and it was okay to show these properties in Miscellaneous section of web part property sheet. Although properties were defined nothing new showed up in property sheet.
-
Example: resizing uploaded image
One of my readers asked for example about my image resizing routine. Here you can find example and also some notes about my code design solution.
-
Resizing images without loss of quality
ASP.NET provides us with System.Drawing namespace where we can find classes we can use to manipulate with images. There are many people out there who mistakenly think that Image.GetThumbnailImage is best choice for image resizing. You can easily create crappy images if you follow the code examples in previously pointed article. In this post I will show you how to resize images without negative side effects.
-
Problem when testing LINQ To SQL Classes objects
I am writing a small web shop application using ASP.NET MVC Framework. As a part of this project I also write unit test and integration tests. I am using LINQ To SQL Classes as a mapping solution in my project. I found one misleading behaviour of LINQ To SQL Classes when writing integration tests.
-
The view 'Index' or its master could not be found. The following locations were searched
One of ASP.NET MVC errors wasted one hour of my life today (of course, it is many times less than this season’s leader SharePoint) but this is still one hour. “The view 'Index' or its master could not be found. The following locations were searched” error raised suddenly and I was not able to get over it. Well, this time solution was simple.
-
Hiding loggers implementations using Unity
Loggers are one of most popular examples about interfaces for sure. And there are a lot of implementations of loggers. Some implementations are simple and yet powerful, some implementations may be more complex. All we have to is to select implementation we need and integrate it to our application. It seems like good idea at first place but as soon as we need to switch from one implementation to another we discover nasty dependencies we have to change in all places where we are logging. Let’s see how to avoid these dependencies.
-
SharePoint: how to fix CKS Live ID logout
Last month I wrote about how to add SharePoint users for Live ID accounts on Community Kit for SharePoint. Another problem we found was that logout didn’t worked as expected. When logging out form Live ID we can see error on Live ID site stating that logout from our system failed.
-
Links 2009-03-25
NB! This blog is moved to gunnarpeipman.com
-
Refactoring: extract and override factory method
I’m sure you have seen classes that initialize a lot of objects in their constructor. These classes may be hard to test because of those object creations I mentioned. To get around this problem we use Extract and override factory method refactoring so we can extend these classes and override some factory methods.
-
Windows Azure Tools for Microsoft Visual Studio March 2009 CTP
On Friday Microsoft released March 2009 CTP of Windows Azure Tools for Microsoft Visual Studio. You have to remove previous releases of Azure tools before installing new one.
-
Refactoring: adapt parameter
Sometimes you are not able to use Extract Interface refactoring because interface of parameter may be too large or there may be no interface at all. You just have class to pass in and you are not able to fake it or extend it to get class testable. In this case you have to use Adapt Parameter refactoring to create adapter that is seen through common some common class of interface.
-
Windows could not be activated
After installing Windows Server 2008 to one of my development server I got the following error: Windows could not be activated. Exact details of error:
-
SharePoint: Solving the name.dll ActiveX problem – the easy way
It is possible to solve name.dll issue in SharePoint without modifying JavaScript files.
-
Search Engine Optimization: An Hour a Day
-
Solving Azure configuration problems
Putting up development environment for Azure development may be not so smooth and easy task to do. All tools have currently CTP status and it is normal that there may be some problems. Here is my short list of problems. I provide solutions that worked for me. If somebody comes out with different solutions then please feel free to drop me a line.
-
Links 2009-03-13: Article series special
NB! This blog is moved to gunnarpeipman.com
-
SharePoint: Tracing Service lost trace events
Tracing Service lost trace events is one of those nasty entries in ULS log that refers to problems in logger service. If you see messages like these in SharePoint log then simply restart Windows SharePoint Services Tracing service. It took me a while to wonder what is going on until Jim Jackson’s blog entry SharePoint Logs - Tracing Service lost trace events helped me out. Thanks, Jim!
-
Links 2009-03-12
NB! This blog is moved to gunnarpeipman.com
-
SharePoint Manager 2007
One extremely useful utility for SharePoint is SharePoint Manager 2007. SPM2007 is developed by Carsten Keutmann. You may know him better by his other project – WSPBuilder that is one of the best SharePoint add-ins for Visual Studio.
-
The List – keep yourself on track
Ship it! A Practical Guide to Successful Software Projects, the book I introduced couple of days ago, introduces something called The List. The List is your task list that tells you what tasks you have, how long they would take to get done and when one or another task should be done.
-
Google Chrome / Windows 7 memory leak
NB! This blog is moved to gunnarpeipman.com
-
Refactoring: reduce variable scope
In good code variables are used as short as possible. Often we can see code where variables are defined in wider scope than it is necessary. There are many examples about too wide scopes. One of fuzziest of them is variable that is defined in class scope but it used only by one method and this method uses this variable as local variable. But variable life time can also be reduced in local scope. To achieve this we use refactoring method called reduce variable scope.
-
Abusing “as” operator
Casting to types using keyword as is one powerful features of C#.
-
Links 2009-03-07
NB! This blog is moved to gunnarpeipman.com
-
Death March
-
Refactoring: parameterize constructor
In legacy code you may find classes with constructor where some objects are created and initialized. These classes are not easily testable because they depend on other classes and therefore when you unit test these classes they may also throw exceptions of classes they depend on. In these cases we can use parameterize constructor refactoring.
-
Reading process output
Here is my little example about how to catch run console program and catch the output. I used similar code to read the output of OpenSLL.
-
Ship it! A Practical Guide to Successful Software Projects
-
Windows 7 and processor problem
I am not professional support worker or administrator. Also I have only a little knowledge about hardware. One week ago my computer started doing something weird. Couple of times per day I get BSOD with the following message:
-
Creating DTOs using AutoMapper
There is one small and nice object to object mapper called AutoMapper. I gave it a little try and I found it very useful. Specially if you have web service and you are using DTOs to move data between client and server. Good news is that AutoMapper is able to perform these mappings and you don't have to write more code than couple of lines. Let’s see example.
-
Links 2009-02-28
NB! This blog is moved to gunnarpeipman.com
-
Refactoring: extract interface
Extract interface is one of the most common refactoring techniques. Motivation behind extract interface refactoring method is to avoid direct dependencies between classes. Instead of using classes in method calls we use interfaces so we can also use subclasses of those classes we used before. Also we can create brand new classes that use follow these interfaces and we can use these classes instead of current ones.
-
SharePoint: creating SharePoint accounts for Live ID users
Couple of weeks ago I started adding Windows Live ID authentication support to SharePoint. I used Community Kit for SharePoint and I also made here some notes about it. There was one problem – although user is authenticated there is no SharePoint user and it is not possible assign it to any roles. Here is some advices how to create SharePoint user account when new user is registered after logging in using Live ID.
-
ASP.NET MVC: Ignore requests to favicon.ico
One problem I faced when writing my example pet portal on ASP.NET MVC was Google Chrome’s request to favicon.ico that doesn’t exist. IE8 that I use (8.0.7000.0) doesn’t make these blind requests to discover that favicon.ico is not there. Solution to my problem was very simple. Just add the ignore rule for favicon.ico to Global.asax file, in the beginning of RegisterRoutes method:
-
SharePoint: Writing messages to ULS (Unified Logging System)
If you want to make your SharePoint solution more SharePoint way you can write your tracing, debug and error messages to SharePoint log. Easiest way to do it is to write logger by yourself. Btw, SharePoint has class called ULS to write messages to logs but this class is internal and we cannot use it. But it is there.
-
SharePoint: Access denied error when adding new page to page library
On one of my servers I detected very weird error. There are authenticated users who can add content to some page libraries and modify pages they have made. One day suddenly they were not able to add pages to page library anymore because of Access Denied error. Well, thanks Google, God and Clinton Cherry for saving my ass this time.
-
Links 2009-02-24
NB! This blog is moved to gunnarpeipman.com
-
Starting with ASP.NET MVC
About a week ago I started learning ASP.NET MVC framework. It is pretty cool entertainment for cold winter nights as I found out. Here are the steps I made to get started:
-
Show your Twitter log in SharePoint
About year ago I wrote how to display blog feeds in SharePoint sites using XML Web Part. Today is Twitter very popular and we can use XML Web Part to render Twitter feeds. To see how to configure XML Web Part check out blog feeds entry referred above. This time you have to insert user Twitter feed as XML link, by example http://twitter.com/statuses/user_timeline/12358522.rss. Click XSL Editor button and insert the following XSL to dialog window.
-
Please help - Visual Studio SharePoint development environment is very slow
I run SharePoint development environment on virtual machine. Virtual machine has 2GB RAM and 30GB disk space. Also I have no complaints over processor (I can run here two usual ASP.NET development virtual machines parallel). All other Visual Studio projects are working well except those that use VSeWSS 1.2. Hard performance problems occur usually at these moments:
-
Links 2009-02-19
NB! This blog is moved to gunnarpeipman.com
-
Debugging SharePoint solutions using Visual Studio
Debugging SharePoint solutions with Visual Studio on local machine is pretty easy. Although you can find articles about how to deploy your PDB files to global assembly cache etc it is more simpler than that. Just follow the steps below. Btw you can click on images if you want to see them on original size.
-
SPListItemCollection.GetDataTable() – be careful
Seems like I am stuck in ADODB days a little bit and I still expect that query with no results returns at least some meta data. Or at least my code gets no bombed by null references. SPListItemCollection has GetDataTable() method that returns items collection as ADO.NET DataTable objects. Be careful when using this method – if your items collection is empty then this method returns null.
-
Windows Mobile 6.5 screenshots
Guys from wmpoweruser.com have posted some nice Windows Mobile 6.5 screenshots. Feel free to follow these links to see what is waiting for us.
-
Creating cross-site lookup field in SharePoint
Cross-site lookup field is something we need almost every project that is not very small. There is no good OOTB solution but we can use field by Toby Bierman. This kind of field is easy to create because SPFieldLookup is cross-site by its nature. Basically you ave to perform the following steps.
-
SharePoint and Windows Live Authentication
In one of my SharePoint projects I had to implement authentication using Windows Live ID. I’m too lazy to code all this stuff from zero if it is possible to find already working solutions. I found out that Community Kit for SharePoint has something for me – Windows Live Authentication 1.0. After some hacking everything started to work.
-
UserProfileManager.UserExists and “Operation is not valid due to the current state of the object”
I have clean install of MOSS 2007 and I have one .aspx page that makes some request to SSP. All the code in this page is running in elevated permissions and I decide programmatically what kind of content this page shows to visitor. When I check if user profile exists I get the following error message: Operation is not valid due to the current state of the object.
-
Visual Studio add-in: CopySourceAsHTML
When I started with this blog I needed some tool to copy code snippets from Visual Studio to Windows Live Writer so I get formatted code. There is cool online code highlighter called GeSHi, but I wanted my code to look like in Visual Studio editor. After some searching I found Visual Studio add-in CopySourceAsHTML.
-
Some notes about custom C# application and Exchange Server 2003 integration
Custom C# application and Exchange Server 2003 integration over WebDAV was one of the tasks I lately worked on. I made posting about how to log on to Outlook Web Access when FBA is used but I didn’t mentioned that I had to read data from Exchange public folders. There are some stuff that may drive you nuts but there are also some tricks to use to get everything work as expected.
-
Refactoring: rename method
One of the simplest refactoring methods is called Rename method. There are many reasons why one may want to change the name of some method. I think that main reason to rename a method is to give it a name that describes better what method is supposed to do.
-
Links 2009-02-07
SharePoint
- Installing a Language Pack for MOSS
Mauro Cardarelli writes about how to install language packs to MOSS 2007. It is good guide to follow if you have clean MOSS 2007 install without any language packs.
- Building multi-lingual SharePoint sites - introducing the Language Store
Chris O’Brien writes about how to use SPLanguageStore to create multi-lingual SharePoint sites where you can easily manage the translations through SharePoint user interface.
- ServerTemplate Numbers
Evan Grimmett offers us a table of SharePoint list template numeric codes. It is handsome list to use when you have to create lists and templates through code.
.Net
- Debugging Slides
Zain Naboulsi offers some slides from his Visual Studio 2008 debugging tips and tricks presentation.
- .NET Memory Leak: To dispose or not to dispose, that’s the 1 GB question
Tess Ferrandez writes about importance of disposing objects. Through the use of debugging tools we can see how Tess analyzes problems with code and finds the reason of memory leaks. Suggested reading for all developers.
- When is a Type not a Type?
Brad Wilson gives us overview of .Net Type class and the types itself and describes some interesting facts related to types in .Net.
- Installing a Language Pack for MOSS
-
Apache, IIS and 502 proxy error
I have some servers in my network. There is one public Apache server that proxies requests to these servers. These servers are not directly visible from internet. Some of these servers run IIS and ASP.NET web applications. When accessing these servers through internet then sometimes Apache reports a problem: 502 proxy error.
-
SharePoint: temporary solution for GetCustomProperty and SetCustomProperty errors
Another day, another kinky problem with SharePoint. This time I struggled with custom properties of my custom field. I tried out different code samples to make GetCustomProperty and SetCustomProperty to work but no luck at all – nothing worked for me. There was no errors when adding field to list or changing field properties but custom properties were never saved. I don’t like solutions like my version comments solution but some (not only some, sorry) parts of SharePoint need brutality and violence to work like expected. But I have solution.
-
SharePoint: why are my custom content type forms empty?
Okay, this is the hit of the month for me. Well, we had to use custom forms with some content types. Everything went fine until all those custom forms showed up empty. No errors on screen, no errors in log files, no errors in event log. Also diagnostic messages were not helpful. But … solution was simple.
-
Creating downloadable calendar item of SPListItem
Recently I prepared some code to download calendar item from SharePoint web part to user computer. I was lucky because the web part will only be used on details view of one list. The testing code I wrote was simple and short.
-
Creating SharePoint global calendar
Creating global calendar that shows data from different calendars is something that SharePoint doesn’t have out-of-box. Using site data query and calendar view control we can easily create global calendar and make it show data from lists we want.
-
whitehouse.gov runs on ASP.NET
I found some information about www.whitehouse.gov web site and it turns out that this site runs on ASP.NET. Some interesting characteristics:
-
Refactoring
Here you can find links to my postings that introduce source code refactoring methods. If I have done good job then after reading these postings you should be able to write more readable code than before.
-
Refactoring: introduce constant
One way to write messy code is to use constant values in code without any explanations about their values or purpose. Sometimes it feels like too small problem to think about, specially when there are only couple of constants, but I am sure that hard coded constants may waste developers valuable time more than one may think at first place. To make this kind of code easier to read and understand we can use refactoring method called introduce constant.
-
Windows 7 on my development machine
Okay, my Windows Vista found its sad end couple of days ago. There was almost nothing to do without going out of sleeping time. Many broken installation packages, large amounts of space were gone somewhere, some processes ate free memory and after each 10 seconds there was 10 seconds delay because something was busy doing something. One thing more – reading and writing USB hard discs was suddenly very-very slow. So it was time to use the moment and try out something new before going back to good old Windows XP.
-
Refactoring: delete unneeded code
It is not a miracle that during coding developers produce code that is later not needed anymore. It is also not a miracle that unneeded code will stay in project files waiting for the day when somebody finds this code useful (again). But this far this code is just sitting there and causing problems to people who look at these modules first time.
-
EnumHelper class
Some time ago I wrote blog posting Extension method for enumerators where I showed how to use extension methods to make using of enumerators more convenient. Today I found very interesting posting from Grant Barrington blog where he describes the class called EnumHelper.
-
Refactoring: expose static method
You may discover sometimes that some of your classes have method you would like to use without creating new instance of that class. In this case we have to use expose static method refactoring to make this method static.
-
Extreme Programming Explained
-
Five questions from customers about web pages
Here is my little QA posting about what customers have asked me and what kind of answers I have given. Feel free to write your opinions to comments as your comments are always welcome here.
-
Five steps to more successful SharePoint solutions
Some points about how to succeed in SharePoint projects. Nothing special but my little experiences.
-
Getting Results From Software Development Teams
-
Refactoring: extract method
Extract method is one of the most popular refactoring method when dealing with legacy code. In legacy code we can often find methods that are very long. My favorite findings methods about 2000 lines of code. Cool, isn’t it? Those methods have usually many responsibilities and they are hard to debug. Having more than one responsibility in one method leads also to duplicated code because some responsibility is required in more than one place in code.
-
You must use the dbSeeChanges option with OpenRecordSet when accessing a SQL Server table that has an IDENTITY column
One error you may get when querying SQL Server databases through MS Access is "You must use the dbSeeChanges option with OpenRecordSet when accessing a SQL Server table that has an IDENTITY column". This error appears when you open recordset that contains IDENTITY column. Usually you have to do something like this to get this error (FindTrainer query gets data from SQL Server table).
-
SharePoint and constant [Today]
If you are creating views on sites that use different language than english then you cannot use constant [Today]. This constant is translated to site language and it depends on language you are using. Example: when developing sites in estonian language I have to use constant [Täna] instead of [Today]. Otherwise error message will be shown and I cannot save the view.
-
Software Estimation - Demystifying the Black Art