Conventions for reusable component assets

What conventions have evolved for placing reusable website assets in a
project? Do people just mix in all a components assets in with the
other assets,

cp -r foo/assets/images/* mysite/assets/images/
cp -r foo/assets/stylesheets/* mysite/assets/stylesheets/
...

Or do they keep the component intact.

cp -r foo mysite/assets/

Or a subdirectory maybe?

cp -r foo mysite/assets/libraries/

How are other handling this?

On Wed, Aug 24, 2011 at 4:38 PM, Intransition [email protected]
wrote:

What conventions have evolved for placing reusable website assets in a
project? Do people just mix in all a components assets in with the
other assets,

cp -r foo/assets/images/* mysite/assets/images/
cp -r foo/assets/stylesheets/* mysite/assets/stylesheets/

Is this for content across projects? For example, company logos, flash
animations?

I have heard of companies making very atomic versions of gems to take
DRY
concepts across projects.

Perhaps it might work well for static assets too.

On Aug 24, 11:48am, Richard C. [email protected] wrote:

animations?
In my case it’s for website libraries, e.g. highlight.js (http://
highlight.js).

I have heard of companies making very atomic versions of gems to take DRY
concepts across projects.

Perhaps it might work well for static assets too.

Actually it looks like I will be doing that too. But it still leaves
the question of where to put files in the end product.

Cnjm

Enterprise Solutions Consultant
Aaron Peter Samuel
347.998.4023 (mobile)

So funny story. I have been on this list for about 3 months. Always told
myself ‘make sure your first post is a good one’.

Looks like my luck is what I thought. Pretty bad.

Sorry about my rear end trying to hijack your thread!

Enterprise Solutions Consultant
Aaron Peter Samuel
347.998.4023 (mobile)
On Aug 25, 2011 4:10 PM, “Aaron Samuel” [email protected] wrote:

Cnjm

Enterprise Solutions Consultant
Aaron Peter Samuel
347.998.4023 (mobile)
On Aug 24, 2011 11:48 AM, “Richard C.” [email protected]
wrote:

On Wed, Aug 24, 2011 at 4:38 PM, Intransition [email protected]

On 25 August 2011 18:51, Intransition [email protected] wrote:


Perhaps it might work well for static assets too.

Actually it looks like I will be doing that too. But it still leaves
the question of where to put files in the end product.

Since you are going to use gems it solves your question. gems separate
files of each gem into a separate directory.

In general separate directories are easy to manage manually.
Installing/updating/replacing a package is easy then.

Using unified location across packages (like FHS) requires a package
manager that tracks which files are part of what so that they can be
later removed or upgraded easily and lends itself to modularity. You
can reference some file like images/site-logo.png and have several
packages that provide the file and several others that reference it,
and it will work as long as one of the packages that provides the logo
is present.

Still you might want to glob images/site-logo.* in case you had a gif
or svg logo, and then you can glob /images/site-logo. equally well.

Thanks

Michal

On Thu, Aug 25, 2011 at 7:56 PM, Aaron Samuel
[email protected]wrote:

So funny story. I have been on this list for about 3 months. Always told
myself ‘make sure your first post is a good one’.

Looks like my luck is what I thought. Pretty bad.

Sorry about my rear end trying to hijack your thread!

lol, don’t sweat it. I remember my first post, Gmail keeps the one you
sent,
and the one the ML sent back to you, so it looks like you sent the msg
twice. I thought I somehow double posted and looked like an idiot.
Honestly,
though, I doubt anyone notices mistake posts, it’s not really worth
their
time.

I wouldn’t give so much emphasis to posting here, just post what you
think,
enjoy yourself. If you’re wrong, someone will let you know, and you’ll
learn
something. No need to worry about impressing people.

On Aug 25, 5:23pm, Michal S. [email protected] wrote:

Since you are going to use gems it solves your question. gems separate
files of each gem into a separate directory.

Not quite. The program I am working on build a website. It needs to
take files from different components such as images and stylesheets
and brings them all together into a single website layout. So I have
to decide if the different components should merge their files, i.e.
all images get put in a shared assets/images/ directory. Or do I
have each component keep it’s own place, e.g. assets/images/ component1/, assets/images/component2/ or something to that effect.

In other words, my question is, when building a website, how to
organize reusable libs like jquery, thickbox, google-code-prettify,
etc. How do all of these get integrated into a site. And so my
question about what conventions have grown up around these. I wonder
why there are not more standard practices in this regard.

In general separate directories are easy to manage manually.
Installing/updating/replacing a package is easy then.

Using unified location across packages (like FHS) requires a package
manager that tracks which files are part of what so that they can be
later removed or upgraded easily and lends itself to modularity. You
can reference some file like images/site-logo.png and have several
packages that provide the file and several others that reference it,
and it will work as long as one of the packages that provides the logo
is present.

A fair case made for using a shard location. Hmm…

Thanks much Josh and will do =).

On Fri, Aug 26, 2011 at 3:21 AM, Josh C. [email protected]
wrote:

learn
something. No need to worry about impressing people.

Kind Regards,
Aaron Peter Samuel
Enterprise Solutions Expert
Specialties: Unix/Linux, Networking, Applications, Storage
Profile: http://www.google.com/profiles/aaron.psamuel
References: http://www.linkedin.com/in/aaronpsamuel

If you aren’t proud of it, it isn’t good enough.