The Google App Engine service currently supports Python as its only runtime language. In its official Google groups, people have been asking what?s going to be the next runtime. A question for curious minds, a point for the Google lovers to ponder. I have been using the App Engine (http://masnun.appspot.com) lately and found the service really cool. They make us all feel like being Google engineers by letting us build web apps on the same infrastructure they themselves use. That means your web app will use the same legendary (!?!) Bigtable and GFS that is used by google. But at the moment you have to build the app in Python. I have been interested in Python for a long time but never had the time to check it out. Now with App Engine, I am learning python at last. But I would prefer Java to Python. I am a BBA student and I cannot dedicate much time to programming. I want to emphasize on a single language for all my needs:
# building web sites
# building desktop app (cross platform)
# building command line apps
# building mobile phone softwares and games
I admit that Python could be used for all these needs. But Java feels cooler to me. Especially the Swing bit of thing. The desktop apps built in Java are easily portable and looks great on all OS. Java definitely has great portable libraries more in number than Python. The only thing I would miss in Java is the scripting ability. But for that I would always have Python and PHP at my disposal. But I am really looking forward to learning how to build web sites in Java. It?s really a pain to find a reliable free Java host. So I would very much want Java to become the next runtime environment for GAE so that I can try it free. I have enjoyed building sites with GAE using python. I do believe that the Java experience would be cool too.
Like many people out there, I have been wondering what languages will come to GAE. Here?s my bet:
1. Java
2. C++
3. Ruby
4. PHP (If it really comes).
Note that Java, C++ and Python are the three official languages at Google. Now that they have already introduced Python, they will roll out the other languages in the project too. In that case, Java should get higher priority because Java is more popular and common than C++. Its OO nature is probably more matured than CPP. But I won?t mind if they introduce C++ first.
It would be of course nice if they introduce PHP too, but the controversy about PHP?s scalability and coding style can be a point to consider.
Year: 2009
The Continuous Sabotage in Bangladesh
It hurts. Really it does. It’s not been long after the BDR massacre, now the largest shopping mall of the country. What the hell is up with this new government?
The effect of BDR mutiny has not died away yet. The loses of so many of our trained and talented army officers have definitely thwarted us. What really triggered this deadly event? What, really? Is it the revenge of the Roumari incident when our brave border guards shot 14 BSF dead when the bloody BSF tried to ambush our land? India has been trying to captivate us for a long time. What this govt is playing at deciding to give them transit? Can’t they see the obvious intention of the Indian Govt? Why did they not allow Army to jump into action when even the killing was not started? What was behind their decision of killing time under cover of political solution? Should we assume that what the army officers said in Shena Kunja was true? Should we assume that the Govt has a hand in it?
Now the Basundhora City has been burnt out. What made it happen? Because Mahmudur Rahman was speaking for Bangladesh, against the Indian loby? Because the Govt is not happy with the truth Mahmudur Rahman is bringing to lime light?
Should we assume that India is going to make us a sub state of itself during the reign of this govt? Why is this govt so silent when it comes to answering questions that concern India in a guilty sort of way? Why was youtube banned the other day?
I am really dying to know the answers. If somebody can, please please let me know. I love my country and would do anything to uphold its independence and sovereignty.
Hasin Hayder, a ZCE and Open Source enthusiast shared a nice trick to duplicate your wordpress blog just using the simple combination of php and mod_rewrite of apache. Read his original blog post here. I am going to explain the mechanism step by step here.
The PHP Code:
Put this code inside the index.php on the target URL’s root directory.
<?php
$dataurl = $primaryurl = ?http://hasin.wordpress.com?;//old domain
$secondaryurl = ?http://blog.ofhas.in?; //new domain
$path =array_keys($_GET);
if(!empty($path[0])) $dataurl = ?{$primaryurl}/{$path[0]}?;
$data = file_get_contents($dataurl);
$pattern = ?~{$primaryurl}/([dS/]+)~?;
$data = preg_replace($pattern,?{$secondaryurl}/$1?,$data);
$data = str_replace(array(?<a href=?{$primaryurl}?,?<form action=?{$secondaryurl}?),array(?<a href=?{$secondaryurl}?,?<form action=?{$primaryurl}?),$data);
echo $data;
?>
The URL REWRITING:
Put the following code inside a .htaccess file or in your apache httpd conf file.
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} (.+)RewriteRule ^(.*)$ index.php?$1&%{QUERY_STRING}
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
Explanation:
······# The URL Rewriting portion processes the requests to index.php (with and without GET query strings) and other static directories and files (images dir and robots.txt)
······# index.php handles the incoming requests as redirected by the URL Rewriting mechanism.
······# First we define the two data source or URL.
<?php
$dataurl = $primaryurl = ?http://hasin.wordpress.com?;//old domain
$secondaryurl = ?http://blog.ofhas.in?; //new domain
These two lines define the URLs involved. The primary URL is the URL where your wordpress blog is really hosted. The secondary url is the URL of the new location where the blog will show up
······# We sort out the path to the data to display and then copy the data as string.
$path =array_keys($_GET);
if(!empty($path[0])) $dataurl = ?{$primaryurl}/{$path[0]}?;
$data = file_get_contents($dataurl);
······# We then use Regular Expression to change all referrences to our primary URL so that they point to our new location.
$pattern = ?~{$primaryurl}/([dS/]+)~?;
$data = preg_replace($pattern,?{$secondaryurl}/$1?,$data);
$data = str_replace(array(?<a href=?{$primaryurl}?,?<form action=?{$secondaryurl}?),array(?<a href=?{$secondaryurl}?,?<form action=?{$primaryurl}?),$data);
Here we change the URLs and Form Targets. But what about Images with relative URL? I think there’s something wrong with that. I will ask Hasin Vai.
······# Lets print out the modofied data. Close the php block.
echo $data;
?>
That’s all. Put the php code in index.php and the Rewriting Rules in a .htaccess. Place the files in your public_html directory to fire off the ground.
PS: I haven’t yet tested the codes myself. But I believe it would work except for relative image URL.