I just read a post from Ayende about the sad state of NHibernate code generation. Between the comments, I spotted a few ones from Frans Bouma.
Exactly one year ago (well, minus a couple of days really), after a thoroughly careful evaluation, I decided to purchase LLBLGen Pro's license. I liked the tool since I first used it and in a very short time it let me to become very productive. I think I was a quite advanced user, I wrote new templates, inserted base classes and stuffs like that.
Problem was, a couple of people in the team never really grokked it, and one of them was the manager. I was sincerely not understanding why they were not able to be as productive as me, so I did some research looking for something to help them to become more proficient, and I found a very clear article written by Frans Bouma. I referred that to my team mates, and after reading that, my manager and some other team member found themselves more in camp 3 (the domain model approach) than 2 (the entity approach). At the time, after evaluating what the market was offering, we switched to ActiveRecord + NHibernate + NHibernate.Generics (incidentally, I was totally against using NHibernate without ActiveRecord due some previous hellish experiences with older versions of Hibernate). One of the alternatives we tested was Genome, which I remember to be quite promising, but which at the time was having very sloppy performances (but it was by no means the worst between the ones we evalueted).
I found that personally I feel comfortable with both the approaches (as long as people don't commit repository breaking code, I am comfortable with almost anything), but some people seems not to be so flexible, so I do sincerely believe it could be a good strategy for LLBLGen Pro to start supporting NHibernate templates (and, even better, ActiveRecord and Gentle.Net templates as well).
Tuesday, 20 March 2007
LLBLGen Pro to support NH, GN, AR: +1
Labels:
ActiveRecord,
en-GB,
Genome,
Gentle.Net,
LLBLGen Pro,
NHibernate
Monday, 12 March 2007
Mutex could not be created
Working with ASP.Net, have you ever got a:
Server Error in '/xxx' Application. -------------------------------------------------------------------------------- Mutex could not be created.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. bla bla bla ..
Server Error in '/xxx' Application. -------------------------------------------------------------------------------- Mutex could not be created.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. bla bla bla ..
I have solved it in various way, but so far the best workaround I have got (thanks mostly to a post of a chap called Joao Morais) is the following:
- - If you have visual studio 2005 is open, close it
- - Go to the ASP.NET temporary folder for v2.0 of the framework
-
\Microsoft.Net\Framework\v2.0 \Temporary ASP.NET pages - - Remove the folder for your application (or all of them)
- - Reset IIS (on a command line window, >iisreset) [not always needed, but I had to use it sometimes]
- - First Browse your page from IE (http://localhost/your app)
- - Then reopen Visual studio
I can only add that a aspnet_regiis -ga \ before resetting IIS, is usually helping, as in 64 bit environments to try to enable/disable the Enable32bitAppOnWin64 IIS Metabase properties.
Warning: this is a brute force approach, a bit like formatting an hard disk because the operating system got some cold, use with discrection!
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 0
%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
Warning: this is a brute force approach, a bit like formatting an hard disk because the operating system got some cold, use with discrection!
Labels:
Asp.Net,
en-GB,
IIS,
Mutex could not be created
Monday, 5 February 2007
CruiseControl.Net and SVN over SSL
On Microsoft Windows (2003 and XP) CruiseControl.Net is usually running as a service under the Local System Account (LSA), but, to update the working copy used from the integration service using a SVN repository contacted through SSL, we have to accept permanently the server certificate.
To achieve that, we have to log as Local System, which is accomplished using the command at with the interactive switch. In example, let's suppose that the time is 16:59, running the following command we'll open a Command Prompt running as LSA:
Once logged in as LSA, it is just a matter of launching a svn up (or another command which is permitting us to save the server certificate) from the desidered working copy folder, and to accept permanently the server certificate.
The server certificate will be then saved on the $UserProfile\Application Data\Subversion\auth\svn.ssl.server folder (where in the case of the LSA $UserProfile is usually something as C:\Documents and Settings\LocalService\).
Warning: no, you cannot log as LSA using the abovementioned trick from a terminal server. Use the console!
To achieve that, we have to log as Local System, which is accomplished using the command at with the interactive switch. In example, let's suppose that the time is 16:59, running the following command we'll open a Command Prompt running as LSA:
at 17:00 /interactive cmd.exe
Once logged in as LSA, it is just a matter of launching a svn up (or another command which is permitting us to save the server certificate) from the desidered working copy folder, and to accept permanently the server certificate.
The server certificate will be then saved on the $UserProfile\Application Data\Subversion\auth\svn.ssl.server folder (where in the case of the LSA $UserProfile is usually something as C:\Documents and Settings\LocalService\).
Warning: no, you cannot log as LSA using the abovementioned trick from a terminal server. Use the console!
Labels:
CruiseControl.Net,
en-GB,
Local System Account,
SSL,
Subversion
Tuesday, 30 January 2007
How to install Subversion 1.4.x with Apache 2.2.x and mod_ssl on Microsoft Windows
General guidelines to install Subversion 1.4.x with Apache 2.2.x and mod_ssl on Microsoft Windows. Use the following instructions at your own risk.
The files we need to install Subversion 1.4.x with Apache 2.2.x are currently on this folder, and as for the 25th January 2007, the needed binary package is svn-win32-1.4.3.zip (this file has to be the one builded for Apache 2.2.x).
To install Subversion 1.4.x take the following steps:
The files we need to install Apache 2.2.4 are currently on this folder, and as for the 25th January 2007, the needed binary package is httpd-2.2.4-win32-x86-ssl.zip. Given that this binary is build with Microsoft Visual C++ 2005 SP 1, you may need to install the latest Visual C++ 2005 Redistributable Package (i.e. from here).
Another quite useful resource that provides binary packages for Apache is the Unofficial Apache webserver binaries / module binaries, where we can find a graciously packaged mod_auth_sspi. To install Apache 2.2.x take the following steps:
Subversion
The home page of the Subversion project is http://subversion.tigris.org.The files we need to install Subversion 1.4.x with Apache 2.2.x are currently on this folder, and as for the 25th January 2007, the needed binary package is svn-win32-1.4.3.zip (this file has to be the one builded for Apache 2.2.x).
To install Subversion 1.4.x take the following steps:
- Unzip the svn-win32-1.4.3.zip file then move its content on a directory as %ProgramFiles%\Subversion (or %ProgramFiles(x86)%\Subversion on X64 systems);
- Add %ProgramFiles%\Subversion\bin to the environment variable path.
- Optionally, look for the hot-backup.py script on the source code of Subversion (ideally, get it from the same SVN branch/tag from which the previous binary package was builded) and save it in the %ProgramFiles%\Subversion\tools\backup directory (create it if needed).
- Create the repository container directory (i.e. e:\repositories);
- Create the configuration directory (i.e. e:\repositories\etc);
- Create the backup directory (i.e. e:\repositories\backup);
- Create a svnserver.conf file inside the configuration directory (i.e. e:\repositories\etc\svserver.conf);
<location>Note that is just an Apache directive, that obviously you may use more than one such directive if you plan to manage more than one SVN repository, and that this is how it would look like in the case of Active Directory authentication. To get an introduction to the Authentication, read the Authentication Options section of the SVN Book.
DAV svn
SVNPath e:/repositories/myProject
SVNIndexXSLT /svnindex.xsl
AuthName "Subversion Authentication"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain INTERNAL
SSPIOfferBasic On
Require valid-user
AuthzSVNAccessFile "e:/repositories/myProject/authorization.conf"
</location>
Apache
The home page of the Apache HTTP Server project is http://httpd.apache.org, but because we wish to use mod_ssl, and because for various reasons the Apache community doesn't provide a binary package for Microsoft Windows with such a module, another place to look for those binaries is Steffen Land's Apache Lounge.The files we need to install Apache 2.2.4 are currently on this folder, and as for the 25th January 2007, the needed binary package is httpd-2.2.4-win32-x86-ssl.zip. Given that this binary is build with Microsoft Visual C++ 2005 SP 1, you may need to install the latest Visual C++ 2005 Redistributable Package (i.e. from here).
Another quite useful resource that provides binary packages for Apache is the Unofficial Apache webserver binaries / module binaries, where we can find a graciously packaged mod_auth_sspi. To install Apache 2.2.x take the following steps:
- If you have IIS installed on same machine, stop it now. If you wish to use Apache and IIS on same machine using port 80 on different IP addresses, you should understand what Socket Pooling is, and how to disable it (in IIS 5 and IIS 6);
- Unzip the httpd-2.2.4-win32-x86-ssl.zip file then move its content on a directory as c:/Apache2;
- Copy the unzipped mod_auth_sspi.so in the c:/Apache2/modules directory;
- Copy the mod_dav_svn.so and the mod_authz_svn.so modules from the %ProgramFiles%\Subversion\bin directory in the c:/Apache2/modules directory;
- Tweak with the c:/Apache2/conf/httpd.conf configuration file until you will not get Apache working. How to tweak that configuration file to get Apache working is out of the scope of this document, but usually it involves fixing a few file system paths, IP numbers, DNS names and port numbers, and testing these fixes invoking Apache with the -t switch (i.e. as in C:\Apache2\bin\httpd.exe -w -t -f "C:\Apache2\conf\httpd.conf" -d "C:\Apache2\.") until there are not configuration error reported. Once Apache is properly configured, backup the httpd.conf file, and then start editing that:
- In the section entitled # Dynamic Shared Object (DSO) Support, after the line starting with #LoadModule auth_digest_module modules/mod_auth_digest.so, add the LoadModule directive to load the module to support the Active Directory:
LoadModule sspi_auth_module modules/mod_auth_sspi.so
To get more informations about this module, check its home page; - In the same section, uncomment the lines to load the modules to support WebDAV:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
To read more about those modules, read the Apache documentation about mod_dav and mod_dav_fs; - After the latter lines, add the following lines to load the modules to integrate Subversion:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
To read more about those modules, read the sections of the SVN Book about mod_dav_svn and mod_authz_svn; - Uncomment the module to support ssl:
LoadModule ssl_module modules/mod_ssl.so
To read more about this module, check its home page; - Uncomment the following Include directive:
Include conf/extra/httpd-ssl.conf
- Start editing the httpd-ssl.conf file:
- Set the SSLCertificateFile Directive, as in:
SSLCertificateFile c:/Apache2/conf/ssl/yourwebsitecertificate.crt - Set the SSLCertificateKeyFile, as in:
SSLCertificateKeyFile c:/Apache2/conf/ssl/yourprivatekey.key - Add the following line, before closing the VirtualHost directive:
Include c:/repositories/etc/svnserver.conf
- Set the SSLCertificateFile Directive, as in:
Friday, 26 January 2007
TSQL Script to get the space used by every table in a SQL Server 2005 database
Here is a TSQL script (developed, tested and used only on Microsoft SQL Server 2005) to get the space used by the tables of a database.
Use it at your own risk, uncomment the select (or substitute that with your more appropriate log strategy) and read about sp_spaceused and above all dbcc updateusage before bitching about the quality of the results.
declare @sql nvarchar(MAX)
create table #usedSpace (
name nvarchar(128),
rows varchar(11),
reserved varchar(18),
data varchar(18),
index_size varchar(18),
unused varchar(18))
declare @table nvarchar(MAX)
declare tabcur cursor for
select s.[name] +'.'+ t.[name] as [name]
from sys.tables t inner join sys.schemas s on t.schema_id = s.schema_id
order by s.[name], t.[name];
open tabcur;
fetch next from tabcur into @table;
while @@FETCH_STATUS = 0
begin
fetch next from tabcur into @table;
select @sql = 'sp_executesql N''insert #usedSpace exec sp_spaceused ''''' + @table + ''''''''
-- print @sql -- uncomment if you wish to read the sql statements
exec (@sql)
end;
close tabcur;
deallocate tabcur;
-- select * from #usedSpace order by cast((left(Data,len(Data)-3)) as int) desc -- uncomment if you wish to get a recordset
drop table #usedSpace
Use it at your own risk, uncomment the select (or substitute that with your more appropriate log strategy) and read about sp_spaceused and above all dbcc updateusage before bitching about the quality of the results.
Labels:
en-GB,
sp_spaceused,
SQL Server 2005,
table space usage,
TSQL
Saturday, 9 September 2006
Brazil-Argentina 3-0
Brazil-Argentina 3-0, a set on Flickr.
Brazil-Argentina 3-0 2006-09-03
Labels:
Argentina,
Brazil,
Emirates Stadium
Monday, 15 May 2006
Brent Hobermann vs Web developers primedonne
[Inviato originalmente su ILI]
La scorsa settimana sono andato ad una fiera ad Earls Court, e tra i vari seminari che ho seguito, uno in particolare era a tal proposito particolarmente illuminante: Brent Hobermann, il CEO di Lastminute.com (http://www.internetworld.co.uk/keynote.htm), stava tenendo il solito buzzspech decoroso, quando ha citato la parola "web developers", ed a quel punto si è imbizzarrito ed ha iniziato a sproloquiare su queste "primedonne" sanguisughe che gli costano un botto e gli chiedono sempre di più (da notare che la fiera era l'Internet World 2006, e che la platea era perlopiù composta da web developers).
Più in là, al momento del question time, un tipo gli ha chiesto quale potessero essere i punti di forza e di debolezza nello start up di un nuovo business web centric, e lui è andato giù di brutto di nuovo contro l'eccessivo costo delle primedonne locali del web, del fatto che a loro tenere i più bravi gli costava un occhio della testa, etc .. etc ..
L'impressione che se ne ricavava era che da quelle parti per quelli bravi c'è una richiesta piuttosto forte anche e soprattutto nel settore web, non mi meraviglierei di stipendi/tariffe ben più elevate (ed infatti qualche mese fa' abbiamo pagato un esperto CSSer un migliaio di sterline per 2 giorni di lezione al designer in-house).
Labels:
Brent Hobermann,
CSS,
Internet World 2006,
it-IT,
web developers
Subscribe to:
Posts (Atom)