Archive

Posts Tagged ‘DI’

JavaScript Dependency Injection

February 15, 2010 Leave a comment

Some time ago I had this idea: – How to create a JavaScript dependency injection container in Java? The beginning of this idea can be read here.

This idea is redundant if you think that now a days we have lots of JavaScript frameworks or even GWT which helps us to write JavaScript applications in Java. However, this is not I want. I want something complete different, something that help me to have the best of two worlds: Java and JavaScript.

How it works is pretty simple: Inject resources (variables, code, objects etc) into the JavaScript code before sending to the client (browser in this case). The draft version of this application allow us to put i18n in action into JavaScript using Apache Velocity as engine.

You can check the development at Google’s code website here.

I’ll update this blog with examples as soon as the development is ready for real things.

Davi

Advertisements
Categories: Java, JavaScript Tags: , , , ,