Home RegisterLogin
Menu
 
Contact

My name is Tomasz Modelski,
please reach me by:


Skype: tmodelsk
Cell: +48 791 999 855

If you speak polish:
http://wiara.tmod.pl

 
Hosted by Webhost4life
Blog
Author: Tomasz Modelski Created: 2009-02-13 15:19:07Z
Blog

I’m trying to do some Sharepoint (WSS/MOSS) 2007 development, mostly advanced custom forms …. .
I’m little bit flustrated and right now I think (feel) that SHAREPOINT SUCKS.

It’s so … overcomplicated … unclear … strange.
Sharepoint Designer is so unfriendly tool.

I’m … angry and typed ‘Sharepoint sucks’ into google:

  • http://furuknap.blogspot.com/2009/10/sharepoint-sucks-and-heres-why-part-1.html 
  • http://furuknap.blogspot.com/2009/10/sharepoint-sucks-and-heres-why-part-2.html 

    Customers are easily impressed and sold when a salesperson, whether that person is a consultant or a bone-fide seller, demonstrate how easy it is to hack together a working proof-of-concept.
    When a real architect or developer enters the project,
    customers are shocked to learn that developing aSharePoint solution is nothing different from any other software development project and is a lot more expensive than the impression left by the sales process.

    When shit hits the fan, blame is easily placed, but the customer is still left without what they want. So, the customer is asked, again, to adjust their requirements to meet the solution.

  • http://www.realsoftwaredevelopment.com/why-sharepoint-portal-server-is-terrible/ 
  • http://sheehantu.wordpress.com/2008/02/01/sharepoint-sucks/ – & comments
  • And finally post from 2005 about SPS 2003. It’s like a prophet :-):
    Five Things wrong with Sharepoint: http://www.informit.com/articles/article.aspx?p=391848 
  • AND FINALLY: http://vtimashkov.wordpress.com/sharepoint-disadvantages/  - good technical list of SPS bugs & stupidity.
  • AND FINAL FINAL FINAL (comment from here): Heh :-)
    Let me just say this, as primarily a BI guy who has become responsible for essentially a sharepoint frontend of reporting services.  I have spent the better part of a week trying to migrate our current production environment to a different dev server with a fresh sharepoint install.  I have run into more errors then I can count, and tried multiple sharepoint tools to try to accomplish this.  I have posted multiple times to the Sharepoint MSDN message boards with not even a single response other than myself practically begging for some advice.  For probably the first time in my life in IT I am looking at a situation where I have no clue how to successfully do what seems like a pretty typical task, and I see no hope in sight.  Hence my frustration and typing in Sharepoint sucks into google just for fun, and I stumble upon this.
  • !!!! sharepoint-not-the-social-answer !!!!!!  http://www.jimgoings.com/2008/03/sharepoint-not-the-social-answer/
    When we migrated from SharePoint 2003 to 2007 ……..
    …… You know what we had in the end? A freakin’ glorified file server. ……
    …………
    One of the comments:

    I know one guy (and I know people in 20+ contries that work with IT), that can handle all the needed aspects of running and developing Sharepoint. The list of knowledge you must have to develop and maintain this application, without ste

Read More »

Ref tells the compiler that the object is initialized before entering the function, while out tells the compiler that the object will be intialized inside the function.

So while ref is two-ways, out is out-only.

http://stackoverflow.com/questions/388464/c-whats-the-difference-between-the-ref-and-out-keywords/388467#388467
http://stackoverflow.com/questions/388464/c-whats-the-difference-between-the-ref-and-out-keywords

Found on : http://www.eggheadcafe.com/software/aspnet/29145230/easiest-way-to-drop-all-t.aspx by ‘Damien’
It works :-)

I’m using it in our project with NHibernate, to recreate database schema.
There are some situation when NHibernate with Hbm2ddl.Auto = "create" won’t delete all old tables from db, and won’t create new schema.

 

