Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/241a5f6370ded07c#

Database if one thing In-Portal can't live without. That's why it's import
to keep it as clean and understandable as possible, especially during
times, when we constantly adding/removing fields/tables from it.

Recently I needed to search for "Type" field I added to one of the tables.
I was very surprised to find, that a lot of database tables share exactly
same field name resulting in a lot of results and no way to automatically
find all needed usages.

Right now we use pascal case scheme in naming tables and fields in
database, e.g.

   - Users
   - UserCustomFields
   - PortalUserId
   - Username

This works perfectly, but for fields with more general names, like "Type",
"Status" and so on I'm proposing to add something specific to
identify connecting with corresponding database table.

For example:

   - Type for users will become UserType
   - Type for orders will become OrderType

Following this logic CreatedById field should be renamed to
OrderCreatedById, AffiliateCreatedById and so on, but I'm not sure this is
good idea, since we don't rename or refactor these fields that much.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

  • No labels