【发布时间】:2012-06-26 18:07:36
【问题描述】:
我对项目架构师的请求有疑问。此人希望我以与 .NET 命名约定相同的方式命名我的所有属性。
我应该努力保持 JavaScript 作为 JavaScript,还是允许 .NET 命名约定在我们的 JS 上蔓延,因为我们在 .NET 商店?
//ALL THE RETURN PROPERTY NAMES SHOULD START WITH A CAPITALIZED LETTER - like MaxItemsPerPage.
return {
MaxItemsPerPage: _dataModel.pageSize,
data: _data,
searchTerm: _searchTerm,
filterViewModel: _filterModel,
dataGridViewModel: _dataModel,
sortOptions: _sortOptions,
selectedSortOption: _selectedSortOption,
selectedSortOrder: _selectedSortOrder,
sortOrders: _sortOrders,
loading: _loading,
update: updateData,
searchResults: _searchResults,
pageTitle: _pageTitle,
showSortOpts: _showSortOpts,
enableSortOpts: _enableSortOpts,
disableSortOpts: _disableSortOpts,
showA: _showAscendingOptions,
showD: _showDescendingOptions,
selectedSearchTemplate: _selectedSearchTemplate,
searchListTemplateOptions: _searchListTemplates
};
【问题讨论】:
-
这在programmers.stackexchange.com 上可能会更好。我投票关闭,因为它不适合这里,因为它无法客观地回答。
标签: javascript .net naming conventions