What is “infinite scroll” and “Flyweight” pattern?

Ans: The “Infinite scroll” and “Flyweight” patterns are used to load large number of objects in web applications.

Infinite scroll is also called auto paganize/endless pages. In this technique pre-fetching of contents is done and added directly to the current page.It allows to load chunk of data when you scroll down to the end of the web page and then injects it inside the page.It will continue the process of loading chunk data each time you scroll down to the end of current page. This is implemented using jquery.

Flyweight pattern is also used to load large number of objects. In this approach, small number of objects are created and reused throughout the loading process. First a factory is created for supplying the objects when requested by the client (here web application). If the object is already available (cached in a hashmap), it is returned or a new object is created and returned. The newly created object is again added in the hashmap for future use. But the point is that the returned objects should be of similar types as it will be returned against a key value supplied to the factory.

One thought on “What is “infinite scroll” and “Flyweight” pattern?

  1. kaushik Post author

    Hi,

    Thanks for your comment and adding us to your blogroll. Let us know if you need any service from us.We would love to help you.

    Regards
    /KP

============================================= ============================================== Buy best TechAlpine Books on Amazon
============================================== ---------------------------------------------------------------- electrician ct chestnutelectric
error

Enjoy this blog? Please spread the word :)

Follow by Email
LinkedIn
LinkedIn
Share