I would like to know what exactly is the difference between a class fragment and an object fragment in an elevator.
If i have
class Foo {
var a: String
def render(n:NodeSeq) = {
<h3> you chose {a} </h3>
}
}
and
object Bar {
var b: String
def render(n:NodeSeq) = {
<h3> you chose {b} </h3>
}
}
What is the specific difference between the two, do aand bhave a different behavior. In just lift it says that
In this case, the fragment is a singleton object, since it does not accept any constructor parameters and does not have an instance.
Does this mean that for each user it Barwill be the same?
I know this is a noob question, however I need to be very clear and I am not very good at understanding the differences between objects and classes in fragments.
source
share