Building a online Q&A site using Grails Framework - grails

I come from a Java background using Java EE components. I know there are open source frameworks which are django based to build online question and answer sites and currently I am trying out couple. But I want to actually do this by using Grails. I was wondering if someone could point me towards right direction. I couldn't find any Grails based information on building such web application.

Do you mean a traditional forum, or a Q&A website like stackoverflow.com? If you're asking about the former, I would recommend creating a Grails application or plugin that encapsulates the functionality provided by jforum. A plugin would be best, because then you (and possibly others) could re-use this functionality across Grails apps.
Writing your own Q&A website from scratch doesn't make a lot of sense unless your forum is significantly different to those that are already available.

Related

grails, drools, and ticket / issue trackers, iTicket

I need to integrate a ticketing system into my grails Web application, so that those running the small company can easily handle customer needs / complaints, etc., tying that in directly with their users. When I searched for a plugin or built application, I found:
drools plugin, small ticketing capability/example, which after having an installation bug led me to
drools-gorm plugin, and then also briefly reviewing
iTicket, which I'm just currently shying away from because of its inclusion of roles management but no mention of Spring Security Core and UI, which is what I'm using for role management
article on building a small issue tracker with Grails
I don't have a lot of problem domain knowledge with ticketing systems, and so I'm wondering if someone whose gone down this road before or knows ticketing system domain modelling & rules engines in general can give a few comments. E.g. are flexible rules engines very important for ticketing systems, or is this only for heavier weight applications? What kinds of other general things can one do with grails plus drools, that might be useful? Alternatively, the opposite, is staying light weight best, because these things often turn out to be very "custom" in this arena.
Your experience is appreciated.
Thanks

Grails or Rails? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I know that there have been plenty of topics describing this topic but I still can't put up my mind what to choose.First of all, I need you to know that I am a student in his last year, who will probably continue studying for a few years. However, I'm trying to find what I would benefit most from.
I've been in contact with RoR last year; seeing Ruby's squirky syntax amazed me, and Rails CoC and DRY principles make me dream. I've written some scripts to generate sql statements in Ruby, but that is about all.
I'm considered to be a java developer, as they call me the java guy on school, (no, i do not consider myself good, on the contrary, every day I realise more how much more i've got to learn). Now, I've taught myself several technologies related to java. To make my work easier, I opted learning hibernate and maven. Now we are developping an application in Spring + Spring MVC.
Grails caught my attention lately since it is built on top of these technologies, and uses a language that is similar to java, and allows access to java classes.
However, i'm not sure what is the best way to go. Should I struggle through Ruby's quirkyness first, and learn Rails? Or would learning Grails first give me an advantage over learning RoR?
Also, as far as from what i've read, RoR would give me a bigger advantage on the market than grails would; but how do I get a "proof" that I can use RoR? Would it be enough to be able to show applications made using RoR?
I've used both frameworks pretty extensively, and both have their warts and advantages, but when you come right down to it, there aren't that many differences for someone coming from your background.
In my area (Minneapolis), the grails market is larger than the rails market, but that isn't the case everywhere.
I'd pick whichever one has the user group in your area that you connect with the most. That will be your best bet for finding work with whichever one you choose.
You've mentioned that you're already into Java, Spring and Hibernate. Well, Grails is based on those - in continuation.
Spring is a very comprehensive, powerful, and modular, framework. Hibernate has been a de-facto standard, and is compliant with Java EE 6's JPA. Both are most relevant in the Java world.
So, there's the aspect of consistency of your technical knowledge. From Spring/Hibernate to Grails/GORM you'll have cohesive knowledge.
Another central aspect is your options. When dealing with Spring, you'll probably soon learn how easy it is to change complete architectural layers, like, changing the view technology, or database layer, or simply exporting a web service by configuration. Spring-based applications can be highly modular, and you can plug-in almost any technology scope you could think of. - So you have many ways to go further if desired.
The Spring framework has been written from the ground to foster best practices. Just dealing with that framework will teach you a lot.
Admittedly, I haven't dealt with Ruby on Rails, at all. I regard it a rather isolated technology, while Grails is a (Java and Spring) integration framework to me, with the backends/grounds and options as mentioned above.
When evaluating practical aspects of technologies, it's always a good idea to do some research on Google Trends and Indeed job trends. Other indicators on popularity/relevance are the numbers (and trends) of mailing list messages for Grails vs. Ruby on Rails, and (not quite an accurate measurement for niche languages) the TIOBE programming languages index.
Finally, Java had experienced several years of starvation and uncertainty in the past (despite of being one of the few all-time languages and frameworks, at all, and a long-burner). Recently, however, several evident signs came up that appear to seriously forecast a much brighter future than before.
As a Grails developer...
Grails runs on mature and proven virtual machine (JVM) and really do the best performance compared to any dynamic language, even static Java/JSP when using Freemarker Plugin! http://www.jtict.com/blog/rails-wicket-grails-play-lift-jsp/
Grails uses Groovy, so it has an almost flat learning curve for Java developers. You can write Java syntax and gradually learning Groovy syntax, closures, meta-programming and more... getting expressiveness and agility of a dynamic language like Ruby.
Grails uses modern principles and practices like Convention over Configuration and Scaffolding, just like Rails taught us all.
Grails uses a mature platform, so it comes w/ all great existing java libs, mature groups and projects like Apache, Eclipse, JBoss and so on for reporting, file exporting, legacy integration... and many new well-supported libs and frameworks from Google and others like Guice, Guava, Collections and so on...
Grails uses a vastly used platform, so you can reuse all your existing java libs. You could reuse your entities, utilities, and so on...
Grails use existing Java infrastructure, so it comes with many ready & mature server w/ great documentation (i.e install, configuration) Tomcat, Jetty, Glassfish, and so on...
Grails use existing Java infrastructure, so it scales very well w/ many ready & mature options: Server Clustering, Open Terracotta, Second Level Cache, and so on...
Grails runs on top of well-know and vastly documented frameworks like Hibernate, Spring MVC, Hibernate, SiteMesh, and so on... and you can step down into abstraction when you need, i.e batch imports, complex reporting queries, complex interfaces, and so on..
Grails has a great plugin ecossystem much like Ruby Gems and can use all existing Maven-based lib repositories to resolve dependencies.
Grails uses a solid platform, so you'll always reuse your libs (JARs) with the next Language of The Year (LOTY). "Write Once, Run Ever"
Hope that helps! :-)
If you liked Ruby's syntax and simplicity, go with Rails, and run it on top of JRuby, which will give you access to Java classes as well.
Check: http://blogs.oracle.com/coolstuff/entry/using_java_classes_in_jruby

