Wrox Programmer Forums
|
BOOK: Patterns, Principles and Practices of Domain-Driven Design
This is the forum to discuss the Wrox book Patterns, Principles and Practices of Domain-Driven Design by Scott Millett; ISBN: 978-1-118-71470-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Patterns, Principles and Practices of Domain-Driven Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 30th, 2015, 08:59 AM
Authorized User
 
Join Date: May 2015
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb UpperCamelCase Vs under score

I see that on page 312, you use methods with under scores. For example, change_price_to. On page 317 you use UpperCamelCase.

Do you think any special style helps domain design easy? It may look like a stupid question, but think about how this can help new developers or large teams?
 
Old May 30th, 2015, 09:43 AM
Wrox Author
 
Join Date: May 2015
Posts: 59
Thanks: 1
Thanked 5 Times in 5 Posts
Default

In my opinion it's mostly it's based on team and language conventions. When I write scala I use lowerCamelCase. In .NET I use UpperCamelCase and in python I use snake_case to follow community conventions and language style guides.

Mostly in the book we followed the .NET convention of UpperCamelCase, but as you point out we used snake_case in a few places because it does make expressing certain phrases easier to read.

It can make your codebase too inconsistent when you mix different types of casing so it's best to use one or the other consistently in my opinion. But if you think there is a big benefit to using a differing casing in certain places, it's worth considering.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Algorithm to Score Global Quality-Quantity of File asgarcymed VBScript 0 November 24th, 2007 11:12 PM
Display highest test score kgs51 VB.NET 2002/2003 Basics 15 November 19th, 2004 11:02 AM
Coursebuilder Score Script fs22 Javascript 0 April 8th, 2004 09:37 AM
get max test score and corresponding date ssambr1 MySQL 1 January 24th, 2004 08:42 PM
quiz total score frenziedsilence Beginning PHP 2 January 14th, 2004 12:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.