1 / 16

Arquitectura de desarrollo

Arquitectura de desarrollo. versión 1.0. Índice. Arquitectura n-capas Modelo de persistencia Generación de código Extender funcionalidad. Arquitectura n-capas. Arquitectura n-capas DAL. Helper que abstrae parte de la complejidad de las tecnologías Nhibernate y ADO.NET.

ardara
Download Presentation

Arquitectura de desarrollo

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Arquitectura de desarrollo versión 1.0

  2. Índice • Arquitectura n-capas • Modelo de persistencia • Generación de código • Extender funcionalidad

  3. Arquitectura n-capas

  4. Arquitectura n-capasDAL • Helper que abstrae parte de la complejidad de las tecnologías Nhibernate y ADO.NET. • Transforma la generación de excepciones de Nhibernate y ADO.NET en excepciones de negocio. • DALErrorClaveDuplicadaEx • DALErrorConcurrenciaEx • DALNoExisteElementoEx • …

  5. Arquitectura n-capasDAL Public Interface IDAL ReadOnly Property BolEnTransaccion() As Boolean Sub AbrirTransaccion() Sub ConfirmarTransaccion() Sub DescartarTransaccion() Sub Leer(ByVal pObjEntidad As IObjetoDAL) Sub Guardar(ByVal pObjEntidad As IObjetoDAL) Sub Eliminar(ByVal pObjEntidad As IObjetoDAL) Function LeerObjetos(ByVal pStrComando As String) As Collection Function LeerDataSet(ByVal pStrComando As String) As DataSet Sub LeerDataSet(ByVal pStrComando As String, ByRef pObjDataSet As DataSet) Sub EjecutarComando(ByVal pStrComando As String) Sub CerrarSesion() End Interface

  6. Arquitectura n-capasBussines Object (BO) <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2” namespace="NEGOCIO" assembly="NEGOCIOProd"> <class name="clsNotaGastos" table="clsNotaGastos"> <id name="NidNidNota" column="NidNidNota"> <generator class="increment"></generator> </id> <timestamp name="SisTmsModificado"/> <property name="SisTmsEliminado" type="DateTime"/> <property name="FchFchGasto" type="DateTime"/> <property name="NumNctAutopista" type="Double"/> <property name="NumNctComida" type="Double"/> <property name="NumNctHotel" type="Double"/> <property name="NumNctTransporte" type="Double"/> <property name="NumNidEmpleado" type="Int64"/> <property name="NumNumKms" type="Double"/> <property name="StrStrConcepto" type="String"/> <property name="StxStxObservaciones" type="String"/> </class > </hibernate-mapping>

  7. Arquitectura n-capasBussines Object Public Class clsNotaGastos Inherits ObjetoBO Implements IObjetoDAL Protected aFchFchGasto As DateTime Protected aNumNctAutopista As Nullable(Of Double) Protected aNumNctComida As Nullable(Of Double) Protected aNumNctHotel As Nullable(Of Double) Protected aNumNctTransporte As Nullable(Of Double) Protected aNumNidEmpleado As Long Protected aNidNidNota As Long Protected aNumNumKms As Nullable(Of Double) Protected aStrStrConcepto As String Protected aStxStxObservaciones As String Protected aSisTmsModificado As DateTime Protected aSisTmsEliminado As Nullable (Of DateTime) Public Sub New() End Sub Public Sub New(ByVal pNidNidNota As Long) Me.aNidNidNota=pNidNidNota End Sub Public Overridable Property FchFchGasto() As DateTime Get Return aFchFchGasto End Get Set(ByVal value As DateTime) ..... End Set End Property ...

  8. Arquitectura n-capasBussines Layer (BL) Imports DAL <System.ComponentModel.DataObject()> _ Public Class clsNotaGastosBLL Inherits ObjetoBL Public Sub New() MyBase.New() End Sub Public Sub New(ByRef pObjDAL As IDAL) MyBase.New(pObjDAL) End Sub Public Function LeerElementosDs() As DataSet ' Preparamos una sentencia SQL para recuperar datos Dim lStrSQL As String = "SELECT ......." Dim lDsTablas As DataSet = lObjDAL.LeerDataSet(lStrSQL) Return lDsTablas End Function End Class

  9. Modelo de persistencia • Uso de claves artificiales. • Estrategia de bloqueos optimista basado en un campo versión (SisTmsModificado). • Borrado virtual de registros mediante marca de borrado en un campo tipo fecha (SisTmsEliminado). • SisTmsEliminado forma parte del indice que define la clave alternativa. • Uso de triggers para implementar los borrados en cascada. • Soporte multi idioma a nivel de datos.

  10. QADDAdmin – Generación de código 6 5 2 6 4 1 • Definición de Modelo Conceptual y Ventanas • Almacenamiento en BD del Sistema Conceptual. 3 • Petición de Generación del Aplicativo. • Recuperación del Modelo Conceptual. • Generación y Compilación de la aplicación. • Publicación de la Aplicación Generada

  11. QADDAdmin – Generación de código Repositorio Meta - modelo • Plantillas • Proyecto • Clases • Páginas • Css • … GENERADOR Nueva versión aplicación

  12. Extender funcionalidad • Triggers de SQL Server • Páginas web • Clases visual basic • Eventos framework

  13. Extender funcionalidadPáginas web • Disponibilidad de los siguientes parámetros en el objeto request: • Request(“pStrEntidad”) • Request(“pSnmEntidad”) • Request(“pNidEntidad”) • Request(“pNID”) • Request(“pStrSerie”) • Request(“pStrCentro”)

  14. Extender funcionalidadClases Visual Basic • Desarrollo de clases que cumplan con el siguiente interfaz: • PublicInterfaceIAccionExtendida • FunctionRealizarAccion(ByRefpObjParametrosAsParametrosIAccionExtendida) As Boolean • End Interface

  15. Extender funcionalidadEventos • Desarrollo de clases que cumplan con el siguiente interfaz: • Public InterfaceIEventoEntidad • SubPreInit(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPreCargaPagina(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPostCargaPagina(ByRefpParamsIEventoAs ParametrosIEventoEntidad) • SubPreCargarLista(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPreInsertar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPostInsertar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPreCargaModificar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPreModificar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPostModificar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPreEliminar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • SubPostEliminar(ByRefpParamsIEventoAsParametrosIEventoEntidad) • End Interface

  16. Contacto • Manuel Alagarda Esteve • malagarda@infonova.es • Telf. 96 316 24 04 • Fax. 96 373 86 43 Infonova Consultores www.infonova.es

More Related