Which web development framework works best with Google App Engine? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Now that Google allows Java on App Engine, I'm wondering what effect this has on a choice of web framework for App Engine.
I realize Google provides the webapp
framework which is pretty barebones.
And the .96 version of django that's
available for App Engine is
restrictive.
web2py burns up resources, from what I've heard.
Rails (now available) can't use
ActiveRecord, ActiveResource,
restclient, rmagick.
Is there something I'm missing - do any frameworks work well on App Engine?
Actually web2py is very light and since ~1.50 on GAE, it caches all bytecode compiled models/views/controllers.
Nevertheless you need to consider that by default is has datastore based sessions and this may add some overhead when compared with framework that do not have sessions working on GAE (at least not by default).
The web2py DAL itself does not add a significant overhead when compared to the naive Google datastore APIs.
Personally, I have found Python to be more fun. That's just me. However there are several commited Java developers out there that will appreciate the Java support in GAE. Furthermore, supporting Java was a good choice by Google since it will allow the GAE platform to potentially host many other languages. It's obviously a little early to expect all JVM based languages to run on GAE, but the future looks promising. For now we can look at what is and isn't working by taking a look at this GAE Java Group Page.
Coming back to Python, I think small web applications will work great with the built-in webapp framework. Other applications will benefit more from Django 1.0. Have a look at the GAE articles under the frameworks section for a few good reads on this. In any case, you will undoubtedly have restrictions in any of your choices since most web frameworks are designed with relational databases in mind ... which datastore/bigtable is not. Furthermore, the GAE platform has to be sandboxed for security reasons which also restrict you to some extent. Hope this helps.
Try Spring. It supports JPA and JDO.
There's even a Python version for Spring now.
I don't know exactly the full range of options, but I can tell you a couple of things off the bat...
Google Apps is built on top of / using Django.
Django is pretty much what Google Apps cheer and support, so I'd expect it to integrate with Google Apps better than others.
Google Apps has restrictions built into it that you cannot circumvent (or shouldn't). These limitations are not related to any particular framework, rather they are built into the fabric of Apps, so to speak.
I wouldn't worry much about performance of the framework - try to improve your design/structure, it will certainly payback better.
Google will eventually move to Django 1.0 and newer, plus they are updating Google Apps too.
They do use memcache (or an equivalent) so take that into consideration and utilize it.
It really depends on what you want to do. In my experience something small hand made on top of Webob is really good for an API. But for full fledged sites that need templates/sessions/complex routing/caching django is hard to beat.
Take into account that if you huge frameworks (like django 1.0) the first request always takes around 3 seconds to load everything in memory and keeps it there until 15 secs after that request.
And while you shop around for frameworks take into account that:
ORM's don't apply to the platform so basically don't matter.
Fast templates (like Cheetah) won't be fast (or even work) as they can't use c extensions.
Caching might be the most important thing to make everything fast.
If you are looking for Python, then Django would be your best bet.
Struts 2 is purported to work on Google App Engine (at least in terms of the example applications). Follow this thread:
http://www.nabble.com/Google-App-Engine-support--td22972179.html
It appears that there are some issues with Sitemesh in terms of templating, but if you're using JSP you should be ok.
It's a good choice as a web application framework goes.
I recommend web.py if you're using Python.
I use new framework GAE framework. This is similar with Django, but work on AppEngine.
Best regards!
For Python use webapp2 (comes bundled with app engine)
If you want to build large scale application and need more flexible framework, then you can take a look at Pyramid Python Framework. Previously it is called as Pylons. There are lot of good companies using this framework.

Are there good Grails sample applications from which to learn? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Besides the sample applications featured in the books Beginning Groovy and Grails and The Definitive Guide to Grails, are there any applications out there written in Grails that are good examples from which to learn best practices? Such as real applications that are open-source? Thanks.
During my learning phase, I came across several good sample applications.
This sample web album app got me started on grails. It covers security, image upload / manipulation, basic crud etc.
http://www.syger.it/Tutorials/GrailsWebAlbum.html
Here's one from Glen Smith, author of the upcoming Grails in Action book. The source code to the groovy blog aggregator is located here:
http://code.google.com/p/groovyblogs/
Here's another one by Glen, a blog engine written with grails:
http://code.google.com/p/gravl/
And finally, here's the code to the grails.org site which includes wiki functionality:
http://github.com/grails/grails/tree/master/grails-samples/grails.org/
Yes. IBM has an excellent series of articles building on to a sample application at IBM's developerworks site:
Part I:
http://www.ibm.com/developerworks/java/library/j-grails01158/
The Series:
http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=mastering+grails
If you are interested in seeing an application which is pre-built which also incorporates the Grails specific testing practices and approaches (as well as some widely practised testing methods as used within Grails), the Winelovers application outlines a fully working app and a number of different testing angles which can be applied to create confidence and increase testing coverage for your apps.
https://svn.energizedwork.com/skunkworks/grails/WineLovers/
There is also a presentation which accompanies this which goes into samples and pros and cons.
I will be following up this work with a greater number of examples and further tutorial type updates to help draw out the benefits of testing this way and this much.
I'm adding Stephane's new application to the list:
Stephane Maldini ✆ to user show
details Oct 21 Hi folks,
I'm pleased to announce the release of
a relatively big grails App called
iceScrum
(http://www.icescrum.org/demo). Code
is under a mix of Apache Licence2 ,
LGPL and AGPL for the core
views/design (
http://github.com/icescrum/iceScrum ).
What you can expect to see in this
sample (and if you want to reuse the
view taglibs behind (140 and more
tags)
Jquery widgets : Tables, Postits, Windows, Widgets, Orderable Menu Bar,
Drag And Drop, Key shortcuts .........
Real time push for jquery with ICEpush
Activity plugin ( "someone has done something")
AJAX paradigm for view (url is http://app/project/#view/action/id )
like GMAIL, history fully supported.
Application of SpringSecurity ACL, Springcache, Resources plugin and many
others
Window/Widget paradigm on controller just by adding static ui = true (use
icescrum Web Component plugins inside)
It will be released separatly when
time will come
Jasper integration
Jquery Chart integration
many many things which deserve a lot of documentation, at this time you
will have to explore yourself some
parts.
The app purpose is to offer to agile
teams a tool to share a dashboard (for
collaborative consultants etc),
reports, stories, track bugs and so.
It will have his own evolution + some
profressional services for better
integration in IT via plugins or
simply hosting.
... have you looked at weceem?
http://www.weceem.org/weceem/
A very good series that builds a sample app: http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=mastering+grails
I second the IBM series Ray Tayek mentioned, and the energizedwork.com example j pimmel mentioned. The latter has been my reference manual for writing well-tested code and I can't live without it.
The new (Grails 2.0) GEvents app from Paolo Foletto needs to be in this list. There are step-by-step apps leading to the complete app. https://github.com/pfoletto/GEvents/wiki/GrailsWorkshop
There's a working version at http://www.grailsworkshop.com/GEvents/.

Best Ruby on Rails social networking framework [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm planning on creating a social networking + MP3 lecture downloading / browsing / commenting / discovery website using Ruby on Rails. Partially for fun and also as a means to learn some Ruby on Rails. I'm looking for a social networking framework that I can use as a basis for my site. I don't want to re-invent the wheel.
Searching the web I found three such frameworks. Which of these three would you recommend using and why?
http://portal.insoshi.com/
http://www.communityengine.org/
http://lovdbyless.com/
It depends what your priorities are.
If you really want to learn RoR, do it all from scratch. Seriously. Roll your own. It's the best way to learn, far better than hacking through someone else's code. If you do that, sometimes you'll be learning Rails, but sometimes you'll just be learning that specific social network framework. And you won't know which is which...
The type of site you're suggesting sounds perfect for a Rails project. If you get stuck, then go browse the repositories of these frameworks. Who cares if you're reinventing the wheel? It's your site, your vision, your rules.
If you just want a site up and running, then I would pick Insoshi or LovdbyLess simply because they're out of the box apps so you'll have to do less to do get running. I suggest trying to install them both, and introducing yourself in the Google Groups. That'll give you a good indication of wether you're going to get along.
Update: Insoshi's license has changed to the MIT license, which means you're basically free to do with it as you please. But still, review the license for any code you are considering before you get too invested in it.
Something to keep in mind when deciding is the license for the code. Insoshi is licensed under the GNU Affero General Public License, http://insoshi.com/license. This means that you have to distribute the source code to your Insoshi-based web application to anyone who uses that web application. You might not want to do that, in which case you'll need to pay Insoshi a license fee (they dual license, like MySQL).
LovdByLess is distributed under an MIT license, http://github.com/stevenbristol/lovd-by-less/tree/master/LICENSE. This means you can use the source code however you want to.
I've not worked with these but am aware of this comparison:
"Unlike Insoshi and Lovd By Less, which
are full social networking Rails
applications, Community Engine is a
plugin that can add social networking
features to existing Rails
applications"
from
http://www.rubyinside.com/community-engine-rails-plugin-that-adds-social-networking-to-your-app-901.html
Regarding RailsSpace, that's a very nicely built Rails 1.2 application, and I think it was updated for compatibility with Rails 2.x. There's even a terrific book that was written about the RailsSpace application (or rather, RailsSpace and the book were written together).
But, RailsSpace became Insoshi, when the authors were so inspired by the amount of interest in a social networking site built in Rails. So while RailsSpace might be an interesting learning exercise, it's dead in terms of development. All of the authors' efforts (for more than a year now, I think) have been going into Insoshi instead, so that's where you should be looking.
Another option for anyone who wants to create a social site without having to build it from scratch is the EngineY framework. EngineY is a social networking framework written in Ruby and Rails. It provides alot of popular social networking features such as activity streams, groups, photos, message boards, status updates, events, blogs, wall posts, integrated twitter feeds, and more. EngineY is also under active development with new features being added all the time. You can read more about EngineY and download it from: http://www.enginey.com
Use Rails 3 and roll your own. Don't copy and paste code though, look through the source and try to understand the reasoning or motive behind certain design decisions, only then will you learn.
Just a quick update, EngineY now supports Rails 2.3.5 and just released this weekend is support for themes. This goes along with existing features including groups, blogs, photos, REST API, status updates, Facebook Connect, forums, private messages, user profiles, activity feeds, wall posts, and more... Check it out at http://www.enginey.com or on GitHub at http://github.com/timothyf/enginey
One other positive to Community Engine is that it is using Engines which is an advanced type of plugin that is becoming a part of rails in 2.3. So what you learn from using Community Engine (and therefore Engines) will be useful going forward.
i'm currently testing both lovdbyless and insoshi. i was able to install and get insoshi up and running fairly quickly whereas lovdbyless is giving me a harder time.
if you're in novice mode, i suggest getting the book from Head First.
http://www.headfirstlabs.com/books/hfrails/
it is probably one of the better books out there for beginners. atleast in my opinion because i went through a few that was just way too confusing.

Resources