Days ago I read something like "Ruby on Rails is for web applications, Django is for standard webpages". Is that true?
I have to decide in the next weeks if I go with Ruby on Rails or Django for an university project. It will be an email marketing software.
What do you advise me to use?
This is mainly because of their heritage - Rails was originally used for web applications like Basecamp, while Django was used to build newspaper/magazine sites.
I would say both have long since outgrown their original purposes however.
No that is not true, but however, Django has the built-in Admin back-end making it a great starting point for a CMS or something similar. Django is still very capable for creating complete web applications!
I presume this is:
Ruby on Rails (i.e. the Rails framework, using Ruby as the programming language)
vs
Django (i.e. the Django web framework, using Python as the programming language)
Both of these frameworks are Model View Controller (MVC) frameworks, so they are both capable of web applications and web pages.
Therefore, your decision is really "Python or Ruby".
Both Ruby and Python are object-oriented languages and are easy to get into... they both have quick-start guides here:
http://www.ruby-lang.org/en/documentation/quickstart/
http://wiki.python.org/moin/BeginnersGuide
I think Ruby has the edge in terms of simple documentation and ease of use - as long as you are happy to abide by the rules that the language enforces (which aren't necessarily a bad thing by the way).
Both frameworks are great for what you're trying to do and Ruby and Python are similar in a lot of ways. My suggestion would be to skim through the online documentation for each and go with what feels best for you.
First, you need to answer 2 questions:
Do you prefer Python or Ruby?
Do you need a minimalistic framework, or a more complete one?
As a minimalistic framework in Python, take a look at web.py.
Both are great frameworks.
The question is.. Do you prefer (or feel more comfortable, or know better) 'Python' or 'Ruby'?
Once you have the answer to this question you also have the answer to the original one.
You can use either framework to create almost any web application imaginable.
If you have no language preference, and you don't have a preference for their different design patterns (Django is nearly not as strict MVC as Rails), then think about the different Python and Ruby libraries/apis out there that could be useful for your project.
Go with whichever language supports those libraries/apis that help you the most.
In my experience, Rails developers are more likely to work in small, funded startups. Django seems to be the preferred environment for independent consultants building websites for small businesses. If you're picking a language to gain experience, you might keep this in mind.
You'll be spending most of your time configuring, learning the tools, frameworks, and environments. The language itself (Ruby or Python) will not be a big hurdle for you.
Also - Rails is really nice to develop with on a Mac. I don't know about Django tools.
Related
thanks for opening my question :)
I am a university student in Computer Engineering, and I've always done class projects in Java (apart from C, and Assembly, but for very specific things). Apart from that, I have worked for quite a lot of time on a web app done in ActionScript 3, contained in .jsp files and deployed onto a Google App Engine site.
Having that said, I now pretend to do a prototype of another web app, which will have registered users with blogs and a messaging system between them.
My question is, having time as a restraint (I have month and a half), and needing just to build a working prototype, could anyone tell me, in his/her opinion, what would be the best framework for me to start learning and use? (Take into account my Java & ActionScript background) I believe RoR is the most common in these cases, as its easy and quick, but I have no Ruby knowledge at all, and maybe it would be quicker for me to learn Scala (which coming fromJava shouldn't be that different) and Lift, and do it with them instead.
Many thanks in advance!
Pepillo
Last year I found myself in a very similar situation for creating a web based relationship browser for a computing science class. I would highly recommend RoR. Granted you will need to spend some time getting up to speed with Ruby, but it is well worth the small amount of time to learn. There is excellent documentation available and a ton of good tutorials.
Rails can generate much of the core code and database schema with the generator functions in seconds (see scaffolding generators). Considering your time constraint, I think this alone makes rails a good choice.
In terms of learning Ruby, you should not have much trouble with this if you are comfortable with any dynamically typed scripting languages.
Anyway, that has been my experience with rails. Good luck on your project!
I think I'm going with Play! Not only is the easiest for me, as I am a Java guy, but it's also the quickest when in conjuntion with Japid, according to a benchmark I saw.
I used Java for about 7 years now, mostly for web applications, and recently started using RoR. I must say it was really easy to pick up and get started. After only 2 months of working on my own project I started using it for a customer projects and it was far more easier to deliver production code then I had anticipated. So yes I can recommend Ruby and it was not hard at all to pick up.
However, RoR does require a nix platform like apple os or linux. I stated out with windows but there are simply too many drawbacks and bugs.
If you decide to go with ruby I can higly recommend Agile Web Development with Rails (Pragmatic Programmers) to get you started.
I am a somewhat experienced rubyist, but I am now starting to do rails development. I know rails is used to make "web applications" but what exactly does that mean? Do you build entire sites with rails or do you build a feature for a website in rails, and integrate it in to an existing website? (I know this question is kind of vague, but any answers to how ROR is used in the creation of websites would be much appreciated).
Generally speaking, you will build a full site with Rails, though you can integrate it into an existing website, as well. It is designed to provide a top-to-bottom solution for entire websites.
For standalone features or small scripts you just want to expose to the web, you might look at something like Sinatra or Camping.
What is Ruby on Rails?
I'm also build some rails applications in that I had entirely use rails to develop my web application. It's quite easy rather than using two or three languages. But when I developed I had to use Javascripts, CSS and Ajax to create more attractively
For me it's a great framework to build website and minimal knowledge is required although experience and knowledge of ruby gives you an upper hand.
I also feel that rails is good not only to build websites but to manage it.
Also the support community of rails is awesome and is complemented by guys like Ryan bates with their screen casts.
Also when we build a website using ror, we have the flexibility to concentrate on different features at different times or by different person.
This gets a great modular structure.
So you can design the basic functionality today and tell your colleague to get the views attractive using JS and friends without affecting your functionality.
Also the external support for rails (like gems and plug ins) is awesome and makes life heaven!
I would suggest that it's a great framework and the best feature is that it is a very easy to begin and learn but it always surprises you with new things.
Thus it allows you to learn a lot!
Hope it helps.
The website/web application distinction is made because there are many Rails apps in existence with no front end or 'website' to speak of. Using Rails, one could serve JSON amongst a cluster of compute nodes for data aggregation, or text to unix sockets for display on terminals. The uses for Rails are only limited by ones imagination, and you could even use Rails for single host interprocess communication if you desired. This might prove effective for a highly skilled rails programmer rather than learn a new tool to achieve similar results.
I just saw that whitehouse.gov is using drupal as a CMS and portal technology.
One of the advantages of drupal seems that it is easy to add plugins and that programming is minimum, i.e. that re-inventing the wheel is at minimum. That is actually exactly the DRY philosophy of Ruby-on-Rails. So:
What are the drawbacks of drupal?
What would Rails or other Ruby based technologies disqualify as portal technology for whitehouse.org (or other CMS portals) ?
What are the drawbacks of drupal?
This is really a quite subjective question in relation to Ruby and Rails. Drupal is a solid content management option and really shines for community-oriented sites. It is useful for general purpose content management for non-portal sites as well. The drawbacks would be that it is built on PHP, if you are a Rubyist then that is a significant drawback. Additionally it is a beast of a project if you are looking at just the core. The API is quite large which is fitting for a project like Drupal, but this can make getting substantial customization done into a lot of coding work. Also, because of the whole architecture of Drupal there is no clear separation of data types unless you write a custom module that makes a clear separation and while this is in keeping with the "Drupal way" it is a little odd to some to think of EVERYTHING as a node or within the structure of Drupal's Taxonomy system or the like.
The biggest drawback to Drupal really can be best summed up this way: in order to make effective use of Drupal you really need to know and understand Drupal in a way that you don't for a CMS system like Radiant; but Radiant is nowhere near as complex as Drupal.
What would Rails or other Ruby based technologies disqualify as portal technology for
whitehouse.org (or other CMS portals) ?
Rails is rather dissimilar from Drupal in that it is not really a content management system at all but a more general purpose application framework. You can use Drupal in ways similar to Rails, but Drupal is really much more than what Rails is. Better comparisons could be made between Drupal and say Radiant or BrowserCMS or some of the other Ruby/Rails CMS packages. There are Ruby/Rails portal systems out there but few match the bulk of Drupal and it's community. The most comparable options in the Ruby ecosystem only match bits and pieces of what Drupal can do, but that is because Drupal is that massive a project and a community. Drupal is a swiss army knife plus some for doing sites on the web. Ruby doesn't have a truly similar project out there because most Rubyists don't see any reason to duplicate Drupal's girth.
I would recommend the following projects as things to look at if you are considering use Ruby in place of Drupal (most of these Ruby projects will cover less than Drupal but fit closer with your site's actual needs):
Radiant
BrowserCMS
Lovd by Less
Community Engine
Quite subjectively, I find the Drupal administration interface a bit clunky. You can try it out for yourself without actually installing Drupal at opensourcecms.com. That being said, there seem to be a great momentum in Drupal community at the moment, and it's starting to become a really full-featured CMS.
Comparing Rails to Drupal is somewhat like comparing apples to oranges. Rails is an application framework and Drupal is a CMS (although with a kind of application framework included).
allesklar, what is wrong with the extension system within Radiant? There are plenty of Rails CMS out there already. I suspect contributing to an established system to improve it would be more productive for the community at large than creating yet another niche CMS.
I'm a Rails developer so I'm all for Rails solutions but presently there is no Rails CMS that comes any close to a CMS such as Drupal in terms of functionality and plugins.
I attribute this partly to the 'less is more' philosophy advocated by 37signals.
Wordpress, Drupal, and others go for 'as many features as possible' and doing such end up attracting masses of users who will find that these products do answer their needs.
I've been playing with the idea of, like many others, starting a Rails based CMS system with plenty of features and a good plugin architecture. No time to work on this yet though between client work and development of an hosted application I'm working on.
I just found this site:
drupal and rails
If you are looking for portal technology built in Ruby, a relatively new candidate to consider would be EngineY. EngineY was originally built as a social networking framework but also has features that make it a viable candidate as a traditional portal. EngineY's concept of a 'widget' is similar to a traditional portal's portlet. There is a Managed Content widget included with EngineY that lets you create a portal made up of managed content. Best of all is that EngineY is very actively maintained and is evolving and improving daily.
Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more expressive and fun.
To cut the story short, is there a Django-like or Django inspired framework on Ruby?
If not, would be possible for an implementation of Django on Ruby? What would be the challenges?
If one were to create a Django-inspired framework for Ruby, how would it's Domain Specific Language (DSL) nature come into play?
I've spent a good chunk of my past life using Symfony, which is a PHP framework heavily inspired from Rails. When I saw Django, it came as a bout of fresh air. I'm really curious to know what you guys think and have to say on this.
Update: I stumbled on a framework call Ramaze for Ruby. It seems to be a bare-bones MVC framework with pluggable components for the JS framework, ORM layer and the templating engine. So you could use Prototype / Sequel / Sass, or Mootools / ActiveRecord / XSLT, or any other combination of your choice! As a side-note, Merb is an interesting choice too.
Update 2: I'm sticking to PHP for big-ass commercial projects and Django for my personal projects. Reason why I decided to side with Django was the amount of flexibility it offered. That said, I realized that with greater power comes greater responsibility.
My advice to others: if you know exactly what you want - go with Django. It's probably easier to define things explicitly in it than in Rails. Merb may have been a good choice too, but I didn't have the time to explore it. Django seemed like a good fit and so I stopped being anal about the language I'm using. Thanks for all the help guys!
Try merb, merb-slices, and datamapper is probably the closest you can get in ruby.
I think you need to define a little closer what you mean by "Django-like". Depending on your exact definition, any of these might fit the bill:
Ruby on Rails
Mack
Waves
Merb
Iowa
Is having less files really a deciding factor on choosing a framework?
I agree that keeping track of a smaller number of files is easier on the brain, but I would choose a framework on:
documentation
size of community
maturity
before I woried about file count.
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.