mercoledì 20 giugno 2007

How to Generate NHibernate Configuration Using ActiveWriter

Preview 3 has this functionality, but there are a few things to mention.
ActiveWriter use ActiveRecord assembly to generate NHibernate config files. So you'll need Castle.ActiveRecord.dll, NHibernate.dll and all necessary dependincies to make it work.

  1. Set the target to NHibernate
    This way, AW will generate .hbm.xml files for each entity in your model.
  2. Set the Assembly Path to where Castle.ActiveRecord.dll, NHibernate.dll and all necessary dependincies reside.
    The design decision was that, I didn't want to package these assemblies with AW. Rather than that, I thought user will most probably have them so they can choose whatever version they want to generate the configuration. If you don't supply the path, AW (VS, actually) will look for them in GAc and then {Your VS Path}\Common7\IDE\Castle.ActiveRecord.dll, so if you have them in one of those places, it should be fine.
    One other quirk is, if you first try to generate with the wrong path, setti ng the correct one later won't work until you restart Visual Studio. This is the framework's limitation, once you try to load an assembly and get an error, the result will be cached for subsequent tries. So VS appdomain should be restarted to make it work. I'll have a possible soliton for this for a future version of ActiveWriter (will try to load in a dummy appdomain, then in the VS appdomain)
    You may use the fully qualified assembly names for Active Record Assembly Name and NHibernate Assembly Name to target a specific version in the GAC, if you have more than one in there.
  3. When you save the model, AW will generate configuration.

I'll prepare a better documentation in the wiki.
Have fun.
Update:
AW does not work with release version of Castle assemblies (RC2?) for NHibernate generation, it works with the trunk (or with recently compiled assemblies). You can use the latest bits from the build server: http://builds.castleproject.org/cruise/index.castle

 

 

FONTE :

 

http://altinoren.com/default.aspx

venerdì 15 giugno 2007

4° Workshop "Introduzione al Domain-Driven Design (DDD)"

4° Workshop "Introduzione al Domain-Driven Design (DDD)"

Venerdì 6 Luglio 2007

Sede Casa Cecchi - Centro Creativo Ambientale Urbano
Via della Paleotta, 11- 61032 Fano (PU)

In questo appuntamento parleremo di Domain Driven Design (DDD), una metodologia costituita da una serie di principi e tecniche di progettazione, utile nella realizzazione di software in cui il dominio dell'applicazione ha una certa complessità.

Questo tema si ricollega al workshop su NHibernate, in quanto gli ORM danno il meglio di sé quando vengono utilizzati per applicazioni la cui progettazione è orientata al domain model: non a caso, uno degli speaker sarà nuovamente Giancarlo Sudano, che già ci aveva parlato di NHibernate.

15:00
Registrazione

15:30
Saluto ai partecipanti

15:45
Introduzione al Domain Driven Design (DDD) - Giancarlo Sudano e Gian Maria Ricci

Domain Driven Design, possiamo definirlo un "mindset", una "forma-mentis", un modo di concepire e modellare applicazioni enterprise che fanno uso del Domain Model. Scopo principale è fare da collante tra il "modello analitico" e il "modello implementativo". Questa metodologia introdotta da Eric Evans mette in risalto il "dominio applicativo" ed è usata come base per metodologie agili di sviluppo.In questa sessione approfondiremo questi concetti guardando anche a varie metodologie di layering e pattern.

17:00
Domain Model e SOA (Service Oriented Architecture) - Giancarlo Sudano e Gian Maria Ricci

In un mondo orientato sempre più ai servizi, che ruolo ha ma soprattutto come si espone al mondo esterno il Domain Model? Le tecnologie per raggiungere l'interoperabilità devono influenzare il modello implementativo? Cercheremo di capire quali sono i principi di design da applicare in questi casi, come per esempio l'inversione di controllo, e vedremo quali tool ci possono dare una mano nella corretta implementazione di un modello a servizi.

18:15
Ask the Expert
Domande libere da porre ai nostri esperti.

18:50
Saluto e discussione sui prossimi eventi

