liftweb
на GitHub. Самих проектов, конечно же меньше) Но я нигде не видел success story с liftweb в главной роли( Note: When you are using nested data this way, the form values sent by the browser must be named like address.street, address.city, etc.(ссылка)
args[accountName] -> Login, args[code] -> code123,
class UserApi @Inject() (db: play.api.db.DBApi ) {
val dababase = db.database("name")
def login(email: String, password: String): Option[User] = {
dababase.withConnection { implicit c =>
// TODO
}
}
}
//controller
class MyController @Inject() (userApi: UserApi ) extends Conroller {
//your code
}
sealed trait Value
case class StringValue(s: String) extends Value
case class IntValue(i:Int) extends Value
case class Values(one: Value, two: Value)
case class Property(
name: String,
values: Values,
displayMode: Int
)
class BlockingInsideOfActor extends Actor {
var state = State() // next time I'll use become(newState)...
def timeout: Timeout = ...
val queue = Queue[(Request, ActorRef)].empty
def pending: Receive = {
case req: Request =>
queue.push((req, sender()))
//log message here
}
def normalContext = {
//popping queue in order of incoming message
}
def receive = {
case req: Request =>
val futRespData: Future[ResponseData] = processRequest(req) // resp is under a Future.
val sndr = sender()
context.become(pending)// catch all messagee whil pending request
futRespData.onComplete{ tryResutl =>
tryResutl match {
case Success(...) =>
val nextState =if (respData.success) state.incSuccessCount
else state.incFailureCount
// response is a function of 'resp'
sndr ! Response(
data = respData,
successCount = nextState.successCount
failureCount = failureCount.failureCount)
// state = nextState
context.become(normalContext)
}
}
}
}