DataLib is a loader class that manages all load requests of your application and stores all loaded data for future requests. I´ve been using it previous version for about an year and half and it’s been working just fine, but I’ve decided to release a new version with more features and better usage.
The concept is simple. Every instance of DataLib have a load queue, and every instance is placed on a static queue that manages all requests. By default, 3 itens can be loaded at the same time, but you can change the number of slots as your wish. This way, one single giant file doesn’t hold your application until it is loaded, you can use other slots to load all other files that your application needs.
Another advantage is that you can load files from a dynamic url, i.e. a php that returns a xml or an image depending on what parameters you passes to it.
You can also get any loaded data from any place of your application even if you don’t have acess to the instance that requested that file. This is because every file is stored at the static class. Another thing is that if you call a file that has already been loaded, it takes the data from the DataLib library, saving some (or much) loading time. If you care about memory usage, you can delete data from the library whenever you want.
(more…)






English