19:00
Aperitivo + cena
ATTENZIONE: per partecipare alla cena, iscrivetevi rispondendo a questo post!

Se volete aiutarci a pubblicizzare l'evento, potete scaricare un volantino già pronto qui!

mercoledì 6 giugno 2007

ed io ? :D

Your programmer personality type is:
DHTB

You're a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.
You like coding at a High level.
The world is made up of objects and components, you should create your programs in the same way.
You work best in a Team.
A good group is better than the sum of it's parts. The only thing better than a genius programmer is a cohesive group of genius programmers.
You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We're not writing on paper anymore so we can take up as much room as we need.

giovedì 24 maggio 2007

BlogEngine.NET versione 1.0 definitiva

E' stata rilasciata la versione 1.0 definitiva di BlogEngine.NET, un motore di blogging realizzato in C# e disponibile su CodePlex. Una caratteristica molto interessante di questo sistema è che esso si basa interamente su XML, quindi non richiede il setup di database di appoggio e, di conseguenza, può essere utilizzato in qualunque spazio web con supporto ad ASP.NET.

fonte: http://blogs.ugidotnet.org/marcom/archive/2007/05/24/79175.aspx

mercoledì 16 maggio 2007

http://www.asp.net/ nuovo veste

E' appena diventato online (visto che tutt oggi che cerco di entrare, e nn ci sono riuscito...anche ora ci sono un po di problemi :D)

 

img: http://img130.imageshack.us/img130/5792/asrn4.png

http://www.asp.net/ nuovo veste

E' appena diventato online (visto che tutt oggi che cerco di entrare, e nn ci sono riuscito...anche ora ci sono un po di problemi :D)

 

img: http://img130.imageshack.us/img130/5792/asrn4.png

mercoledì 9 maggio 2007

NHibernateRepository Upgraded for NHibernate 1.2 RC1

Now that NHibernate 1.2 is finally out of Beta stage and into official Release Candidate mode, I felt it was appropriate to upgrade NHibernateRepository to use it. Not much has changed and there isn't any new functionality, but I wrote some tests for it and of course updated its references to NHibernate 1.2 RC1.
You can get the latest NHibernateRepository here.

 

Fonte: http://www.arcware.net/archive/2007/04/06/NHibernateRepository-Upgraded-for-NHibernate-1.2-RC1.aspx

martedì 8 maggio 2007

Simple TDD Visual Studio Templates

 

 

To speed up the creation of solutions like these, I've created two templates to plug into Visual Studio to do it for you. There's one for testing with MbUnit 2.3 RTM and one for NUnit 2.2.9. Download the one you want to your VS2005 Project Templates folder and then create a new project. You'll see the options to use the templates automagically.

 

FONTE:

Dan's Archive

 

post:
http://blogs.ipona.com/dan/archive/2007/01/02/SimpleTDDVisualStudioTemplates.aspx

venerdì 27 aprile 2007

Simple NHibernate Architecture

By Cassio Alves.

Introduction

I started using NHibernate at the end of last year and I am having a wonderful experience with it. The simple fact that I don't have to maintain hundreds of procedures and data access abstraction classes to do basic CRUD operations is enough to justify the use of NHibernate (even though I used a custom code generation tool). Besides that, my code is amazingly clearer and simpler. I only need to worry about business and user interface logic now. All that pluming code has gone for good.

I had zero experience with ORM frameworks, so on the first couple of weeks using NHibernate I had a hard time with some issues, like using it with ASP.NET disconnected objects and abstracting NHibernate sessions from the domain layer. After putting in some effort I came out with a nice architecture that abstracts the NHibernate layer and allows me to work with an ASP.NET session.

Background

I am assuming you already have some familiarity with NHibernate. If you are new to NHibernate I encourage you to go to the website and download the reference documentation. I am using NHibernate 1.2 CR1 in this article.

The Architecture

The idea here is to keep my business objects unaware of an NHibernate session. So I created a different project for NHibernate stuff, called Shared.NHibernateDAL. It includes the session and transaction manager classes. I also created a common business object that serves as a base class for all my business entities. This class (BusinessObject) encapsulates the common methods and properties all entities that need to be persisted have, like Save(), Delete(), ID, etc.

