Play: Yet Another Framework

Last night I went to the meeting for the Chicago Groovy Users Group. The presentation was a web framework that uses a bit of Groovy, but uses a lot more Java called the Play Framework.

Does the world need another framework? Maybe not. But this one looks interesting. It is a lot like Ruby On Rails, or Grails. You do a lot of stuff from the command line, and you do not need to restart to see your changes. It is REST based, and everything is stateless, so it is easy to scale. It uses “convention over configuration,” like many other frameworks.

I guess there is interest in getting Scala to work with Play. I do not really see the point of that. Scala and Groovy moved a lot of the boilerplate of Java into the languages, while Play seems to move the drudge work into the framework.

And, of course, I asked the speaker to present at CJUG.

Image from Play Framework website, assumed allowed under Fair Use.

Update on Concurrency

I posted my last post in a few LinkedIn groups. I got a few responses, some of which have led me to more questions. So I may post some follow up questions. Then I will try a few more of the groups.

In one of the groups it got deleted. I have no idea why.

I also got a link from one of my Twitter followers (a lovely young woman in Tunisia) to an article about GPars, an Actor library that can be used from Groovy or Java. I will look into that at some point.

CJUG Meeting 2011-02-15

We have another CJUG Meeting on February 15, 2011. Ray Ploski of Red Hat will talk about Drools. You can find info on the CJUG site here. You can RSVP for it here.

The past few CJUG meetings have gone pretty well. We are now having them at CME. It has really helped our attendance. We used to be lucky to get a dozen people. Now we get about 30. The RSVP software we are using is called gathers.us. It was made by a few guys here in Chicago. It uses the “freemium” model, and free events are limited to 50 responses. A few times we hit that limit. If we keep hitting it consistently we might have to either find something else or convince the GathersUs developers to increase that limit. They have responded to some feedback from me and a few other people, so we will see what happens.

For future CJUG meetings, there are some plans in the works. I will probably give a presentation in March on Android. Jeff Palmer of the Chicago Groovy Users Group will give one in April about Grails. Someone from a local consulting firm might be able to give one about hooking mobile apps up to JEE servers.

I would also like to get some presentations about some trends in the software industry. I think that the current threading model of concurrency is being replaced by the Actor model. The Akka library in Scala can also be used in Java. I would like to have a presentation on that. Also, NoSQL is gaining some traction. I would like to have a presentation on MongoDB, showing how to use it and some examples with the Java API.

If anyone could do these (or point me to existing presentations that I could use), that would be great. Alternatively, I could collaborate on these with someone. We could set up a GitHub account and hash out a presentation deck and some code; I think using Maven would be the best bet. I do not have a Mac, so the deck would have to be in OpenOffice.

Image from Wikimedia, assumed allowed under Fair Use. Image from the Vatican Virgil, a 5th-century manuscript of poems by Virgil. Note: Some images may contain spoilers.

I may look for something to replace Apache James

I think I may soon look for another mail server to replace Apache James. Right now I am using 2.3.2, which will someday be obsolete. I downloaded the new version, 3.0-M2. It looks like Apache James may no longer be a mail server that can be used by “retail users”. I am running it on a VPS account with 512 MB of memory.

The new version has IMAP. It also uses OpenJPA and Spring (before it was using some other Dependency Injection framework from another Apache project that almost nobody else used). It can be managed via JMX. The project seems to be geared towards the “Enterprise”. James 2 uses ~60 jar files. James 3 uses about 125.

I ran James 3 on my desktop to see if I could port my admin web app to James 3. Unlike James 2, James 3 does not create the tables upon startup. I emailed the list and I was told that I would have to add some users or domains in order to create tables. I was told via the email list that I could add a user via JMX or the remote manager (which I just do not like).

So I started James 3, and then I started jconsole. I was able to connect to James via jconsole. But I was not clear on what to do after that. For example, I saw a screen for adding a user. But the parameters on the form/screen are labelled “p1”, “p2” and “p3”. I assumed having worked with James 2 that they would be username, encrypted password, and encryption algorithm, but it would be nice if jconsole was clearer on this. I tried adding a user. I put “SHA-256” in the last field, and I got an exception message telling me “user repository does not exist: SHA-256”. Looking in other windows, I found that there is a repository called “LocalUsers”. I tried that and got a message about java.rmi.UnmarshalException. So I decided to stop at that point.

Then I tried the remote manager. I really do not like the remote manager. I do not like having unnecessary services and ports open. But I thought that until I get some tables created I have no choice. I logged in, and I tried a few commands. I tried adding a user a couple of times and adding a domain. Each time the remote manager hung, and I had to kill James. I could run the commands to list users and domains. The only command that returned any information was the command to list domains, but it only listed the domains that I put in the domainslist.xml file. So no tables were created.

So I think I will start looking for another email server. Perhaps I will try to write one myself in Groovy. I have started looking into Groovy and Grails again recently. I would rather run something myself than use GMail.

Image from Wikimedia, assumed allowed under Fair Use. Image from the Vatican Virgil, a 5th-century manuscript of poems by Virgil.

The Groovy Crescent

In addition to knowing Java, I have decided to start learning other languages. There are a bunch out there, so I decided to stick to languages that run on the JVM. In particular, I will stick to languages that are indigenous to the JVM, like Groovy or Scala, as opposed to languages that have been ported to the JVM like Ruby or Python.

I was in Texas recently, and someone asked for volunteers for help with a Grails project. I gave him my card, and he sent me a link to the project and a link to an online book about Grails. So I am now learning Groovy.

I have been attending the Chicago Groovy User Group meetings over the past few months, and I think that this Groovy language is a good thing to get into. They said the Midwest seems to be the center of the action for Groovy in the USA. One of the speakers was an author well-known in the Groovy community who lives in Saint Louis, the big GR8 Groovy conference was a few months ago in Minneapolis, and there are some decent-sized Groovy groups in Chicago, Madison and Milwaukee. So it seems like there is a Groovy Crescent in the Midwest.

 Image from Wikimedia, assumed allowed under Fair Use. Image from the Roman Vergil, a 5th-century manuscript of poems by Virgil.