naming-conventions

An Ideal Folder Structure for .NET MVC [closed]

蓝咒 提交于 2019-12-02 15:31:47
When I started in .NET Webforms I didn't have much trouble finding a folder structure to follow since VS offered you application folders like "App_Code" and most app examples put "BLL", "DAL" inside there and so on. But now in MVC, every example I check uses different structure, like no standards this time and I haven't found a good solution on Google or SO. So, maybe we can share how we organize our MVC projects, may help others to make their own mind. Here is the structure for small to medium projects I use: App_Data Areas Admin Controllers Models Views MyAccount Controllers Models Views

python: naming a module that has a two-word name

我怕爱的太早我们不能终老 提交于 2019-12-02 15:03:07
I'm trying to put together a really simple module with one .py source file in it, and have already run into a roadblock. I was going to call it scons-config but import scons-config doesn't work in Python. I found this SO question and looked at PEP8 style guide but am kind of bewildered, it doesn't talk about two-word-name conventions. What's the right way to deal with this? module name: SconsConfig? scons_config? sconsconfig? scons.config? name of the single .py file in it: scons-config.py? scons_config.py? edit: I did see "the use of underscores is discouraged" and that left me at a dead end:

How to properly set an element's scope using BEM?

故事扮演 提交于 2019-12-02 14:58:21
Given the following BEM tree structure, where five nested levels exist: collection-main__features-top__story__byline__author according to BEM's naming convention, where an element is part of a block and has no meaning outside of the block it belongs to, what is the proper way to name the author class? Since an author is semantically tied to the byline and the story context, but meaningless under the features-top and collection-main blocks, what is the best BEM name? collection-main__author features-top__author story__author (best?) story__byline__author byline__author What happens if a new

Dynamically name a struct variable in MATLAB

ぐ巨炮叔叔 提交于 2019-12-02 14:56:24
问题 I have several files "2011-01-01.txt", "2013-01-02.txt", "2015-02-01.txt", etc. I wish to create a struct variable for each of the file such that (the values are made up): machine20110101.size=[1,2,3]; machine20110101.weight=2345; machine20110101.price=3456; machine20130102.size=[2,3,4]; machine20130102.weight=1357; machine20130102.price=123; machine20150201.size=[1,2,4]; machine20150201.weight=1357; machine20150201.price=123; And, save('f20110101.mat','machine20110101'); save('f20130102.mat'

“ID” or “Id” on User Interface

风流意气都作罢 提交于 2019-12-02 14:47:36
The QA manager where I work just informed me there is a bug in my desktop app due to the sign-on prompt being "Operator Id" when it should be "Operator ID". Her argument being that "Id" refers to the ego portion of Freud's "psychic apparatus" and is not semantically correct. Now being an anal engineer (AE) I of course had to go and lookup Id vs ID and from my cursory investigations (google) it seems ID is just as commonly used for Freud's ego as Id is. So my reasoning would be that Id is a shortened version of "Identifier" and is more correct or at least more commonly used than ID which would

Git flow release branches and tags - with or without “v” prefix

痞子三分冷 提交于 2019-12-02 14:07:37
I have seen multiple contradicting definitions on various git flow related websites. Is there an official recommendation or single source of truth? Branches: release-1.2.3 or release-v1.2.3 Tags: 1.2.3 or v1.2.3 TimWolla Well, basically it is a matter of preference, but I prefer the version with the v , as Semver does it that way and I try to follow that specification as close as possible to get a sane versioning. It also makes filtering for those Tags easier, as you can press v and then the TAB -key for autocompletion: This will list all the tags (and maybe a few branches), whereas there are

Naming convention for utility classes in Java

爱⌒轻易说出口 提交于 2019-12-02 14:05:37
When writing utility classes in Java, what are some good guidelines to follow? Should packges be "util" or "utils"? Is it ClassUtil or ClassUtils? When is a class a "Helper" or a "Utility"? Utility or Utilities? Or do you use a mixture of them? The standard Java library uses both Utils and Utilities: javax.swing.Utilities javax.print.attribute.AttributeSetUtilities javax.swing.plaf.basic.BasicGraphicsUtils Apache uses a variety of Util and Utils, although mostly Utils: org.apache.commons.modeler.util.DomUtil org.apache.commons.modeler.util.IntrospectionUtils org.apache.commons.io

How to name factory like methods?

最后都变了- 提交于 2019-12-02 14:05:31
I guess that most factory-like methods start with create . But why are they called " create "? Why not " make ", " produce ", " build ", " generate " or something else? Is it only a matter of taste? A convention? Or is there a special meaning in "create"? createURI(...) makeURI(...) produceURI(...) buildURI(...) generateURI(...) Which one would you choose in general and why? Some random thoughts: 'Create' fits the feature better than most other words. The next best word I can think of off the top of my head is 'Construct'. In the past, 'Alloc' (allocate) might have been used in similar

Naming convention for unique constraint

北城以北 提交于 2019-12-02 13:52:56
Naming conventions are important, and primary key and foreign key have commonly used and obvious conventions ( PK_Table and FK_Table_ReferencedTable , respectively). The IX_Table_Column naming for indexes is also fairly standard. What about the UNIQUE constraint? Is there a commonly accepted naming convention for this constraint? I've seen UK_TableName_Column , UQ_TableName_Column , and someone recommending AX_TableName_Column - I don't know where that comes from. I've typically used UQ but I don't particularly like it, and I do not enjoy having to defend my choice of using it against a UK

Is there a naming convention for git repositories?

做~自己de王妃 提交于 2019-12-02 13:49:24
For example, I have a RESTful service called Purchase Service. Should I name my repository: purchaserestservice purchase-rest-service purchase_rest_service or something else? What's the convention? How about in Github? Should public repositories follow some standard? I'd go for purchase-rest-service . Reasons: What is "pur chase rests ervice"? Long, concatenated words are hard to understand. I know, I'm German. "Donaudampfschifffahrtskapitänspatentausfüllungsassistentenausschreibungsstellenbewerbung." "_" is harder to type than "-" The problem with camel case is that there are often different