Archive for Ruby on Rails

AJAX frameworks

As I posted the basics of AJAX yesterday, immediately I wanted to checkout the list of available frameworks for AJAX. Whoa, the below links will show you different frameworks available.

And of course Rails already comes built with Ajax capabilities and you can do wonders out of the box without looking for any frameworks.

Blink this AJAX frameworks at blinklist.com    Bookmark AJAX frameworks at blogmarks    Bookmark AJAX frameworks at del.icio.us    Digg AJAX frameworks at Digg.com    Fark AJAX frameworks at Fark.com    Bookmark AJAX frameworks at Furl.net    Bookmark AJAX frameworks at NewsVine    Bookmark AJAX frameworks at reddit.com    Bookmark AJAX frameworks at Simpy.com    Bookmark AJAX frameworks at Spurl.net    Bookmark AJAX frameworks with wists    Bookmark AJAX frameworks at YahooMyWeb

Comments      Cosmos

Job Scheduler

Suppose your web application needs to run something on a periodical basis. Say for example every day at midnight you want to send a quote to all your subscribers. So you need a scheduler that can trigger off a process which will call appropriate action in your application that will get a quote from the database, get the list of subscriber’s mail id and send out a mail to each subscriber. This scheduler is the key to make sure that a specific action gets triggered in your application at a scheduled time. The following are the job scheduling frameworks available for different technologies.

“Quartz is a full-featured, open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application - from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components or EJBs. The Quartz Scheduler includes many enterprise-class features, such as JTA transactions and clustering.

Quartz is freely usable, licensed under the Apache 2.0 license.”

“Schedule and run server-side tasks from your ASP.NET applications. PortSight Task Scheduler is a component for ASP.NET applications that can be used for scheduling an immediate or recurring execution of server-side tasks. Since the tasks are executed on the server, they can run asynchronously and under a privileged account. It allows you to execute long-running and resource intensive tasks. You can also serialize your tasks to avoid concurrent access to shared resources and possible locks, which makes your applications more robust and available”

PortSight is commercial but is available for trial.

“RailsCron is a way to execute background tasks using your Ruby on Rails environment. The RailsCron object is an ActiveRecord, so you can manipulate it in familiar ways”

Also a ruby program can be written to run as cron job. The book “Enterprise integration with Ruby” has some insights on creating services and daemons.

Blink this Job Scheduler at blinklist.com    Bookmark Job Scheduler at blogmarks    Bookmark Job Scheduler at del.icio.us    Digg Job Scheduler at Digg.com    Fark Job Scheduler at Fark.com    Bookmark Job Scheduler at Furl.net    Bookmark Job Scheduler at NewsVine    Bookmark Job Scheduler at reddit.com    Bookmark Job Scheduler at Simpy.com    Bookmark Job Scheduler at Spurl.net    Bookmark Job Scheduler with wists    Bookmark Job Scheduler at YahooMyWeb

Comments      Cosmos

Rails Engine

I was glancing through dzone as usual today and the blog link on “Rails Engine: A Short Introduction” caught my attention.  I went through it which led me to the Rails Engine plugin site.  It looks like the rails community is continuing to make developers life simpler.  This engine addresses common feature requirements that are part of most of the projects.  Example is the login functionality.  You just need to say the model that corresponds to the user table, and the engine on the fly can bring login and registration screens.  Of course the default one created by the engine is crude; it is simple to modify to suit your application style.  And as usual, a cool movie demonstration of using the engine is available.  Way to go!

Blink this Rails Engine at blinklist.com    Bookmark Rails Engine at blogmarks    Bookmark Rails Engine at del.icio.us    Digg Rails Engine at Digg.com    Fark Rails Engine at Fark.com    Bookmark Rails Engine at Furl.net    Bookmark Rails Engine at NewsVine    Bookmark Rails Engine at reddit.com    Bookmark Rails Engine at Simpy.com    Bookmark Rails Engine at Spurl.net    Bookmark Rails Engine with wists    Bookmark Rails Engine at YahooMyWeb

Comments (1)      Cosmos

Using Rails to increase J2EE development productivity

At Compassites we have project developments on Ruby on Rails and J2EE. Now that we have realized the power of rails and its power to create rapid application development we are using it to boost our development productivity on the J2EE applications as well. As we are executing our projects using eXtreme programming techniques, development happens as and when requirements are clear. But this also means that we assume certain dependencies of incomplete requirements. There might be a data dependency from a requirement that is not complete. In such situations with the available information we create temporary table structures. When the business analysts and the testers test the application at the end of an iteration they need to have some valid content in these temporary tables.

We create the CRUD (create, read, update, delete) screens rapidly using ruby on rails that connects to the same database as the application does. Then the BA’s and testers use the rails application to add the data they want through these CRUD screens . Even in the development environment it saves a lot of time to manipulate these temporary tables and none of us have to run SQL against the database or need to understand to use a database tool. Since the rails application is throw away, we don’t need to add any validations, error or exception handling checks. So within minutes the CRUD screens are ready for use. This is like data mocking equivalent to the object mocking.

Blink this Using Rails to increase J2EE development productivity at blinklist.com    Bookmark Using Rails to increase J2EE development productivity at blogmarks    Bookmark Using Rails to increase J2EE development productivity at del.icio.us    Digg Using Rails to increase J2EE development productivity at Digg.com    Fark Using Rails to increase J2EE development productivity at Fark.com    Bookmark Using Rails to increase J2EE development productivity at Furl.net    Bookmark Using Rails to increase J2EE development productivity at NewsVine    Bookmark Using Rails to increase J2EE development productivity at reddit.com    Bookmark Using Rails to increase J2EE development productivity at Simpy.com    Bookmark Using Rails to increase J2EE development productivity at Spurl.net    Bookmark Using Rails to increase J2EE development productivity with wists    Bookmark Using Rails to increase J2EE development productivity at YahooMyWeb

