Joodo
Today Eric, Jeremy, Micah and I officially started writing code for our new internal project. It’s the first project in Clojure for we three apprentices, but Micah knows a thing or two (or three) about it.
In order to build the app we’re using the Joodo framework, which is now the third web framework I’ve worked with after Rails and Sinatra. Although Joodo is written in an entirely new language for me, it follows the core of the other two frameworks well enough that it actually doesn’t seem that foreign.
Joodo is relatively easy to get up and running and Eric wrote a great how-to today. After you lein joodo new project_name
you have a fairly familiar directory structure to work with:
You can see in the ‘src’ directory above that it sets up folders for your models, views and controllers, and there is even already a spec folder with a sample test for you. (You can browse through a clean Joodo project here).
However, we actually aren’t going to be using the standard MVC architecture for this project, but rather moving towards a “screaming” architecture that brings our entities up to their own level instead of buried down and spread across the prescribed directories. For example, if we have a User
for our application, then there will be a user directory that lives at “src/our_app_name/user”, and inside of the directory will all be all of the relevant files for a user, including its models, controllers and views.
Setting this up required a little tweaking to the core.clj file to direct the layout and template rendering to a different directory than the default “view”, but really that was about it.
For any programmers who work primarily with an OO language and a web framework like Rails, I recommend a jump into the Clojure/Joodo waters. So far the water is just fine.