Site Creation – Ruby on Rails

Ruby on Rails is another programming language for faster web development. It is also known as Rails or RoR and is the newest programming language as of this writing since it first came out in 2004. The purpose of the Rails project was to make the process of creating web applications much easier and less time-consuming. This is accomplished by using the Model-View-Controller (MVC) architecture to organize application programming.

By using various packages like ActiveRecord (an object-relational mapping system for database access), ActiveResource (provides web services), ActionPack, ActiveSupport and ActionMailer, Rails make programming a web script very easy. In fact, when I was researching Rails, I found a video on their website that shows a blog being made in 15 minutes! If the video is still online, you can view it here. Unlike Java, Rails requires a web server to run on, which makes it a great choice for building web apps.

Rails Resources

  • Official Rails Website – There’s no better place to start than here! Get all the latest news and updates from the developers. Get screencasts, code and documentation as well.
  • Ruby on Rails Cheat Sheet – To get a nice little quick reference guide for Rails created by AddedBytes.com, go here. You can print out this one-page guide to aid you in your Rails programming ventures.
  • Rails Tutorials – There are three really good tutorials on this site that go into depth about how Rails works and how you can get started.

Who uses Rails?

The biggest site known to use Rails is Twitter! I’d have to say that for a website as large as that, Rails must be pretty useful, not to mention stable. Other known sites are BaseCampHQ and Shopify.

<< Back to Java Forward to Content Management System (CMS) >>

Site Creation – PHP

PHP is a programming language used for creating dynamic webpages. Dynamic, as opposed to static, simply means that pages are created on the fly based on data from a database, user input or some other “call” for information. Originally created in 1995 as a set of CGI binaries, PHP has withstood the test of time and is currently in its 5th incarnation as PHP5.

Personally, I find that it’s the easiest programming language to work with when dealing with websites. This is because PHP gets integrated directly within HTML code and uses similar tags for performing functions. I’m no genus at coding PHP, but for creating basic scripts or even making changes to advanced scripts, I can hold my own! I also find that it’s a much speedier code when compared to others like CGI or Java and it’s also compatible with many different operating systems, webservers and all web browsers.

Above all, the best part about PHP is that it’s free! There is no cost to run PHP on your webserver and it’s already installed on practically every webhosting plan you can buy.

How does it work?

As mentioned earlier, PHP can be integrated directly within HTML code. By using dilemeters, you can tell PHP where to find code to parse on the page. Here’s an example of some PHP code within a webpage:
<html>
<head>
<title<PHP Test</title>
</head>
<body>
<?php
echo "Hello World";
/* echo("Hello World"); works as well, although echo isn't a
function (it's a language construct). In some cases, such
as when multiple parameters are passed to echo, parameters
cannot be enclosed in parentheses */
?>
</body>
</html>

The above code would display the words “Hello World” directly on a blank web page titled, PHP Test. By looking at this example, you can see how easy it is to have a standard HTML page, while integrating PHP within. Since the PHP parser only recognizes code inside the <?php ?> tags, everything else is sent to the browser as it normally would.

Why would I need it?

If you plan to use a CMS package like WordPress, you’ll be dealing with PHP in some form. Besides that, PHP offers a whole new world of functionality for your website and ultimately your users. Here are some common uses for PHP:

  • Web forms – Have you ever filled out a form on a site asking you for information like email address, name and phone number? These are all sent dynamically through a POST command to the website owner so they can collect your information.
  • Shopping carts – Every time you’ve bought something online, you more than likely were using PHP to place an order, fill out your information and send a payment.
  • Security – If you ever needed to access a secured area for a website, you may have seen PHP in action protecting the secured area.
  • Message boards – The majority of message board software is written in PHP.

This list can literally go on and on because just about anything you can think of can be written in PHP. That’s what makes it such a great language to use! It’s also very easy to learn. In fact, what little I know about PHP has all be learned by just looking at code and trying to figure out what it’s trying to do.

Where do I get PHP scripts?

Since its licensing is free (and open), scripts can come in all shapes and sizes from large corporations down to the guy in his basement and can cost anywhere from zero dollars to many thousands of dollars. When looking for PHP scripts to use, you first want to establish your goals.

To begin your search, start looking for scripts at HotScripts.com. They not only have a very large PHP database, but they house every other major programming language as well. Once you get to the site, you’ll notice that their PHP collection is the largest (many times over) than every other collection! This tells you just how popular PHP is.

More information

To get much more information as well as all the nitty, gritty details behind PHP, visit the official PHP website at php.net.

<< Back to Email Forward to Java >>