Comments      Cosmos

Ruby for enterprise applications

With Ruby on Rails (ROR) getting so much popularity recently, I am sure any techie would have had this thought, but for how complex projects can ROR support? How about enterprise applications? You would also get the answer that any language/technology would take its own time to mature and be ready for any type of problem/complexity. Said that there is also a question should it really meet all complexity requirements? I think a variety of language/technology choices for different complexity level of projects is always better than any language/technology choice trying to mature and cover up all problem spaces. Anyway here is an article in enterprise open source journal on “Bringing Ruby to the enterprise” that talks about where Ruby stands.

Blink this Ruby for enterprise applications at blinklist.com    Bookmark Ruby for enterprise applications at blogmarks    Bookmark Ruby for enterprise applications at del.icio.us    Digg Ruby for enterprise applications at Digg.com    Fark Ruby for enterprise applications at Fark.com    Bookmark Ruby for enterprise applications at Furl.net    Bookmark Ruby for enterprise applications at NewsVine    Bookmark Ruby for enterprise applications at reddit.com    Bookmark Ruby for enterprise applications at Simpy.com    Bookmark Ruby for enterprise applications at Spurl.net    Bookmark Ruby for enterprise applications with wists    Bookmark Ruby for enterprise applications at YahooMyWeb

Comments      Cosmos

Using Mock Objects when unit testing

Unit testing is important and a developer has to create unit test code to automate the unit testing process. But it is always that the code the developer has written is dependent on code that would be written by some other developer. When that code is not be ready yet, it will be difficult for developer 1 to write his/her unit test code. To make it simple, lets say developer 1 develops code for class A and class A is dependent on class B. Class B has to be done by another developer or let’s say that the design is not ready yet to write code for class B.

So how does developer 1 create his unit tests when the dependent class is not ready? The answer is to mock the code B. The mock object is a dumb object having same method and field signatures but with a different class/program name (example BMock) and the methods always return back a static output. The mock object is a temporary object to fool the test case of object A that the functionality dependency will be met by the class BMock. Once the actual class B is ready, it is just a matter of replacing the BMock declaration and instantiation to B. Now this process can even be made simpler when coding to an interface. The Mock object is an implementation of the same interface that the actual implementation would implement. In this case the changes necessary after the original implementation is available will be minimal.

Mocking frameworks help in creating mock objects to reduce the additional effort required to create these classes. There are several mock frameworks. Some of them listed below.

  1. EasyMock - Generates mock objects for interfaces on the fly
  2. JMock - Lightweight framework that can be extended and configured
  3. rMock - Another framework for Java that can be used with JUnit
  4. EasyMock.net - EasyMock for the .Net environment
  5. MockR - Mock for Ruby

To kick start with EasyMock, here is a good article “Getting started with EasyMock“.

Blink this Using Mock Objects when unit testing at blinklist.com    Bookmark Using Mock Objects when unit testing at blogmarks    Bookmark Using Mock Objects when unit testing at del.icio.us    Digg Using Mock Objects when unit testing at Digg.com    Fark Using Mock Objects when unit testing at Fark.com    Bookmark Using Mock Objects when unit testing at Furl.net    Bookmark Using Mock Objects when unit testing at NewsVine    Bookmark Using Mock Objects when unit testing at reddit.com    Bookmark Using Mock Objects when unit testing at Simpy.com    Bookmark Using Mock Objects when unit testing at Spurl.net    Bookmark Using Mock Objects when unit testing with wists    Bookmark Using Mock Objects when unit testing at YahooMyWeb

Comments (1)      Cosmos

Oops a mistake!

I made a mistake in my post “Useful Resource #4 - Setting up ruby on rails on eclipse“. There is an eclipse update site link available in the RadRails site using which you can install rails as a plugin in eclipse. Thanks to Matt Kent @ radrails who pointed this to me. I missed it and touched my nose round about. Sorry about that.

Blink this Oops a mistake! at blinklist.com    Bookmark Oops a mistake! at blogmarks    Bookmark Oops a mistake! at del.icio.us    Digg Oops a mistake! at Digg.com    Fark Oops a mistake! at Fark.com    Bookmark Oops a mistake! at Furl.net    Bookmark Oops a mistake! at NewsVine    Bookmark Oops a mistake! at reddit.com    Bookmark Oops a mistake! at Simpy.com    Bookmark Oops a mistake! at Spurl.net    Bookmark Oops a mistake! with wists    Bookmark Oops a mistake! at YahooMyWeb

Comments      Cosmos

Selenium

Selenium is a web testing tool that runs on the browser and imitates like a user operating the application. Selenium is an excellent tool to automate some of the functionality tests. The Selenium IDE which is a firefox extension can help in recording and playing back the actions on a web application. The recorded script can be stored as a test case and run any time. Selenium on Rails is a plugin for rails that can help testing rails application easily. Here is an excellent screen cast that demonstrates using selenium on rails. On the whole Selenium is a great tool really helps in greater productivity and help in delivering quality applications.

Blink this Selenium at blinklist.com    Bookmark Selenium at blogmarks    Bookmark Selenium at del.icio.us    Digg Selenium at Digg.com    Fark Selenium at Fark.com    Bookmark Selenium at Furl.net    Bookmark Selenium at NewsVine    Bookmark Selenium at reddit.com    Bookmark Selenium at Simpy.com    Bookmark Selenium at Spurl.net    Bookmark Selenium with wists    Bookmark Selenium at YahooMyWeb

Comments      Cosmos

Next entries » · « Previous entries

Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.