Saturday, January 8, 2011

Common config for Sharepoint 2010




As always when the new SharePoint installation is deployed I tend to think about it's framework. As we know SharePoint is compiled to work with .NET framework 3.5, actually it works best with .NET 2.0 and I found myself doing hacks, from time to time, to make it work with 3.5 library. And I don't get it when people say that SharePoint 2010 works with .NET framework 3.5 Service Pack 1, it is so misleading. The truth is that SharePoint 2010 is compiled against .NET in version 3.5, and this version of ASP.NET framework is based on 2.0 runtime, it is because .NET version 3.0 and 3.5 did not change the runtime. Why can't I use framework 4.0, why people at Microsoft thought It would be great not to allowed SharePoint, to work with .NET 4.0 libraries? I can only guess that they wanted to realese new version as soon as possible, and didn't want to experiment with a new runtime, that probably did not exist when they started the project (or what is more probable it was unstable and no one knew if it is going to be stable on time). The result of those actions is my headacke, each time when I try to create architecture in order to overcome framework problem. In example I have to host WF4.0 workflows as WCF services in order to use it.

The next thing I do not like in SharePoint 2010 is it's configuration. Everything is done through XML, and there is no fluent, that I am aware of to make it simpler. In example, when I work in my development environment, and I have a fresh SharePoint installation I look at the web to find how to turn on error logging, that are developer friendly. As always it takes time to find in on the web and modify web.config.


<SharePoint>
<SafeMode CallStack="true" ...>
</SharePoint>
<system.web>
<customErrors mode="off">
</system.web>


Why can't you Microsoft make it more friendly?

Sharepoint 2010 on Windows 7




I finally did it! I was working on my mac dual boot (Leopard, Windows 7) box for a long time. Long time ago, I've chosen a Windows 7 32 bit operating system, instead of 64. I did it because when Microsoft released Windows 7 on 64 architecture I was struggling to do anything on 64 bit configuration (on my personal laptop), and I didn't want to face this same problems on my stationary computer at home. By problems (ehm... challenges, as my mentor once said) I mean majority of 3'party applications, or even applications written by Microsoft did not work on a 64 bit Windows 7. Those were a tools that everyone (developer) uses like SQL Server Management Studio Express, Remote Desktop, ... until updates were written and new version of products were released I spent many nights trying to find a tool that allowed me to do my job, that would be easily done by a tool that I knew, but was not willing to run on Windows 7 64.