declare boris cursor for
select
'alter table [' + USER_NAME(so.uid) + '].[' + OBJECT_NAME(sfk.fkeyid)
+ '] drop constraint [' + OBJECT_NAME(sfk.constid) + ']'
from
sysforeignkeys sfk
inner join
sysobjects so
on
sfk.fkeyid = so.id
where
OBJECTPROPERTY(so.ID,N'IsMSShipped') = 0 and
OBJECTPROPERTY(so.ID,N'IsTable') = 1

declare @sql varchar(8000)

open boris

fetch next from boris into @sql
while @@FETCH_STATUS = 0
begin
exec(@sql)

fetch next from boris into @sql
end

close boris
deallocate boris

declare boris cursor for
select
'drop table [' + USER_NAME(uid) + '].[' + OBJECT_NAME(ID) + ']'
from
sysobjects
where
OBJECTPROPERTY(ID,N'IsMSShipped') = 0 and
OBJECTPROPERTY(ID,N'IsTable') = 1

open boris

fetch next from boris into @sql
while @@FETCH_STATUS = 0
begin
exec(@sql)

fetch next from boris into @sql
end

close boris
deallocate boris

We are setting up architecture in new project and it’s not easy to decide which DAL / ORM technology use in it.
NHibernate or Entity Framework ?
I’m determined to use NHibernate, but 2 of team members are familiar with EF and don’t now NH at all.

I was looking for post about NH vs EF, there are many (most of them are 1 year old) but only a few are recent , those recent ones are here:


UPDATE
(05-01-2010):

First, we decided to use Entity Framework. After 2 weeks, we swiched back to NHibernate.
I’ll explain it in further posts, but main reason was buggy EF Designer in Visual Studio. It was hard & time consuming to build model.

Especially updating model from database was painful and buggy process.

Some few additional links:

My advice is: If you are creating enterprise application, don’t touch EF. Use NHibernate.
I’ve tested it.

Read More »

I’ve created FAQ page for DNN Tagged Content solution.
Dear customer, feel free to ask questions if you have doubts or you don’t know how to achieve Tagged Content functionality you can see on my website.

Few months ago I’ve published first version of my ListUnique.
ListUnique is .Net C# generic list which keeps insertion order, you can iterate through it and it has only unique values, with IListUnique interface.

Below is next version, with unit tests.
What’s new :

  • new methods AddUniqueOnly & AddRangeUniqueOnly – those methods will add only unique values, won’t throw exception if value is already in list.
    Just add unique values and omit existing ones.

This post is also online test of SyntaxHighlighter.
I’ve integrated it with DotNetNuke Blog module.
Within few days I’ll release this module (called BlogPlus) – it contains fixes & modifications & new features for core Blog module, SyntaxHighlighter is one of new features.

using System;
using System.Collections.Generic;


namespace TM.Common.Collections
{
	/// <summary>
	/// List that allows only unique values
	/// </summary>
	/// <typeparam name="T">Must implement IComparable T </typeparam>
	public class ListUnique<T> : List<T>, IListUnique<T> where T : IComparable<T>
	{
		
		public new void Add(T item)
		{	
			if( Exists(itemList => itemList.CompareTo(item) == 0) )
			{
				throw new ArgumentException("Cannot add not unique value to collection");
			}
			
			base.Add(item);
		}
		
		/// <summary>
		/// Adds element only if is unique
		/// </summary>
		/// <param name="item"></param>
		/// <returns>Return added or not</returns>
		public bool AddUniqueOnly(T item)
		{
			if( Exists(itemList => itemList.CompareTo(item) == 0) )
				return false;
			
			base.Add(item);
			return true;
		}

		/// <summary>
		/// Adds elements of the specified collection to the end of the list
		/// </summary>
		/// <param name="coll"></param>
		public new void AddRange(IEnumerable<T> coll)
		{
			foreach (T item in coll)
			{
				Add(item);
			}
		}

		/// <summary>
		/// Adds only unique elements of the specified collection to the end of the list
		/// </summary>
		/// <param name="coll"></param>
		public void AddRangeUnique(IEnumerable<T> coll)
		{
			foreach (T item in coll)
			{
				try
				{
					Add(item);
				}
				catch (ArgumentException)
				{  }
			}
		}

