I'm looking at writing some applications for facebook. I've come up with a few things, and dozens of ideas, however I'm not sure that grails is the way to go. A recent inquiry into a web hosting company said that grails would require 1 gig of memory over the standard 256 mb (for struts based java apps) due to the additional memory requirements of grails.
As my goal is to make these applications for social networking sites, I want to make them as scaleable as possible. In my best case scenarios my apps become "fads" and can be accessed by as many as a million people a day. Have you addressed any memory requirements in this book? What about scaling?
Also, I'm not sure if I should post this in another thread (to maximize my chance of winning ), but to keep from cluttering up the forum I'll ask this here
Conversely, how do you feel about the productivity gains from using the scaffolding of grails vs something like Maven?
Jason Mayer wrote:Conversely, how do you feel about the productivity gains from using the scaffolding of grails vs something like Maven?
How are scaffolding and Maven related? As far as I know, they do two different things.
posted 10 years ago
I just played with Maven for the first time this past weekend, so bear with me if I misspoke. It appears to me that Maven allows you to build projects and all the dependencies with very little set up allowing you to create a base 'project' and spin off variants from there. I'm not entirely sure how the scaffolding of grails would be different. Am I completely misunderstanding what scaffolding is supposed to bring to the table or should I have read page 3 of the 'Make a Struts 2 app with Maven in 5 minutes' article?
One approach you could take, especially if you have specific metrics that you are aiming for in terms of performance, is to build a bare bones application in Grails, test the heck out of it, and if you find performance issues either fix them or revert back to an approach you feel more comfortable with.
The benefits to this approach are that you should be able to build the application incredibly quickly in Grails and focus on the logic of the application, rather than getting bogged down in the mundane aspects of web development. You may even find that Grails performs perfectly adequately for the applications you need to build.
Now, on the developer productivity point, Gregg is correct is that Grails scaffolding is a separate from the convention based approach to compiling and packaging applications that Grails and Maven share. Scaffolding is a mechanism that generates an entire user interface given only a domain class.
The developer productivity gains that come with Grails are more from the reduction in the amount of code that you need to write to build your application. Less code == less time to build == less bugs to fix. Let me explain what I mean by developer productivity:
In less than 30 lines of code I have created a domain class to represent messages and three actions that will save a message to my database, show a list of messages and allow users to view a message by name. There is no configuration required to map the Message class to the database, there is no configuration to expose the three actions: save, list and view. They will be available on the following URLs:
I have also not had to implemented the list and findByTitle methods on the Message class.
Even though this example is trivially simple, consider how long it would take to implement this functionality in your current web framework, from scratch.