Rails technicality

rails11.jpg

Rails uses the Model-View-Controller (MVC) architecture just like many other contemporary web frameworks for organizing application programming. Rails is remarkable for its widespread use of the JavaScript libraries Prototype and Script.aculo.us that is significantly used for for Ajax and its graphical interface. And because of Rails’ “out of the box” scaffolding, it can promptly generate most of the models and views necessary for a basic website. Rails has useful development tools built in or already installed like the WEBrick web server and the Rake build system. Rails also originally supported lightweight SOAP for web services and it was later replaced by RESTful web services as it significantly altered to version 1.2.

Posted in Basics | Tagged , | Comments closed

Ruby on DON’T REPEAT YOURSELF (DRY) philosophy

Also known as Single Point of Truth, “don’t repeat yourself” or DRY is a process philosophy seeking to reduce duplication especially in computing. This philosophy stress on that information should not be duplicated because it makes the change more difficult, it can lessen clarity and may lead to inconsistency. DRY is from Andy Hunt’s and Dave Thomas’ principle in the book of Pragmatic Programmer. A revision of any single element of a system does not alter other logically-unrelated elements when the DRY principle is effectively applied. Moreover, elements are kept in sync because elements that are logically related all change predictably and evenly.

Posted in Basics | Tagged , | Comments closed

Convention Over Configuration

2439047093_63a0999615.jpg

One of the Ruby on Rails fundamental principle is “convention over configuration.” It aims to reduce the number of decisions that developers need to make as it gains simplicity but not losing flexibility. The simple phrase implies that a developer only needs to indicate alternative aspects of the application. When the convention implemented by the tool you are utilizing equals your desired behavior, you take pleasure in the gains not even having to write configuration files. When your desired behavior digresses from the implemented convention, then you configure your desired behavior. The programmer can work at a higher level of abstraction with all this configuration free approach to programming.

Posted in Basics | Tagged , | Comments closed

Ruby on Rail’s alternative implementation

ror_1.jpg

JRuby, YARV, Rubinius, and IronRuby are some of the alternative implementation of the Ruby language as of 2008 with each of them taking a diverge approach.

•JRuby – One of the strong features of JRuby is its capacity to invoke the classes of the Java Platform considering that it is a Java implementation of the Ruby and is closely incorporated with Java.
•YARV – an acronym for Yet Another Ruby VM, it is a bytecode interpreter developed for the Ruby programming language with the goal of trimming down the execution time of Ruby programs
•Rubinius – it is clean, understandable code that is easy for users to comprehend and extend. It is a virtual machine and compiler for Ruby.
•IronRuby – an approaching implementation of the Ruby programming language that targets Microsoft .Net framework

Posted in Basics | Tagged , , , | Comments closed

RUBY with just-in-time compilation

2ed1fe69802.jpg

There are several alternative implementations and completion of the Ruby language as of 2008 including JRuby, Rubinius, IronRuby and YARV. Each of them has different approach especially that JRuby provides just-in-time compilation functionality. JIT or just-in-time compilation is also known as Dynamic Translation. In computing, it is a system and a technique for improving runtime performance of a computer program. It has two earlier ideas in run-time environments such as dynamic compilation and bytecode compilation. Its advantage over statically compiling the code at development time is that it can recompile the code and its ability to enforce security guarantees. Hence it can merge a few of the advantages of interpretation and static compilation.

Posted in Basics, Programming | Tagged , | Comments closed

Ruby on Rails is Leading in Web Application Development

The obvious need today is to go with the flow of technology as aggressive web applications are being produced here and there. Ruby on Rails has been identified as the best interface software that programmers look forward to today since it simple yet great output makes the world of programming all the more simpler.

You can really install it on any software even on your Windows XP or Vista. With all the ideas of new developmental software up in the air, you can just imagine how many programs from people can be seen after some time especially once they have settled in and mastered this program.

Posted in Advanced, Basics, Programming | Comments closed

Benefits of Using Ruby On Rails

For most business owners, it has been advised the Ruby on Rails is the best way to go especially if you don’t want too much technical terminology with reference to the programming included in the whole package.

Known to be an extension of the Ruby programming language, it is a very powerful and enriching programming language. It uses intelligent reflection and discovery to automatically map relational database tables to Ruby objects.

Thus, the application code and the running database already contain everything Rails needs to know. Best of all, it requires less coding, something that is the normal excuse each time a compiled program goes on the blink.

(Source) Script2Please

Posted in Basics, Programming | Comments closed

Using the IF Statement

If you are a programmer then most probably you know that when the IF statement is used, it stands for options as far as the program flow is concerned. It is not different in Ruby on Rails and other programming languages since normally, the need to provide users of the program with the variable options is a need.

Here is a sample of the IF statement in code:

class BookList
def [](key)
if key.kind_of?(integer)
result = @Books[key]
else
result = @Books.find { |aBooks| key == sBooks.name}
end
return result
end
end

Further shortening the code we have above by using the ‘if’ statement as a modifier it becomes a shorter version of its former self as:

class Booklist
def [](key)
return @Books[key] if key.kind_of?(Integer)
return @Books.find { |aBooks| aBooks.name == key }
end
end

(Source) Artueel Blog

Posted in Programming, Sample Code | Comments closed

Ruby Shortcuts Program Scripts Logically

As far as scripting is concerned, it would be less of a headache if programming scripts were used in the lesser means of coding. Too much scripts and line breaks in the usual scripting techniques of programming today makes it more complicated and harder to trace the root of the actual problem at hand.

What is important is that you are able to understand the basic commands and terms in Ruby. Once you do, you will surely find it convenient to use considering that debugging can prove to be a hassle if you are not aware of what you are doing today in the world of programming and scripting.

Posted in Basics, Programming | Comments closed

Ruby On Rails Flexibility

As far as programming is concerned, compatibility and ease of use of the logic is what any programmer would certainly dream off. With the fast paced technology we live on today, more programming languages have made interface for people to understand how to get new means of programming logic to go by.

Rails works with a wide range of web servers and databases. For the web server, recommended are Apache, lighttpd, or nginx proxying to Mongrel (or using FastCGI). For database, use MySQL, PostgreSQL, SQLite, Oracle, SQL Server, DB2, or any of the other many systems supported can be considered as well.

Posted in Basics, Programming | Comments closed

Bad Behavior has blocked 34 access attempts in the last 7 days.