As I create the Models to define the real-world things of interest to
my webapp, I'm wondering what to put into either the class or the
object. Here is some pseudocode as I understand the Model table
definition pattern:

// first comes the class, which defines fields and creates the
singleton:
class Thing extends LongKeyedMapper[Thing] with IdPK {
  def getSingleton = Thing
  // define a field...
  object field extends mappedWhatever(this) {
    // and define some constraints and validations for the field...
  }
 // global class methods here plus xml, json, etc output...
}
// then the object:
object Thing extends Thing with LongKeyedMetaMapper[Thing] {
  // define an instance method:
  def instanceMethod() = {
    doSomething
  }
  // more instance methods, etc...
}

My question is: how do I know what kinds of methods and other goodies
should go into either the class or the object, that is, into each
'half' of the Model specification?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to