Projects

NetBeans platform plug-in – new file type & multi tab

Posted on Updated on

In my degree program I have a module called industrial training program which I have to follow 6 months in an IT organization in order to get familiar with industries and this module helps to build a strong relationship with industry. And I had a chance to work with NetBeans platform when I was worked in a software company as an intern. Knowledge transfer is one of the main activity in IT organization – share their knowledge with others so I believe that by expressing thing I learnt as a post will help others as well as to me also after some time back.

When I was there I developed a NetBeans plug-in that convert the application as a NetBeans plug-in which provides same functionalities that available in the existing tool.  So this post and the coming posts will talk about the implementation I made while I develop the plug-in. here I’m not gonna describe everything from scratch and I believe that you people have some basic knowledge abut NetBeans platform and plug-in development. If you want get the basic knowledge you can follow NetBeans platform site. Actually what I’m gonna write here is, the small problems I face while developing the plug-in. And that would be the problems you may be faced and searching for the solution.

In this post I attached a small NetBeans plug-in module that create a new file with .abc extension and open it as an xml editor. This is the very basic implementation in new file type module and in future I will post, how we can add additional feature to this module. Maily i will focus on Multi View Elements like Source and Design.

There is lot of tutorials available, just have a look and get basic knowledge. .

http://platform.netbeans.org/tutorials/nbm-filetype.html

Sample code available here

Here I used NetBeans 6.8 IDE + java 1.6

MPTT on WordPress – Programming Project – Plug-in

Posted on Updated on

