Monday, May 17, 2010

Creating a new Module in Drupal

First of all we need to create a folder inside modules folder, basically we will see it in C:\wamp\www\drupal platform\sites\all\modules\Test
and inside this folder now we will create some module related files.
like -.info file, .install, .module,ModuleAction.php, ModuleView.php

it is important to define the id of the new module, for the reason it recognizes a module with its id.
do define name, description, package and core for that module.
core basically defines which drupal version are you using.

There is a choice - To make a Drupal website more of MVC architecture oriented in Place of PAC orieneted, we can introduce this concept of writing
an .xml file .

where you can define the title, action URL and function name etc.

also we will have to write a utility function to generate an array of these things out of XML file, to tell the controller that which function should be called when a particular URL is hit.

if you dont opt for this approach you will have to define this array of title, function name and URL etc same as its done in drupal modules.

Now we need to do a build and check it whether these URLs got registered in the menurouter table or not.

so Do a build and check your menu_router table, also check Actions.php there it should have defined the action name , url etc there also .

Now we need to go to URL like-
localhost/drupalwebsite/?q=admin/build/modules

Now our newly created module should be shown here, just check it to enable
and click on save configuartion.

once its done You can basically access other pages where those specific actions can be performed which you will be defining soon in .module file.


now go to .module file and well make sure that you have defined a hook_menu function.
and the other functions.

If you have done so, just say hurray! as you must be retreiving the function output while hitting the URL.

Learning Drupal

Its as easy as that, installing Drupal and creating a website with it.

Download and Install wamp on your machine, Put the Drupal (Downloaded folder inside the www directory of wamp, which is same as apache/webapps)
Now surf localhost on your browser. you will get to see Drupal directory there as project.
Click and it will take you to easy install.
Just make sure that you have created a database in your MySQL.

Now provide all the specific details that Drupal asks you for while installing itself.
and here you are ready to go.

** PS = Installation of Drupal Basically refers to creating the backend tables needed for the functionality of all the modules you have selected while installing it.

** also note that the first created User becomes the admin of the website by default.

Webapps 2010

I got a chance to attend this event sponsered by siliconindia.
Guys from Yahoo and Rediff took the sessions.
topics were:

Tuesday, December 8, 2009

Winning Habits of Star Developers

Here are few points that i captured in the meeting. It was a great learning experience not only in term of technology but also in terms of technical etiquettes, I met few people with extra ordinary social etiquettes (actually irritating) too.

I would love to share few of the key points with you.
Name of the conference was - Unlock the star within you.
and They have been talking about Qt and Symbian technology as in technical presentations.

This was discussed by Erich John, He was talking about what one should take care of in order to shine in development and delivering the relevant and appealing.


Friday, November 20, 2009

Business Agility

Business agility is nothing but having that ability or say flexibility in your application /softwares or products which can efficiently respond to the frequently changing needs of a client or customers.
Its all about moving to coupling from hardwinding. Its about planning all way around, making up a proper strategy, thinking proactively and incorporate innovation in your work.
Business strategy, BPM () Business process management and SOA (Service oriented application)is all that's demand of time, keeping in view the smart and less job for coder, lesser maintenance and obivously lesser time for implementation.
One biggest challenge what i felt is by now (with whatever little experience I had in industry and also from the life.)
Never Tempt yourself to diverge from the standards try it at least because once you see the code running without even following the standards you simply get in the hold of bad habit.
yeah, obviously you will get back to following standard but I am sure that will be only when you would have faced enough damage so better as naive start following standards.
Documentation and Reporting, these two things are really I have felt these two are badly missing in the industries. specially in the start ups. They should follow all these standards, because very easily they miss it very badly when they start really growing in terms of projects and people.

Wednesday, November 18, 2009

My First Project in Symfony

First of all I installed wamp server 2.0 on my machine.
Its easy http://www.wampserver.com/en/download.php
download the file from here. and then run it as you install any other program.
Next thing to do is- php -V
check php version.
you may get a message that your machine is not able to recognize this command name as php.
so the solution is add environment variable.
right click on mycomputer-> properties-> advanced-> environment variable -> edit.
in the tmp- > use the path C:\wamp\bin\php\php5.3.0. append this using a semicolon after the given path.
then its time to install pear on your machine
its as simple as that - go to C:\wamp\bin\php and just execute the go-pear.bat file.
But when i did it, it gave me an error, may be thats the less compatibility issue of PEAR.
so i found a magic command- that will do u a trick -
this command is -
php.exe -d phar.require_hash=0 go-pear.phar
once you will run it no!!
it will install pear on your machine.
all you will have to do it -
either pressing 'enter' to continue or
typing a 'y' to say a yes for the installation of the files.
now you may feel a problem may be executing your pear command.
same - go and set the environment variable- C:\wamp\bin\php\php5.3.0\pear\, append this in the tmp with along with a semicolon.
Next comes the installation of symfony on your machine
why i preferred symfony installation over pear is - because it lets you explore and understand the real offerings of symfony. also leaves you with a lot many options.

One thing- that i learnt today - if you dont want to use name 'localhost' for- 127.0.0.1 then just go to C:\WINDOWS\system32\drivers\etc\hosts\ and change the name in the last line of the file.
hurrey, Now access your application with the name of your choice!! :)

Sunday, August 30, 2009

BarCamp @ kanpur !!

New word!! , wanna know it ... what a Barcamp is ??
http://en.wikipedia.org/wiki/BarCamp

Great opportunity for kanpurite Techies!!Its happening in Kanpur too !
http://barcamp.org/BarCampKanpur
and the best one for Tech students (BTech, BCA, MCA... ) infact to all (look at the topics, they are common) !

Check the link out, participate and volunteer the event!!

Help making Kanpur a place of learning enthusiasts!!

see you at the event! :)