Ajax On Rails
mu-sly writes "Ajax and Rails - probably two of the biggest buzzwords in web development at the moment. In this article over at ONLamp, Curt Hibbs introduces the incredibly powerful Ajax support that is part of the Ruby on Rails web application framework. It's a great read, and serves as a gentle introduction to the cool stuff you can accomplish with ease using the Ajax features of Rails."
I'm sure many developers like myself have a day job that probably involves J2EE. The first time I did the iniitial tutorials for Rails several weeks ago I was blown away. Connecting to a database is not susposed to be this easy.
Even when using newer frameworks like Spring, Tapestry and Hibernate (I hate you so much Struts) Rails still manages to be easier.
I highly suggest any developers looking for a change of pace at least give Ruby on Rails a few hours of your evening. While it's not nearly as comprehensive as Java, it's gaining libraries and functionality by leaps and bounds.
And just so I don't get labeled as a Rails fanboy/Java basher: Rails is not perfect, I still would recommend using J2EE for large corporate projects. It's just a much more mature solution with less unknowns. I think Rails needs another year at least before people are ready to really give it a shot in the corporate environment.
ce n'est pas un Sig.
Can this again help reducing bandwidth consumption in a similar, but prettier way, than html frames?
Every time I see material surrounding Ruby on Rails, I'm further convinced that it could be the web application programming foundation that starts to displace PHP as developers start to look at the transition from PHP 4 to PHP 5. Getting an increased install base for ruby on rails, as is the case with php (a fairly difficult task, admittedly) would definitely help no end in increasing the framework's popularity, at least amongst those programming smaller web applications.
Business Voyeur
Get the Beta book http://pragmaticprogrammer.com/titles/rails/index. html
If you're interested in Rails at all, this book is all you need.
b) Microsoft's own technology being used by Google to loosen Redmond's deathgrip on the market?
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
Of course Rails isnt the only completely F/OSS web application framework; Rails is best when you want to put relational data online: It's edge is it's simplicity.
On the other hand remember Zope - If you can get your head around Aqusition, the ZODB and Product Deveopment then Zope is a super-fast development platform.
From the article:The most visually impressive of these is Google Maps, which gives you the illusion of being able to drag around an infinitely sizable map in its little map window.
It's illusory alright, when I start at the US and scroll due west the first thing that I come to is the UK. Where'd all the other countries go?
Ajax grew from one of those hated, non-standard Microsoft features.
Help me take back Slashdot. When did 'News for Nerds' become 'FUD and Conspiracy Theories for Extremist Nutjobs'?
The rise in AJAX is almost solely due to the recent AdaptivePath article. I'm not sure it's a major trend.
n ews.png
e vsrubyDejanews.png
http://www.realmeme.com/miner/technology/ajaxDeja
However, Ruby on Rails is clearly rising,
moving steadily upward for over a year. Thanks to a reader for bringing this to my attention.
http://www.realmeme.com/miner/technology/hibernat
In just about every way you could possibly imagine.
How is eating feces not better than ASP.NET?
Most of this product comparison site was developed in Ruby on Rails within the last two months, and it already does more than Froogle, has more search features, etc.
I've also developed a large marketing system for the restaurant industry in Rails which lets restauranteurs develop e-cards, e-gifts, and send them to their customers on certain days.. or certain days away from their birthdays, etc.. and that will be going fully live soon.
My 10,000 user strong RSS Digest will be making the leap to Rails soon (July 1st) and this is a system driving over half a million uses a day.
I developed a del.icio.us-style tagged Code Snippets site in Rails within two days! It's had further refinements since then, but less than two weeks after launch, it was getting thousands of pageviews a day and hundreds of visitors a day from Google.
I was ready to give up development work 6 months ago, and now it's the most fun and profitable work out there for me. Ruby on Rails deserves the attention it's getting. You can put together your ideas in a fraction of the time you'd have ever imagined.
First thing this title reminded me of was Cheech & Chong's Up In Smoke. That chick does a couple rails of ajax that Chong was cuttin up for fun. I was surprised no one else posted about it.
You're nothing; like me.
Time to add Ajax and Rails on my resume!
(To all potential employeers: I kid!)
The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
Has the performance of Ruby gotten much better since the early days?
I started using Ruby a long time ago, back when no one knew about it. I liked it because it was like a better Perl (better OO support but with Perl syntax). However, I quickly tired of its lackluster performance. I mean it was a lot slower than even Perl or Python. I eventually moved on hoping to return when Rudy had matured and performance was kicking. Last time I checked the performance was the same as always. So much for the "tune for performance later" crap. When will programmers learn that doesn't actually work? You need a good design that includes tuning for performance early on.
Now I know Ruby on Rails has been shown to be faster than J2EE and similar but that's just a small part of what Ruby can do. Everywhere else it doesn't seem to perform as good. Sorta like Java. Good for server-side web stuff (mostly due to the nice API's really) but suck-ass at everything else.
The ratio of people to cake is too big
I first heard of Ruby on Rails here on Slashdot. Although Rails is dead simple once you get it, getting to the "ah ha" point is a bit of a steep climb.
If you want to learn Ajax in Rails, the best thing I've read has been Dave Thomas' new book "Agile Web Development with Ruby on Rails". The author of Ruby on Rails itself, David Heinemeier Hansson, is also a co-author. Great book, absolutely fantastic web development framework.
Ruby on Rails Screencast
On Railsday (a 24 hour ruby on rails competition), myself and a couple of pals built a "Ajax" powered game on top of google maps. I'm not going to put a live link to it. (each client does xmlhttprequests to the server for status ASAP, and I don't want my poor server to die)
See Britt's write up and my (Jesse's) write up, Rails Day SVN source for all the projects.
Then using that I was able to build Geo-comments into my rails based blog with a couple hours work... When leaving a comment, you leaving your zip code, and then the geo-comments view using embedded google maps to show who has said what
It's best to be suspicious of this framework until it has a nicely integrated mechanism for graceful degradation of the user experience in clients that don't support Javascript.
I used to think, like the tadalist folks, if you aren't willing to upgrade your browser, screw you. But that was before my mobile web client began being an ever-more-important part of my systems for managing my personal data on the web. Most mobile devices just don't support Javascript, and even if you find one that does, it isn't that quick or easy to switch devices, with many such devices being cell phones that have contracts. These days if a site doesn't support plain HTML, it's as if it doesn't work at all, unless you are tied to a desktop.
There certainly are AJAX apps out there that do gracefully degrade the UI on HTML-only clients. But the rails stuff I've seen so far are not among those.
our new scripting overlords who feed us ajax rails.
by TheSpoom (715771) Uncaring Linux user here. I have nothing to add to this but please continue. *munches popcorn*
The article has two links intended to allow the reader to compare a traditional web app to Ajax.
In Firefox 1.04, the 'traditional web app' link doesn't work: the form for posting comments doesn't appear. (It does work in IE).
The Ajax link throws up an error message:
Not all that impressive!
Would anyone care to post their experiences with any of the libraries - DWR, Prototype, Sajax, and Ajax.NET (i'm not interested in this one at all, but to be fair...) - mentioned in TFA?
"Our interests are to see if we can't scale it up to something more exciting," he said.
Its not better than ASP.NET in any way except for the fact you can put it on servers that have free OS's. ASP.NET is considerably more feature full and as better caching and performance features. Now that said AJAX can be used with any web platform, so if you want to use AJAX you can still do it with ASP.NET. If you are making a large scale site or a corporate inter/intranet site you really have two choices ASP.NET and J2EE. Either one is a vast improvement over Ruby/PHP/Perl is both performance and features.
As mentioned in Curt's great article, the Agile Web Development with Rails (beta) book has a nice chapter on Ajax support. You can even get an extract of the chapter at the pragmatic programmer's site: PDF Extract of Chap 18: Web 2.0
Figure 18.1 should make Ajax clear. The book is highly recommended, and the 2nd Beta was just released last week.
Matz is well aware of the speed problems, and unlike ruby zealots is at least willing to admit that its a problem, and plans to make ruby2's performance competitive with perl and python.
Can anyone who has experience with this comment on how well this works with various browser versions, older and newer?
It looks like the ISP's entire server is down, not just this particular web app.
Traditional Web App (at this moment running fine)
Ajax Web App (Crashed / burnt)
--> Insert Funny Sig Here
I'm not a programmer, but someone who pays a programmer to develop a web-application for which PHP is used. It is possible to mix PHP and RoR, making a gradual transition possible? The FA surely mentions types of behaviour I'd like to have. Bert
Comparing lighttpd + fastcgi rails to tomcat is just retarded. That's the fastest rails configuration vs one of the slowest java configurations. Tomcat is a very slow reference implimentation, java web apps are almost never deployed using tomcat. Repeat the benchmark using a reasonably performing java server (resin is free and fast) and then compare numbers.
libedit is a free replacement for libreadline, which oracle could use without any problems at all. They choose not to because they do not care about making their product usable.
ASP.NET 2.0 does this also. You can define client callbacks on web controls which let you run code on the server-side and get the results back without reposting the page.8 96
http://www.developer.com/net/asp/article.php/3506
I am sick of seeing this excuse. You can't run around the internet screaming how rails is the greatest thing since the wheel, and how it renders java obsolete because its 100x faster to work with, and then say "its not done" when people actually try to use it. If you are ready to hype something and tell everyone how great it is, then you need to be ready to accept criticism too. If we can't compare it yet because it isn't finished, then stop running around telling us how great it is and how we should all be using it.
You can still cache over the network. Pulling an object out of a simple key/value hash which is stored entirely in RAM (memcached) is significantly faster than parsing an SQL query, retrieving all the data, and then making an object out of it. And it also allows your database to only have to deal with queries that MUST be done, instead of fetching the same things over and over again for no reason.
Yeah, proof by assertion. That must be why Slashdot, Amazon, Livejournal and zillions of other "large scale site" don't use them, or what? Amazon and Slashdot use Perl, btw...
Either one is a vast improvement over Ruby/PHP/Perl is both performance and features.
What features of ASP.NET and J2EE are so unique and essential that they make them a "vast improvement" and the only viable choices for larger web apps? Ruby and Rails have features that simply let programmers do the same thing with less code, faster, and with more fun, and make programming in Java/C# look boring and tedious.
Ok. So someone built a webpage with java script rich client features and some server stuff to deal with it. Right? Well, this is as old as the hills. Web developers where doing this 5 years ago.
But this is called Ajax and suddenly everyone goes crazy.
Then there is ROR. I checked Ruby on Rails about a year ago. Then again a little more just the other month. It looks like Zopes younger brother. Not half as powerfull, and 5 years to late. But with Ruby, as to add even more extra geekness or what?
Please understand: I think all these OSS PLs, Appservers and Web technologies are great. I love to use them for my work, and when a new one pops up - it happens every odd week - I'm the first one checking it out. I just would like to understand what all the extra excitement is about.
Could someone please explain? I'm serious.
We suffer more in our imagination than in reality. - Seneca
A web application framework that includes a web application program generator
No, Rails generates many methods "on the fly", but it doesn't generate any program for you. You still have to write the program. However, there are many cases where if you don't write your own code for something, Rails will supply a "default". When you get started writing your app, do you really need to waste time writing code to "display the template"? No, rails does it for you and chooses the template with the same name as the action. However if you need it to do something different, which is common, you simply have to add the one line of code to render the template. This saves a lot of time!
Think of it this way: when you log into a Unix shell, you need to "ls" some files, "cp" some files, etc. Luckily, most Unix shells have those commands available, already written for you. Does that mean you can't write your own? No. Does that mean you can't customize what they do? No, they have lots of flags. Do you often need to write your own? No, usually the existing functions are good enough.
That's what Rails is: a domain-specific language for writing web apps. Of course you can throw all that out the window and write *any code you want*, Ruby is a general programming language, but it's kinda silly to waste your time like that.
a database
what database?
Rails doesn't "include" the Ruby language! And the web server is part of the Ruby library, not Rails!
The program generator accepts a description of database tables and generates generic Ruby code (web pages) to do CRUD (create, read, update, delete) maintenance of each table.
Man, you are really lost. ActiveRecord (a PART of Rails, you can use your own model classes) queries the DB to find methods *if you haven't defined them*. It also makes time-saving assumptions like, the name of the table is derived from the name of your class. Most people of course, use the defaults.
With very little initial effort one can create a (very) basic web application.
Delete "initial". Delete "(very) basic". Replace "create" with "create and maintain".
Same weaknesses as most one-way program generators:
Rails is not a code generator. Do you understand? No .rb files are created. It's all done dynamically, on the fly, with well-factored libraries. You can rewrite or replace any part of it.
Once a site is generated, modifying the generated code slows things to a near-halt since
Man, when you're in a hole, stop digging. All you have to do to "modify" the "generated code" is write a method that overrides the default. If you're an OO programmer you already understand the concept. (And no, it's not hard to do. If your table has a "first_name" column, and you want to override Rails' generated method, name your method "first_name". The original value is in a hash called "@attributes". It ain't rocket science).
There is no round-trip capability (i.e., if you hand-coded changes to a web app, regenerating the app in RoR will wipe out those changes.
You seriously need to take 10 minutes to look at Rails so you can realize how ridiculous this is.
Both RoR and AJAX are being pitched to communities not particularly skilled in development.
If this community doesn't include folks like you, count me in.
I've been coding since before the web, for nearly 20 years. I've done "real" MVC. Rails is a collection of all the good ideas people have been using for years, all in one pac
These are "hot" technologies?
I haven't heard jack-all about them. Then again I don't make my living doing web apps so who knows.
I've been working with struts as of late, and although setting things up can be a little tedious, what specifically don't you like about it?
You don't understand one of the most important necessary preconditions for a larger web app in corporations - someone to approve it.
J2EE and ASP.NET have rich organizations that they can loan you to take key decision makers (CFOs) out to lunch to help approve expensive J2EE projects.
Compared to the Oracle sales guy flying my previous CFO out to some golf conference to pitch their J2EE-based framework, Rails has NOTHING..
I speak from experience - We had the case of One Oracle Salesguy against EVERY SINGLE internally developer telling this CFO that the Oracle framework sucked and that even Oracle was moving to Tomcat. Guess who won.
That feature - the lunch&conference&golf budget - and that feature alone is enough to make J2EE and ASP.NET win most corporate environments.
I didn't say nobody uses it. I said almost never deployed. You can get lots of offers for PHP too, that doesn't change the fact that its slow. Like I said, comparing the fastest rails setup to one of the slowest possible java setups is dishonest.
I very clearly stated that you can cache over the network, and pointed out why a network cache like memcached is faster than an RDBMS. Your post has nothing to do with what I said, so why is it a reply to me? And you can just pull an object from the cache with memcached, because every time you update the db, you also update the cache.
Amazon is on a complete different level then most sites. They don't use standard Perl by the way, they use C and Perl mixxed together, they have a custom build web server that completly changes the game. Most companies can not afford to write their own webserver specific to their needs. Slashdot handles a large load by generating static pages for the main areas, they are not dynamic, so arguement here does not hold either. Livejournal probably does use Perl or PHP but I don't know anything about them, so maybe they pull it off. Both MSDN and MSNBC use ASP.NET and they both have more vistors then Slashdot so I don't know what your point was. ASP.NET blows away Ruby on Rails, I don't even know how to counter you arguement about Ruby being more fun since fun is subjective. But ASP.NET has much larger community support, documentation, it has caching options that boost performance greatly, it uses managed code that protects from errors. The VS.NET ide provides faster development time, ASP.NET lets you code your application with less code and has better database integration. I could go on and on. J2EE is better as well but I don't feel like typing anymore.
"Its not better than ASP.NET in any way except for the fact you can put it on servers that have free OS's."
By George I think he's got it!
Why was it somebody wanted to use ASP.NET?
Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
ok i had to post on this
i'm just sick of people rejoicing about AJAX
doing stuff FLASH does since like 2000..
OMG SERVER LOAD NO PAGE REFRESH !@#$%
that is all.
/// evilloop.com
By George I think he's got it!
Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
I only have a few comments about the web-development community in general, relating to the technologies under discussion.
It seems to me that the majority of web developers program in javascript for the browser and then use something like ruby, python, perl, or even php on the back-end. And even though PHP is very similar to javascript, it isn't.
It saves me so much time to write code once, and be able to use it on the front-end as well as the back-end.
Now, with the ability to load content AND CODE dynamically into the browser, doesn't it make sense to write back-end code in JavaScript as well?
I've been doing "Ajax" (hate that name!) since 2000, and it is still difficult to convince the back-end coders at work that it is a good thing. They all code in VB/VBScript. One or two know javascript for the browser, but don't use it at all on the back-end.
I know and have used many other languages, for over 25 years, and I have found that javascript is univeral, extremely solid, and powerful. It is as robust as the developer(s) using it.
--my $.02 towards increasing Javascript's popularity and market penetration.
In the mid-90's the best tools for developing data-centric client/server apps where VB, Delphi, Powerbuilder, and Clarion. They fell out of favor because management wanted everything webatized. This was partly out of fad chasing and partly because deployment over the web is usually a lot easier.
I would like to see interface kits take the best features of these four and create HTTP-friendly protocols for using them: a Biz-GUI browser. HTML+JS+DOM is growing into fat-client technology anyhow, just a messy set.
Table-ized A.I.
> If you are making a large scale site or a
;->
.NET solution is neither timely or cost-effective. The choice is to try to come up with a business case to use J2EE or .NET, or to look elsewhere. There's so much of this work around, it's almost scary to contemplate.
> corporate inter/intranet site you really have two
> choices ASP.NET and J2EE.
Agree with the parent, disagree with the GP.
Any large corporation has many layers of Web presence. There's their customer-focused Internet site, and I agree it'd be brave (not necessarily foolhardy) to use Rails for that.
However, there's also a LOT of intranet stuff going on, under the covers so to speak. Every person in that corporation needs access to internal information, and a lot of it is held in databases. That's where Rails can shine.
In my current job, while a debate was going on about how to build a small intranet site (serving ~30 people, but used by them 90% of the day), I put together the solution using Rails. Almost literally (missed it by about 30 minutes!), when someone asked for my input, I was able to say "Well I think it should look something like this..." and demonstrate a full working solution. I did say "Yep, the UI is absolute basis HTML, and I'm aware that the corporate standard is J2EE, and you're fully welcome to take this functionality and port it to J2EE if you want to, and if you can find the budget to do so" - guess what happened...
They went with the Rails solution, and (more importantly) I got exactly the feature set I wanted in the solution. My workmates jumped on and started using it straight away, so there's been no time since then for me to add all the esoteric/useless features that were requested by the "less-informed" users. Funny about how that worked out...
Many many intranet sites in large corps fall into the same category; there's a relatively small group of users need highly-specific and/or flexible functionality where a J2EE or
I've worked in many large corps over many years, and only a tiny percentage of the Web dev work is on the huge sites that need mass scalability/auditability/etc. Rails may or many not evolve to serve the needs of those huge sites, but it's absolutely golden for the myriad smaller sites.
The little demo they have on ONLamp has a tiny little mention of unchecking a particular checkbox on your MySQL install. You know. To turn off authentication of username/password to login to the database. They claim that MySQL broke authentication in 4.1.9.
Whatever.
My DBD::DBI applications are able to athenticate against MySQL just fine, but this app throws large gaudy errors when trying to connect to my (non-crippled) MySQL instance. (Yes, I ran through the tutorial in the hopes that the bug would have already been fixed)
Rails is a great toy for running on your Windows-only development server. When it comes time to actually point it to a database, you're screwed. I might recommend to the developers to use an existing DB abstraction layer.
fifth sigma, inc.
Damn you, I spit up my coffee. L. Ron Hansson?
Yes, there appears to be a core set of Rails fanboys who never miss a chance to slag off ABR (Anything But [Ruby|Rails]). This is quite sad, as the freakish hype and nonsense coming from many of these people denigrates both the general Ruby community and the truly good things in Rails.
FWIW, I hope people do not equate Railers with the more general Ruby community, which is overwhelmingly tolerant and open to new ideas and alternative approaches.
Java is the blue pill
Choose the red pill
They use the exact same Javascript library that is used in Rails as well: Prototype.
Rails is pretty decent. I guess the only issue is performance... you pretty much have to count out your typical web hosting account and have your own server. Mod_ruby pretty much takes care of the performance issues and it installed without incident in my Apache 2.xx web server with PHP 5.
Like many other people here, I realized that the whole Rails paradigm is great for new schemas and sites and will not fit well into my old crufty database schemas.
Newsfollow.com
ASP.Net has a LOT of new and very impressive features. I was blown away when I tried it (so were my co-workers). It's nice to have "Ajax-like" controls, but that wasn't the selling point for me.
.Net framework. It has user groups and roles as well. Combined with profiles, these 2 things save me about half the work on most projects.
:)
... Been a good time, but the ride's over. ASP.Net 2.0 is like a revolution. A next generation tool/platform. Microsoft have really done a great job of it. Once it's out on November 7th, I think it'll start getting a lot of well-deserved attention, and eventually get adopted by a lot of companies. I've already got myself ASP.Net 2.0 beta hosting :) I'm not looking back to anything else anymore.
A few new things...
Complete separation of code and HTML (code behind). No more generated-on-the-fly HTML by some snippets of code everywhere in your HTML (ala PHP). The code is compiled as well, and it'll run faster than all the parsed & interpreted stuff (like PHP). It makes it harder for others to shamelessly steal your code.
Caching! A new and very powerful feature. Pages have output caching - no need to render it every single time it's requested. It also caches the data source - no "trips" to the SQL server if the data hasn't changed. (Used with stored procedures, you get VERY fast and scalable app).
Sessions have been improved. They are shared across all webservers in a cluster. The new profiles are very powerful. No need to save or retrieve them either. As soon as a user logs in, you can start using their full profile and make modifications to it.
Login system (Forms, NTLM, etc). Are you sick yet of creating a new user manager for every new project? Well, that's history. With ASP.Net 2.0, you can have complete LogIn, CreateUserWizzard, ChangePassword, LostPassword solutions with exactly 0 lines of code to type - that's right! No code AT ALL! It's all taken care of by the
Sick of writing tons of javascript for onchange/onsubmit validation (as well as server-side validation) for every form? Well, again, there's form validation components. Nothing to code. Add them to your form (there's some RegExp validators too), and you're done. Major time saver!
Everything has excellent data binding (like, bind the "themes" or "skins" of all web controls to a user's preferences in his Profile - nothing to code at all!)
Tired of all the server side includes for headers/footers/menus? No need for that anymore! Master pages take care of it all.
WebParts let everybody pick different things they want (or don't) to see on their customized view of the webpage. Easy to use, and everybody has the web pages the way they want them. Definately welcomed!
New data access controls. More powerful, less code.
It's supposedly a LOT faster than J2EE.
Stability wise, it's a lot better too. It has health monitoring (can notify you) and it self-recovers.
Projects are easy to deploy on other servers.
And the new VS.Net 2005 really rocks
Have a peek! Guided Tour
I was wondering lately if I wouldn't be switching to another language/platform for web development, and I couldn't really pick anything superior. Well, I've found it. Nothing comes even close to it. It's not the usual "develop faster!" claims - this time it IS faster, you'll be amazed! And everybody else I've shown it to has adopted it too.
Bye bye Java, ASP, PHP,
I'm not going to go into a detailed rebuttal like the previous poster, but you've really missed the point. The only real generation of code are the helpers that create initial skeletons, no different than what IDEA or Eclipse do for you when you want a new class. These are starting point templates, no the sort of thing that the terms "round trip" or "two way" geneneration even apply.
Your generation comments on Rails are completely wrong. You would realize this if you tried it.
+1, Well Met. (-:
Got time? Spend some of it coding or testing
Try it before talking out of your ass. Its not an ad-hoc network cache system, its a simple, VERY FAST cache that stores objects in RAM. If you are too stupid to grasp why this helps, go read about how it saved livejournal thousands of dollars that they would have had to spend buying a huge DB server and still had worse performance.
...of urpmi "postgresql-server; createdb mydbname; psql mydbname" but has used Oracle a few times, I have to say: Amen, brother, amen!" (-:
Yes, sqlplus is one of Oracle's big minuses (and not just the lack of readline). Yes, I'm aware that there are many replacements and that Oracle has to be configurable in detail in order to be able to scale, but you shouldn't have to deal with all of that rhubarb up front. It should remain politely anonymous out of the box until you explicitly ask for it.
You should be able to type in one or two non-obscure commands and at that point be able to bang in SQL92 or whatever and get stuff running. You can do it in PostgreSQL, ibFirebird or (albeit slightly weirdly) MySQL and others, why not Oracle? Can't they afford to make it easy to use out of the box?
Got time? Spend some of it coding or testing
...grail or not, Ruby is a lot holier than any other scripting language I've used. Unless you try to treat it like Java or PERL, in which case it comes across about as well as a CoBOL programmer writing in C.
Got time? Spend some of it coding or testing
http://www.stripcreator.com/comics/arbi/290818
Microsoft and many others have been doing similar things for over a decade, and for money.
If I had to change what they were saying, it would be to add one word, "already", to their spiel to flag its immaturity for the sake of the innocent.
However, the whole situation is pretty much like a simple ballistics comparison transmogrified into software: J2EE has been flying for a lot longer, so it's higher in the air now, but by sighting along the trajectories you can easily see that RoR has a clearly greater base velocity and will fly both higher and further than J2EE. If there are performance bottlenecks, they will be coded around, and probably in far shorter order than they were on Java's timeline. Java and other languages have been doing a certain amount of trailblazing there already, so Ruby can simply reimplement only the roundest and most resilient of software wheels and use them rather than having to laboriously reinvent them from scratch and try each one out.
Is that enough metaphor soup for one day?
Got time? Spend some of it coding or testing
No, the fundamental advantage of dynamic languages is programmer productivity. You can accomplish a goal in a dynamic language like Scheme, Smalltalk, Python, or Ruby in 100 lines that would require 500 or more lines of Java. That's also an advantage when you have to modify the code--there's less of it and it's faster and easier to read as a result. It's also much simpler and faster to create unit tests in dynamic languages, leading to more and faster testing of projects. These advantages grow with the size of the project.
The other advantage of dynamic languages is flexibility. While Java has limited support for features like reflection and generics, dynamic languages have offered much more powerful and easy to use versions of these features for years. Java is also missing other dynamic features like closures and metaprogramming. Groovy's feature list is an inverted list of many of the limitations in Java's dynamic capabilities.
Java's main contribution to programming languages isn't any new feature. It doesn't have any significant new features, and most of its main features like object orientation, byte-compilation/VM and primitive concurrency were in other languages like Simula and Pascal in the 1960s or 1970s. Java's primary contribution is that it was well marketed and that its limited dynamic features have inspired a large number of programmers to want more of the flexibility that languages like Scheme and Smalltalk offered decades ago.
...so I still have to use PHP4 for anything involving iMagick calls.
Yes, I know. I was just pushing your buttons. (-:
Got time? Spend some of it coding or testing
It's clear that you've not had exposure to any great languages yet. (-:
Got time? Spend some of it coding or testing
...but like PERL, it just happens to be a useful "smooshy mess".
PERL is generally more consistent than PHP. When you consider PHP's history, this is completely unsurprising. It went from a simple CGI templating thingy to a Swiss Army Complete Web Engineering Corps that also does command-line, interactive graphics (including 3D), Flash, PDF and all manner of other stuff.
Got time? Spend some of it coding or testing
...by the time it rolls off the presses, makes its way through warehouses and parcel post to your doorstep, RoR will have been substantially improved. (-:
Got time? Spend some of it coding or testing
...they switched away from FreeBSD.
Got time? Spend some of it coding or testing
Zope is a hog, but it's also very quick development environment - until you hit a wall and have to rebuild big slabs of the Zope universe more or less from scratch in order to handle a small extra feature. Modulo that and heaps of server horsepower, it's extremely attractive.
Got time? Spend some of it coding or testing
Rails has multiple possibilities for caching web content at different granularities. You could at least have googled for "Rails caching" and incorporated the results in your posting to make it look as if you'd made a comparison.
Essentially everything but assembler and C/C++ uses some variant of "managed code that protects from errors", and Ruby is no exception.
The Ruby and Rails communities are very competent and helpful, and Rails itself is actually easy enough that you can read and understand the source code in a few days. I strongly dispute the claim that big real-world applications (that's those containing large amounts of business code, not just a dragged'n'dropped bunch of databound controls) require less code in ASP.NET than in Ruby. Ruby's OOP features and its meta-object protocol (i.e. runtime "hackability" of artifacts of the language itself) make it easy to write very clean, high-level, declarative code.
Let's just say that you may know something about J2EE and ASP.NET but not much else :-p
Hey this is all well and good but do you honestly believe that I really wish to learn ruby? Python does a simply smashing job for me and so does PHP.
Call me lazy but rails is not that great that I am going to invest time in yet another scripting language.
Although ajax architecture is the big buzz word because of google maps it is still damn messy to deal with from a programming aspect.
Now I am not a guy big on flash but take a look at a project with some potential like Lazslo. Now that is a great innovative use of a ajax type architecture that has some fantastic capabilities. Hell I just seen a tv ad promoting a application written in it....Lazslo not that is a innovative open source product....and no I have never even developed a lazso app but it exceeds anything I have seen thus far.
Got Code?
Go read David's blog. He makes up completely and utterly false claims about rails vs java all the time, just to stir up shit with java people. Rails is not under any circumstances 10 times faster to develop in than any java framework, but that's the claim he's always making. In fact, having used both rails and RIFE, rails isn't actually faster to use at all, but David still makes misleading comparisons on his blog of best case rails examples vs worst case rife examples to make it seem like rails is 10 times faster to use.
If your sole criteria for "better" is "less keystrokes", then rails is better, and so is not commenting your code and using single letter variable names. If you instead consider things like time to develop, time to maintain, performance, scalability, security, reliability, etc, then you will realize that some java frameworks will be better for some things, and rails will be better for other things, and that there's plenty of other options in other languages that are perfectly viable too. Trying to pretend rails is simply "better" than everything is rediculous.
Keep in mind, rails "scales" by spawning processes, which is slow and uses lots of memory. It also means that if someone tried to actually run a big site on rails like the rails zealots falsly claim you can, then you would end up with literally THOUSANDS of connections to your database server. So much for scaling. How you can possibly claim that rails is universally better than anything java has is beyond me. Think for yourself for a change, maybe even go try a few java frameworks before you making such rediculous claims.
And again, "available to use" does matter. Because you are comparing a version of rails that only exists in your imagination, to a vague concept you don't understand (J2EE). Compare what rails has now, what is really there. And compare an actual framework in java, not a vague concept of stuffy "enterprise" java. Or did you not realize there's many different frameworks you can use in java, with different strengths and weaknesses, so you can pick the one that best suites what you are doing.
There's something kind of karmic about this, really. Those big organizations get exactly what they want, and exactly what they deserve: a big smelly heap of J2EE. Why should we try to convince them of the technical superiority of our techniques, unless we actually care about the success of the institutions themselves? We have nothing to win -- if we're wrong, then we lose credibility; if we're right, then they get to take our good ideas.