레일에서 루비
때때로 Rails가 Ruby와 거의 동의어가되는 시점까지, 우리 회사는 Ruby on Rails가 아닌 Ruby를 사용하는 세계 유일의 회사라고 생각합니다.
나는 이것이 사실이 아니라고 확신하지만, Rails Ruby가 아닌 사용법에 대한 이야기를 듣는 것은 재미있을 것입니다.
Ruby의 큰 장점 중 하나는 DSL을 매우 쉽게 만들 수 있다는 것입니다. 루비를 사용하면 비즈니스 분석가가 쉽게 사용할 수있는 자연 언어로 "비즈니스 규칙"을 작성할 수 있습니다. 웹 개발 이외의 많은 Ruby 앱이이 목적으로 존재합니다.
나는 훌륭한 독서를 위해 Googling "ruby dsl"을 강력히 추천하지만, 특히 하나의 게시물을 남기고 싶습니다. Russ Olsen은 DSL 에 관한 두 부분으로 구성된 블로그 게시물 을 작성했습니다 . 나는 그가 DSL에 관한 프리젠 테이션을하는 것을 보았고 매우 좋았다. 이 게시물을 읽는 것이 좋습니다.
또한 Obie Fernandez의 Ruby DSL에 대한 훌륭한 프레젠테이션을 발견했습니다 . 추천하는 독서!
나는 작업에서 Ruby를 광범위하게 사용하며 그 중 어느 것도 Rails (또는 웹) 기반이 아니다.
내 도메인은 일반적으로 클라이언트 측 Windows 응용 프로그램 (wxRuby GUI) 및 스크립트이며 Excel, Internet Explorer, SQL Server 쿼리 및 보고서 생성 (win32ole COM 자동화)을 자동화합니다. 또한 다양한 데이터 융해 및 그래프 생성 작업에 sqlite, pdf-writer 및 gruff 라이브러리를 사용합니다.
Rails의 성공은 Ruby에게 큰 영향을 주었지만 Rails는 웹을 넘어서는 Ruby의 가치를 간과하기 위해 많은 관심을 받았다는 데 동의합니다.
우리는 주로 C ++ 상점이지만 Ruby가 매우 유용한 것으로 입증 된 여러 영역을 발견했습니다. 몇 가지가 있습니다 :
- 코드 생성-단일 입력 파일에서 C ++ / Java / C # 코드를 생성하기위한 여러 DSL 구축
- 지원 구축
- Visual Studio 프로젝트 파일에서 유닉스 용 Makefile을 생성하는 스크립트
- 프로젝트를 빌드하고 크루즈 컨트롤의 출력 형식을 지정하는 스크립트
- 단위 테스트를 실행하고 크루즈 컨트롤의 출력 형식을 지정하는 스크립트
- 명령 줄에서 Visual Studio 프로젝트 및 솔루션을 조작하기위한 스크립트
- 통합 테스트-C ++보다 Ruby를 사용하여 테스트를 훨씬 빠르고 깨끗하게 할 수 있습니다
- QA의 전체 테스트 스위트는 Ruby로 작성되었습니다.
루비는 기본적으로 내가 이해하기 쉬운 도구를 찾는 곳입니다. 그리고 그것은 많은 곳에서 의미가 있습니다.
Google Sketchup 은 Ruby를 임베디드 스크립팅 언어로 사용합니다. 이를 사용하여 모든 종류의 3D 모델링 및 가져 오기 / 내보내기 작업을 수행 할 수 있습니다. 스크립팅은 무료 버전에서 작동하며 문서 도 괜찮습니다 .
C ++로 작성된 homebrew 확장 기능을 가진 Ruby는 내 사진 처리를 위해 모든 픽셀을 밀어 넣습니다. 파이썬 + 숫자를 사용하고 있었지만 예술적인 일을 할 때 루비는 더 재미 있습니다. 또한 좋은 이미지 처리 라이브러리가 상대적으로 부족하거나 성숙도가 낮기 때문에 휠을 재발 명하는 것처럼 느끼지 않습니다. 내가들은 것 외에는 Rails에 대한 실마리가없고, 그것이 무엇인지 모호한 아이디어를 가지고 있으며 실제로 그것에 관한 책이 있습니다 (열지 않은 상태)
우리는 사용 Watir과 우리의 .NET 웹 응용 프로그램을 테스트 (루비 라이브러리).
초보자 프로그래머를 대상으로 Ruby에서 GUI를 빌드하기위한 간단한 API 인 Shoes를 확인하십시오 .
또는 Ruby를 사용하여 음악을 Giles Bowkett의 Archaeopteryx로 만들 수도 있습니다. Giles의 시조새에 대한 이 프레젠테이션 은 지금까지 최고의 프레젠테이션 중 하나입니다. 나는 그것을 강력히 추천합니다.
RubyCocoa 및 MacRuby. Rails없이 완전한 Cocoa 기반 GUI 앱을 만들 수 있습니다. 그런 다음 Interface Builder도 사용하십시오.
나는 작년에 많은 루비를 사용한 박물관 프로젝트에서 일했습니다. ( http : // http : //ourspace.tepapa.com/home )
내가 대부분의 시간을 보낸 부분은 대화식 플로어 맵이었습니다. 바닥의지도에는 센서가있어 사람들이 걸어 다니면 조명이 트리거되고 벽에 표시되는 이미지 나 비디오 및 오디오 트랙이 재생됩니다.
전시회의이 부분에 대한 모든 제어 코드는 루비입니다. 플로어 센서 및 조명 컨트롤러와 통신하기 위해 루비 래퍼로 C 인터페이스를 작성했습니다. 시스템은 미디어 파일을 표시하기 위해 MYSQL 데이터베이스를 쿼리 한 다음 벽에있는 컴퓨터에 UDP를 통해 미디어를 재생하도록 지시합니다.
전체 전시회에서 가장 신뢰할 수있는 부분입니다.
루비는 전시의 다른 주요 부분으로 사용되었지만 벽과는 관련이 없었습니다. 대부분의 그래픽은 순수한 Obj-C로 포팅되기 전에 약간의 Cocoa 및 물리 라이브러리 인 OpenGL에 대한 인터페이스를 사용하여 루비로 프로토 타입되었습니다.
꼭두각시와 요리사 : DevOps
나는 도착하기 전에 30 답변에서 Puppet 또는 Chef 에 대한 언급을 보지 못했습니다 . 루비는 클라우드 자동화 분야의 현재 작업을 지배하는 것으로 보이며이 두 대기업의 기본, 확장 및 템플릿 언어입니다. 주로 서버 배열 및 일반적인 IT 워크 스테이션 관리를위한 시스템 및 응용 프로그램 구성 정보를 배포하는 데 사용됩니다.
개발 운영의 필드는 매우 루비 알고있다. 오늘날 펄은 경쟁자가있다. sh(1),
복잡한 작업을 위해 실제로 간단한 스크립트를 직접 작성하는 경우가 많지만 이제는 Perl 대신 Ruby로 수행 할 수 있습니다.
내가 직장에서 루비로 한 유일한 사이트는 Rails를 사용하는 것이지만 Merb 을 시도하고 싶습니다 .
그 외에는 루비에서 많은 유틸리티 프로그램을 사용합니다. 예를 들어 RSS 피드를 읽고 새 게시물을 dabase로 가져 오는 앱이 있습니다.
재밌기 때문에 너무 빠르기 때문에 바보 같은 것들도 씁니다. 어제 나는 친구가 교수님이 교수가 올바른 전략이라고 확신하도록 돕기 위해 Monty Hall 문제를 100,000 번 재생하는 앱을 작성했습니다 .
나는 루비가 난간이라고 거의 모욕합니다. CGI가 최신 트렌드 였을 때와 비슷합니다. 모든 사람들이 Perl을 알고 있다면 CGI 앱을 프로그래밍했기 때문에 CLR을 프로그래밍해야한다는 것을 모두 알고있었습니다. 루비는 단지 스크립팅 언어이지만 파이썬만큼 성숙하지는 않았지만 일부 농구와 최근 변경 사항을 뛰어 넘어야하는 것을 후회하지만 여전히 좋아하고 사용합니다. 자바 상점에서 일하고 있기 때문에 그루비는 스크립팅 언어에 이상적인 선택이지만 여전히 루비를 집에서 사용하고 직장에서 공유 할 필요가없는 스크립트는 버립니다.
I was considering getting into RoR from all the buzz and how quick/simple it is, but after looking over rails I didn't see anything at all that was amazing or even the least bit innovative or rapidly fast about its development compared to any other framework. The only benefit I saw was that I could code in ruby, which would be nice, but initial setup, server maintenance and scaling is more difficult, thus re-offsetting the pleasure of coding in ruby.
I created a presentation -- coincidentally named Off The Rails -- to discuss Rack-based web applications:
https://github.com/alexch/Off-The-Rails
The git repo includes slides in Markdown format and sample code (in the form of running applications and middleware). Here's the abstract:
Ruby on Rails is the most popular web application framework for Ruby. But it's not the only one! If you think Rails is too big, or too opinionated, or too anything, you might be happy to learn about the new generation of so-called microframeworks built on Rack. And since Rails 3 is itself a Rack app, you don't have to give up Rails to get the benefit of Sinatra routes or Grape APIs.
And here are some references:
- This talk lives at https://github.com/alexch/off-the-rails
- Yehuda's #10 Favorite Thing About Ruby
- Rack
- Sinatra
- Grape
- Vegas
- Siesta
- Rerun
Hope you find it useful!
I'm mostly a Web developer, and I learned Ruby to use Rails, but I like the language so much that I started developing a desktop Swing application in Ruby, using JRuby and Monkeybars. I'm competent in Java, but don't much like using it, and the Swing API is horrible, so putting Ruby on top has been a big win.
We mainly use rails, but we have plenty of other non-rails ruby things - for example a standalone authentication daemon thing for centralized authentication of users, and an 'image processing server' which runs arbitrary numbers of ruby processes to process images in parallel.
Oh, and don't forget good old Rake :-)
Ruby is also used for Desktop application. Especially the use of JRuby to develop Swing desktop application.
I've used Ruby at work for
- A data extractor, generating csv files from binary output.
- A .ini file generator, turning a simple syntax into a repetitive .ini format.
- A simple TCP/IP server, acting as stand-in for the customer's system during testing.
We use Ruby to implement our test automation software. This includes test framework and driver code for Selenium RC, WATIR and AutoIT.
Ruby is powerful enough to create comprehensive applications that can interface with Test tools like Selenium or WATIR, while at the same time reading from data files, interacting with a remote Windows UI and performing near transparent network communication. All while running on Windows or Linux.
The uncluttered syntax makes it ideal for new and inexperienced programmers to read. While its totally OO nature makes it easy for these same programmers to apply good (recently learned) OO techniques, from the start.
The flexible nature of Ruby's syntax also makes the use and creation of DSLs much easier. This allows less-technical people to get invovled, read and possibly create there own tests.
I have used Ruby for code generation of C# and T-SQL stored procedures in a project with unstable requirements. The data model was encoded in a YAML file and .erb templates were used for the classes and stored procedures. It also allowed for a much more DRY solution than would have been possible with straight C# as repetitve code could be factored out into a single method in the code generator.
Where I work, we use Ruby to do a number of different one-off type batch jobs. One example of that is a job that interacts with Amazon's S3 service. At the time, the Ruby S3 library was probably the easiest one out there for us to get up and running in a short amount of time.
I wrote an order processing expert system (see DSL answer as well), converted 100k lines of customer specific perl into about 10k lines of ruby handling dozens of customers. No web components at all, no Rails.
I am a webdriver user. ruby is used by webdriver for automating the build process thanks to rake. see http://code.google.com/p/webdriver/ for details
Heh, great question.
I used Ruby to convert Excel spreadsheet airport facility data to sqlite3 for the android phone platform while making an app for pilots.
I use Ruby with Sinatra which is much simpler than Rails. I did use Rails but just found that it has turned into a bit of a monster, although Rails is still amazing compared to web frameworks available for Java.
The main feature of Ruby that I love however is "eval" and "method_missing", which Rails actually uses for example in ActiveRecord so that you can use the amazing "find_by-field-name-" queries.
I used Ruby for a lot of back-end code simply because I was the only person who was tasked to do it and needed a nice clean language that allowed me to be very productive and write easy to maintain code. I find Ruby allows me to do that easier than Perl and Python. Other people's mileage might vary on that but it works well for me.
Besides that, I like how Sequel and Nokogiri work. I also used ActiveRecord for a while separately from Rails.
We use some Ruby for file manipulation but have not been able to incorporate rails yet.
I've used Ruby a lot professionally for quick scripts for things like shuffling files around. I'm the same way in that I was using Ruby first before touching Rails at all.
In Boulder there was an excellent group of Ruby users who met monthly. This point was made - that Ruby does have an existence beside its use in Rails. Plain Ruby users do exist, are begging for attention, have neat things to show, and can find each other at user group meetings.
They also had better pizza than the Python group, who met also the same day of the month. Can only pick one...
While we do have several Rails apps at work, we also use Ruby for some fairly intensive non-web stuff.
We've got an SMS delivery daemon, which pulls messages from a queue and then delivers them, and credit card processing daemon which other apps can call out to, which makes sure there's a central audit trail.
참고URL : https://stackoverflow.com/questions/150638/ruby-off-the-rails
'development' 카테고리의 다른 글
WPF에 Main ()이 없습니까? (0) | 2020.07.24 |
---|---|
std :: array와 std :: vector의 차이점은 무엇입니까? (0) | 2020.07.24 |
LINQ, Where () 및 FindAll () (0) | 2020.07.24 |
포인터, 스마트 포인터 또는 공유 포인터? (0) | 2020.07.24 |
입력 옆에 레이블을 형태로 정렬 (0) | 2020.07.24 |