During my third year I developed a plug-in that applies the MPTT technique to WordPress CMS (it is a GSoC 2009 idea from WordPress – http://codex.WordPress.org/GSoC2009) . I did it as a project for a subject called program project. If we want to add more functionalities to WordPress then it can be done in two ways, implement the code inside the WordPress core or add the implementation as a plug-in. It was a hard thing to deal with WordPress core so I developed it as a plug-in by dividing the project into two parts.

MPTT technique is a great algorithm . . . to get more details refer this site

1. Applying the MPPTT technique to WordPress database –  here i added new fields lft and rgt  to some of the WordPress database table – wp_post, wp_comment. By rearranging the database i can convert the database into tree structure(MPTT) and this tree structure will be useful in the 2nd step.

2.  Showing the contents of WordPress using MPTT – The best way to handle this is to modify the WordPress core but dealing with wordpress core is very hard so i planned to provide a new template that apply the MPTT technique and display the contents of the blog. This new template is not the perfect one but it shows most of the contents(posts and comments) correctly using MPTT technique.

To check it visit http://code.google.com/p/mptt-WordPress-ajith/ or http://sourceforge.net/projects/wordpressmptt/

This slideshow requires JavaScript.

some of the progress documents(RUP) i used to develop the plug-in . . .

  • Project Development Case Document
  • System Requirement Specification
  • System Architecture and Design
  • Weekly Report 1
  • Weekly Report 2
  • Weekly Report 3
  • Weekly Report 4
  • Weekly Report 5
  • Weekly Report 6
  • Weekly Report 7
  • 🙂

    Moving WordPress Proposal

    Posted on Updated on

    Project Description

    Change the domain name

    This part is risky and need to handle it carefully. If we had some problem with WordPress address URL then it’s hard to access admin panel and page lost its beauty. The problem with Blog address URL will break the link with blogs and comments.

    Through my plug-in it will be able to access the wp_option table in WordPress database and make the modification on appropriate fields. But here we have some problem with handling sterilized array so I planned to unsterilized the valued then make the changes in that value and update the values to wp_option table.
    Change the server location without changing domain address

    The current process to move the WordPress is, download the whole files and export the database from old server and upload it to new server so it consumes some time and not an effective way and there is a chance to failure.

    So the new method will be effective and able to reduce the errors while moving the files. Another interesting thing I would like to add here is, blogger no need to wait until the uploading process finishes. It means the process will run in the back and blogger will get a notification after all the files moved to the new server like importing posts to WordPress.

    Sample WordPress is already installed on new server so what we need to do is make a comparison between old and new server and copy the new files from old to new server. For that we need the following details,

    1.   Both servers’ name

    2.   Username and password of ftp server.

    3.   Username and password of WordPress account.

    New server’s details can be retried from wp-config file and the old server’s details must be provided by the user. To do this, I planned to provide a new tab under WordPress setting dashboard so then it’ll be easy to enter the login details and by pressing the button the process will be conducted.

    The starting point of this project will be a plug-in development because it easy to develop and fix the bugs. With the success I plan to move to WordPress core which will be little bit of harder.

    Open Source Development Experience

    PHP Experience

    During my 2nd year I developed a online based database system that keeps track of all sponsorships details of various events that are organized by CSE department. Here php is the server scripting language with MySQL database. Here is the link http://cs3040.totalh.com/ .

    WordPress Experience

    During my third year I developed a plug-in that applies the MPTT technique to WordPress (it is a GSoC 2009 idea from WordPress – http://codex.WordPress.org/GSoC2009 . I did it as a project for a subject called program project. It was a hard thing to deal with WordPress core so I developed it as a plug-in by dividing the project into two parts.

    1. Applying the MPPTT technique to WordPress database – it’s a simple thing and   that was successful

    2.  Showing the contents of WordPress using MPTT – it’s the hard part and in order to do this I need to deal with WordPress core. But simply did this by providing a new template that handle the MPTT technique.
    To check it visit to http://code.google.com/p/mptt-WordPress-ajith/

    Work Experience

    During my training period I got more knowledge about open source because the project I did was finding an open source solution to pdf printer driver. Also worked on developing a plug-in to NetBeans.

    Why WordPress

    I really interested on creating and designing websites. Initially I didn’t have any idea about CMS and used some tools to create the website. After I got to know about WordPress CMS I really involved with it because of its friendliness and power. Also as I mentioned earlier I worked with WordPress in my third year and I have an understanding about WordPress architecture and its coding standards. The best thing I noticed in WordPress is, compare to other CMS it’s simple and easy to understand the architecture of WordPress.

    Moving WordPress

    Posted on Updated on

    WordPress is one of the best Content Management System(CMS) that make our work easy to build a web site. I really interested in involving WordPress CMS and i found that WordPress announced some ideas(GSoC 2010 ideas) that they want to build on their system in future. I have gone through the ideas and found a cool idea MovingWordpress . So i this post i’ll talk about this idea and my solution to handle this problem.

    The problem goes like this . . .

    Currently, if you want to move your WordPress install to a new host and keep the same domain, you only need to move all the files (WordPress Core, Themes, and Plugins), and then export/import the database. It’s pretty straight forward, but still more complex than many users are capable of.

    However, if you want to change the domain (even without moving to a new host) you have to export the database, do some search and replace on the .sql file, and then re-import the updated database. Even then, if the new domain has a different number of characters in it than the old one did, you can run against problems if any of the places you replaced the name happened to be inside a serialized array (almost all the options, including things like widget settings, text widget text, etc).

    The goal of this project would be to make a these kinds of transitions simple and smooth. If only the domain is changing, then when the user updates the WordPress URL we would update internal links in their posts, settings, image urls, etc. If they are moving to a new host, allowing them to install WordPress at their new host and enter their credentials for their old host (WordPress admin credentials as well as FTP credentials) and WordPress would simply import everything (posts, settings, uploads, theme, plugins, etc).

    My solution goes like this . . .

    Change the domain name

    This part is risky and need to handle it carefully. If we had some problem with WordPress address URL then it’s hard to access admin panel and page lost its beauty. The problem with Blog address URL will break the link with blogs and comments.

    Through my plug-in it will be able to access the wp_option table in WordPress database and make the modification on appropriate fields. But here we have some problem with handling sterilized array so I planned to unsterilized the valued then make the changes in that value and update the values to wp_option table.
    Change the server location without changing domain address

    The current process to move the WordPress is, download the whole files and export the database from old server and upload it to new server so it consumes some time and not an effective way and there is a chance to failure.

    So the new method will be effective and able to reduce the errors while moving the files. Another interesting thing I would like to add here is, blogger no need to wait until the uploading process finishes. It means the process will run in the back and blogger will get a notification after all the files moved to the new server like importing posts to WordPress.

    Sample WordPress is already installed on new server so what we need to do is make a comparison between old and new server and copy the new files from old to new server. For that we need the following details,

    1.   Both servers’ name

    2.   Username and password of ftp server.

    3.   Username and password of WordPress account.

    New server’s details can be retried from wp-config file and the old server’s details must be provided by the user. To do this, I planned to provide a new tab under WordPress setting dashboard so then it’ll be easy to enter the login details and by pressing the button the process will be conducted.

    The starting point of this project will be a plug-in development because it easy to develop and fix the bugs. With the success I plan to move to WordPress core which will be little bit of harder.

    Sponsorships management System

    Posted on Updated on

    This post tells about a project ……

    This is a small project about handling database through MySQL. This project is announced by our department under the module of CS 3040 – database systems. As a group we completed this project successfully.

    To check out our project visit http://cs3040.fh50.com/

    And feel free to give feedback ..

    The scenario is,

    There are various events that are organized annually by the CSE Department such as the Formulae CSE, the Hit the Grounds and the AGM. You are required to design a database that keeps track of the sponsorships of these events.

    A particular event can have different types of sponsorships. A particular sponsorship for a given event will have a predefined number of sponsorships. For example in the event Hit the Grounds ’09, there will be Platinum, Gold, Silver and Bronze sponsorships, with 1 Gold, 2 Silver and many Bronze sponsors. Each type of sponsorship will have different kinds of privileges such as the number of banners given. Companies can opt to give any number of sponsorships for a single event.

    Event coordinators should be able to register with the system and create new events. They should be able to a brief description about the event and add sponsorship details, which will be displayed along with the details of the event on the website. They should be able to add/delete/modify the sponsorship details for the events. All events will have a closing date for the call of sponsorships. Companies should be able to register through the system as potential sponsors and view event details and give sponsorships.

    Both event coordinators and companies should be able to

    1. Search for upcoming events

    2. Search for past events

    3. Search for events that fall during a given timeframe

    4. Search for the type of sponsorships of a selected event

    5. Search for the vacant sponsorships of a selected event

    6. Search for the privileges of a given type of sponsorship of a selected event

    Companies should be able to

    1. Search for events sponsored by a their company

    2. Search for events that fall within a specified time frame sponsored by their company

    Event coordinators should be able to

    1. Search and view the list of sponsors of a set of events, grouped according to the name of the sponsor

    2. Search and view the list of sponsors of a set of events, for a given time frame, grouped according to the name of the sponsor.

    You are encouraged to add any additional functionality that you think will be useful.

    have a look ….