"ruby on rails" with "ajax"

Ruby on Rails开发实践指南 本文介绍了Ruby on Rails开发中的多个实践操作,包括控制器与视图的编辑、模型字段验证、购物车功能实现、结账页面创建、Cookie设置、请求方法过滤、Ajax页面实现以及数据库配置等内容,适用于Rails初学者和开发者参考。 阅读详情

Ruby on Rails 跟 ajax 有一点联系,在 web development 中可以协同使用。
ajax的应用越加广泛,可以被整合到各种应用中,Ruby on Rails 可算一例。

Ruby on Rails Koolaid, Redux

Excuse me for a moment while I eat crow with some humble pie for dessert...

In February, after reading Curt Hibbs' Rolling with Ruby on Rails, I posted a blog entry titled Ruby on Rails Koolaid. That blog entry was based solely on Curt's article: I took issue with his assertion that development with Rails was at least 10 times faster than with any Java framework.

I took a fair bit of abuse for that post and it seems that even 6 months later, some folks are still upset with me. I must say though, that Curt has been most gracious even though I publicly disputed his claims.

In retrospect, my post was stupid and irresponsible. To publicly disparage claims about a framework I knew nothing about was wrong, not to mention just plain dumb, and to those I offended, I offer my sincere apologies.

So, with that out of the way, was Curt right? Is Rails development at least 10x as fast as your favorite Java web application framework? In a word: maybe. I would definitely agree with 5-10x as fast, but I'm not sure about numbers over 10. Note: my observations are based on about 1 month of Rails experience coupled with what I've read.

Why is development with Rails so much faster than with JSF, Tapestry, Struts, or whatever? The single biggest reason is zero turnaround time. You make changes to your application, refresh the browser, and voila, instantaneous feedback. For some, this might not be as appealing as it is for me. Coming from a SmallTalk background, I like to make tiny little changes quickly in succession. Some folks, like my friend Rob, who I worked with on my Cleveland job, like to write a ton of code before redeploying the app in the servlet container. In fact, I took quite a ribbing from Rob because I wasn't man enough to write large chunks of code at a time.

One thing that surprised me about Rails, once I started using it, was how robust it is. There are some very cool things in Rails: Active Record (Rails' ORM and the single biggest component of Rails) makes it drop-dead simple to write CRUD applications and from what I can tell, is robust enough to easily work with legacy databases; scaffolding gives you canned views and controllers, and although you will indeed replace nearly all of the generated scaffolding, it nonetheless provides a significant productivity boost; partial views are sort of Tiles-lite—you get ~70% of the functionality in Tiles (and SiteMesh, for that matter)—and partials are very simple to use (I've found that 70% to go a long way); convention over configuration lets you adhere to simple naming conventions instead of specifying tedious details in configuration files; 3 environments, one each for development, testing, and production, make each of those phases a little easier; testing baked into the framework makes it easy to implement tests, which means you're much more likely to actually write tests; and finally, Ajax support is absolutely killer in Rails.

Another thing that I didn't realize early on was how much Ruby shines through the Rails. With Ruby, you can, at runtime, add methods to classes, and Rails takes great advantage of this feature by stocking your models with methods that represent what's in database tables. That alone makes Rails very intuitive to use. And as I've said before, once you've been loosed from the confines of static type checking, you may never want to go back.

But of course, Rails is not perfect. For example, Rails suprisingly provides no built-in support for i18n or client-side validation. Yes, you can wrestle with get_text() and use that in conjunction with Rails to localize text, but who wants to endure that pain, not to mention, you've still got other i18n issues, such as unicode, localizing dates and times, etc. Frankly, I'm baffled by Rails' lack of support for i18n. Lack of client-side validation's not that big of a deal—especially now that we can easily use Ajax to validate w/o page refreshes—but lack of i18n support, especially in today's flat world, is hard to understand. And it's not like Rails users don't want i18n; I have recently witnessed Rails users drooling over the idea of resource bundles. Imagine.

And then there's the static type checking issue. I know some folks wouldn't dare to develop mission critical apps without stc, and I won't try to convince them otherwise (although the tight corset that Ada straps on wasn't enough to prevent the infamous Ariane 5 Rocket disaster). One thing about letting the wind blow up your skirt is that you've got to write tests. No choice, when things are this free and loose. Luckily Rails makes tests a breeze to write.

As most of you know, I was on the JSF 1.0 Expert Group, so you might be curious to know how I would compare Rails and JSF. We'll leave that to another post, or perhaps set of posts, but for now let me say one thing: JSF was created primarily for tool vendors, whereas Rails was created for developers. A fair percentage of what Rails does (perhaps 80-90%) could be implemented in a killer JSF-based IDE that featured incremental deployment, active record, etc., but we're simply not there yet in the JSF world. (Note: for Tapestry users, you might want to check out Trails. I haven't used it yet, but it looks interesting, although I'd rather do time in Jails 8-))

Everything Zen
Everything Zen
I don't think so

Everything Zen
from sixteen stone by Bush

Ruby on Rails中使用Ajax与控制器操作实践 本文介绍了在Ruby on Rails框架中,如何编写控制器方法进行Cookie设置、请求过滤、视图中使用Ajax更新和删除div内容,并实现页面动态交互效果,涵盖before_filter、link_to_remote、Effect.Squish等技术点。 阅读详情

相关推荐

Ruby on Rails学习笔记 (一)

  过去的一年多时间里净忙着准备出国,学习法语,然后就是在做一些很杂的事情,一直没有花多少时间在编程上。我的博士论文课题是《社会语义WEB》,也看了不少关于本体论和语义WEB方面的论文。前几天看到一篇关于本体论的文章,里面提到了很多目前非常流行的WEB2.0、TAG、AJAX相关内容。文章中我看到非常有趣的一段,大概是说:“从书籍销售情况就可以看出那种技术是当前最流行的技术,具体的数据我不太记得了

Beloved 4462

什么是Ruby on Rails

过去的一年多时间里净忙着准备出国,学习法语,然后就是在做一些很杂的事情,一直没有花多少时间在编程上。我的博士论文课题是《社会语义WEB》,也看了不少关于本体论和语义WEB方面的论文。前几天看到一篇关于本体论的文章,里面提到了很多目前非常流行的WEB2.0、TAG、AJAX相关内容。文章中我看到非常有趣的一段,大概是说:“从书籍销售情况就可以看出那种技术是当前最流行的技术,具体的数据我不太记得了,只

在路上 3261

2D激光slam数据集的下载与测试

参考博客: https://blog.youkuaiyun.com/qq_24894159/article/details/81265991 https://blog.youkuaiyun.com/fk1174/article/details/52673413#commentBox 数据集下载与生成 下载数据集 下载网址: http://ais.informatik.uni-freiburg.de/slamevaluation/datasets.php 进去网站后点你想下载的对应的"download log file" 然后你

老李的博客 4025

ajax ruby,在Ruby on Rails中使用AJAX的教程

如果没有听说过 Rails,那么欢迎您外星旅行归来,近几年大概只有那个地方没有听说过 Ruby on Rails 了。Rails 最吸引人的地方是能够很快地建立功能完备的应用程序并运行起来。Rails 为 Ajax 而内置集成的 Prototype.js 库可以轻松快速地创建所谓的富 Internet 应用程序。本文将逐步引导您创建 Rails 应用程序。然后深入分析如何利用 Ajax 特性编写从...

weixin_35985162的博客 452

MYSQL、ORACLE、PostgreSQL数据库对象层次及权限管理对比

本文为出于自己扩展、比较、图形化的思维路径自行总结归纳,可能有些细节不太准确,欢迎指正。MySQL、Oracle、PostgreSQL关系型数据库都有管理员用户、用户、权限管理、表函数索引等数据库对象,schema。但在数据库对象隶属层次上有差异和相同的地方。

rachel_2016的博客 1490

MTGS与3D高斯泼溅:如何用多轨迹数据重建自动驾驶场景(附代码解析)

本文深入解析了MTGS(多轨迹高斯泼溅)技术在自动驾驶场景重建中的工程实践。该方法通过分层场景表示,巧妙融合多轨迹数据,利用3D高斯泼溅技术统一处理静态几何与动态物体,有效解决了复杂环境下的重建难题。文章结合代码,详细阐述了其实现框架、损失函数设计及优化策略,为构建高保真数字孪生场景提供了实用指南。

v5w6x的博客 446

Python Django还是Ruby on Rails

这篇文章可能比较老了,不过也可以当作框架学习的背景知识:     看了limodou 在上期程序员杂志推荐的Python Django框架,于是选择Django用来书写热点自动发现的Web界面。Python本身的优势、友好的URL、方便的template、MVC,都是让书写Django顺畅|好心情的原因。    ;    但是再往下,还是有点担心。一是Ajax,“Ajax Wit

icodec的专栏 2529

Yolov5 多边形标签转换,所有json文件自动转成txt格式[详细过程]

注:labelme是麻省理工(MIT)的计算机科学和人工智能实验室(CSAIL)研发的图像标注工具,人们可以使用该工具创建定制化标注任务或执行图像标注,项目源代码已经开源。通过labelme对图进行标注后,得到的是json文件,而Yolov5对数据进行模型构建的时候,读取需要的是txt格式的文件。txt_outer_path——保存txt文本的文件夹的绝对路径。json_name——json_name是json文本的名字。json_floder——读取json的文件夹的绝对路径。

Pandas_007的博客 1万+

ruby语言开源Web应用框架 Ruby on Rails 简介

目录 Ruby on Rails是什么 历史 Rails 的 MVC 架构 Web 服务器支持 数据库支持 系统要求 集成开发环境 Ruby on Rails是什么 Ruby on Rails(官方简称为 Rails,亦被简称为 RoR)是一个使用Ruby语言写的开源Web应用框架,它是严格按照MVC结构开发的。它努力使自身保持简单,来使实际的应用开发时的代码更少,使用最少的配置。 Ruby on Rails(官方简称为 Rails,亦被简称为 RoR),是一个使用Ruby语言写的开..

whatday的专栏 2463

验证(uvm常见问题)--子类和父类的句柄和对象问题

sv中的子类和父类 在sv中,有如下两个类,child继承于parent。然后在test module中,正确转换的方法如下面所示。其中c1,c2,p1 都指向了同一个子类的对象c1。总结如下: 一个子类的对象是包括子类的成员变量,方法和父类的成员变量,方法。 子类的句柄c1可以直接赋值给父类的句柄p1,此时p1只可以访问父类的成员变量和方法,或者子类的虚方法,比如下面调用p1.display是...

q876507447的博客 7633

GD32单片机引脚复用指南:如何让JTAG接口的PA15/PB3发挥第二功能?

本文详细介绍了GD32F103Cx系列单片机如何通过AFIO模块进行引脚复用,特别是将默认用于JTAG调试接口的PA15、PB3等引脚释放为普通IO或复用功能引脚。文章从原理出发,结合代码实践,讲解了如何配置调试端口重映射,将JTAG引脚安全地转换为GPIO或定时器通道,并提供了常见问题排查与最佳实践,帮助开发者高效利用有限的引脚资源。

nept的博客 810

跨越边界: Ajax on Rails

转自IBM技术网站对 Ajax 这种使 Web 页面更具交互性的技术的大肆宣传已成过度之势。Ruby on Rails 框架和 Ajax 的完美集成所产生的力量在一定程度上促成了该框架的繁荣。本文旨在揭示:是什么使 Ajax on Rails 成为如此强大的组合。 跨越边界 系列之前的两篇文章(参见 参考资料)全面介绍了 Streamlined,这是 Rails 的辅助框架,该框架

goody9807的专栏 631

Vue项目实战:用DataV的dv-scroll-board打造高颜值滚动表格(附完整代码)

本文详细介绍了如何在Vue项目中使用DataV的dv-scroll-board组件打造高颜值滚动表格。从基础集成到高级配置,包括动态数据处理、深度样式定制、性能优化策略以及交互增强方案,帮助开发者快速实现企业级数据展示需求。特别针对样式优化和滚动表格的常见问题提供了实用解决方案。

weixin_30892037的博客 499

ruby on rails_Ruby on Rails RoR

ruby on rails Ruby on Rails(RoR) (Ruby on Rails (RoR)) Ruby on Rails, also known as RoR or Rails web framework is a free written in Ruby. It follows the design pattern Model-View-Controller MVC also a...

culu1614的博客 355

华为OD机试真题 新系统 2026-04-19 C语言 实现【8位LED控制器】

