Filipino Programmer | Philippines

Just another Filipino Programmer’s blog by Nick Fernandez III, on web development using PHP in LAMP framework and random information about everything I would tought interesting on and off the IT world.

Random Bytes:
A Computer Programmer father explains his son how did he came to this world. Daddy: Listen carefully. Mom and Dad met each other in a cyber cafe. In the restrooms of that cyber cafe, Dad connected to Mom. Mom at that time made some downloads from Dad's memory stick. When Dad finished uploading, we discovered we did not use a firewall. Since it was too late to cancel or delete, nine months later, we ended up with a virus.

Archive for May, 2007


Google Gears BETA - Browse Web Offline

Google Gears is an open source browser extension that lets developers create web applications that can run offline. It allows developers to enhance their AJAX applications to be able to run even when their users are offline. Basically web applications using GEAR’s API will benefit from this feature. To be able to understand fully how this new product will help developer’s enhance their web application here’s a few sample GEAR driven demo sites provided by Google:
Note: You must install Google Gears to use these samples.

For real world application Google Gears consists of three modules that address the core challenges in making web applications work offline.
LocalServer
- cache and serve application resources (HTML, JavaScript, images, etc.) locally
Database
- store data locally in a fully-searchable relational database
WorkerPool
- make your web applications more responsive by performing resource-intensive operations asynchronously
Currently Google Gear is supported on Firefox 1.5+ and Internet Explorer 6.0+ browsers. A tutorial for enabling static files to work offline using Gears is provided. This will get you started working on how the API works.

Google Reader is one of Google’s Product which already uses Google Gear API, below are screenshots of Google Reader using Gear in action:

1. When signing-in on your Google Reader account, if Google Gear is already installed on your browser, you will see a pop-up screen, just accept it and let your Reader loads.
Google Gears - Filipino Programmer

2. After the page loads a new icon is added on the upper right corner of your page, the small green button. This will enable you to download the articles locally.
Google Gears - Filipino Programmer

3. When you click the green arrow button. It will now download all articles for offline viewing.
Google Gears - Filipino Programmer

4. After downloading all file a screen will tell you all files are downloaded and you can switch to offline mode by turning off your Internet connection.
Google Gears - Filipino Programmer

Bookmark This!

del.icio.us Digg Google StumbleUpon Technorati

Ruby on Rails - The Language

Now that everything is installed and we can view the “Congratulations, you’re on Rails!” screen. The next step is the language itself, we will create a simple application. To start, we’ll make a simple “Hello Worldâ€? type example. For this demonstration, we won’t even use the database. Rails is a MVC (Model View Controller) framework, which means that all the output will happen in the controllers and the views. So the first thing we’ll need is a controller. Run this from your rails project directory to generate one:

./script/generate controller hello index

This will generate all the files necessary for our example. Try browsing to http://rails/hello. And you should see something like:

Hello#index
Find me in app/views/hello/index.rhtml

Now (just like it tells you) open app/views/hello/index.rhtml. This is the View. It contains the text that will be shown at http://rails/hello or http://rails/hello/index. Change it however you want. Or leave it alone. So it should be getting clearer now that URLs in Rails usually follow the format:

hostname/controller/view

Now take a look at app/controllers/hello_controller.rb. This is the Controller. It contains program logic that builds the data for the view. Notice the index function. Any public methods on a controller become actions in Rails.

Try adding the following method just before “end� :

def world
  @greeting = "hello world!"
end

Now browse to: http://rails/hello/world

Template is missing
Missing template script/../config/../app/views/hello/world.rhtml

We have a problem. The template is missing. “Template� is a rails word for “View�. And it even tells us the path where it was expecting the template. This path has a lot of ..’s in it, but regardless you can probably see where it’s going. So let’s edit app/views/hello/world.rhtml and add the following text:

<%= @greeting %>

Now refresh that last page. And you will see our “hello world!” text. Notice how the controller created a variable @greeting that carried over into the view. All the instance variables (ones that start with @) from the controller get pulled into the view.

Bookmark This!

del.icio.us Digg Google StumbleUpon Technorati

Coldfusion 8 aka Scorpio

Adobe® ColdFusion® 8 is the highly-anticipated upcoming major release of ColdFusion. The public beta release provides developers with the opportunity to begin building applications with new ColdFusion 8 features as well as test their existing applications on the new version.

