Questions tagged [convention-over-configur]
60 questions
3
votes
4 answers
Ruby on Rails commands and conventions - what are they?
I have been making websites in PHP and MySQL for almost ten years now but I have never used a framework. This means I have hand coded everything and I know how the code all works and interacts with itself.
Wanting to expand my horizons I have…

Reily Bourne
- 5,117
- 9
- 30
- 41
3
votes
0 answers
StructureMap RegistrationConvention for decorator pattern
I'm using the decorator pattern to implement caching for my Repositories as such:
IFooRepository()
IFooRepository FooRepository()
IFooRepository CachedFooRepository(IFooRepository fooRepository)
The Cached repository checks the cache for the…

smathson
- 108
- 2
- 6
3
votes
1 answer
How can I use Caliburn.Micro conventions to set a button's text and its action?
If I have a button in my View named, say, Save, then I can add a Save property to my ViewModel, and Caliburn.Micro will automatically bind it to my button's Content. For example:
public string Save { get { return StringResources.Save; } }
Or I can…

Joe White
- 94,807
- 60
- 220
- 330
3
votes
1 answer
Set instance lifecycle with StructureMap convention based registration
I'm trying to use StructureMap 2.6.1 to register all my repositories at once using the convention based registration. See the code bellow :
x.Scan(s =>
{
s.TheCallingAssembly();
s.IncludeNamespaceContainingType();
…

mberube.Net
- 2,120
- 2
- 29
- 39
3
votes
2 answers
Convention Over Configuration - Is this a proper scenario?
I have some Result classes that represent flat results in an object oriented fashion. The flat result comes in as a text stream, and a Formatter formats the flat results into the properties of the Result.
I assume my convention will consistently be…

grefly
- 1,181
- 2
- 12
- 28
3
votes
3 answers
What is wrong with placing models in a folder other than Models?
I'm a new learner of ASP.NET MVC. I looked through few books and code samples. While I learn I came up with the below question and cannot clearly understand the point below.
Most books explain that placing Models in Models folder is a Convention…

Zafar
- 3,394
- 4
- 28
- 43
3
votes
2 answers
Grails: How can I change default view location?
I've got controller AdminTagController. By default view will be located in /adminTag folder. Is it possible to change default folder for this controller to /admin/view? I can specify view for each method but it's not cool
Thank you

fedor.belov
- 22,343
- 26
- 89
- 134
3
votes
3 answers
Any way to use goog.require in development with convention-over-configuration?
Is there any way I can use Google Closure goog.require to manage JS dependencies, without having to register each namespace explicitly in a dependencies.js file?
I like the idea of the compiler for production, but for development, I'd like some kind…

wrschneider
- 17,913
- 16
- 96
- 176
2
votes
2 answers
Ruby on Rails Unit Testing
I'm currently writing unit tests for my Ruby on Rails application, and one of my models is a normal Ruby class for parsing XML files.
I now wish to write unit tests for this class using a correct and incorrect xml file. The only question is, where…

codingbunny
- 3,989
- 6
- 29
- 54
2
votes
2 answers
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…

Chad Moran
- 12,834
- 2
- 50
- 72
2
votes
1 answer
Is there a dynamic module loader for AngularJS that uses convention over configuration?
Most dynamic modules that I can find are not really dynamic and are actually lazy loaders, as they mostly require you to register what you want loaded in config files and registers.
I am looking for a loader js way of using convention and just auto…
user924069
2
votes
2 answers
Java Dependency Injection framework with Convention over Configuration feature
In this blog post Mark Seemann explains the different approaches to configure dependencies with a dependency injection framework. Convention over Configuration is one of this approaches. In the .NET world there are multiple DI frameworks which…

Olaf
- 3,786
- 4
- 25
- 38
2
votes
3 answers
Does coding by convention prevent flexibility?
Firstly, I'm 100% in favour of conventions and an entire team complying. However, I'm looking at frameworks (mostly various PHP but also Ruby on Rails and others) that pretty much enforce coding by convention. On the surface this seems like a great…

Engineer81
- 1,004
- 1
- 11
- 26
2
votes
1 answer
What are drawbacks of naming controllers in singular form is Rails?
I know in Rails we follow conventions. And we should name controllers in plural form.
Recently I hired a freelancer to help me with one part of my application in Rails as I'm really new to this framework and ruby.
I had a PortfolioController - this…

Nemoden
- 8,816
- 6
- 41
- 65
2
votes
2 answers
Is there any issue with using respond_to blocks in controller actions like this?
I'm AJAXifying an existing Rails 3.2 application, and some of the requests that are made from the client are better done asynchronously. To facilitate this, and to cut down on rendering time, I'm giving feedback to the user via alerts. I have a…

RubyRedGrapefruit
- 12,066
- 16
- 92
- 193