in

DotNetMarche

.NET Framework User Group delle Marche

This Blog

Syndication

ExternalBlogs

April 2007 - Posts

  • Come creare un Content Type personalizzato via codice

    I Content Type sono una delle novità di Sharepoint Services 3.0; essi permettono di creare una struttura ad albero per gestire i vari tipi di contenuti che possono essere utilizzati nei siti sharepoint. Quindi ogni vario tipo di lista, da quelle personalizzate...
  • 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

  • Reassociated object has dirty collection

    Today I Hitted this exception working with NHibernate, after consulting some posts on the net I discovered that this exception is raised when a detached object is reattached to a session with lock and the object has a one-to-many relation that was changed. The strange thing is that the same code works perfectly on a [...]
  • Bloggare da word 2007

    Stamane ho provato a bloggare da word 2007 ma purtroppo è veramente scarso nella formattazione del codice, qualcuno ha qualche soluzione al problema?? Effettivamente word è sicuramente migliore in tutto e per tutto al windows live writer, ma in WLW la formattazione del codice viene benissimo, uff.

     

    Alk.

  • Test of blog publishing with Microsoft word 2007

    This post is created using Microsoft word 2007. Let’s see if this makes blogging simpler. First of all some formatting bold italic. This is indented with tab. Some ordered item Another ordered item A bullet list Another element of the bullet list Some weird code in VB.NET     1 <AspNetHostingPermission(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal), _    2  AspNetHostingPermission(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal), _    3  ToolboxData(“<{0}:MultipleFieldsValidator runat=server></{0}:MultipleFieldsValidator>”)> _    4 Public Class MultipleControlsValidator    5    Inherits BaseValidator    6     7    <Browsable(False), _    8    EditorBrowsable(EditorBrowsableState.Never)> _    9    Private Shadows Property SetFocusOnError() As Boolean   10       Get   11          Return False   12       End Get   13       Set(ByVal value As Boolean)   14          Throw New NotSupportedException(“Cannot focus if we have more than one control to validate.”)   15       End Set   16    End Property Some in C#    38          Section section, Int32 linkId) {    39     40          IUnitOfWork UoW [...]
  • Ritardo nelle pagine asincrone

    Oggi mi è stato fatto notare che l'esecuzione di una query in maniera asincrona in una pagina ASP.NET, ritornava un recordo in meno di quanti erano stati richiesti effettivamente nella query. In pratica, anche il mio stesso esempio , a volte, aveva...
  • Nhibernate bug?

    I replicated a bug in nhibernate. I have a simple mapping for a simple class  <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Ca1" assembly="Ca1" default-lazy="false" default-access="property"> <class name="Ca1.Cliente" table="Clienti" > <id name="Id" column="Id" type="int" [...]
  • Office 2007: The new day

  • A French e-voting catastrophe

    Alfonso Fuggetta cita l'articolo di ars technica che riporta alcune considerazioni sull'esperienza di voto francese nelle ultime elezioni presidenziali. Da parte mia ho scritto alcuni post su questo argomento e mi dispiace che ancora ad oggi non ci sia chiarezza su questa delicata questione. Rispondendo al post di Alfonso, Marco Bizzarri si domanda persino "il perchè" si debba utilizzare un sistema di voto elettronico, in quanto non sono ancora chiari i reali vantaggi!! Alcune premesse sono utili, onde evitare retoriche:

    1. Una cosa è la tecnologia ed una è il suo utilizzo...per favore non crediamo veramente che una tecnologia da sola sia in grado di automatizzare i processi di una PA;
      1. Per utilizzare al meglio una tecnologia all'interno di una PA, occorre una normativa ADEGUATA che ne regoli l'utilizzo.
      2. Una nuova tecnologia si usa non si subisce, magari affidandola a persone competenti?
    2. L'attuale processo di voto e scrutinio è pieno di buchi oscuri, chiunque all'interno di una PA potrebbe manipolare il risultato;
      1. I processi attuali sono eseguiti da persone dello stesso Ente!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! anche per le elezioni comunali!!
      2. Le varie aule di circoscrizioni sono autonome ed hanno pieno potere decisionale!!!!!!!!!!!!!!!!!!!!

    Mi dispiace ricordare come il Ministro Amato liquidò la questione tempo fà sul corriere!

    I vantaggi?

    1. Costo
    2. Tempo di elaborazione dei risultati
    3. Inesistenza di errori (schede nulle)
    4. Certezza del voto
    5. Eliminazione delle fette di mortadella all'interno della scheda di voto ;-)

    La stessa Beatrice Magnolfi interpellò lo scorso governo con una interrogazione parlamentare! ma non si occupa di innovazione???

    E' un problema sociale o informatico?

    Sicuramente sociale, i modelli matematici algoritmi di ordinamento, crittografia chiave pubblica/privata) e implementazioni che ci sono dietro sono effcienti! Nel voto elettronico (più correttamente digitale) non c'è nessuno che concorre al raggiungimento dell'obiettivo finale, tranne che il sistema informativo, datemi qualcosa di più democratico come contro esempio per favore!!!

    Uno scenario classico è il seguente, immaginate in ogni ufficio pubblico una cabina titpo “info città” un totem elettronico che attraverso un monitor touch-screen vi da la possibilità di toccare e dare il vostro voto. Potrebbe esserci la fotografia di Berlusconi o Prodi o più semplicemente più pulsanti di opzione con i simboli dei partiti, che cosa si può volere di più.....il tutto è coordinato da una cabina di regia presieduta dal presidente della commissione che inserirà la vostra carta di identità elettronica in un lettore di smart card e convaliderà la vostra posizione nei confronti del voto. Il core di tutto è l’algoritmo di decifrazione e mescolamento dei voti e i tre server di gestione che sono al ministero e quindi non raggiungibili fisicamente, non vi sembra meglio degli scatoloni custoditi nelle scuole, decisamente, ma andiamo oltre. Per chi è interessato provo a spiegare dove stanno andando oggi i progetti di eGovernment che propongono una soluzione per lo scrutino elettronico: abbiamo detto che ci sono due aspetti importanti dal punto di vista tecnologico, l’algoritmo e l’architettura, guarda caso però queste due variabili non vengono minimamente prese in considerazioni quando si muovono critiche al sistema proposto, forse queste persone non sanno che i loro dati sono gestiti in maniera simile anche all’interno dell’INPS ;-) L’implementazione di riferimento è questa, anche se datata rappresenta secondo me una buona implementazione dei requisiti iniziali che deve avere una soluzione di questo genere, ossia: - privacy(soo il risultato finale del voto deve essere visibile e non i passaggi intermedi) –robustezza dell’algoritmo(l’iter di calcolo non deve essere distorto da nessun agente esterno dal sistema) –universalità(conclusa la votazione i risultati devono essere verificati da qualsiasi sistema).  Che cosa dire di più, non ditemi che è un problema di automazione del processo non sareste informatici, ditemi che non vi fidate...allora siete dei politicanti che non aprono gli occhi e non leggono il giornale ;-)

    Posted Apr 25 2007, 01:22 PM by Romeo Pruno
    Filed under:
  • Knowledge Ttransfer for eGovernment

    Innovation of Government sheds spotlight on knowledge transfer of successful eGovernment projects and the transfer of experience. There is high interest in assessing model projects, in using good practice cases, in considering the feasibility of transfer, and in spurring an organisational learning process.

    Academics and professionals from public and private organisations have contributed to this collective volume. The themes cover different aspects of knowledge transfer from several points of view: case studies, country reports, challenges, deliberating strategies, analyses on the framing conditions and policies, model projects referring to various settings on national and international level. Several transfer mechanisms are considered such as competitions, transfer conferences, virtual communities as well as mentorship and facilitation.

    The book is edited by Roland Traunmüller and published by Trauner Verlag in it's Informatics Series. The 15 contributions of this collective volume are grouped in three sections: framing the conditions, coping with challenges and making transfer work. The detailed table of contents see below. The book can be ordered at book shops (ISBN 3-85499-177-0; price 21 Euro,

    http://www.trauner.at/go.asp?ber=universitaet&seite=warenkorb.asp?artnr=2013

    9211)

    List of content:

    1. Framing the Conditions 1.1 Public Governance Urges for Better e-Government Solutions: Best Practice Will Indicate the Way (Roland Traunmüller, Gerti Orthofer, Helene Gieber)

    1.2 Knowledge Building and Transfer of eGovernment Applications: Conditions for Global Socio-economic Dynamics in Europe (Patrick Corsi) 1.3 European e-Government, Strategy, and Uncertainty (Michael Blakemore) 1.4 Nothing left to transfer? Knowledge Transfer Revisited in View of Research and Development Mix-up (Ake Grönlund) 1.5 Knowledge Transfer and Innovation Strategies in eGovernment (Jeremy Millard)

    2. Coping with Challenges 2.1 Sourcing Decisions in Electronic Government and the Knowledge Transfer Problem (Hans J. Scholl, Timothy S. Carlson) 2.2 Enterprise Architectures as Knowledge Sharing Instrument: Concepts and Challenges (Marijn Janssen, Ren´e

    Wagenaar) 2.3 Trust and Collaboration: Knowledge Sharing in Public Sector IT Innovations (Anthony M. Cresswell, Theresa A. Pardo, Fiona Thompson, Jing

    Zhang) 2.4 Knowledge Transfer – a Challenge for Central Governments: A Learning Government Paradigm (Jaro Berce)

    3. Making Transfer Work 3.1 Administrative Process Management – setting the scene (Witold Staniszkis, Eliza Staniszkis) 3.2 Transfer of e-ParticipationManagement:

    Budget Restrictions and Preferences (Kim Viborg Andersen, Helle Zinner

    Henriksen) 3.3 Knowledge Transfer: an Essential Factor to Good Governance (Wichian Chutimaskul, Vatcharaporn Esichaikul, Wanchai Varavithya) 3.4 Conflict in E-Government Systems: Analysis and Policy Implications for Developing Countries (Rahul De’) 3.5 Distributive Knowledge Transfer Processes in G2G Endeavours: A Heuristic Frame (Luiz Antonio Joia) 3.6 Organisation of National and International eGovernment Knowledge Transfer at Communal Level Taking Germany as an Example (Felix Richter, Norbert Niemeier)

     

    Best regards,

    Roland Traunmüller

  • I Nullable Types di .NET 2

    Nella versione 2.0 del framework sono stati introdotti i Nullable Types, un particolare tipo di dato, facente parte della categoria dei "Value Types", utile a dichiarare una variabile senza doverla valorizzarla in fase di dichiarazione. Era...
  • FORUMPA'07...stiamo arrivando!!!

    FORUMPA'07...stiamo arrivando
    Posted Apr 25 2007, 07:09 AM by Romeo Pruno
    Filed under:
  • I'm flaming

    I'm Flaming
  • Workshop DotNetMarche: resoconto fotografico...

    Resoconto fotografico dal workshop DotNetMarche...
  • First blog

    This is the first blog on word press, we switched the hosting from italy to IX web hosting that will give us more tools and the possibility to use a lot of database space for ours blog. Alk.
More Posts Next page »
Powered by Community Server (Commercial Edition), by Telligent Systems