Schemes For Referencing Client-Side Components

I tend to design components in a consistent way.  I can be anal about this sometimes.  What I like to do is name my server components the same as my client-components.  This way, it becomes easier to register and describe these components in a logical way.  So if I have a server control:

Nucleo.Web.ButtonControls.Button

as it's fully quantified name, I have a client-side component named

Nucleo.Web.ButtonControls.Button

and it's equivalent JS file resource name would be:

Nucleo.Web.ButtonControls.Button.js

This way, when I describe or reference the component, I can use the type name to pass to the descriptor/reference.  One little shortcut, one way not to have to change something later, and it makes it a little more convenient.

 

Published Thursday, May 14, 2009 3:15 AM by bmains
Filed under: ,

Comments

No Comments