Tuesday, November 16, 2010

Propel 1.6 query methods

wow! New Query Methods in propel 1.5/6 are neat, and fun to learn.
http://www.propelorm.org/wiki/Documentation/1.5/ModelCriteria

I am wondering if joining more than two tables is possible using UseTableNameQuery() method.
Do you have any idea?

Wednesday, June 16, 2010

Information should Inspire Transformation

Sitting in the beautiful ambience of nature, I was reading the book of OOPs concepts (Summers of 2nd year of My Graduation)
and was wondering at the perception of world through the frame of Object Orientation.
Lovely ! Awesome!
The train of thought was taking me through the "Concept of God =Creator of this world." also .
I am not an athiest, but I always denied any God outside us.
I also had this concept in my head that - The world which we are living in, is a continous dream by Someone called GOD.
we are nothing but the THOUGHT Instances .... of a main (master) function!
weird things keep coming in my mind.
Looking at the nature I smiled,
recently some Big guy tweeted - on earth day!
We: "Save Earth"-
Earth: "Save yourself, I will take care of myself"
I am wondering why is Software engineering, development, build, localization, globalization are being the buzzword.
Whats /Why the need of a network!! Community, Conversations, Interdependence- These words, I dont see them as technical words, to me they have a spiritual meaning.
I look for the reason why the human race is doing what It is doing!
Look at the plan of Nature. I wonder if we are enabling ourselves for the realization that we ourselves are the creators and The Creations.
"AHAM BRAMHASMI" - I say it as - I am the Creator I am the Creation
I was wondering HOW MIRACELS HAPPEN?
what do you call a MIRACLE!! etc etc !!
Continous thinking, talking, walking what you talk about, make the Miracles Happen.
and for next generation (inherited) those miracles are just the Technology (Vidya).

Wondering Mystery is what few of my friends call me!!
But think over it!

Isn't that Nature is wanting us to realize the fact that We can be the Developers, Builders, Analysts, Integrators, Implementors, The CREATORS, The GODs!!

Monday, May 17, 2010

Taking and Deploying the Dump (fast)

Taking a Dump from command line-
mysqldump -h localhost -u root -p emba > c:\dbname.sql

Deploying the Schema from command line-
mysql -u root -p emba < dbname.sql

advantage- far much faster in comparison to doing it other wise
just make sure that you have created a database before deploying your .sql file into database.

Basic Concept of an ORM

It will generate four files for an entity= Table

say for example - Employee

1) employee.php (over ride or define some new methods (getter setter or others) on your own= custom code)
2) baseEmployee.php (avoid touching it, as these are the files automatically generated by ORM)

These files are basically to deal with Object level things

3) employeePeer.php (here you can override the basic query for an object )
4) baseEmployeePeer.php () (The basic CRUD queries are written here- automatically generated by Propel)

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: