You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Gustavo Hexsel <gh...@gmail.com> on 2011/01/07 01:24:11 UTC
Scala-Wicket Help and advice
I agree with that. Considering the amount of effort involved in the
porting, and specially in the maintenance of that port, I think it would be
(would have been? http://www.youtube.com/watch?v=cY_oKve-bH0) easier to
create a shell on top of Wicket to make Scala programmers' lives easier,
rather than rewrite it in Scala. Not that I don't believe it would be nice
to write Wicket in Scala, but without strong community support it would mean
at best fragmentation in the community...
There was such a Wicket-Scala thin API bridge that was started about a
year ago, but I never again heard from it...
One of the cool things about scala is that you could have a model concept
without a model class. You just need to receive 2 functions, a setter and a
getter (or just a setter for read-only models). So for instance a ListView
could have a model-less signature like:
ListView[T](id:String, => Iterable[T])
or the like. You can then just use first-class functions to do that:
add(new ListView("rows", myService.list))
[]s Gus
Re: Scala-Wicket Help and advice
Posted by Gustavo Hexsel <gh...@gmail.com>.
That signature binds the function call to the function call expected in
the listview (i.e. the function itself is the parameter, not the results).
This means that the myService.list function is called only when the model
is evaluated, not when the listview is created.
On Thu, Jan 6, 2011 at 4:41 PM, James Carman <ja...@carmanconsulting.com>wrote:
> On Thu, Jan 6, 2011 at 7:24 PM, Gustavo Hexsel <gh...@gmail.com> wrote:
> > One of the cool things about scala is that you could have a model
> concept
> > without a model class. You just need to receive 2 functions, a setter
> and a
> > getter (or just a setter for read-only models). So for instance a
> ListView
> > could have a model-less signature like:
> > ListView[T](id:String, => Iterable[T])
> > or the like. You can then just use first-class functions to do that:
> > add(new ListView("rows", myService.list))
> >
>
> What about detaching?
>
Re: Scala-Wicket Help and advice
Posted by James Carman <ja...@carmanconsulting.com>.
On Thu, Jan 6, 2011 at 7:24 PM, Gustavo Hexsel <gh...@gmail.com> wrote:
> One of the cool things about scala is that you could have a model concept
> without a model class. You just need to receive 2 functions, a setter and a
> getter (or just a setter for read-only models). So for instance a ListView
> could have a model-less signature like:
> ListView[T](id:String, => Iterable[T])
> or the like. You can then just use first-class functions to do that:
> add(new ListView("rows", myService.list))
>
What about detaching?
Re: Scala-Wicket Help and advice
Posted by Johan Edstrom <je...@savoirtech.com>.
I know of several other Apache projects like Camel, ActiveMQ, ServiceMix that
happily look at projects like http://hawtdispatch.fusesource.org/ as well as integrate Scala
and of course use them as they were written by Apache people, they just used Scala to solve problems
in an elegant manner.
I don't think anyone "dinged" the effort, possibly "questioned" the direction a little?
But hey isn't that what open source is all about?
/je
On Jan 6, 2011, at 5:24 PM, Gustavo Hexsel wrote:
> I agree with that. Considering the amount of effort involved in the
> porting, and specially in the maintenance of that port, I think it would be
> (would have been? http://www.youtube.com/watch?v=cY_oKve-bH0) easier to
> create a shell on top of Wicket to make Scala programmers' lives easier,
> rather than rewrite it in Scala. Not that I don't believe it would be nice
> to write Wicket in Scala, but without strong community support it would mean
> at best fragmentation in the community...
>
> There was such a Wicket-Scala thin API bridge that was started about a
> year ago, but I never again heard from it...
>
> One of the cool things about scala is that you could have a model concept
> without a model class. You just need to receive 2 functions, a setter and a
> getter (or just a setter for read-only models). So for instance a ListView
> could have a model-less signature like:
> ListView[T](id:String, => Iterable[T])
> or the like. You can then just use first-class functions to do that:
> add(new ListView("rows", myService.list))
>
> []s Gus