property naming conventions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

property naming conventions

Steven Grijzenhout
Hello,

I'm designing a data model for a Hippo CMS 7 project. I was wondering
what the naming conventions of properties are. Are there any naming
conventions and/or what are the best practices?

As an example, how would I name a property 'number of items'?
Something like numberOfItems, numberofitems or number-of-items?

Regards,

Steven
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: property naming conventions

William Borg Barthet
I believe the convention is namespace:fieldname, so in your case its "namespace:numberofitems". I have seen quite a few projects that use camelCase for properties when the namespace is omitted.

William

On Mon, Mar 19, 2012 at 1:03 PM, Steven Grijzenhout <[hidden email]> wrote:
Hello,

I'm designing a data model for a Hippo CMS 7 project. I was wondering
what the naming conventions of properties are. Are there any naming
conventions and/or what are the best practices?

As an example, how would I name a property 'number of items'?
Something like numberOfItems, numberofitems or number-of-items?

Regards,

Steven
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Ard
Reply | Threaded
Open this post in threaded view
|

Re: property naming conventions

Ard
We never made it really to a convention. You can only rule out
number-of-items as it is not allowed in a cnd nor as a java identifier

The hst has all cnd properties lowercased, sometimes using a '_' as
separator...I am not sure however if when we would be able to start
again, would use the same naming convention.

Ard

On Mon, Mar 19, 2012 at 1:13 PM, William Borg Barthet
<[hidden email]> wrote:

> I believe the convention is namespace:fieldname, so in your case its
> "namespace:numberofitems". I have seen quite a few projects that use
> camelCase for properties when the namespace is omitted.
>
> William
>
>
> On Mon, Mar 19, 2012 at 1:03 PM, Steven Grijzenhout
> <[hidden email]> wrote:
>>
>> Hello,
>>
>> I'm designing a data model for a Hippo CMS 7 project. I was wondering
>> what the naming conventions of properties are. Are there any naming
>> conventions and/or what are the best practices?
>>
>> As an example, how would I name a property 'number of items'?
>> Something like numberOfItems, numberofitems or number-of-items?
>>
>> Regards,
>>
>> Steven
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: property naming conventions

Minos Chatzidakis-2
In reply to this post by William Borg Barthet
namespace:numberofitems

Yes that's what I've seen so far in every project as well. No camelCase, nothing special when you also have the namespace



On Mon, Mar 19, 2012 at 1:13 PM, William Borg Barthet <[hidden email]> wrote:
I believe the convention is namespace:fieldname, so in your case its "namespace:numberofitems". I have seen quite a few projects that use camelCase for properties when the namespace is omitted.

William


On Mon, Mar 19, 2012 at 1:03 PM, Steven Grijzenhout <[hidden email]> wrote:
Hello,

I'm designing a data model for a Hippo CMS 7 project. I was wondering
what the naming conventions of properties are. Are there any naming
conventions and/or what are the best practices?

As an example, how would I name a property 'number of items'?
Something like numberOfItems, numberofitems or number-of-items?

Regards,

Steven
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html



--
With kind regards/Met vriendelijke groet,
Minos Chatzidakis

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: property naming conventions

Steven Grijzenhout
Thanks everyone. I'll concatenate everything in lowercase.

On Mon, Mar 19, 2012 at 1:22 PM, Minos Chatzidakis
<[hidden email]> wrote:

> namespace:numberofitems
>
> Yes that's what I've seen so far in every project as well. No camelCase,
> nothing special when you also have the namespace
>
>
>
> On Mon, Mar 19, 2012 at 1:13 PM, William Borg Barthet
> <[hidden email]> wrote:
>>
>> I believe the convention is namespace:fieldname, so in your case its
>> "namespace:numberofitems". I have seen quite a few projects that use
>> camelCase for properties when the namespace is omitted.
>>
>> William
>>
>>
>> On Mon, Mar 19, 2012 at 1:03 PM, Steven Grijzenhout
>> <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> I'm designing a data model for a Hippo CMS 7 project. I was wondering
>>> what the naming conventions of properties are. Are there any naming
>>> conventions and/or what are the best practices?
>>>
>>> As an example, how would I name a property 'number of items'?
>>> Something like numberOfItems, numberofitems or number-of-items?
>>>
>>> Regards,
>>>
>>> Steven
>>> _______________________________________________
>>> Hippo-cms7-user mailing list and forums
>>> http://www.onehippo.org/cms7/support/forums.html
>>
>>
>>
>>
>> --
>> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
>> Boston - 1 Broadway, Cambridge, MA 02142
>>
>> US +1 877 414 4776 (toll free)
>> Europe +31(0)20 522 4466
>> www.onehippo.com
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
>
> --
> With kind regards/Met vriendelijke groet,
> Minos Chatzidakis
>
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html