Here are just a few of the key features that you’ll discover in the public beta:

  • Server monitoring to help identify server bottlenecks, allowing for tuning and improved performance.
  • Step through code debugging in a new Eclipse plug-in debugger.
  • Adobe Flexâ„¢ and Ajax features that let ColdFusion power personalized, multimedia-rich applications to enhance users’ experiences on the web.
  • High-quality, dynamically created on-demand multimedia presentations.
  • PDF document and form integration for a printable, portable way to intelligently capture and share information.
  • Image creation and manipulation with more than 50 new CFML tags and functions.
  • Native support for .NET objects to easily integrate ColdFusion applications with enterprise data and infrastructure services.
  • Significant application runtime and server performance improvements.

Get the beta copy here or share and discuss anything at coldfusion 8 labs forum

Bookmark This!

del.icio.us Digg Google StumbleUpon Technorati

Security Risks and Prevention Softwares

We will just pause our Ruby on Rails topic, and let’s discuss security risks software, which I would like to raise awareness. But first I would like to clarify that this topic’s intention is to educate people on security applications and how they are used, I will also be including preventions but not all are 100% fool-proof. Ok let’s start our “so-called hacking”!

First let me introduce some applications which might compromise your privacy like chatting. In this example we will be targeting Yahoo Messenger, Yahoo’s chat application is a widely used chat software today, and I think that most of online user’s are using Yahoo Messenger to communicate to friends and family online. But did you know that there are 3 basic applications that can compromise your privacy if a “so-called hacker” would be able to use your PC physically? IntellectualHeaven a group of people doing OS development and systems programming. Provides some of the applications I am talking about, these are the following:

Y!Pass
- Yahoo Messenger Saved Password Decrypter. If you are lazy typing your password and just let Yahoo Messenger to automatically login, well better think again, this application if used on your PC will decrypt your locally stored password.

YahDecode
- Yahoo Message Archive Decoder. Are you saving your chat history locally? This application will decrypt your chat archives which gives your “so-called hacker” access to your previous chat history and all of your secrets.

SniffIM
- Yahoo & MSN Instant Message Sniffer. It can grab chat message in realtime.

This applications listed are very basic applications and are not high risk applications, but I would like to raise awareness that this application when used properly will be able to help “so-called hackers” break into your privacy.

Prevention:

  • Always use a password on your PC, when leaving your computer open make sure have locked your PC and have it set upped to ask for password before using.
  • Never use Yahoo Messenger’s “Remember my ID & Password” feature, especially if you are sharing your PC to others.
  • Message Archives are sometimes convenient, if you need your chat history active the best way to protect your archives is use a software which can hide your folders with just a press of a key, I would recommend using HideFoldersXP.
  • Protect your PC by using Firewalls and Virus/Spyware softwares.

Bookmark This!

del.icio.us Digg Google StumbleUpon Technorati

Ruby on Rails in Action

In this section I will explain a quick walkthrough on setting up RoR on On my first post I have mentioned that Ruby on Rails are separate packages combined to work as one, that is why there are two basic packages we need to install.

1. Installing Ruby
Download the Ruby one-click installer. After downloading install the package. Follow the instructions accordingly.

2. Update the Gem Package
Open a new session of command prompt (Start > Run > type in: cmd) and locate the ruby bin directory which by default “C:\ruby\bin”. After that we need to update the gem package by typing:

C:\rubyinstalldirectory\bin> gem update

The gem package will be updating, just wait. If you are prompted with a screen like this:

C:\ruby\bin>gem update
Updating installed gems...
Bulk updating Gem source index for: gems.rubyforge.org
Attempting remote update of fxruby
Select which gem to install for your platform (i386-mswin32)
 1. fxruby 1.6.11 (ruby)
 2. fxruby 1.6.11 (mswin32)
 3. fxruby 1.6.10 (mswin32)
 4. fxruby 1.6.10 (ruby)
 5. Skip this gem
 6. Cancel installation
> 2
Successfully installed fxruby-1.6.11-mswin32
Installing ri documentation for fxruby-1.6.11-mswin32…
…
…

Select the appropriate action, I selected the number 2 option. This may take a while so be patient. Other options will also be displayed which requires you to choose, just choose the latest version for mswin32 platform.
(more…)

Bookmark This!

del.icio.us Digg Google StumbleUpon Technorati


Filipino Programmer | Philippines
The views expressed here reflect the views of the author alone.
HOME SUBSCRIBE WORK EXPERIENCE ABOUT ME



Filipino Programmer | Philippines © 2007 All Rights Reserved. Using WordPress Engine
Entries (RSS) and Comments (RSS).

Creative Commons License