Questions tagged [convention-over-configur]
60 questions
1
vote
1 answer
Conventions over Configuration with Caliburn.Micro and code obfuscation in .NET
We're considering using Caliburn.Micro and Conventions over Configuration for our application, but I'm concerned that code obfuscation (which we require for the distributed application) will interfere with the naming conventions. Without having…

larsmoa
- 12,604
- 8
- 62
- 85
1
vote
0 answers
How do I create a javascript file from a struts 2 action while still using the .js extension?
I have some javascript files that need to be dynamically generated. It's purely i18n stuff, and I use the struts 2 convention plugin. I'm successfully able to do this when I omit the .js extension from both the URL and the source file, like…

chad
- 7,369
- 6
- 37
- 56
0
votes
2 answers
FluentNhibernate Custom Primary key Automapping - (dis)allow nulls
If this is the way for hard-coded mapping for nullable and not nullable database fields
// nullable
Map(x => x.FirstName)
.Nullable();
// not nullable
Map(x => x.FirstName)
.Not.Nullable();
How is it done with automapping and…

Sofija
- 713
- 11
- 14
0
votes
1 answer
wcf framework / project to remove a lot of the configuration to use convention over configuration
We are moving a WPF app across to use WCF and POCO. So far there are 10 or so services, but this will grow with time. It seems to me that we are having to repeat a lot of rubbish (the same text, I know its not rubbish) in the app.config to wire up…

Jon
- 15,110
- 28
- 92
- 132
0
votes
3 answers
Serving static content to my action using MVC's convention approach
I'm looking at outsourcing some in-page help on a large web application I am creating and would like to make it really easy for this content to added to our pages when we're ready for it.
So I was thinking I could create a system where I can add…

ajbeaven
- 9,265
- 13
- 76
- 121
0
votes
2 answers
Why Django static and media folders aren't pre-configured?
I was presenting a Django demonstration to my brother and he asked me the following question(s): "Why Django static and media folders aren't pre-configured? It's purpose aren't to be a convention over configuration framework? Why I am supposed to…

Herberth Amaral
- 3,479
- 3
- 33
- 35
0
votes
2 answers
Suggested directory structure/placement of ASHX files
Thanks to the published ASP.NET MVC conventions, I'm looking much more closely at the idea of universal conventions over configuration for my projects (versus 'home-rolled' conventions, or grabbing from a variety of conventions).
However, I'm not…

James Skemp
- 8,018
- 9
- 64
- 107
0
votes
3 answers
How to define Welcome Page in Java EE without a deployment descriptor
In a simple Java EE 8 web application, and since the deployment descriptor is not mandatory, and since a Servlet and a Filter can be registered in a ServletContextListener annotated with @WebListener, how can I define the list of welcome page…

Ali Bassam
- 9,691
- 23
- 67
- 117
0
votes
2 answers
Do I need to create folder hierarchy for nested module class in Rails
I have a scenario where I just need to inherite the classes in my subclass, there is not single line of code. Just due to STI I need to create it.
Ex:
|-- app
| |-- models
| | |-- a
| | | |-- a1
| | | | |-- special
| | | | …

Sourabh
- 21
- 2
0
votes
1 answer
Find class in model with has many relation
I have following Model:
TestProfessional {
static hasMany = [answers: Answer]
}
Answer {
String answer;
}
How to find TestProfessional with answers having specified id?

changtung
- 1,614
- 15
- 19
0
votes
1 answer
Start off with a default "hello world" project in Emacs
Many languages in eclipse have some sort of "default" Hello World project which will start you off with everything necessary to navigate, compile, and run a multi-file project
(ie Java can use Ant or Maven or any number of other options, CDT will…

dspyz
- 5,280
- 2
- 25
- 63
0
votes
1 answer
Setting up a convention for automatic factories
By defining a IDataRepositoryFactory non-generic interface with a generic Create method:
public interface IDataRepositoryFactory
{
T Create(DataContext context) where T : IDataRepository; // new non-generic interface
}
I'm able to avoid…

Mathieu Guindon
- 69,817
- 8
- 107
- 235
0
votes
2 answers
Creating a View Before the Controller in ASP.NET MVC
I created a Razor View by creating a new folder in my Solution under the Views folder, and then I right clicked that folder and selected "Add View".
Later, I went to my Controller folder and right clicked it, selecting "Add Controller". However, now…

AlbertoPL
- 11,479
- 5
- 49
- 73
0
votes
1 answer
Caliburn Micro: How to bind ActivateItem to selectionEvents in Conductors
As can be seen in the SimpleMDI Caliburn Micro project there are some conventions that bind the selectionEvent in tabControls to the ActivateItem in a Conductor. I can't really see any mention of what this event might be.
However when you have a…

Ingó Vals
- 4,788
- 14
- 65
- 113
0
votes
3 answers
Entity Framework Code First convention over configuration should be the other way around
Why has MS decided to use convention over configuration.
I deal with very large projects and not all projects are data centric. In fact, even with data centric projects, my entity classes have a lot of custom functionality that needs to be…

Raheel Khan
- 14,205
- 13
- 80
- 168