I'm doing a web application for my Software Enginearing' exam. I decided to use Rails framework and I'm trying to learn it.
During the course we have studied Design Patterns from GoF, but I don't find anything interesting for Rails.
Can anyone adress me to some sources that can help me?
I read this one http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452 and I found it very interesting. Both in terms of design patterns and in the way it goes under the hood of things people usually know about ruby.
I'm quite new to the field of computer science but I think I've got a pretty decent idea for a website to aid classroom CS learning and collaboration. I'd really like to develop the website from the ground up and make it a sort of pet project in hopes of eventually getting it out on the web for free. Hopefully I can get some teachers to adopt it for use with their classes.
The problem is that I honestly don't know where to start. I've got the idea but I don't have enough formal education to guide the implementation of my idea. The site should have quite a bit of functionality in the long run. I'll need to be able to store user and class data/files as well as offer discussion boards and other things.
Without getting into too many details, what is the best way for me to get started? What languages and databases should I be most interested in as I build the site and ensure scalability and future functionality developments? I would really appreciate any information you could give me on how to structure the project/stack as I don't have much of a clue at this point. I have the idea. Now I just need a little bit of help getting started.
Thanks!
There are definitely already projects out there that will (more than likely) do everything you're currently considering. That said, there's immense benefit in doing a project like this for personal development - you get to learn, and you expand your public portfolio. If you run the project as open source, you can also demonstrate your ability to work with others. All very good (hireable) attributes.
Are there any programming languages you already know? Are there any that your course is going to be teaching that you know ahead of time?
There are so many different languages and frameworks available to choose from, but I'll only mention a few.
Language: Framework
.NET: ASP.NET MVC
python: django
ruby: ruby-on-rails
I'm a huge fan of django. Python is quite a nice language to learn. I'd recommend django purely from a biased point of view. Python runs on Windows, Linux, and Mac, though you probably don't want to host python on windows (culture more than ability).
Conversely, if you really like Windows, ASP.NET MVC makes building out websites very very easy. Mono does allow you to run .NET on linux and mac, but you might find support lacking, and I wouldn't suggest using Mono for your first project.
PHP is (was?) another popular language for building websites in. There are tonnes of web frameworks available for PHP. Popular opinion seems to be that PHP makes it easier for developers to write bad code, though it is possible to write good code with PHP.
Unfortunately, without knowing a rough direction in which you're headed, it's nearly impossible to offer some concrete advice. Database choice will generally come down to what language and platform (linux/.net) you're targeting. Web server also fits this profile. Once you decide on a language, narrowing down the other choices become a lot easier.
Learn HTML to start with and keep improving as per needed with css , javascript. You won't need more then this.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I wanted to create a web application. I thought of selecting Groovy or Grails. But I don't know from where to start! To start with Groovy or Grails?
If you know Java, go directly to grails. Groovy can be used with pure Java syntax, and you'll be learning its special syntax extras on the way.
I've just been in the same situation.
With my last Java experiences dating back some 7 years, I tried to start with Grails directly using "The Definitive Guide to Grails".
I went about 1/3rd thru and thought I understood enough to start out. But as soon as I started to hack I noticed I simply ran into too many errors that would take me hours to resolve, simply because of missing Groovy knowledge.
So I went and got myself "Groovy in Action" (a.k.a GinA). I studied the whole book and programmed each and every listing myself. As I didn't focus on this task solely, it took me several weeks to complete the 600+ pages.
Then I went back to my Grails project and found that I had even forgotten the things I already had known from the first book.
In hindsight, I would go about the task like this:
Directly start your Grails project (I recommend you setup NetBeans SpringSource Tool Suite IntelliJ IDEA Ultimate as your IDE)
Work on it every day for about one
hour
Learn ~50 pages in your
preferred Groovy resource.
Learn ~20 pages in your preferred
Grails resource.
Apply what you
learned
Keep in mind that the current edition of Groovy in Action is dated 2007 and The Definitive Guide to Grails is dated 2009.
In both cases this is quite old, though almost all of the GinA examples still work.
The most important parts of the official Grails Framework Reference are written well structured in chapters, thus it will suite perfectly as your Grails resource.
The following combination would be my personal choice:
Groovy: Groovy in Action, Second Edition as MEAP (Manning Early
Access Program) ($34.99 or $49.99)
Grails: The Grails Framework - Reference Documentation (free)
I'd love to hear about your success & subscribed to your questions as I might be able to help with some of your simpler ones.
Enjoy!
It may be that you're misunderstanding what exactly Groovy and Grails are.
Groovy is a dynamic language that uses Java's JVM (virtual machine). It can compile to Java bytecode and run anywhere that a typical Java program can run. It's only a language, not a framework for developing web applications. You could use Groovy by itself to build a web application, leveraging Servlets, JSPs, and other libraries to help you. However...
Grails is a framework that uses the Groovy language to help you build web applications. Grails gives you easy ways to create all of the web application components that you'd normally have to build yourself (using Servlets, JSPs, etc.).
This may help explain to you why Bozho suggested to go straight to Grails (and why I agree with him).
If you have the opportunity to deploy on google appengine you should take a look at Gaelyk (http://gaelyk.appspot.com/), which is a Groovy framework that gets you up and running realy fast.
Based on your situation, I would start with grails. Here is the Quick Start tutorial: http://grails.org/Quick+Start
At some point you may want something lighter. When that happens check out Ratpack at https://github.com/bleedingwolf/Ratpack#readme
As a learner like you, here is what I've got in few last weeks.
Even if you're familiar with Java, Grails auto-generates templates of code, and knowing Groovy syntax helps to understand it better.
I very suggest books by Scott Davis, they are just brilliant -- short, clear, and straightforward.
Start from "Groovy Recipes", and then take a look at "Getting Started with Grails".
Gaelyk is good for some very custom webapps, but if you're doing ordinary dynamic website, then too much code has to be written manually, and from scratch. Grails provides much more help here.
If you do not know Groovy or Java, sure, you could go straight to Grails, although much of it will be lost on you. My path has been Grails, Groovy, Grails, and now Groovy full-time.
Groovy provides so much pure goodness (builders, command chaining, closure driven Annotations, Groovy SQL, POGOs, etc.), it would be a shame not to explore it in depth ;--)
I'll get back to Grails no doubt, but I am having too much fun with Groovy right now...
I'm interested in the possibility of developing Liferay portlets on Grails, using the Grails Portlets plugin. I reckon introducing a portlet framework (such as the Spring Portlet API) will make development faster and more comfortable, so being able to further add Groovy and Grails conventions to the mix sounds almost too good to be true.
I guess this combo is relatively new, since this far I've found no experiences on how well this works in practice, or of its potential pitfalls.
Any experiences, suggestions or warnings? I would greatly appreciate them.
As you said, the plugin is very new so you might have to get involved by suggesting improvements/logging JIRAs.
But I think the nice Grails features would make it worth the while. Both Kenji and I read the mailing list so you should get an answer to any questions you have.
I've never used it to create a real application (only test apps while developing the original plugin code which Kenji has since improved).
My company is in the process of starting down the Grails path. The reason for that is that the current developers are heavy on Java but felt the need for a MVC-style language for some future web development projects. Personally, I'm coming from the design/usability world, but as I take more "front-end" responsibilities I'm starting to feel the need for learning a language more intensively so I can code some logic but especially the front-end code for my UIs and stuff.
I've been trying to get into Python/Django personally, but just never invested too much time on it. Now that my company is "jumping" into Grails I bought the "Agile Web Development with Rails (3rd Ed - Beta)" and I'm starting to get into RoR. I'd still like to learn Python in the future or on the side, but my biggest question is:
Should I be learning RoR, and have a more versatile language in my "portfolio", knowing that my RoR knowledge will be useful for my Grails needs as well??
-OR-
Should I just skip RoR and focus on learning Grails that I'll be needing for work soon, and work on learning RoR/Django (Ruby/Python) later?
Basically the question revolves around the usefulness of Grails in a non-corporate setting and the similarities between Rails and Grails. (and this, while trying to avoid the centennial discussion of Python vs Ruby (on Rails) :))
Mmh, I don't know how to say this. Some people might bash me over this.
Language (Groovy and Ruby)
As a language I reckon Ruby is more funky compared to Groovy. Groovy only exists to ease Java programmer as you don't need to learn too much new syntax. But overall I reckon is not as funky as Ruby. Groovy wouldn't be the JVM language that is worth to learn based on attender's vote in this year's JavaOne but instead Scala is the one to go. Besides that, the original creator of Groovy himself does not have faith in the language he created himself in the first place.
Community and Job openings
As for the community, Grails community is not as big as Rails, though since the acquirement by Spring more and more people are using it in serious application. Rails has more job openings in the market compared to Grails (that is if you want to invest in looking a new job).
The framework (Grails and Rails)
But, as a framework, if you really care about maintainability and need access to Java framework and legacy Java system, Grails is the way to go as it provides cleaner access to Java. Grails itself is built upon several popular Java framework (Spring & Hibernate). Rails itself IMHO is funky like Ruby itself, but it's funkyness costs you maintainability. Matz himself prefers Merb over Rails 2 because Rails create a DSL on top of Ruby which is really against the Ruby philosophy. And I reckon because Rails itself is opiniated, which in turn if you don't have the same opinion as the creator, it might not fit your needs.
Conclusion
So in your case, learn Grails as that is the company's consensus (you need to respect the consensus) and if you still want to secure your job. But, invest some time learning Rails and Ruby too if you want to open a chance getting a new job in the future.
Just a bit of a question, is the reason they are choosing Grails because Groovy is closer in syntax to Java than Ruby, or because they want access to Java?
If it is the former, then I would say try to focus on Grails since that is what you will be using. If it is the latter, you might want to see if the development team is open to using JRuby.
I have never used Grails or Rails before, but I have used Groovy and Ruby before, and as a language I think Ruby is much cleaner and more consistent, and the team might enjoy production more. As a platform, Rails has been out longer and has a lot of attention, so I would imagine it is a more stable platform to use with more fleshed out features.
JRuby has full access to classes written in Java, so this is why I would say consider trying Rails. If it is too late in the decision time to consider it then I guess you can just ignore this post.
Basically, if you just want to hook in with Java, then JRuby is an option you should consider, but if the team is afraid of non-Java like syntax, maybe continue as is.
I would learn both. They are both up and coming technologies. Learning RESTful coding is a real benefit in any language.
I use GRAILS at work and RoR for side projects. I can say that the RoR community is much larger (I'm talking about RoR vs Grails not RoR vs Java) and very helpful.
Short Answer: They are similar.... what could it hurt?
Just skip RoR. There are really not a lot of similar things(besides the name)
I certainly believe that being enough familiar with Java, plus some experience programming with a dynamic language is more than enough if you plan to do serious development with Grails.
Comparing just only views(taglibs in Grails, RHTML in RoR) and the persistence stuff(GORM vs ActiveRecord) is just too different in the core, to invest time learning the nitty gritty details of RoR. Just dive into Grails, you won't regret.
Edit: corrected typo.
I've been learning RoR and Grails and the latter is far easier to learn.
Both frameworks share the same principles (agile, kiss, dry, duck typing and so..) but Groovy syntax is...well is simply great, something you can learn and use in a blink of an eye.
I truly feel that Grails has brighter future than RoR.
PD: Just in case you find it useful, a college of mine it's working full time with Grails and has a blog with some tips:
http://dahernan.net/search/label/grails
You should just skip RoR and focus on learning Grails that you'll be needing for work.
#Levi Figueira
For one thing, Grails is far more flexible than Rails. Rails is difficult to use with a legacy DB because ActiveRecord has too many design constraints that many legacy DBs didn't follow. Grails, oth, can use standard Hibernate mappings, which can accommodate a much broader range of DB designs.
The Rails community has been very vocal in evangelising RoR, with the result that high expectations have been set and not always met (programmer productivity is good, but ensuring good performance once deployed isn't so easy).
Grails has been designed as the scripted successor to Java, whereas the Ruby-Java integration used in JRuby on Rails, for example, has had to be retrofitted.
I would suggest that you stick with Grails; it may not have the same glitz as RoR, but it's a pragmatic choice; you get improved productivity and the re-use of existing Java libraries.
Jump straight into Grails. I'm sure Ruby/Rails is good but so in Groovy/Grails. I recommend this book.
http://beginninggroovyandgrails.com
Remember the errata is online. There are a couple of mistakes in the book.
http://beginninggroovyandgrails.com/site/content/errata
Also, check out the 3 minute and 30 second demo of creating your first Grails app.
http://grails.org/Grails+Screencasts
This tutorial will show you the basics.
http://grails.org/Quick+Start
Yes Grails is the way to go. RoR is good but it ties you in to the Ruby ecosystem. Part of the effort of learning a new framework or language is learning the class libraries as well as the language syntax. If your co-workers are all Java types you will be much better placed to receive help and support as they will all be speaking the same language as you.
The other advantage to learning a bit of Groovy and Java is that web frameworks like GWT will open up to you. Grails has a GWT plugin and as a front end developer you will appreciate the ease of use and cross browser compatibility.
Also there is at least one hosting company offering free Grails application hosting (http://www.mor.ph/) which means that you can prototype sites at small data volumes before having to pay.
I favor Grails over Rails, but learning Rails will give you a more balanced perspective and actually open your eyes to overlooked things that are possible in Grails.
At a first glance you would think they are completely differente stories, since they are based on extremely different languages (Ruby and Groovy).
Then, after reading a couple of tutorials, you'll realize they share the same principles, scaffolding, duck typing, .. and finally the same goal:
making agile programming feasible.
If you already feel comfortable with terms like IoC and MVC, you'll find any of these options easy and exciting to learn.
I would say no, I'm learning Grails as well, and I've considered this as well, but just learning Grails is pretty big, plus learning Groovy (which granted is easy, but still gotta learn it right?) and all that... so learning Rails would have been just too much.
Yes if we compare grails and rails I would choose grails (I developed some intranet applications in grails).
But Django is superior to both - as python is well hmm a perfect choice.
You might also want to take a look at Clojure, a JVM language that's just starting to get popular. It may be a good choice for a Java-based company since it's compatible with your old codebase, and has a lot of modern innovations going for it. There are some good web frameworks emerging, including Compojure.