RSS

Archive for the ‘HTML’ Category

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

While using Ruby for your projects, you may need some references.

These are some references that might help you in using Ruby:

  • Language

General Syntax Rules

  • Comments start with a pound/sharp (#) character and go to EOL.
  • Ruby programs are sequence of expressions.
  • Each expression is delimited by semicolons(;) or newlines unless obviously incomplete (e.g. trailing ‘+’).
  • Backslashes at the end of line does not terminate expression.

Reserved words

22 Mar 2008

Ruby Quick Reference

Author: ceefour | Filed under: HTML, Rails, Reviews, Ruby, Tools

Morph logo

Morph Labs is currently beta-testing their next-generation solution in application deployment, delivery, and management, the Morph Application Platform.

Acquiring hardware and configuring software to support web apps are things of the past. Morph Labs brings you the next-generation solution in application deployment, delivery, and management. Reduce your time to market and lower your startup costs no matter if you are an ISV, a developer or a business.

About Morph Labs

Morph Labs Inc. www.morphexchange.com is a Philippine-based Web 2.0 technology company focused on providing innovative technologies and applications to support Software as a Service (SaaS) globally.

We’ve been doing a lot of scraping and mashups lately. So we’d love to share on how to do this. Fortunately Schadenfreude has written a good tutorial about using Mechanize and Hpricot to scrape Gmail.

The tutorial uses mechanize and hpricot to login to gmail and return a list of Unread emails.

Installation of required tools

gem install mechanize --include-dependencies

This will install both mechanize and hpricot.

Usage

Using jRails, you can get all of the same default Rails helpers for javascript functionality using the lighter jQuery library.

jRails is a drop-in jQuery replacement for Prototype/script.aculo.us on Rails. It has the features and the visual effect.The visual effects in jRails are based on the new jquery-fx library. jRails currently uses a slightly modified version of jquery fx code to get some of the desired effects.

Features of jRails :

jRails provides drop-in functionality for these existing Rails methods.

    • Scriptaculous
    • draggable_element
    • drop_receiving_element
    • sortable_element
    • visual_effect
    • RJS
    • hide
    • insert_html
11 Dec 2007

jRails: jQuery On Rails

Author: ceefour | Filed under: Ajax, Cool, HTML, Plugins, Rails, Ruby, Tips, Tools, Web 2.0

Selenium Core provides an easy way to test Rails application.

This plugin does four things:

  1. The Selenium Core files don‘t have to pollute /public.
  2. No need to create suite files, they are generated on the fly — one suite per directory in /test/selenium (suites can be nested).
  3. Instead of writing the test cases in HTML you can use a number of better formats (see Formats).
  4. Loading of fixtures and wiping of session (/selenium/setup).

Installation

  1. Install Selenium on Rails: script/plugin install http://svn.openqa.org/svn/selenium-on-rails/selenium-on-rails
  2. If you‘re on Windows, gem install win32-open3
9 Dec 2007

Selenium on Rails

Author: ceefour | Filed under: Ajax, Cool, HTML, Plugins, Rails, Tips, Tools, Web 2.0

Need to parse command line arguments for your Ruby program? OptiFlag comes to the rescue!

This image is shows a typical OptiFlag scenario. You will note that there is a natural indentation.

terminology Optiflag: The Magic Ruby Command Line DSL Parser

It’s really an easy way for getting command line in options into your program.

Rather than use the ‘module’ DSL syntax, we just re-use an existing class. Any method accessor will be used verbatim as a switch. OptiFlag will crawl up the inheritance hierarchy up to (but not including) object and use all accessors as standard ‘flag’s.

Let’s see the Example:

3 Dec 2007

Optiflag: The Magic Ruby Command-Line DSL Parser

Author: ceefour | Filed under: HTML, Reviews, Ruby, Tips, Tools

logo Sinatra: Classy web development dressed in a DSL

Sinatra is a new cool open-source DSL-driven web application framework!

This super-sexy DSL runs at lighting speed. It sits on top of Mongrel and was written to be thread-safe, sleek and tiny. And an entire web-application can be written and contained in one file (or a small collection of files)!

It’s super easy to use! Let’s create an app from scratch to demonstrate!

Install!

gem install sinatra -y

Use!

  • Create a file called lyrics.rb (or any name you like)
  • Add
      require 'rubygems'
    
      require 'sinatra'

NetBeans IDE 6.0 is, among other things, a Ruby and Rails text editor :-)

The NetBeans IDE is a modular, standards-based, integrated development environment (IDE) written in the Java programming language. The NetBeans project consists of an open source IDE and an application platform, which can be used as a generic framework to build any kind of application.

The focus of NetBeans IDE 6.0 is improved developer productivity through a smarter, faster editor, and the integration of all NetBeans products into one IDE. Please download it, check it out and let us know what you think. The NetBeans IDE 6.0 is scheduled to be released in November 2007 (see roadmap).

12 Nov 2007

NetBeans Ruby IDE 6.0 Beta 2

Author: ceefour | Filed under: HTML, Rails

New Riders Press has recently launched a new web design book titled Bulletproof Web Design, authored by Dan Cederholm:

No matter how visually appealing or content-packed a Web site may be, if it’s not adaptable to a variety of situations and reaching the widest possible audience, it isn’t really succeeding. In Bulletproof Web Design, author and Web designer extraordinaire, Dan Cederholm outlines standards-based strategies for building designs that provide flexibility, readability, and user control–key components of every sucessful site. Each chapter starts out with an example of an unbulletproof site one that employs a traditional HTML-based approach which Dan then deconstructs, pointing out its limitations. He then gives the site a make-over using XHTML and Cascading Style Sheets (CSS), so you can see how to replace bloated code with lean markup and CSS for fast-loading sites that are accessible to all users. Finally, he covers several popular fluid and elastic-width layout techniques and pieces together all of the page components discussed in prior chapters into a single-page template.

8 Nov 2007

New book: Bulletproof Web Design

Author: ceefour | Filed under: Books, HTML, Reviews, Tips, Web 2.0

Shave your Semantic (or semantic?) Web

microformats has been only two years old, yet it has brought significant changes in a relatively short time.

What is it, actually? According to microformats.org, “[microformats is] designed for humans first and machines second, [they] are a set of simple, open data formats built upon existing and widely adopted standards.”

Enough with the fluff, let’s see how it actually works, microformats in action:

Arie Kusuma Atmaja nampang gitu lhoh
Flickr picture source

The above picture is me browsing to the LinkedIn profile of one of Indonesia’s renowned Ruby on Rails experts, Arie Kusuma Atmaja. The overlay window that contains these semantic information is not a LinkedIn feature. Rather, it is the easily usable, cross-browser Microformats Bookmarklet by LeftLogic. Go on… try it if you haven’t!