Archive for the ‘ Projetos ’ Category

Proposal: XMLBean Framework

In these days we listen a lot about MDA that ains liberty of programming language o technology and the problem the company i work was facing, the “neccesary redundancy” of creating data validation on server and client side, I was wondering:

Create instead o POJO , JavaBeans, DTO, FORM (struts), create some XML Schema that we can call XMLBeans, this way we can share between many technologies the ways the data is expected.

I fast-drawed this model:

This .XSD files will be useful for:

  • Form Validation
  • Data Transfer
  • Data Persistence

These FILE must have nothing to do with business logic, otherwise will be too much complexity!

Soon i will work on some proto.

I’ve searched the web to and found some reference that may help:

http://www.ibm.com/developerworks/library/x-flexschema/
http://www.javaworld.com/javaworld/jw-09-2000/jw-0908-validation.html
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/Validator.html
http://xmlbeans.apache.org/

Arquitetura Orientada a Modelo

Simples tradução de:  MDA Guide Version 1.0.1, pagina 6, Capitulo 1.2 – Primeiro Paragrafo
1.2 Entrar na Modelagem:

Ao mesmo tempo uma curiosa mudança de pensamento apareceu na industria de IT, assim que as linguagens de modelagem de sistemas finalmente começaram a se unificar e convergir em direção a inicial sopa de OMT, IDEF, Booch, Shlaer-Mellor, outras linguagens e metodos, o interesse em modelar dados e aplicações cresceu significativamente. Se contruirmos prédios do modo que construimos software, seremos incapazes de conecta-los, muda-los ou até mesmo redecora-los de forma fácil para adequar a novos usos, e pior, eles constantemente desabarão. Enquanto isso pode significar novos lucros para desenvolvedores, isto se torna inaceitável para os que vivem e trabalham nestes prédios.

De fato não temos muitas desculpas para construir software sem antes cuidadosamente o projetar, este trabalho que não somente possibilita um sistema mais facil de desenvolver, integrar e manter, mas também nos permite automatizar ao menos algumas partes da construção. Imagine se o contrutor pudesse pegar a planta, enfiar na maquina, e a fundação simplesmente aparecesse. Pouco provavel fora do mundo dos “Jetsons”, mas algo que ocorreria todos os dias no mundo do software. Podemos criar modelos, definir padoes como o UML, MOF e CWM da OMG, e automatizar a criação das fundações de modelos de dados e aplicação. Ainda melhor, quando precisarmos conectar estes “prédios” uns aos outros poderemos automatizar a geração de pontes e tradutores baseados nos modelos definidos, assim quando um novo tipo de aço resistente a fogo for inventado, poderemos gerar a nova infraestrutura.

Esta é a promessa do Arquitetura Orientada a Modelo (MDA): permitir a definição de uma aplicação e modelo de dados, legivel pela maquina que permitirá alta flexibilidade de:
* Implementação: nova infraestrutura de implementação (o efeito “tecnologia mais atual”) pode ser integrada ou almejada para um design existente.

  • Integração: Como não somente a implementação mas também o projeto existe no momento de integração, podemos automatizar a produção de pontes de integração de dados e conexões para novas estruturas de integração.
  • Manutenção: A possibilidade de projetar de uma forma legivel pela maquina dá ao desenvolvedor acesso direto a especificação do sistema tornando a manutenção muito mais simples.
  • Teste e Simulação: Assim como os modelos desenvolvidos podem ser usados para gerar codigo, eles podem de mesma forma ser validados aos requisitos, testados em varias infraestruturas e podem ser usados para simular diretamente o comportamento do sistema que esta sendo desenvolvido.

_______________________________
1.2 Enter Modeling

At the same time, a curious change of thought has appeared in the IT industry. As the languages for modeling systems have finally started to coalesce and converge from the primordial soup of OMT, IDEF, Booch, Shlaer-Mellor and scores of other languages and methods, the interest in modeling data and applications has picked up significantly. After all, if we built buildings the way we built software, we would be unable to connect them, change them or even redecorate them easily to fit new uses; and worse, they would constantly be falling down. While this might generate new income for construction workers, it might not be acceptable to those who live and work in those buildings.

In fact, we have very little excuse to build software without first doing careful design work; design not only leads to systems that are easier to develop, integrate and maintain–but also because we have the ability to automate at least some of the construction. Imagine if the construction worker could take his blueprint, crank it through a machine, and have the foundation of the building simply appear. Not likely
outside the Jetsons’ world, but an everyday occurrence in the software world. We can take models, defined in standards like OMG’s own UML, MOF and CWM, and automate the construction of data storage and application foundations. Even better, when we need to connect these “buildings” to each other we can automate the generation of bridges and translators based on the defining models; and when a new,
more fire-resistant type of steel is invented, we can regenerate for the new infrastructure.

This is the promise of Model Driven Architecture: to allow definition of machine-readable application and data models which allow long-term flexibility of:

  • Implementation: new implementation infrastructure (the “hot new technology”effect) can be integrated or targeted by existing designs
  • Integration: since not only the implementation but the design exists at time of integration, we can automate the production of data integration bridges and the connection to new integration infrastructures
  • Maintenance: the availability of the design in a machine-readable form gives developers direct access to the specification of the system, making maintenance much simpler
  • Testing and simulation: since the developed models can be used to generate code, they can equally be validated against requirements, tested against various infrastructures and can used to directly simulate the behavior of the system being designed.

Fonte:  http://www.omg.org/docs/omg/03-06-01.pdf

Dicas para modelagem de Sistema

“Especial para a turma de Desenvolvimento de Aplicações Corporativas (DACJaime) da TSI da UFPR  segundo semestre de 2008”

Utilizar a ferramenta Jude Community (http://jude.change-vision.com/jude-web/product/community.html) para o Desenvolvimento dos seguintes diagramas:

  • Diagrama de Casos de Uso
  • Diagrama de Classes
  • Diagrama de Sequência

Para fazer o download é simples, só se cadastrar, a ferramenta funciona tanto em Windows Quanto em linux, para instalar basta descompactar. A versão Community é grátis porém possui sua versão paga.

Utilizar a ferramenta DBDesigner (http://fabforce.net/dbdesigner4/) para criar o:

  • Modelo de Entidade e Relacionamento

Ferramenta livre (alguns dizem que esta descontinuada, porém é a melhor que encontrei para esse fim), funciona tanto no Linux quanto no Windows.
Infelizmente a ferramente é voltada a gerar código para MySql, porém existe uma ferramenta em java desenvolvida por alguém chamado Fred que converte o xml do DbDesigner em DDL para postgres (SQL) psql-0.1.jar (http://www.guj.com.br/posts/downloadAttach/2022.java;jsessionid=1je6g3lqgzy9x.jetty1) para usar execute em seu terminal o comando: java –jar psql-0.1.jar

Para a criação da estrutura base do projet (Pojo’s, Mapeamentos hbm, DAO’s dentre outros) de um projeto java WEB dinamico utilize a ferramenta Jquerena da Celepar (http://www.frameworkpinhao.pr.gov.b/modules/conteudo/conteudo.php?conteudo=6) A principio só funciona no Linux

Para desenvolvimento, utilizar o RHDS (https://webcentro.wordpress.com/2008/09/18/rhds-red-hat-developer-studio-download/)

Espero ter contribuido, Obrigado.