There are a number of useful OO Frameworks that allow us to avoid reinventing the wheel:
This project acts as a container for a number of other Open Source Projects
Random outpourings of a software developer
There are a number of useful OO Frameworks that allow us to avoid reinventing the wheel:
This project acts as a container for a number of other Open Source Projects
This is a great introduction to CSLA 2.0
CSLA 2.0 is the 7th version of a complete OO framework.
It has a rather steep learning curve.
Ubuntu 6.06 (Dapper Drake) is out on 1st June 2006.
Here are the simplified instructions for upgrading from 5.10 (Breezy Badger)
The instructions for this are not very clear to the uninitiated so here is a simple version:
Wait and then you have a Dapper Drake system.
The Castle Project is a collection of useful C# tools
This is a sample application of the Castle using an App.config:
It demonstrates the use of Castle.Winsor to allow an app to specify behaviour.
This could easily be used to switch logging handlers.
Here is the main source of the application:
using System;
using System.Collections.Generic;
using System.Text;
namespace CastleConsole
{
using Castle.Windsor; // Castle.Winsor
using Castle.Windsor.Configuration.Interpreters; //Castle.MicroKernel
public interface ILogger
{
void Log(string msg );
}
public class LogToConsole : ILogger
{
public void Log(string msg)
{
System.Console.WriteLine(“The message was {0}”, msg);
}
}
public class SecondLogger : ILogger
{
public void Log(string msg)
{
System.Console.WriteLine(“Second logger was {0}”, msg);
}
}
public interface IExecute
{
void Execute();
}
/// <summary>
/// This is a class that uses the logger
/// </summary>
public class ThreeExecutions : IExecute
{
/// <summary>
/// This is used to store the logger interface
/// </summary>
ILogger _logger;
public ThreeExecutions(ILogger logger)
{
_logger = logger;
}
public void Execute()
{
_logger.Log(“One”);
_logger.Log(“Two”);
_logger.Log(“Three”);
}
}
/// <summary>
/// Summary description for CastleConsoleTestClass
/// </summary>
public class CastleConsoleTestClass
{
static void Main(string[] args)
{
try
{
// This is the initial version
//IWindsorContainer container = new WindsorContainer();
//container.AddComponent(“logger 2”, typeof(ILogger), typeof(SecondLogger));
//container.AddComponent(“logger”, typeof(ILogger), typeof(LogToConsole));
//container.AddComponent(“execute”, typeof(IExecute), typeof(ThreeExecutions));
// This one uses app.config
IWindsorContainer container = new WindsorContainer(new XmlInterpreter());
IExecute service = (IExecute)container[“execute”];
service.Execute();
}
catch(Exception ex)
{
System.Console.WriteLine(ex.Message);
}
System.Console.ReadLine();
}
}
}
Here is the app.config file:
<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<configSections>
<section name=”castle”
type=”Castle.Windsor.Configuration.AppDomain.CastleSectionHandler,
Castle.Windsor” />
</configSections>
<castle>
<components>
<component id=”logger” service=”CastleConsole.ILogger, CastleConsole” type=”CastleConsole.LogToConsole, CastleConsole” />
<component id=”execute” service=”CastleConsole.IExecute, CastleConsole” type=”CastleConsole.ThreeExecutions, CastleConsole” />
</components>
</castle>
</configuration>
If you replace the first line of the components section with:
<component id=”logger” service=”CastleConsole.ILogger, CastleConsole” type=”CastleConsole.SecondLogger, CastleConsole” />
This is a port of the MVC Web Framework Ruby on Rails to C# and ASP.NET.
Here are some articles on the use of Castle.
Of late I have been having fun supporting applications that were written for Windows 2000 as they are implemented on Windows Server 2003.
Windows Server 2003 is the first microsoft OS that actually takes security seriously.
By default everything is switched off and needs to be enabled. This has the minor drawback that all of the switches needed are not clearly documented plus the previously working configuration tools do not inform you that they have been disabled at a higher level.
For example you need to explicitly install IIS, COM+ and ASP.NET
On a new server 2003 you need to use Add/Remove Programs to install ASP.NET and IIS.
There is also the IIS Lockdown wizard to content with.
These new security features are great but need to be backed up with some serious, easy to find, clear documentation.
Don’t get me started on the lack of intelligable documentation for Active Directory. That has simply thousands of switches with incredibly vague names.
Want is a delphi freindly build tool based upon ant.
It is useful for more than building delphi.
It is a small standalone exe that can be used to script tasks.
You can use %{MY_VAR} to access environemt variables.
This makes creating build scripts that work for more than one developer much easier.
This is useful blog entry on automating the vside to build from the commandline.
I have added this to an existing want script (want is the ant/nant port for delphi).
This makes our build process far less painful.
I am studying C# 2.0 to get myself upto speed with .NET 2.0
I am reading “A Programmers Introduction to C# 2.0 – Apress”
There is a great new class in .NET 2:
System.Security.SecureString
This provides a mutable string that is encrypted in memory.
This is ideal for passwords &c that need to be hidden for prying debuggers.
As a Delphi Developer learning C# there are a few very odd things to deal with: