At last, Scala in SA :)

Showing 1-16 of 16 messages
At last, Scala in SA :) Cornel Masson 2/26/12 11:41 AM
I asked this question quite some time ago on Quora, and was finally referred to this group today: for a while there I thought I was the only Scalar Saffer. 

I'm a Java architect/developer and have been using Java for > 10 yrs in enterprise computing, websites, database-driven commerce, etc. I want to retain the scalability & capability of Java, but dearly want to move to the beauty of the Scala language. I haven't programmed anything in Scala yet: would the following architecture make sense for a large system:
  • Scala as general language
  • Lift as web framework (AFAIK it also supports AJAX/HTML5/Javascript interfaces, as well as RESTful web services)
  • Circumflex for object/relational mapping (can it cope with complexity/performance tuning similar to Hibernate?)
  • Cake pattern for dependency injection (replacing use of a library like Spring)
  • Akka for remoting (if applications need to inter-communicate)
  • Scala-Redis interface if using Redis as centralised application cache
Thanks!

Cornel Masson
Stellenbosch
Re: At last, Scala in SA :) Pavel Tcholakov 2/26/12 12:15 PM
Welcome! It's a pretty quiet list I'm afraid :-)
Re: At last, Scala in SA :) Mitch Wong Ho 2/26/12 1:34 PM
Welcome,

It's up to the group's members to stimulate discussion and grow support.--
Regards,
Mitch
Tel: +27 (0)84 987 8888
Email: oreomitch[at]gmail[dot]com

Re: At last, Scala in SA :) Gary Pamparà 2/26/12 9:33 PM
Just some perspectives from my personal experience:

1. Lift is ok. It is, however, one of those frameworks that you have
to fully embrace. Moving away from it is not really an option once you
start using it.
2. ORM is a bad idea, no matter the situation.
3. You are better off using some proper typing instead of the cake
pattern. Most of the time you end up in a "bakery of doom".
4. Akka is great :)
5. Redis integration is good.

Regards,
Gary

Re: At last, Scala in SA :) Guillaume Belrose 2/27/12 1:01 AM
Hi to the list as well.

I am not (yet) in South Africa, but I will be in the near future,
moving to Jo'burg sometimes in September.
I am currently using Scala on a small scale at my company (a
predominantly C++ shop).

Another advice I would give to someone learning the language is to
take the time to read Martin Odersky's book because it is a pretty
good one. The book is very well structured, starts quite simple and
gradually introduces more advanced topics.

Cheers,

Guillaume


On Feb 27, 5:33 am, Gary Pampara <gpamp...@gmail.com> wrote:
> Just some perspectives from my personal experience:
>
> 1. Lift is ok. It is, however, one of those frameworks that you have
> to fully embrace. Moving away from it is not really an option once you
> start using it.
> 2. ORM is a bad idea, no matter the situation.
> 3. You are better off using some proper typing instead of the cake
> pattern. Most of the time you end up in a "bakery of doom".
> 4. Akka is great :)
> 5. Redis integration is good.
>
> Regards,
> Gary
>
> On Sun, Feb 26, 2012 at 11:34 PM, Mitchell Wong Ho <oreomi...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Welcome,
>
> > It's up to the group's members to stimulate discussion and grow support.
>
> > On Sun, Feb 26, 2012 at 10:15 PM, Pavel Tcholakov <pchola...@gmail.com>
> > wrote:
>
> >> Welcome! It's a pretty quiet list I'm afraid :-)
>
> >> On Sun, Feb 26, 2012 at 9:41 PM, Cornel Masson
Re: At last, Scala in SA :) Ewald Horn 2/27/12 9:54 AM
Great,

looks like I have some reading to do!

Best regards,
Ewald
Re: At last, Scala in SA :) Guillaume Belrose 2/27/12 12:19 PM
I know books can be quite pricey in SA. There is a free online version of the first edition of Martin Odersky's book at http://www.artima.com/pins1ed/
It does not cover things that were are added in Scala 2.8 and after but it is a very good resource. The other one, also free is the book from Alex Payne who used to work at Twitter. The book is available at: http://ofps.oreilly.com/titles/9780596155957/
Happy reading.
Re: At last, Scala in SA :) Wilter du Toit 2/27/12 12:26 PM
You could look at:

* Scala
* Squeryl for ORM (if you are going to use a relational database, if
not look at AWS DynamoDB)
* Akka
* Play 2.0
* VIM

I specifically mention VIM since most of the tooling for Scala is not
great and using VIM will most likely be much more productive for you.
Scala is also succinct enough that you do not generally need an IDE.
The typesafe stack already comes with VIM support and there are
several alternatives available.

It is also worthwhile learning sbt in-depth since both the typesafe
stack and play use it as the underlying build system.

I also found that learning Haskell at the same time as Scala works
well since many of the FP concepts are explained in more depth in the
Haskell community/resources (e.g. learnyouahaskell.com ).

The learning curve is fairly steep and there has been some recent
articles about Scala being too complex, which I have found to be not
true. I can assure you that if you just keep going, it is well worth
it.
Re: At last, Scala in SA :) Michael Netshipise 2/27/12 12:55 PM
Hi,

Welcome, it is true this list is very quite, but it's something we can change.

Here is a list of resources that should get you started:

Scala Schools -> http://twitter.github.com/scala_school/
Programming in Scala (2nd Edition) Buy the book, you won't regret it. http://www.artima.com/shop/programming_in_scala

Scala Introduction from a Java Perspective ->  http://www.youtube.com/watch?feature=player_embedded&v=PKc5IwHG68k
Hilarious intro to Scala -> http://www.youtube.com/watch?v=LH75sJAR0hc

I currently working on a fun project using Akka, SBT, ScalaTest and Scalaz, I've ha.

Regarding your question:
Lift is a very mature Scala framework, but the community is moving towards Play! framework, it's part of the Typesafe stack.
For a new endevour i'd recommend using Play! instead of Lift. It also plays nicely with Akka (another Typesafe product).

I have used Hibernate + Spring within Scala, they tend to feel javaish but they are still good for the job.
A couple of gotchas : your bean properties must have setters & hence be vars. (you could use @BeanProperty for setters)
If you decide to use Circumflex tell me how it goes, i've never used it.

Cake is good if you want wiring during compile time. you may also want to check SUBCUT (Cake on steroids) https://github.com/dickwall/subcut

Scala Redis (I've never used this).

In Summary, this is what i'd recommend

Play! Framework http://www.playframework.org/
Akka http://www.akka.io
Hibernate + Spring
Scala Redis (If you are using Redis, it makes sense)
SBT https://github.com/harrah/xsbt/wiki (similar to Maven, with more scala power)

Hope this helps.


Kind Regards
Michael
I see the fun in functional
Re: At last, Scala in SA :) Guillaume Belrose 2/27/12 1:17 PM
Hi,
For remoting, you can also take a look at Finagle from Twitter http://twitter.github.com/finagle/
For general knowlege of concurrency, I find ScalaSTM to be quite interesting http://nbronson.github.com/scala-stm/

Sent from my iPad 
Re: At last, Scala in SA :) Guillaume Belrose 2/28/12 1:29 AM
@Wilter
Have you looked recently at both Eclipse and Intellij. The Scala support for both IDEs is many times better than what it used to be. 
I've not used VIM, but I have heard good things about it.
Re: At last, Scala in SA :) Wilter du Toit 2/28/12 11:48 PM
I have been following the improvements in the IDEs, mostly with
regards to refactoring. Once the refactoring support is compelling I
will most likely keep Vim as the editor and use an IDE when I need to
do larger refactoring.

Using the Scala REPL also further reduces the need for an IDE.
Re: At last, Scala in SA :) Cornel Masson 3/6/12 12:17 AM
Thanks, guys, some interesting replies. Looks like it's not going to be possible to do  a complete Scala re-architecture for this next project, but I'm going to try and slip in a small side project as a tester. I'll keep you posted.
Re: At last, Scala in SA :) Jacobus Reyneke 3/8/12 12:09 AM
Definitely have a look at Finagle or Play2-Mini for integration and REST. Lift is rock solid, but the Play2 Framework and Play2-Mini solves similar problems in a friendlier manner (that's my opinion at least)

To see how Finagle can be used as a bare bones REST server, have a look at this project: https://github.com/robi42/heroku-finagle-rogue
(If you end up looking into Finagle, then be sure to join the Finaglers google group.)

I found Finagle interesting for the huge amount of cool stuff it hides under the bonnet. It has a super-slick architecture, that allows you to expand by adding filters to support additional functionality rather than changing existing code. For example, to add JSON support to you REST service, you would simply add a JSON filter onto your existing service.

For general Scala questions and general advice, there is still nothing that beats StackOverflow.

Cheers,
Jacobus
Re: At last, Scala in SA :) Guillaume Belrose 3/8/12 1:10 AM
If you work for an organization with a large amount of human capital
invested in Java code, it is worth pointing that Scala works very well
with Java libraries. Scala allows you to add your own sugar coating
around Java code quite easily. For example, for RESTFul web services
or DI you can use JAX-RS and Google Guice from Scala just as fine. The
code is still Java-ish but you can still use Scala features like type
inference. functions, traits, etc, to make it a lot more concise.
Re: At last, Scala in SA :) Cornel Masson 3/8/12 2:06 AM
Wow, I've done a bit of research on the Play Framework, and it looks like a serious contender! I'm actually considering it very strongly for this big Java project of mine and, of course, it will be an ideal, low-risk route into Scala




On Sunday, 26 February 2012 21:41:53 UTC+2, Cornel Masson wrote:
On Sunday, 26 February 2012 21:41:53 UTC+2, Cornel Masson wrote:
On Sunday, 26 February 2012 21:41:53 UTC+2, Cornel Masson wrote: