Questions tagged [convention-over-configur]
60 questions
2
votes
3 answers
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.
alt text…

p.campbell
- 98,673
- 67
- 256
- 322
2
votes
1 answer
NHibernate testing strategy: one test suite per root or per class/mapping
Given that most real world applications have fairly complicated relationships between entities, is there much value in testing individual class mappings? It seems that to be truly valuable, NHibernate tests should revolve around retrieving,…

Mitch A
- 2,050
- 1
- 21
- 41
2
votes
1 answer
Fluent NHibernate automapping class conventions aren't being applied to entire class hierarchy
I'm trying to automap a simple inheritance hierarchy with Fluent Nhibernate, and I need to have a slightly different name for each table than its class (underscores instead of Pascal case). This seems like an obvious place to use conventions. I…

Paul Phillips
- 6,093
- 24
- 34
2
votes
1 answer
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…

pepe
- 47
- 1
- 5
2
votes
2 answers
When do I add new folders in Convention over Configuration?
I have two questions, really.
I see people add a Services folder to their projects. What is the purpose of that folder?
I see the folders for Services and ViewModels. Now I ran across an article about Repositories. So is it the rule that every time…

dotnetN00b
- 5,021
- 13
- 62
- 95
1
vote
1 answer
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…

Charlie
- 10,227
- 10
- 51
- 92
1
vote
1 answer
Convention-driven configuration for WCF (server-side)
Just started on a new project and opened up a 1600 line web.config file for a WCF project, where 90% of the services are configured identically (hmfph).
I like a project to be easy to manage, with as few redundant lines of code as possible. So my…

jaspernygaard
- 3,098
- 5
- 35
- 52
1
vote
1 answer
How to achieve convention-over-configuration for Angular?
I find it somewhat inconvenient having to manually register my Angular MVC components and services within the root module (AppModule). It becomes even more inconvenient when working in a team. Ideally, developers should only add three files - a…

JustAMartin
- 13,165
- 18
- 99
- 183
1
vote
1 answer
Spring MVC: CoC for requesting mapping
Having used other MVC frameworks such as Zend Framework in the past, I am used to the idea of requests being mapped as follows by default.
http://mysite.com/user/add calls the add method in the User controller class, which then calls a view named…

William
- 13,332
- 13
- 60
- 73
1
vote
2 answers
Is there anyway to eliminate spring-context xml and turn on annotations programatically?
I am new bee in spring and was playing with 'Autowired' annotation in my small test program. So far, I have learned that to make 'Autowired' annotation work we need to turn it on from the spring- context xml using the tag:

VictorGram
- 2,521
- 7
- 48
- 82
1
vote
1 answer
Package-based controller resolving in Spring MVC
I would like to know if it is possible to make Spring MVC work like Stripes when resolving controller classes.
Normally I can annotate a controller with a @RequestMapping in order to map it to its URL.
However my boss asked for a…

usr-local-ΕΨΗΕΛΩΝ
- 26,101
- 30
- 154
- 305
1
vote
1 answer
Configuration by Exception vs Convention over Configuration
Does anybody know the difference between those two terms? In my opinion both refer to exactly the same thing: a framework or API, for which only unconventional behavior must be specified. If there is a difference, could you share with example, in…

Tinki
- 1,486
- 1
- 21
- 32
1
vote
1 answer
How do I map a model with nested properties to a flat Dto?
I'm trying to create a mapping from our entity models to a Dto but I'm failing everytime in trying to create the mapping.
I have two domain classes. This is a simplification of our model (Device for instance has a lot more properties that represent…

julealgon
- 7,072
- 3
- 32
- 77
1
vote
0 answers
How to keep my DbContext in another project?
I'm trying to use EF 6 with Custom Conventions but the interface IConfigurationConvention is not recognized!
Packages:
EntityFramework 6.0.0-beta1-20702
I'm following this post but unsuccessfully to use Custom Conventions in EF6

ridermansb
- 10,779
- 24
- 115
- 226
1
vote
2 answers
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…

mpen
- 272,448
- 266
- 850
- 1,236