This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Groovy and the fly likes Trying Griffon using http://griffon.codehaus.org/Quick+Start but it isn't clear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Trying Griffon using http://griffon.codehaus.org/Quick+Start but it isn Watch "Trying Griffon using http://griffon.codehaus.org/Quick+Start but it isn New topic
Author

Trying Griffon using http://griffon.codehaus.org/Quick+Start but it isn't clear

Tom Hite
Greenhorn

Joined: Mar 23, 2010
Posts: 2
I'm trying to get Griffon to work but the instructions on http://griffon.codehaus.org/Quick+Start are not clear.

The instructions on the Quick+Start page are these as best I can tell:

(1) griffon create-app
(2) create-app will prompt for a name - I used DemoConsole
(3) cd DemoConsole
(4) We are good to this point no errors
(5) This is where there wheels come off:

I'm not understanding this step:

"The application model for the quick start is simple: the script to be evaluated and the results of the evaluation."

Am I supposed to do something? I don't see where it does so I move to the next step.

(6) Then next instruction is:

"The controller for our quick start app is simple: throw the contents of the script from the model at a groovy shell."

I'm not understanding this either. Am I supposed to do something? What does "throw the contents of the script" mean?
This step doesn't seem to tell me to do anything so I move on to the next step

(7) The next instruction is: "griffon run-app"

Aha! A clear instruction. I do that and Griffon runs for awhile does a lot of work but inevitably it fails with a Class not found error.


There is a Warning on the download page that version 0.9.0 of Griffon is not for Windows. Perhaps I should try Linux? Or my Mac?

Thanks for any ideas! I would really like to use Griffon.

Andres Almiray
author
Ranch Hand

Joined: Jan 25, 2010
Posts: 47

Hello Tom.

Those instructions you're referring too. They actually describe what the Model and Controller will do. You only need to paste the code into the correct file.
It is Griffon 0.9.1 (not 0.9.0) the one that will not work on Windows platforms. There two additional releases after 0.9.1 that deal with the problem.

Could you please post a stacktrace with the CNFE error?
Thank you!

Cheers,
Andres
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The Quick Start is a bit too quick, isn't it ?

A Griffon application is made of MVC classes. When you create a new application using the create-app command, Griffon will create a dummy MVC triad, named according to your application name. If your application is called DemoConsole, you'll have :
  • A model called DemoConsoleModel, in the "models" directory.
  • A view called DemoConsoleView, in the "views" directory.
  • A controller called DemoConsoleController, in the "controllers" directory.


  • The DemoConsole is a simple application having a textarea, where you'll write groovy script. It also has a button to evaluate the content of the textarea and show the result in a label. All components are defined in the DemoConsoleView. The DemoConsoleModel holds the values of the view (the fields are binded to the UI). The DemoConsoleController does the job of evaluation the script when the button is clicked.


    [My Blog]
    All roads lead to JavaRanch
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Trying Griffon using http://griffon.codehaus.org/Quick+Start but it isn't clear
     
    Similar Threads
    Swing->Griffon
    Bear's Frontman, suggested way to pass a session object.
    Griffon IDE support
    More Model-View-Controller advice needed
    Simple Chat Application with JSP/ Servlets