• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another Asset Management

#1
[eluser]Amzad Hossain[/eluser]
I have developed another asset management but my colleague told me that he has seen something some same idea in Ignited code. I have searched but could not find it. So, if anyone have seen or developed something of same kind then plz let me know. If there is nothing of this sort, i will publish my code.


Idea:

Lightbox, facebox and these sort of plugins has their own js, css and dependent other js/css files. In my library you have a config file where you have to add these components as following:

Code:
[ lightbox ] -
          [ resources] - { lightbox.js, lightbox.css }
          [ dependency ] - { jquery.js }

[ facebox ] -
          [ resources] - { facebox.js, facebox.css }
          [ dependency ] - { jquery.js }


Now in your controller you will call the helper function:

Code:
add_component('lightbox');

or,

Code:
add_component( array('lightbox', 'facebox') );


The library class then arranges and prioritize the js and css files. And removes duplicated resources in case of you have added multiple components.


In your view file, all you have to do is to call another helper function print_components().


This function prints all js according to their order and also css files.



I am waiting for your response.. Thank you.

#2
[eluser]sofbas[/eluser]
Have you seen AssetlibPro?

I currently use it, it is quite neat.

#3
[eluser]Amzad Hossain[/eluser]
Just saw some basic of Assetlib:
but is it possible to load -> all js/css by one call from module ?? I did not find that feature Sad .. did i missed that.

Actually if just to add some js/css from a particular module or folder in a neat way; is not what i was looking for. I wont' mind if all my js is in one folder and all css in one folder and a generic function to load them all. I wanted a component based solution. I am using the above told library in my current project now. So, just before publishing it i wanted to make sure it's not a duplicate of some other library.

thanks for the reference..

#4
[eluser]sofbas[/eluser]
What about Asset Helper or Asset Manager?

They might not do what you exactly need to do, so you will most probably have to use your own lib (put it on the wiki if you do!) but you are saying when you searched you cannot find Asset type libraries?

#5
[eluser]Amzad Hossain[/eluser]
Quote:I have developed another asset management but my colleague told me that he has seen something some same idea in Ignited code. I have searched but could not find it.


I have seen Asset Helper. I was trying to say that i have not found any other asset manager which does the same thing that does mine. But one of my colleague, told me he has seen an asset manager does the same thing that my asset manager does.

I hope i clarified the confusion. I will check the second library. Thank you.

#6
[eluser]Amzad Hossain[/eluser]
Here i my library file and a little documentation. It's not much but it helps me a lot to manage my codes. Thaks.

component_library


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.