Web
My Favourite Note-Taking Applications
3Earlier, it used to be sufficient to have a sticky note-taking application hanging around a corner of the screen(or on a different [virtual] desktop) ready to take any text you want to paste in it for future reference. While browsing various technology related websites, I would just copy and paste the important text, along with the URL of the page, in the sticky notes. The data thus collected could then be perused later, organised, blogged about, sent as email to the friends etc. Stickies are easy to create, easy to manage and the data persists even across system reboots. A text editor in contrast has to be started from a menu or a command line, and the user also needs to remember to save the contents every once in a while lest it may be lost due to an unexpected system failure. Every time the system reboots, the text editor needs to be started and the scratch file needs to be re-opened, unless you have the habit of saving your work session before rebooting(I never do it).

Nevertheless, there are some shortcomings of a sticky note-taking application too.They are as follows:
- Its available in only one operating system. I can’t save the notes in Gentoo and later access them from Ubuntu or Windows operating systems. Accessing the notes from another machine is out of question.
- It doesn’t save the formatted text(bold, italic etc), images, hyperlinks and similar stuff – only pure text is supported.
Three applications that I have evaluated in the past few weeks proved to be excellent replacements for the traditional way of taking notes. These modern note taking applications that I grew really fond of are:
- Google Notebook: This application allows formatted text to be saved including images, and also includes a link to the source of the text in case you want to go back to it to collect some more info. Multiple notebooks can be created for different categories of notes, some of them can be shared with the general public, it has got features like expanding and collapsing the notes etc. Most significant benefit is that it is accessible from any machine, any operating system that has got an Internet connection. It pops up in the bottom left corner of the web browser for easy note taking while surfing the web; a full page view is also available to better organise and share the collected notes.
- EverNote: You are sure to fall in love with the interface of this application if you give it but one chance. The feature rich, basic version(no time limit) of this product is freely downloadable from the website, and the paid version, EverNote Plus, that boasts of some additional impressive features like handwriting recognition, is currently priced at $35. A one month trial version of it is available for download at their website.

Its the best note-taking application I have ever used; be it the interface of the application, the features that it supports(copy content from anywhere and paste it in the application and it appears just like it was in the original place) or even the help manual that comes with the product, everything leaves a strong impression upon the user. If you are used to taking notes heavily while you surf the web, read the emails, chat with friends, read the documents etc then you must give this application a try. The only limitation of the product is that its available only for Windows users. - Tomboy: Its a desktop application created in Mono for the GNU/Linux operating system. So unlike Google Notebook, the data cannot be shared across operating systems or among different machines. It allows the text to be formatted after the text has been copied into it(it does not retain the formatting from the original page as does Google Notebook and EverNote) and also allows links to be created to the other notes created in the same application(sort of cross-linking).

It’s still in early stages of the development, so lets give it some time before it can completely replace our old note-taking applications.


Upgrading from Drupal 4.6.6 to Drupal 4.7
0Now that the 4.7 version of the Drupal CMS is released, I went through the documentation for the upgradation process, watched the videocast available on the website, and on one bright afternoon, decided to attempt the upgradation of my drupal 4.6.6 installation. These are the steps that I followed to complete the task:
- I downloaded the latest version of Drupal software, Drupal 4.7, from the drupal.org website: Drupal 4.7.0
- I took a complete backup of the existing Drupal installation in a safe location:
- Backed up all the files and folders present in the Drupal installation location(themes, modules, admin etc).

- Took the full backup of the drupal database.
- Backed up all the files and folders present in the Drupal installation location(themes, modules, admin etc).
- I always first test out the backup to see if it is in good condition or not before overwriting the original installation; a bad backup is worse than no backup. So I tried the restore procedure on the local machine and made sure that everything is working fine and I can depend on this backup if something goes wrong.
- I then logged into my old installation using my administrator account and disabled all the non-core modules(modules that didn’t come with Drupal 4.6.6 and I had to install them manually). I also reverted back to the default ‘bluemarine’ theme and disabled all the other themes. Finally, I logged out.
- I renamed the old installation folder ‘drupal’ to ‘drupal_bak’ and copied the downloaded latest version of Drupal and gave it the folder name ‘drupal’. I copied the ‘settings.php’ file from drupal_bak to drupal folder. I do not have any files in ‘files’ folder, otherwise I would have had to copy that folder also from drupal_bak to drupal.
Its always advisable that you don’t overwrite the old installation files with the files from the new release – for security reasons(some old files may be left out exposing a potential vulnerability etc). Its better to completely remove the old files and the folders and then freshly copy the files from the new version. If Drupal is installed in a sub-folder, as opposed to being installed in the root folder of the web domain, the process becomes as simple as renaming the old folder to a different name and then copying the latest version in its place. Later, the old version can be removed completely or atleast ‘settings.php’ should be permanently deleted from it(don’t forget this).
- I ran the update.php script by going to:
http://mydomain/drupal/update.php
then clicked the ‘Update’ button and watched all the scrolling SQL statements closely for any errors. Fortunately, there was not even a single error. - In anticipation that the hard work will be getting paid and Drupal 4.7′s home page would be welcoming me in all its splendour, I tried accessing the index page at http://mydomain/drupal, but was greeted with an error message instead, which indicated that a function called nodequeue_node_titles() was being called but its definition did not exist.
Yuck. I forgot to delete this function call that I had manually added to one of the blocks. Once the nodequeue module was disabled, there was no way that this line of code could work. I promptly had to go back to my previous installation(rename drupal to drupal_new and drupal_bak to drupal AND restore the backed-up database), login, disable everything again(modules, themes) and additionally, remove the above function call from the block that I had created. If I had added anymore such custom code in any other blocks/pages/files that depended on the non-core modules, I would have had to remove/commentize those parts too.
I repeated the above procedure to attempt the upgradation process another time:
- Moved drupal to drupal_bak and drupal_new to drupal
- Ran the http://mydomain/drupal/update.php file. Selected “Update” button.
When I tried to access the home page this time, there were no more surprises in store; the old familiar home page welcomed me with all my posts and the other stuff. I logged in as administrator to make a final check that everything is in proper order.
- The next tough task was to find the latest, Drupal 4.7 compatible versions of my old themes and modules. I always try to use the modules/themes that are in active developement so that there is best chance of these modules/themes getting upgraded as soon as the main software is updated, and I can immediately continue to use them even after a version upgrade of the main software. If you use a module that is not in active development, then it may not get upgraded to the new version of the software at its release time and hence you may have to wait a long time/forever to get similar functionality after you upgrade. If the module is critical for the working of the website, then it can single-handedly stop you from upgrading to the latest versions! Another reason why you should use only those modules which add significant value to the websites and not try out every single module that is released for the software.
- Download the 4.7 versions of the modules that were being used earlier with the website.
- Extract them in the modules folder.
- Login as administrator and enable the modules from the modules page: administer->modules.
Thankfully with Drupal, majority of the modules are upgraded to the latest version in no time. Among the rest, old version of some of them continue to work with the new Drupal version and some others work if their latest CVS versions are checked out. I was able to replace most of the modules with their 4.7 versions, and I am still in the process of finding the best possible way to replace the rest of them. The process is straightforward:
After confirming that everything is working smoothly and correctly, I permanently deleted the drupal_bak folder and all of its contents. If your journey was not as smooth as mine, you can refer to the following resources to get any assistance:
A Case Against Ajax Web Development Model
2Ajax is the hottest buzzword today on the web development scene. Everyone is trying to port their existing websites to now make use of the Ajax technologies or just including the name ‘Ajax’ somewhere on the website to claim that they too are in the loop too. I am not totally impressed by the Ajax technologies though.
My primary reservations are with the complete diversion of the path that web development is currently taking towards the Ajax based development style. I have the following concerns:
- Creating websites using a heavy dose of HTML and Javascript is not the most intuitive way of creating complex web applications. After taking all the steps to build convenient abstractions(objects and events) for web development, hence bringing it closer to the desktop development model, its foolish to take one big step back now.
- Not being able to bookmark most of the pages of a website is not going to make anyone, the customer or the website owner, feel happy about it. We come across the same concern with the ‘POST’ data too, but POST method is either used:
- when submitting sensitive information to the server; or
- when sending large amounts of data to the server
No bookmarking should be needed in either of these cases. The same is not the case with the Ajax based websites.
- It breaks the ‘Back’ button of the web browser. Once again, this is not a new restriction; many websites break at many places if the ‘Back’ button of the browser is used, but the problem is compounded to the extreme level when using Ajax.
- I can’t right click on a link to open the target page in a new window. This point may look silly but this in fact is my biggest irritation when using the otherwise excellent Google Mail interface.
- Web developers need to be taught to learn new interface design guidelines. With the liberty of being able to create and destroy any part of a web page dynamically, a bad design can easily leave the user clueless and confused if enough indications are not left regarding what each part of the page tries to accomplish(Flickr demonstrates an example of a good interface). Easy to navigate interfaces are critical for any kind of applications, but the issue gains more importance with Ajax based interfaces.
Its not that I see only drawbacks of using the Ajax technology – with so many great application interfaces being created using this technology every day and so many Ajax applications gaining such widespread adoption, it cannot be without its virtues. It allows some cool effects to be achieved(game website) without having to invest a lot of effort in it – just a basic knowledge of HTML, DOM and Javascript(a skill set that every web developer should be comfortable with) is sufficient. Ajax is not just coolness though; it also helps in creating better interfaces than possible with the traditional web development model, for similar kind of functionality; improves response times giving a more interactive feel to the users; it saves bandwidth, saving time and money in turn.
So when would I use Ajax and when would I prefer to stick to the traditional web development style? For simple web tools(eg: a file uploader/manager, a simple online game, a calculator etc), I would go all the way to use the Ajax technology as it would enable the user to experience the same convenience as that of a desktop application. For complex/moderately complex applications, it should be a tough call based upon the following question: what is most critical for the application, the interface and responsiveness, or the development and the maintenance of the application? Let us admit the simple fact that its not a much pleasurable activity to implement feature after feature using heaps of Javascript code, then writing just enough php code to merely pull the data from the database to return it to the client in some obscure data structuring format.
I would still use Ajax based techniques to pepper up certain parts of the interface though, if I feel like none of the above mentioned disadvantages weigh heavily over the gains that the application can make with them. For example, I wouldn’t use Ajax technologies heavily if I were creating a website like Amazon, though I would still use Ajax to pop up the balloons whenever a user holds the mouse over a product, providing the user with fresh and useful information about it(how many in stock, latest discounts etc).
All the Ajax frameworks that are propping up on the Internet in recent times should help the web developers escape from having to write large amounts of Javascript code, test them, debug them and also from having to maintain them. Such frameworks also use the best practices, thus removing the scope of many design errors that the web developers might commit if they write the Javascript code manually. The Ajax framework that Google has released recently is definitely worth trying out, and I will try to write about it in a future post.
Apache + PHP + MySQL on Gentoo
5Most of the today's web applications need the combo of Apache, PHP and MySQL packages to be first installed on the system. Installing these software on a Gentoo system should be a straightforward process. Below is the complete procedure.
First add apache2 and mysql to the USE flag in the /etc/make.conf file:
USE="gtk gnome qt kde dvd alsa cdr hal howl imap maildir mysql apache2"
emerge the apache package:
sh# /etc/init.d/apache2 start
sh# rc-update add apache2 default
Test the installation by accessing the url http://localhost/ from a web browser. If you get a welcome message from apache, the installation is complete. More info here.
Now emerge PHP4 and the mod_php module for apache:
Add the configuration directive(-D PHP4) to /etc/conf.d/apache2 file and restart the apache web server:
APACHE2_OPTS="-D DEFAULT_HOST -D PHP4"
Create a sample php script in the directory /var/www/localhost/htdocs with the following contents and access it from the web browser to test the php installation:
[php]
phpinfo();
?>[/php]
If you see a lot of information displayed about the version of PHP and other related things then PHP is installed and properly configured with the apache web server. Installation of PHP5 is also similar but be warned that still a lot of software runs only on PHP4(Eg: phpBB Bulletin Software). With a little bit of effort you can also run both PHP4 and PHP5 on the same system side by side.
Install MySQL and all the related tools:
Add the following lines to the /etc/portage/package.keywords file:
>=dev-db/mysql-administrator-1.1.5 ~x86
>=dev-db/mysql-query-browser-1.1.17 ~x86
>=dev-cpp/gtkmm-2.8 ~x86
>=dev-cpp glibmm-2.7 ~x86
sh# emerge –config mysql-4.1.14
sh# /etc/init.d/mysql start
Set a root password for mysql server when prompted by the 'emerge –config' command. You can administer the mysql server by using either the command line tools or using the graphical tool mysql-adminstrator. Similarly, the command line client mysql can be used to create and view the database schemas or the graphical tool mysql-query-browser can be used. I recommed you give these two graphical applications a try.
Other databases, like PostgreSQL, can be used instead of MySQL whenever the applications support it, but a majority of the applications support only the MySQL database. WordPress for example doesn't support PostgreSQL.
Recent Comments