Questions tagged [convention-over-configur]
60 questions
22
votes
2 answers
Where to put constraint classes in Rails project
Just curious about the best practices for Rails in where I put a custom constraints class that's used as a constraint in config/routes.rb. Seems like Rails.root/lib is where all user classes go. Is that appropriate for this? Should I be creating a…

at.
- 50,922
- 104
- 292
- 461
12
votes
1 answer
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…

Robert Harvey
- 178,213
- 47
- 333
- 501
10
votes
2 answers
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…

Joe White
- 94,807
- 60
- 220
- 330
9
votes
1 answer
Static Checking for Framework Conventions
Is there a product/project that would allow you to define conventions for say an MVC Project to statically check for naming conventions like Controller being appended on the end of classes that inherit from controller and/or enforce a certain method…

Gent
- 2,675
- 1
- 24
- 34
8
votes
1 answer
Using Autofac registering everything that ends with Service
So Im using autofac in a MVC so my controllers can have there dependencies injected on there constructor, I have in my Global.asax I have the following snippet of code, which works.
// Register your MVC…

Ashley Kilgour
- 1,110
- 2
- 15
- 33
8
votes
3 answers
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…

Alana Storm
- 164,128
- 91
- 395
- 599
7
votes
3 answers
in Rails where do you put your Sweepers?
Is there a convention in Rails to put Sweeper classes in a particular directory location?
UPDATE: Since observers are put into app/models, I'm assuming sweepers are no different, as long as the name always ends with "sweeper".

m33lky
- 7,055
- 9
- 41
- 48
7
votes
6 answers
Benefits of the "Convention over Configuration" paradigm
What are the benefits of the "Convention over Configuration" paradigm in web development? And are there cases where sticking with it don't make sense?
Thanks

wassimans
- 8,382
- 10
- 47
- 58
7
votes
1 answer
ODataConventionModelBuilder usage
Apart from auto mapping CLR Classes to EDM models, what are the advantages or use-cases for the ODataConventionModelBuilder ?
What specific set of pains does it make go away? With sample code if possible.

GilliVilla
- 4,998
- 11
- 55
- 96
7
votes
1 answer
How can I configure the target namespace globally in JAX-WS web services?
I have a lot of endpoints annotated with @WebService(targetNamespace = "mynamespace"). Every @WebResult and @WebParam has the same definition of targetNamespace = "mynamespace".
Is there a way to configure JAX-WS (Metro implementation) to use…

timomeinen
- 3,101
- 3
- 33
- 46
6
votes
2 answers
servicestack with funq - autowiring by convention
I have a service which takes an IMyDependency in its constructor. IMyDependency, MyDependency and the service all live in the same assembly. MyDependency has a single, public, parameterless constructor.
To my surprise, this did not…

Jordan Morris
- 2,101
- 2
- 24
- 41
6
votes
1 answer
NHibernate ConventionModelMapper; What is the difference between IsRootEntity & IsEntity
I'm playing around with Sharp Architecture Lite, which emphasizes convention over configuration, and trying to understand how the NHibernate ConventionModelMapper works. Specifically, I can't tell the difference between the IsRootEntity & IsEntity…

Mitch A
- 2,050
- 1
- 21
- 41
5
votes
2 answers
Does cmake use convention over configuration?
Maven is said to employ a form of Convention over Configuration.
I don't want to draw any wrong comparisons but as far as I understand cmake can fill a similar roll for a C++ project as maven can for a Java project.
So, does cmake have some…

Martin Ba
- 37,187
- 33
- 183
- 337
5
votes
2 answers
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…

Ruben Bartelink
- 59,778
- 26
- 187
- 249
4
votes
2 answers
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

James McMahon
- 48,506
- 64
- 207
- 283