我对项目架构师的请求有疑问。此人希望我以与 .NET 命名约定相同的方式命名我的所有属性。
我应该努力将 JavaScript 保留为 JavaScript,还是因为我们在 .NET 商店中而让 .NET 命名约定在我们的 JS 上蔓延?
//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
};