Recently I find more (but still not many of them) applications that work only on 64 bit architecture. One of them in SharePoint server, and SharePoint foundation 2010. By not working on 32 bit architecture I mean that you can not even run the installer, It will simply not work. What you can do if you are desperate - you can virtualize the SharePoint image on your 32 bit computer. But it requires a different tool then Microsoft Virtual Server. You need a tool that can emulate the 64 bit architecture on top of 32 bit one (like VMWare Server, witch is also free). Some (I don't know any tool that does not) of emulating tools, like VMWare Server require you to have a special mother board that allowed such configuration (I mean that allowed emulation of 64 bit system on 32 bit one). Architectural and bits problems, It all always reminds me about old time programming for Windows, Petzold in his excellent book, spent tremendous work trying to explain to people why, for windows programmer, architecture mater. It's amazing that this book was released in 1998 (my version is from year 2001, and still keeps it's price) by current developers are facing this same challenges.

I finally reinstalled my windows system to take advantage of the 64 bit architecture. Unfortunately still I faced some problems in SharePoint installation. The normal SherePoint Server and SharePoint Foundation installer wont work on other operating system then Windows Server 2008. One needs to follow instructions. I would add some comments to this documentation. The command that needs to be triggered to unpack SharePoint Foundation installation is different:

SharePointFoundation.exe /extract:c:\SharePointFiles

And yes, you DON'T need to copy installation to following location:

C:\SharePointFiles

You can do it wherever you want.

The following command didn't work for me, and I didn't need it to install SharePoint:

c:\SharePointFiles\PrerequisiteInstallerFiles\FilterPack\FilterPack.msi

There error I received when trying to run this command was exactly this same as when trying to run default SharePoint installer - it requires Microsoft Server 2008.

If you installed Visual Studio 2010 you DON'T need to install following dependencies (even when you install SharePoint Foundations):

Microsoft Sync Framework
SQL Server Native Client
Chart Controls
SQL Server Analysis Services - ADOMD.Net


You need to install following dependencies:

Windows Identity Foundation (I got mine from here, for Windows 7 64bit version 6.1)


You DON'T need to fire up this instruction

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;
IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;
IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;
IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;
IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;
IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;
IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;
IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;
IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;
WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;
WCF-NonHTTP-Activation

Just be sure to go to ControlPanel->Programs->IIS and enable all the features underneath IIS, that are showed in the documentation (I mean the SharePoint installation instruction for Windows 7 mentioned before).

Thursday, January 6, 2011

SISAL language




Some time ago I was reading a really good article by MarkCC. Because recently I am struggling with implementation of Knuth's algorithms in my favourite languages (Scheme and recently Haskell) I was looking for something less declarative and more strict (in terms of how algorithm is going to be computed). I found SISAL, a really interesting language designed in 1983 (my favourite year), and with a design that is totally 21 century - the language by design supported concurrency, and was designed to have a Fortran like performance, SISAL is functional and you can compile it's code. Because lately I see only articles that deal with Scala, Groovy and other languages that are well know (from the set of a not main stream languages) I thought that would be a great idea to introduce some completely different programming language that looks at the programming problem from a different perspective. Give it a look.

Sunday, December 26, 2010

ycombinator and things I read




Recently a friend of mine send me a link to ycombinator - great resource for someone like me. So, if you like to read things that are more pragmatic then going deep but stay focused on one technology, methodology or technic, then this is something like /. but more techie. Simply I love it, usually, really short articles behind, on various subjects. Some time ago I spend tremendous amount of time looking for some good resources of techie knowledge, and so far /. is the only thing I am using on daily basis, but ycombinator seems to be great as well.

In terms of books, recently I read:
Knuth's The Art Of Programming (first 3 tomes)
Avodey's Category Theory (Oxford Logic Guides)

I enjoy reading few books at this same time (well, almost this same). When a part of book, or some topic is not really interesting, I switch to second book, and give my brain a fresh topic.

In terms of Knuth's books, I enjoy the way how they are written, easy to read, with sense of humor. Excellent exercises at the end of each topic. I don't like the MIX language. It is too old fashion to me. Sometimes, dealing with the language is harder then the algorithm itself, and a problem is more about how to write the code well (or even, how to write it), and not how to deeply understand, why some operations take place, and why they are done now, and that way. But still I recommend this book.

I spend some time deciding between Category Theory (Oxford) and Basic Category Theory for Computer Scientists (MIT). The O book is newer and bigger than M book, but also more expensive. I made a decision, base on fact that I am more Oxford then MIT boy (sorry chaps:)). So far I love it, easy to understand, lot's of new stuff to learn. I don't see to many exercises that are good for me, and It makes it hard to test new knowledge.

Sunday, December 19, 2010

Enabling grep in windows emacs installation




New windows, means new emacs and firefox configuration.

First step is to install dired plus, so it would be easy to search using grep directly from dired.

To enable grep in windows installation of emacs one needs to install grep, it is a good idea to install also find utilities. I tend to change the find.exe file name to efind, because windows already defines find utility. Then add bin directory to windows path. And copy following libraries:

libiconv2.dll
libintl3.dll
pcre3.dll
regex2.dll


to emacs installation bin directory:

%EMACS_HOME%\emacs\bin


In addition in my last post I forgot to add following line in .emacs

(setq make-backup-files nil)


In terms of Firefox some additional plugins, that I tend to use recently:

Tamper data
Statusbar
Visual Event

Haskell Platform





Long, long time ago, when I started to learn haskell I spend many days trying to choose between ghc and hugs. Some people used ghc and other hugs, and there was no right choice. The problem for me was pretty big, because I come to haskell from the world of scheme, and in scheme sooner or later one finds out that there are 'some' differences between implementations, and later on when you want to use some public library you need to switch to other implementation, and code that you already have is not 100% compatible with it. And some migration errors are really hard to find. For example if an element of a code is not used usually, but will fire up when some weird criteria are met. Sad thing, isnt it?

Today, I created a new Windows box, and I needed an haskell environment. I tend to write my haskell code in Emacs (OurComments.org edition), and I love it, but today I went to haskell.org, and I was surprised to see that there are dramatical changes in the contend of this site (I don't use this site at all). And finally somebody have written some cool looking haskell tutorial. I love the look and feel of it (guys, great job there). Also I was surprised to see that they are promoting a Haskell Platform. Witch is an environment and set of tools on top of ghc. I gave it a shot, and so far so good. Good to see that the haskell is still improving. Let's keep it that way:)

Sunday, October 10, 2010

Types in c#

I hate to forget about links that I love to read. From time to time I forget about how it goes. Here are two great articles and links to nice blogs to read.

Types in C#.