Naming convention for libraries with CSS+JS

28 views
Skip to first unread message

David Beitey

unread,
Oct 16, 2012, 8:02:48 PM10/16/12
to fans...@googlegroups.com
Hi all,

Just curious as to whether anyone's got suggestions for a namespace convention for a Fanstatic library that contains both JS and CSS resources.  These resources are related to one  but can be used independently.  My thought was to use 'fanstatic.library_name', but one would have to take care not to use something already in the fanstatic namespace.  Anyone see any issues with this approach and/or have a better naming suggestion?

Thanks,
David

Jan-Jaap Driessen

unread,
Oct 17, 2012, 7:35:44 AM10/17/12
to fans...@googlegroups.com
Hi David,

You can't use the fanstatic namespace, as fanstatic is not a namespace
package. You say the resources can be used separately, so I would
suggest creating both a css. and a js. package.

Cheers,

JJ

Andreas Kaiser

unread,
Oct 17, 2012, 7:51:03 AM10/17/12
to fans...@googlegroups.com

On 17.10.2012, at 13:35, Jan-Jaap Driessen <janjaap...@gmail.com> wrote:

> On Wed, Oct 17, 2012 at 2:02 AM, David Beitey <da...@davidjb.com> wrote:
>> Just curious as to whether anyone's got suggestions for a namespace
>> convention for a Fanstatic library that contains both JS and CSS resources.
>> These resources are related to one but can be used independently. My
>> thought was to use 'fanstatic.library_name', but one would have to take care
>> not to use something already in the fanstatic namespace. Anyone see any
>> issues with this approach and/or have a better naming suggestion?
>
> You can't use the fanstatic namespace, as fanstatic is not a namespace
> package. You say the resources can be used separately, so I would
> suggest creating both a css. and a js. package.

Isn't it common convention to name packages that contain bot CSS and JS
js.library_name and just make the resoures available separately as well
as combined?

I.e.:

library_name_js = Resource(library, 'library_name.js')
library_name_css = Resource(library, 'library_name.css')
library_name = Group([library_name_css, library_name.js])


Andreas

Noe Nieto

unread,
Oct 23, 2012, 3:51:39 PM10/23/12
to fans...@googlegroups.com


2012/10/17 Andreas Kaiser <di...@binary-punks.com>

+1

--
---
Noe Nieto
NNieto Consulting Services
M: nni...@noenieto.com
W: http://noenieto.com
T:  @tzicatl
Li: Perfil en LinkedIn

Reply all
Reply to author
Forward
0 new messages