		public List<T> ToList()
		{
			return this;
		}

		public ListUnique(IEnumerable<T> collection)
		{
			foreach (T t in collection)
			{
				Add(t);
			}
		}

		public ListUnique(int capacity): base(capacity)
		{
		}

		public ListUnique()
		{
		}
	}

	/// <summary>
	/// IList that allows only unique values
	/// </summary>
	/// <typeparam name="T">Must implement IComparable T </typeparam>
	public interface IListUnique<T> : IList<T> where T : IComparable<T>
	{
		List<T> ToList();

		bool AddUniqueOnly(T item);

		/// <summary>
		/// Adds elements of the specified collection to the end of the list, throws exception on unique violation
		/// </summary>
		/// <param name="coll"></param>
		void AddRange(IEnumerable<T> coll);

		/// <summary

Read More »

31 Days of Refactoring is a serie of refactoring tips and producing good quality code by Sean Chambers from Los Techies.
It’s also available as ebook.

Below is index of those refactoring tips (copy from original index):

  1. Refactoring Day 1 : Encapsulate Collection
  2. Refactoring Day 2 : Move Method
  3. Refactoring Day 3 : Pull Up Method
  4. Refactoring Day 4 : Push Down Method
  5. Refactoring Day 5 : Pull Up Field
  6. Refactoring Day 6 : Push Down Field
  7. Refactoring Day 7 : Rename (method, class, parameter)
  8. Refactoring Day 8 : Replace Inheritance with Delegation
  9. Refactoring Day 9 : Extract Interface
  10. Refactoring Day 10 : Extract Method
  11. Refactoring Day 11 : Switch to Strategy
  12. Refactoring Day 12 : Break Dependencies
  13. Refactoring Day 13 : Extract Method Object
  14. Refactoring Day 14 : Break Responsibilities
  15. Refactoring Day 15 : Remove Duplication
  16. Refactoring Day 16 : Encapsulate Conditional
  17. Refactoring Day 17 : Extract Superclass
  18. Refactoring Day 18 : Replace exception with conditional
  19. Refactoring Day 19 : Extract Factory Class
  20. Refactoring Day 20 : Extract Subclass
  21. Refactoring Day 21 : Collapse Hierarchy
  22. Refactoring Day 22 : Break Method
  23. Refactoring Day 23 : Introduce Parameter Object
  24. Refactoring Day 24 : Remove Arrowhead Antipattern
  25. Refactoring Day 25 : Introduce Design By Contract Checks
  26. Refactoring Day 26 : Remove Double Negative
  27. Refactoring Day 27 : Remove God Classes
  28. Refactoring Day 28 : Rename boolean methods
  29. Refactoring Day 29 : Remove Middle Man
  30. Refactoring Day 30 : Return ASAP
  31. Refactoring Day 31 : Replace Conditional with Polymorphism

Read More »

I needed to ‘TDD’ class which uses HttpContext.

Easiest solution that I found working is to use MockHttpContext class by Michael Primeaux - http://www.distributethis.com/ .

The concept is when you create

MockHttpContext context = new MockHttpContext(@"C:\Intepub\wwwroot\", "/MyVirtualDirectoryName")

in ex. unit test TestFixtureSetUp than
HttpContext.Current is not null in unit tests. Nice, it works.

I have bad feeling that it’s not ideal solution, the best is to inject mocked HttpContext to tested class, I think.
But above solution works for now.

Other links about mocking HttpContext:

Tagged Content v.1.4.3 is released.

These is bug fix release.
Changes from version 1.4.2 are:

  • RelatetedTaggedCnt module - obsolette button 'Add Content' for admin/editor removed.
  • RelatetedTaggedCnt module -added setting checkbox: open related links in same or new window

See release notes for complete version history.
Clients who purchased earlier version are free to upgrade – please go to Update page.

Only RelatedTaggedCnt module needs to be updated (installed) into your portal.

Tagged Content could be purchased on on SnowCovered, free version 1.4.3 is available for download.
Please visit project page for all details.

 
Tags: IT , Home
Tags