Here's a class diagram just to give an idea:

Screenshot - nh_classdiagram.jpg

The Implementation

The main classes on the NHibernateDAL project are the following:

  • NHibernateSessionManager – This is the class responsible for managing the NHibernate session. I've got this class from another NHibernate article on Code Project.
  • TransactionBlock – This is a class I created to manage transactions and abstract it from NHibernate. I will show an example of its use further on this article.
  • BusinessObject<T> - This is the base class for all the business entities I need to persist. It implements the basic CRUD methods.

 

LINK: http://www.codeproject.com/aspnet/NHibernateArchitecture.asp

mercoledì 21 marzo 2007

martedì 20 marzo 2007

Prova nuova di c#

Vediamo se riesco a pubblicare sto codicillo o ci devo diventare scemo + di quello che sono oggi :D

 

 


/*
* Created by: WaYdotNET [Carlo Bertini]
* Created: 18.34.28
* NameSpace: GestioneOttica.DomainModel.Cliente.Anagrafe
*/
using System;

namespace GestioneOttica.DomainModel.Cliente
{
public class Anagrafe
{
#region private fields

private string _nome;
private string _cognome;
private string _codiceFiscale;
private Nullable<DateTime> _dataNascita;
private string _professione;
private string _iva;
private string _ditta;

#endregion

#region protected members

#endregion

#region public properties

public string nome
{
get { return _nome; }
set { _nome = value; }
}

public string cognome
{
get { return _cognome; }
set { _cognome = value; }
}

public string codiceFiscale
{
get { return _codiceFiscale; }
set { _codiceFiscale = value; }
}

public DateTime? dataNascita
{
get { return _dataNascita; }
set { _dataNascita = value; }
}

public string professione
{
get { return _professione; }
set { _professione = value; }
}

public string iva
{
get { return _iva; }
set { _iva = value; }
}

public string ditta
{
get { return _ditta; }
set { _ditta = value; }
}

#endregion

#region system.object overrides

#endregion

#region constructor

#endregion
}
}

giovedì 1 marzo 2007

Struttura OpenOttica

Il nome del programma è "OpenOttica" visto che ho intenzione di rilasciare i codici sorgenti di questo applicativo (appena ho tempo mi leggo un paio di licenze e ve la comunico).

 Prima di tutto va detto che verrà sviluppato con il .NET 2.0 e come database Mysql/SQLExpress/SQLite poi da decidere quale utilizzare in "produzione".

Altra cosa, se un giorno riesco cerco di farlo girare pure su MONO .... ma non credo, visto che ancora ci sono delle PINVOKE che SQLite utilizza e che MONO allo stato attuale non supporta.

 

Incominciamo......

Per realizzare questo progetto, ho intenzione di utilizzare NHibernate

Prima di tutto vediamo come ho intenzione di dividere la struttura del progetto, almeno cosi' se avete intenzione di aiutarmi, criticare, e tutto quello che vi viene in mente, ben accetto :D:D:D:D

 

  • Domain Model 
  • Persistance ( con l integrazione di NHRepository o Rinho.Commons)
  • UI (qui è il caso di vedere se farlo Winform o Webform, od entrambi)
  • Utilities

Fino a qui facile, si tratta semplicemente di 4 progetti di Vs.NET

Ovviamente ci saranno anche i vari test da fare:

  • Domain Model.Test
  • Persistance.Test

Per fare i test utilizzo NUnit

Sistemazione Interfaccia blog

Appena avro' un po di tempo dovrei sistemare almeno l interfaccia del blog e farla un pochino + personalizzata (dato che x ora nn è personalizzata x niente :D:D::D)

Primo post

Ben arrivati nel mio nuovo blog.

Ho aperto questo blog nella speranza di poter postare alcune informazioni utili riguardante il mondo .NET , del quale sono appassionato, anche se ho pochissima esperienza....

Per prima cosa vorrei illustrare il progetto a cui sto lavorando, ovvero la gestione di un negozio di ottica (richiestomi dal mio amore di nome Lisa)

Alla prossima puntata....