You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "fanf42@gmail.com" <fa...@gmail.com> on 2009/01/19 23:51:28 UTC

[blog post] T5 - Scala blog : layout and CRUD for the blog

I just published a (fairly long) post where I explain how I setted up a 
layout and basic CRUPD operation for the blog tool project I'm building 
in T5 / Scala.

The post is rather long, but the total amount of code is really short. 
The good new is all is going really good, and Scala begins to really 
show how compact and simple it is compared to Java.

So, the blog post is here: 
http://fanf42.blogspot.com/2009/01/t5-scala-layout-and-basic-crud.html 
and the code is available on git hub:

% git clone git://github.com/fanf/scala-t5-blog.git
% cd scala-t5-blog
% git checkout -b test article3_20090119
% mvn jetty:run

Enjoy !

Francois Armand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [blog post] T5 - Scala blog : layout and CRUD for the blog

Posted by Francois Armand <fa...@linagora.com>.
Thiago H. de Paula Figueiredo wrote:
>
> Nice post. :)
> I don't really know Scale nor I plan right now, but it's very 
> interesting to see how other languages can be used using the Java 
> platform, the awesome collection of open-source Java frameworks and 
> even Tapestry. 

Yes, the JVM+open source mixe delivered an amazing ecosystem, which is 
growing in beautiful way. It's perhaps time for the JVM to fly by itself 
and let Java behind...

> And the Scala Tapestry-related classes can be easilly understood by 
> someone who never studied Scala . . . :)
Cool :) I tried to not use too much functional black magic in these 
articles, it will be for latter ones ;)


-- 
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/
Open Source identities management and federation


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [blog post] T5 - Scala blog : layout and CRUD for the blog

Posted by Francois Armand <fa...@linagora.com>.
Angelo Chen wrote:
>  Nice post, I was just wondering what's the benefit of using Scala or
>  Groovy in a T5 app,

The main benefit : using a language that help you, not that don't stop 
putting strange restriction between your thougth and there expression.

>  T5 app seems very short in code, typing a little extra does not mean
>  too much to the developers,

Well, if some boilerplate can be remove, it's always better. But you are 
true, for classes that pair with template, the benefits are really small 
: Tapestry is doing an amazing work at reducing the amount of code 
written, and I expect (and seeà little benefits for now in that place.

But it's always simpler to have some kind of homogeneity on the 
languages you use across your application, and Scala is really shorter 
and more expressive than Java for deeper layers.

>  the only benefit i can see from using Groovy(not so sure about Scala)
>  is we can use closure in the code, anything else? also Clojure seems
>  a interesting language too, possible to use with T5?

For the comparison between the three language, I would say that Groovy, 
Scala and Clojure are three *really* different languages. They share the 
same virtual machine, but it's almost the only things they share. 
Clojure and Groovy are dynamically typed, Scala is statically. Clojure 
has meta-programming, Groovy and Scala not really. Scala and Groovy are 
young languages (5 years), Clojure is in the same time the youngest, and 
the oldest - List has 40 years. Groovy is an OO language with some 
limited functional traits, Clojure is functional and not at all OO,  and 
one of Scala goal is to mixed the two aspects.  Groovy is born from two 
young passionated developers, Scala is an academic research work by one 
of the parent of javac and  Java generics,  Clojure is  the work of a 
lone, experienced developer... And so on, and so on.

More related to your question: I believe that Howard is currently trying 
some experiment with Clojure, I would not be surprise if he tries it 
will T5 ;) The best place for learn about that for now is Howard's blog 
: http://tapestryjava.blogspot.com/search/label/clojure

And for the benefits... well, don't be fooled by the blub paradox[1]. 
You really have a lot to gain in using better language. Scala encourages 
immutable datas, has higher-order functions, closures and currying, 
pattern matching on classes, traits and mixin composition, is statically 
typed (not the joke Java is, and with (ok, limited) type inference), a 
good actor library for concurrency, and much more.
So... perhaps the best is to learn new languages (not especially Scala, 
even if it's one of the simplest language to discover functional 
paradigm from a Java background). Look to Haskell, Python, Coq, Erlang, 
OCaml, Clojure... Try to learn the best practices with them, and after, 
ask yourself if really it didn't worth the try.


[1] it's a little story build up by Paul Graham to explain why expert 
developer in one language may have some difficulties to see the limits 
of their preferred tool. The story is here: 
http://www.paulgraham.com/avg.html


-- 
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org
FederID - http://www.federid.org/
Open Source identities management and federation


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [blog post] T5 - Scala blog : layout and CRUD for the blog

Posted by Angelo Chen <an...@yahoo.com.hk>.
Nice post, I was just wondering what's the benefit of using Scala or Groovy
in a T5 app, T5 app seems very short in code, typing a little extra does not
mean too much to the developers, the only benefit i can see from using
Groovy(not so sure about Scala) is we can use closure in the code, anything
else? also Clojure seems a interesting language too, possible to use with
T5? 

Thanks,

Angelo


Thiago H. de Paula Figueiredo wrote:
> 
> Em Mon, 19 Jan 2009 19:51:28 -0300, fanf42@gmail.com <fa...@gmail.com>  
> escreveu:
> 
>> I just published a (fairly long) post where I explain how I setted up a  
>> layout and basic CRUPD operation for the blog tool project I'm building  
>> in T5 / Scala.
> 
> Nice post. :)
> I don't really know Scale nor I plan right now, but it's very interesting  
> to see how other languages can be used using the Java platform, the  
> awesome collection of open-source Java frameworks and even Tapestry. And  
> the Scala Tapestry-related classes can be easilly understood by someone  
> who never studied Scala . . . :)
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-blog-post--T5---Scala-blog-%3A-layout-and-CRUD-for-the-blog-tp21553661p21555668.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [blog post] T5 - Scala blog : layout and CRUD for the blog

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 19 Jan 2009 19:51:28 -0300, fanf42@gmail.com <fa...@gmail.com>  
escreveu:

> I just published a (fairly long) post where I explain how I setted up a  
> layout and basic CRUPD operation for the blog tool project I'm building  
> in T5 / Scala.

Nice post. :)
I don't really know Scale nor I plan right now, but it's very interesting  
to see how other languages can be used using the Java platform, the  
awesome collection of open-source Java frameworks and even Tapestry. And  
the Scala Tapestry-related classes can be easilly understood by someone  
who never studied Scala . . . :)

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org