有一个8位LED控制器,包含8个LED灯(编号0-7),初始状态全灭,用8位二进制表示为:00000000。控制器可以接收以下三种指令: Lx:L表示点亮操作,x表示LED的编号(0一7),操作得到的结果是:点亮第x个LED灯,把状态设为1。 Dx:D表示熄灭操作,x表示LED的编号(0-7),操作得到的结果是:熄灭第x个LED灯,把状态设为0。 Tx:T表示切换操作,x表示LED的编号(0-7),操作得到的结果是:切换第x个LED灯的状态,若状态为0则变为1,为1则变为0。 现在给定一组指令字符串(0<

MISAYAONE的博客 149

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

23个优秀的开源Ruby On Rails应用

Ruby on Rails是一个功能强大的web框架,使创建Web应用变的更容易,更快捷。有很多网站都使用它,例如流行的Twitter,Basecamp, AboutUs 等…   我们将为您介绍23个开源的Ruby on Rails的应用程序:   Project, Task &amp; Time Management Notes Notes是一个易于使用的to-do-...

shen2006的专栏 769

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

rails ajax 书籍,Ruby on Rails - AJAX

Ruby on Rails - AJAXAdvertisementsAjax stands for Asynchronous JavaScript and XML. Ajax is not a single technology; it is a suite of several technologies. Ajax incorporates the following −XHTML for th...

weixin_39833454的博客 183

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

ruby on rails 4 中利用 remote:true 实现 ajax ,小记

_form.html.erb true do |f| %> postcontroller.rb def new @post = Post.new respond_to do |format| format.html format.json { re

beslow的专栏 5025

一个使用Ruby on Rails开发LBS网站的简单实例

使用Ruby on Rails开发LBS网站 cheungmine 这几天一直在学习使用RoR(Ruby on Rails),想建立一个功能全面一点的LBS(Location Based Service)网站。但是对于我这个RoR的初学者(仅有几天时间)来说,毕竟太复杂了。尤

恒 1万+

Ruby On Rails中REST API使用示例——基于云平台+云服务打造自己的在线翻译工具

做为一个程序员可能在学习技术,了解行业新动态,解决问题时经常需要阅读英文的内容;而像我这样的英文小白就只能借助翻译工具才能理解个大概;不禁经常感慨,英文对学习计算机相关知识太重要了!最近发现IBM的云平台Blumemix,并且提供语言翻译的服务,感觉不错,就拿来研究学习一下;这里就分享一下我的研究学习过程,如何使用Ruby On Rails调用REST API打造自己的在线翻译工具,并演示如何把它

无知人生,记录点滴 8382

视图模板开发利器:Ruby on Rails TextMate Bundle的ERB与Builder支持终极指南 [特殊字符]

Ruby on Rails TextMate Bundle是一款专为Rails开发者设计的强大编辑器插件,它彻底改变了视图模板的开发体验。这款工具包通过智能代码补全、快速导航和丰富的代码片段,让ERB和Builder模板的开发变得异常高效。对于任何使用TextMate编辑器进行Ruby on Rails开发的程序员来说,这个Bundle都是不可或缺的生产力工具。 ## 🔍 什么是Ruby on

gitblog_00793的博客 1047

Ruby on Rails: Up and Running

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。http://blog.youkuaiyun.com/topmvp - topmvpRuby on Rails is the super-productive new way to develop full-featured web applications. With Ruby on Rails,

TopMVP 549

如何在Ruby on Rails中获得当前的绝对URL?

如何在Ruby on Rails视图中获取当前的绝对URL ? request.request_uri仅返回相对URL。

p15097962069的博客 671

ajax on rails,Ajax success callback in ruby on rails

问题Hi want to implement ajax in my ruby on rails tutorials and the controller will return an object on handling the ajax request. I dont know to handle the response in my javascript file.I want to upda...

weixin_39538500的博客 179

Ruby on rails 实战圣经:入门导览->Ruby on Rails 简介

Ruby on Rails 简介 “Life’s too short tobuild something nobody wants” - Ash Maurya, Running Lean 作者 Ruby on Rails是一套非常有生产力、维护性高、容易布署的Web开发框架。从一开始不知名的玩具,到现在它已经成为全世界Web应用程序开发的首选框架之一。进入学习的旅程之前,我们先了解为什么它如

607
上一篇: AJAX
debren
博客等级 码龄25年 2粉丝 43原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值