• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Lazy loading of objects in Java

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this book cover lazy loading of objects?
Lets see the below scenario
class A{
private B b;
public A(B b){
this.b = b;
}
public B getB(){
return this.b;
}
}

The same thing with Class B with respect to Class C.
So As the linkage of classes are big and it would be resource intensive to initialize all classes. Is it possible to load only skeleton of instances without detail initialization. And the momemnt I sa getB() then only Class B should be initialized fully.
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ranjan,

which book are you refering to?

concerning lazy load - a pretty advanced topic in my eyes ;-) - you might want to consider the proxy pattern.

in this pattern the code will be developed against an interface, which fakes to be the real, heavy-weight object. in reality you work with a much smaller proxy object, which only instantiates the needed, light-weight code.

some case-special business logic to develop, of course.

hope it helps,
jan
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my view, Lazy Loading is a synonym for Run Time Binding in Java. And Run Time Binding is, in case of overridding, JVM always makes decision (at run time), which method will get called on the bases of type of object.

Hope it is right.
 
Kumar Bisk
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought this was the forum to review "The book is "Java: A Beginner's Guide, Third Edition (Beginner's Guide)" by Herbert Schildt."
 
Kumar Bisk
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

And Run Time Binding is, in case of overridding


This has nothing to do with overriding.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ranjan Baisak:
I thought this was the forum to review "The book is "Java: A Beginner's Guide, Third Edition (Beginner's Guide)" by Herbert Schildt."



You're about 4 months late for that promotion, which was at the beginning of April. But we've got another promotion this week -- Jacquie Barker is talking about the new edition of her book "Beginning Java Objects: From Concepts To Code."
reply
    Bookmark Topic Watch Topic
  • New Topic