convention-over-configur

Convention over Configuration go against loose coupling?

Something a lot of programmers seem to be abiding by is Convention of Configuration. In the context of IoC this means using the API instead of XML configuration. How are you supposed to keep the loose coupling idea behind DI/IoC when you have to reference the DLL containing the concrete implementations of the abstract interfaces/classe...

Convention over configuration with Spring MVC using ControllerClassNameHandlerMapping?

Following the directions from Spring Source and the book Spring in Action, I am trying to set up Spring MVC in a way that minimizes xml configuration. However according to Spring Source this is how you set up the ControllerClassNameHandlerMap <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/> ...

Sensible defaults for configuration

I've recently started to play with Ruby on Rails which favours convention over configuration and relies on sensible defaults to tie various aspects of the application together. I was thinking that it might be useful if this concept of sensible default configuration was used in general configation for various frameworks then it might sav...

How Rails be configured to access a media resource that is not in its conventional directory location?

Let's say I have an image that does not reside in the normal location: {appname}/public/images/unconventional.gif But instead here: {appname}/unconventional.gif I understand this is a complete violation of Rails conventions, is immoral and you should never do this under any circumstances and, furthermore, why would I even suggest s...

Convention over configuration in ASP.NET MVC

I am relatively new to ASP.NET MVC, and am very impressed with the clarity of the platform so far. However, there is one aspect that I find uncomfortable. At first, I accepted the fact that when I say return View(); I am calling a helper method that returns an ActionResult, and makes some assumptions about which view to present, ro...

Can Autofac do automatic self-binding?

I know some DI frameworks support this (e.g. Ninject), but I specifically want to know if it's possible with Autofac. I want to be able to ask an Autofac container for a concrete class, and get back an instance with all appropriate constructor dependencies injected, without ever registering that concrete class. I.e., if I never bind it ...

Do you find convention over configuration good or bad?

I did a fair amount of experimenting with Ruby on Rails and its convention over configuration, which gave me a lot of functionality automatically. But later I found that I wasn't sure I like the paradigm. It seemed to get in the way when dealing with my database and having to make sure everything was named just so, etc. Is there a hug...

ASP.NET MVC: convention for organizing ViewModels

As discussed throughout the various MVC questions and blogposts, we know that the ASP.NET MVC project layout is heavy on convention. I blindly made a sub-directory in the Controllers folder. This doesn't feel right. Question: What's the common accepted convention on which directory to store your ViewModels? What are your suggestio...

Adding more CoC to Django

I come from a Cake background, and I'm just starting to learn Django now. I'm liking it quite a bit, but I kinda wish it used convention over configuration like cake does. So, How can I get Cake-style URLs automatically? For example, if I went to mysite.com/posts/view/5 it would load up mysite.posts.views.view and pass an argument 5 to...

What are your Common Magento Configuration Mistakes?

If there's something that everybody hates about Magento it's endlessly configuring your modules before being able to write some code. I'm trying to collect a list of common Magento configuration errors for a future project that's I'm close to launching. I'm looking for specific examples of things like using the wrong naming conventio...

Removing a trailing slash in MSBuild / Convention based filename generation

I'm trying to search for a set of assemblies based on the following convention within a directory: {SubDirName}\{SubDirName}.dll I've started by creating an MSBuild ItemGroup [by batching another ItemGroup on the .RecursiveDir portion]. <AllAssemblies Include="$(SourceDirectory)\**\Test.*.dll" /> <Dirs Include="@(AllAssemblies->'%(Re...