how to write views for our own custom module? I am new to drupal. I have created one form submission module like this

 &lt;?php
function form_test_permission()
{
return array(
'submit_form_test' =&gt;array(
'title' =&gt;('submit_form_test'),
'description' =&gt;('submit the form_test form'),
),
);
}
function form_test_menu() {
$items=array();
$items['application']=array(
'title' =&gt;'Application Form',
'type' =&gt;MENU_NORMAL_ITEM,
'access arguments' =&gt; array('submit_form_test'),
'page callback' =&gt;'drupal_get_form',
'page arguments' =&gt; array('form_test_form'),
);
return $items;
}

function form_test_form($form,&amp;$form_state){
$form['firstname'] =array(
'#title' =&gt;t('Firstname'),
'#type' =&gt; 'textfield',
);
$form['lastname'] =array(
'#title' =&gt;t('Lastname'),
'#type' =&gt; 'textfield',
);
$form['addr']=array(
'#title' =&gt;t('Address'),
'#type' =&gt; 'textfield',
);
$form['age']=array(
'#title' =&gt;t('Age'),
'#type' =&gt; 'textfield',
);
$form['submit']=array(
'#value' =&gt; 'submit',
'#type'=&gt; 'submit',
);
return $form;
}
function form_test_form_submit($form,&amp;$form_state) {
$ft_id=db_insert('form_test')
-&gt;fields(array(
'firstname' =&gt; $form_state['values']['firstname'],
'lastname' =&gt;$form_state['values']['lastname'],
'addr'=&gt;$form_state['values']['addr'],
'age'=&gt;$form_state['values']['age']
))
-&gt;execute();
drupal_set_message(t('Saved.'));
}


if I go like localhost/drupal-example/application.. this module works.. But I want to display this module in front page.I referred a lot. But it doesn't works. Can anyone guide me how to write a view function in this module?
In order to be able to use a custom module's table with Views, you need to use hook_views_data().

Even better, I would recommend that you invest some time to learn about entities. Entities are much better for most and thay can be almost immediately used in views.

To define a custom view into your module, put it in file module.views_default.inc (replacing with your module name), in a function module_views_default_views().