background preloader

Inversion of Control Containers and the Dependency Injection pattern

Inversion of Control Containers and the Dependency Injection pattern
In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they perform the wiring, a concept they refer under the very generic name of "Inversion of Control". In this article I dig into how this pattern works, under the more specific name of "Dependency Injection", and contrast it with the Service Locator alternative. The choice between them is less important than the principle of separating configuration from use. One of the entertaining things about the enterprise Java world is the huge amount of activity in building alternatives to the mainstream J2EE technologies, much of it happening in open source. A lot of this is a reaction to the heavyweight complexity in the mainstream J2EE world, but much of it is also exploring alternatives and coming up with creative ideas. Components and Services A Naive Example class MovieLister...

http://martinfowler.com/articles/injection.html

Design Patterns In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Uses of Design Patterns Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Wiki Ninject is a lightweight dependency injection framework for .NET applications. It helps you split your application into a collection of loosely-coupled, highly-cohesive pieces, and then glue them back together in a flexible manner. By using Ninject to support your software’s architecture, your code will become easier to write, reuse, test, and modify. Ninject is: Focused. Too many existing dependency injection projects sacrifice usability for features that aren’t often necessary.

Understanding node.js Node.js has generally caused two reactions in people I've introduced it to. Basically people either "got it" right away, or they ended up being very confused. If you have been in the second group so far, here is my attempt to explain node: It is a command line tool. ASP.NET MVC 5 - A .NET Developer Primer for Single-Page Applications A majority of Microsoft .NET Framework developers have spent most of their professional lives on the server side, coding with C# or Visual Basic .NET when building Web applications. Of course, JavaScript has been used for simple things such as modal windows, validation, AJAX calls and so on. However, JavaScript (client-side code for the most part) has been leveraged as a utility language, and applications were largely driven from the server side. Lately there’s been a huge trend of Web application code migrating from the server side to the client side (browser) to meet users’ expectations for fluid and responsive UX. With this being the case, a lot of .NET developers (especially in the enterprise) are dealing with an extreme amount of anxiety about JavaScript best practices, architecture, unit testing, maintainability and the recent explosion of different kinds of JavaScript libraries. Creating an SPA in Seven Key Steps

The Node Beginner Book » A comprehensive Node.js tutorial About The aim of this document is to get you started with developing applications with Node.js, teaching you everything you need to know about "advanced" JavaScript along the way. It goes way beyond your typical "Hello World" tutorial. Status You are reading the final version of this book, i.e., updates are only done to correct errors or to reflect changes in new versions of Node.js. It was last updated on July 1, 2013.

Execution in the Kingdom of Nouns Hello, world! Today we're going to hear the story of Evil King Java and his quest for worldwide verb stamp-outage.1 Caution: This story does not have a happy ending. It is neither a story for the faint of heart nor for the critical of mouth. If you're easily offended, or prone to being a disagreeable knave in blog comments, please stop reading now. 10 common traps and mistakes in C# 1) Using the wrong type of collection .Net has a lot of collection classes and they are all specialized on specific tasks. Make sure to select the right one with care. Making the wrong choice can make your code inefficient, have unexpected consequences as well as making your code's intent unclear. Read more here: 2) Not using yield return

The Unit Of Work Pattern And Persistence Ignorance Patterns in Practice The Unit Of Work Pattern And Persistence Ignorance Jeremy Miller In the April 2009 issue of MSDN Magazine ("Persistence Patterns") I presented some common patterns that you will encounter when using some sort of Object/Relational Mapping (O/RM) technology to persist business entity objects. I think it's unlikely that you or your team will be writing your own O/RM tooling from scratch, but these patterns are important to know to effectively use (or even just to choose) existing tooling. In this article, I would like to continue the discussion of persistence patterns with the Unit of Work design pattern and examine the issues around persistence ignorance.

Related: