没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > emballo |
|
emballo
|
| 1 | 0 | 53 |
| 贡献者 | 讨论 | 代码提交 |
EnglishThis project aims to provide a simple dependency injection container for Delphi Win32.
The project is designed to work only with Delphi 2010 and newer versions. There's an older version, that is compatible with other Delphi versions, and you can find it on the "OldVersion" folder on our repository. But note that this version has been discontinued.
Dependency injection is a design pattern that makes components totally unaware of implementation details of their dependencies. It helps to reduce coupling while improves maintainabiliy and testability.
If you're using Emballo (either the current version or the "OldVersion"), please let me know. This information is important when I have to make decisions about the project.
New directionI've decide to change the focus of Emballo. It will be no longer restricted to a DI container. I'm gonna make it an application library with other usefull features. This is what I'm working now:
Interface to Dll binding: You declare an interface whose method's signatures matches the signatures of exported functions of a Dll. The framework will dynamically create an implementation of that interface for you, where all methods on the interface redirects the call to the correspondent method on the Dll. The work is all done at runtime, with almost no overhead, and does not require the implementation to be generated at compile time or design time. This is almost finished, I just need to write some automated tests to make sure it's working fine. Whis feature will have an integration with the DI container
Interface proxy. You define an interface and the framework implements it in such a way that all calls to the methods of the interface will be redirected to a common generic method. This is the same as Java proxy classes. When it's finished, it will be the base for an mock framework similar to many available for Java. Currently I'm having some success with it, but it needs a lot of work to be finished. The interface proxy feature also doesn't require code generation at design time. PortuguêsEste projeto tem por objetivo prover um simples framework de injeção de dependencias para Delphi Win32.
O projeto foi feito para funcionar apenas com Delphi 2010 e versões mais novas. Existe uma versão mais antiga, que é compatível com outras versões do Delphi, e você pode enontra-la na pasta "OldVersion" do nosso repositório. Porem, tal versão foi descontinuada.
Injeção de dependencias é um design pattern que faz com que componentes não tenham conhecimento de detalhes de implementação de suas dependências. Isso ajuda a reduzir o acoplamento enquanto melhora a manutenabilidade e testabilidade.
Se você está usando o Emballo (seja a versão atual ou a "OldVersion" - versão antiga), por favor me diga. Essa informação é importante quando eu tenho que tomar decisões sobre o projeto.
Novo rumoEu decidi mudar o foco do Emballo. Ele não estará mais restrito a um container de DI. Eu irei transforma-lo em uma biblioteca para aplicações com outros recursos úteis. Estes são o que eu estou trabalhando agora:
Binding de interface e Dll: Você declara uma interface cujas assinaturas dos métodos correspondem às assinaturas de funções exportadas da Dll. O framework irá dinamicamente criar uma implementação da interface para você, onde todos os métodos da interface redirecionam a chamada para o método correspondente na Dll. O trabalho é feito inteiramente em tempo de execução, praticamente sem overhead, e não requer que a implementação seja gerada em tempo de compilação ou de projeto. Isso está quase terminado, eu apenas preciso escrever alguns testes automatizados para garantir que está funcionando bem. Esse recurso terá integração com o container de DI.
Interface proxy. Você define uma interface e o framework a implementa de forma que todas as chamadas a métodos da interface serão redirecionados para um método generico comum. É o mesmo que as Java proxy classes. Quando estiver terminado, será a base para um framework de mock similar a muitos que existem para Java. Atualmente eu estou tendo algum sucesso com isso, mas ainda requer muito trabalho para ser concluído. O recurso de interface proxy tambem não requer geração de código em tempo de projeto.
标签:
