Category Archives: FOSS

End of a great three months

First, I’m sorry about not being able to post any thing in a while. I’ve been caught up with my Summer of Code final works and university works, I’ve hardly had any time left. Summer of Code finals evolution began on 20th August and I’ve tried to finish all goals before the deadline.

By midterm evolution, I had built the basic work for the text engine. It had a solid structure and ability to render inline tags by then. But after the midterm evolution I pushed myself bit hard than in the first half of SoC and could finish all the goals I’ve setup with my mentor.

Now Foiegras has the ability to render both inline tags and block tags. Rendering block tags had been something to think over and it was very satisfying to see it’s accomplished at last. Then it came to rendering images, and it wasn’t hard as implementing block tags and could finish quickly. Also meanwhile I understood that the text editor should have a mechanisms to validate and render tag attributes. So I’ve implemented the structure for attribute validating and rendering, in which you can define what are the attributes that’s valid under a given tag and what are the valid values for that attribute. (Similar to a DTD) . As the final goal I’ve planned to finish Foiegras table support, which is a bit complex task since Foiegras table structure has considerable amount of attribute variations. Because of this, I’ve focused only on implementing the basic table support within the SoC time period and could finish that. This is the current status of FoieGras text engine.

Even though the GSoC time period is over, it’s really is the beginning of FoieGras project. Since this project is starting from the scratch, I only focused on basic needs of the text editor that will be required for a first release. For this release two parts of the project will be merged and come as a complete text editor. I’m itching for that first release to see how the response is going to be since that’s what we will be reaping from the effort we have put into the product.

This three months of time period has really made an effect on me. It has helped me to get more in touch with Open Source developments and directly contribute to it through Gnome, which is the most favourite Linux desktop environment according to a survey of DesktopLinux.com. It was a great pleasure to work with such a community which consists of a large bunch of very entusiastic people.

Throughout the Summer of Code time period and even before that, my mentor Don (Don Scorgie) has been a great help to me, and for that I’m in debt to him. He is also the one who directed me to this project at the beginning when I was looking out for projects. Also my partner in Foiegras throughout Summer of Code period –Phenatic and his mentor Shaunm have been very supportive throughout the project. Phenatic has implemented a cool application shell for Foiegras and as I’ve mentioned before we have to combine the application shell and text engine for the first release. As a final remark, I’d like to thank everybody who has given a hand to this project and made me possible to product something useful(hopefully) for FOSS community.

Screen shots of the current FoieGras text rendering status is given below.

The final look of fiegras text rendering at the end of SoC

The final look of fiegras text rendering at the end of SoC

FoieGras- First look at how the text rendering

After about a months of time into the GSoC project, I was able to finish the first significant improvement in the project that happened from my side. For a long time I was wandering here and there testing one thing or the other to see what’s working best and finally got a breakthrough.

For now FoieGras (The code name of the editor we are developing) text engine is capable of these capabilities. It can render some given tags but only inline tags. It can hide and show tags, so if the user wants to see tags and work with them it’s possible. Also you can add more tags and configure the style tags, which are rendered using a configure file. I think it’ll be the main configuration file with regards to text rendering functions. After phenatic (http://phanatic.hu) releases the first UI part, we’ll be able to map the menu events to this text rendering functions and present the first release of FoieGras. 🙂

To tell you how the implementation of FoieGras is done: it’s done using python and PyGTK as the wrapper for GTK to do UI work. First I planned on implementing the text renderer using some thread system, giving a thread to take care of each tag. But soon I understood that it’s a waste of time and resources so thought of a better way. Now the text rendering is done through the XMLparser that comes with python, and so far it’s working nicely.

Also my mentor ( Dr. Don Scorgie – yeah, he is now a doctor 🙂 . Congrats Don ! ) is helping me with technical details and brilliant ideas. FoieGras now has a repository in GNOME svn and I’ve created a branch for tag rendering implementation and copied my works there, So you can check it. Another news is that I’m planning to goto GUADEC next 14th July and I hope it’ll be fun and be able to discuss more about FoieGras there with the team and also hack FoieGras there.

FoieGras-1

FoieGras-2

FoieGras-3

New PHP trends

As a web language PHP is without a doubt is the most popular server language that is in the use. As PHP.net statistics shows by April, 2007 there have been 20,016,421 domains using PHP for their web sites. So you can get a brief idea how popular the language has become.

History

PHP was founded in 1995 by Rasmus Lerdorf, because he needed to build a tool that would track the access to his web page. He used C to create his tools and then he released his tools to open source community under the name PHP/FI (PHP Form Interpreter).

In the first release it had many syntax similarities with Perl and in 1997 PHP 2 was released with some new features. In 1998 PHP 3 was released with many flexible features in it. And even in that stage it’s said to have occupied 10% of web servers.

PHP 4 came in year 2000 and it brought a new look to PHP language. A new object oriented look which I think resulted in initiating many new web trends such as CMS and Frameworks. It also had many new features such as new session features which helped coding with PHP. In 2004, PHP 5 was released with enhanced OOP abilities which gave PHP the strength to compete with any other web language. Unfortunately it seems that most of the web products already had a good based in PHP 4 when PHP 5 came and even now most of the products and web services are using PHP 4 as standard without using the enhanced features in PHP 5.

Some of the new OOP features in PHP 5 are listed here.

  • Abstract classes
  • Final Keyword
  • Constant Keyword
  • try, catch…throw syntax in error handling
  • HTTP_*_VARS are depricated

So if you are a Java or C++ programmer no doubt you will see this is lot familiar. And with that it goes without saying that PHP is a lot tougher language than it sounds.

Evolving world of PHP

I am really glad about the moment I chose to use PHP as my primary web language when I think back. It’s not only because of advanced features of PHP 4 or 5. It’s because of the rapidly evolving community around PHP. Apache the most popular server, and PHP goes hand in hand giving all the functionality a programmer would need in web world without any waste of money. And there’re more than enough tools for a PHP programmer to use, from basic PHP modules to advanced CMS or frameworks. I’ve used ASP.net also for some time, but I can safely say I didn’t get that homely feeling around ASP.net as I had in PHP.

Lately I have started to work with PHP frameworks, mainly cakePHP and CodeIgniter. These frameworks seem to have taken after the steps of Ruby on Rails and still have the space to develop. But it’s very enjoyable to work with them, especially with cakePHP as I have been using it now for some time.

As an example, to access a database and get all data in a table with cakePHP you only need this sentence.
$this->Module->findAll() ;
So you can understand how cool it is to work with cake.

I’m hoping to post my experiences with cakePHP in another post and some tips I found when working with cakePHP.

SoC Preparations

My Hackergotchi

About 3 weeks after the acceptance into my SoC project I thought of putting a note saying what’s going on with the project.

Actually there’s a fair amount of work going on with SoC already. Even though we are not to start coding until May 28, there are things that have to be done before coding starts.

We have been given extra 2 months ahead of coding in order to better preparing for the project and get to know the community. It’s really good to have some time to understand ethics, ways and workings of new environment. that we are working with in next 3 months and may be for quite some time after that. So most of the organizations seem to using this extra time wisely and getting to know about their SoC students and making them comfortable with the community.

Talking about Gnome, it’s really great to work with them. Gnome got 29 projects selected for this year SoC and they are giving a great support to their students. After getting selected first thing I did was chat with my mentor and other guy who will be doing the other part of the project. ( Since the scope of this project seemed too long for SoC time line, Gnome divided the work load into two, thereby giving me most of GUI and may be some widget works and giving Phenatic most of inner works such as subversion integration, adding functions to send patches, more widgets.etc). So we had a sort of group discussion with 4 of us(Me, my mentor, Phenatic and his mentor) in IRC. Then I subscribed to Gnome SoC and Developer mailing lists. Gnome-soc mailing list is the place where all the Gnome SoC students can express their problems, progress in their projects and also can be used as a meeting place. After that I sent my blog and Hackergotchi to Gnome and hope it’ll be integrated into Planet Gnome soon. Yeah, above is my Hackergotchi ( I know it seems funny). And if any one interested in the FoieGras project you can reach us through IRC, gimp.net #doc or #gnome chanels.

I also requested for a new SVN account in Gnome because it’ll make my works easier to have a separate account when doing the coding. There are some strict policies into getting a new account in Gnome and they seem to take security of the accounts very seriously and I agree with that. And also we have to give a sort of a report of what we have done in every week to Gnome starting from this Monday. Yeah, Gnome is taking a head start into the SoC projects and I think it’s a good thing, to keep in touch and correct mistakes ASAP before being too late.

And finally, in personal matters I’ve been doing some python and working with pyGTK which will be used to do the GUI parts of the project. And also I bought a wireless router so I can completely move into Ubuntu. (By the way, if you haven’t tested Fiesty, it has some good features, give it a try.). Hmm, Eventful days these are with nearing the start of SoC projects.

GSoC-Proposal accepted!

It’s with great pleasure that I say, “I’ve been accepted for GSoC this year”. The results were updated in the 12th, April morning and even though there was some confusion at the beginning the day turned out to be a great day of my life. And if this will help any one, this is my proposal for GSoC.
GSoC Proposal for GNOME-FoieGras

As I’ve mentioned previously, GSoC for this year is progressing now. Google Summer of Code is a programme funded by Google to improve the FOSS community in the world. More on GSoC can be found here, Google Summer of Code 2007

I’ve applied for only one project, that is a Gnome project – creating a doc editor for their documentation system, Mallard. The code name for the doc editor is “Foie Gras” and it’s still only a few good ideas and plans. So it’ll have to be implemented completely during the SoC duration.

“Foie Gras” will be done in python and XML. So using this doc editor, writers will be able to edit wikis and XML related documents easily. So hope it’ll be a good asset for the future doc writers who are using Gnome related products, especially Ubuntu.
GSoC-Foie Gras.

Also all my 2 fellow Vesessins who applied for the SoC, Lakshan
and Amila have been selected; so this really a great occasion for us and also it indicates the strength within Vesess. Also representating Vesess, special thank should goto Prabath who gave us a great support from the very begining. And also good luck and congrats to all the GSoC selected people out there and don’t lose your hope who hasn’t got selected this time. You may very well get the chance next time!