This is default featured post 1 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
This is default featured post 2 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
This is default featured post 3 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
This is default featured post 4 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
This is default featured post 5 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Friday, 31 January 2014
Thursday, 30 January 2014
Generate a sitemap automatically, does it need to be XML?
The simple answer is no, it doesn't have to be XML. It can be XML file, a text file or RSS/Atom feed (which is basically XML), HTML Sitemap
HTML Sitemaps These are used on your website to display the layout in layers on your website to any customer that would wish too (don't know why they would want too). These unfortunately are not suitable to submit to search engines
RSS Feeds These are rather useful for a feed of comments or articles on a blog, which are constantly updating, which in a sence is like an automatic sitemap of new content/comments on a blog.
XML Files These are in simple terms a set of links in XML format with aditional fields such as link and maybe a last modified field.
Text Files These used to be the prefered method of submitting to yahoo, however a while back they started accepting XML feeds.
HTML Sitemaps These are used on your website to display the layout in layers on your website to any customer that would wish too (don't know why they would want too). These unfortunately are not suitable to submit to search engines
RSS Feeds These are rather useful for a feed of comments or articles on a blog, which are constantly updating, which in a sence is like an automatic sitemap of new content/comments on a blog.
XML Files These are in simple terms a set of links in XML format with aditional fields such as link and maybe a last modified field.
Text Files These used to be the prefered method of submitting to yahoo, however a while back they started accepting XML feeds.
- Can you create a site map with a .php extension Basically as long as your PHP file returns and XML header / mime-type and returns valid XML then you will be fine. Look at Wordpress, their RSS feeds are created using PHP.
header( "content-type: application/xml; charset=UTF-8" );
$doc = new DomDocument('1.0', 'UTF-8');
What are the best ways to increase a site's position in Google?
A lot of people look for technical tricks for SEO and ignore the big picture. You need both. Your SEO (and business) strategy is every bit as important as SEO tactics. There are more than 200 SEO factors that go into rankings, but here are a few of the more important SEO factors that I've experienced, both tactical and strategic:
- Have a website worth visiting. If your website isn't designed for users first, most of the time it won't do well in the search engines.
- Make your site crawlable. Don't rely on Flash or JavaScript navigation. If you need to use JavaScript, use it to enhance an existing (X)HTML menu, not create it. You won't even need a sitemap if your site is crawlable in the first place (but it doesn't hurt). RSS feeds also help you get crawled.
- Do your keyword research using Google's Keyword Tool. I guarantee that you're missing out on traffic opportunities if you don't do this (and most people don't). Take 5 minutes to make sure that your content is hitting the most popular search terms for its subject matter. It's worth it.
- Make a bigger website. Backlinks matter and internal links from your own pages count. The easiest, surest, and most efficient way to get backlinks is to increase the number of pages on your site. The bigger your search engine footprint, the more weight you have to throw around. This is one of the reasons blogs are recommended for SEO.
- Get your title right. You get 65 characters to create an on-topic incentive for the user to click on your search engine listing. Use the opportunity wisely. Your best keywords should be in the title. However, it's not just about using the right keywords; it's also about catching the user's attention while still signalling that your page is going to be relevant and helpful to them. Use Michael Masterson's Four U's Method: Be Unique. Be Useful. Be Urgent. Be Ultra-Specific. Stronger titles use more U's. Remember that your title is often used by social media sites to link to your page as well.
- Get your anchor text right. Use keywords that are also helpful to your users. Never use the infamous 'Click Here' or 'More...' text as a link.
- Get a handle on duplicate content. It's far too easy to create duplicate content.
http://example.com
,http://example.com
/,http://www.example.com
, andhttp://www.example.com
/ are all considered different URLS. URL parameters also create duplicates:http://example.com?a=1&b=2
andhttp://example.com?b=2&a=1
are both different URLs. Use Apache or whatever server you're using to manage your redirect rules so this doesn't happen. This needs to be a consideration from the beginning and should be solved both programatically and with server redirects. - Don't waste time asking for links. There is no bigger waste of time and money, IMO, than emailing other websites offering to do link exchanges. Think about the time spent searching for relevant websites, emailing, responding, and implementing a link exchange. What's your hourly wage? Now think about economies of scale and how many times you have to do that to make a discernible difference for every page of your website. There is no way that you can possibly come out on top. There are easier ways to get links.
- Make your site sharable. All those little social media widgets? They might be annoying, but when used properly, they make it easier for your users to share your content. The caveat here is proper context. Privacy policies, terms of use, registration, and other pages of that ilk are probably not good candidates for a widget.
- Viral content works. But you need to use it wisely. Not every announcement on your site is going to be or should be viral. It has to make sense and it needs to be well-thought-out. Ask yourself objectively, why would someone link to this? If you can't think of a good answer, you should go back to the drawing board. Again, the 4 U's help here.
- Incentivize linking. A great way to kickstart a viral campaign or even a more moderate but steadily growing external link profile. Think contests and giveaways, but also think StackOverflow's badge widgets.
- Build a community An audience of loyal readers will link to and share your content naturally. User-generated content increases your website's footprint and also incentivizes linking.
- Remember the big picture. Why are you doing SEO in the first place? What is the purpose of your website? It's easy to focus so much SEO that you lose sight of what you're trying to do. If you're trying to make money with your site, don't forget that you also need to focus on the usability, the design, the copy, the offer, the product, the checkout process, etc. SEO is only a small part of that.
Plugin Breaking Wordpress Login
Two issues with this plugin, please help...
1 My plugin is breaking my /wp-admin to where all I get is a white screen instead of forwarding to the login screen, which is also broken when this is enabled. The rest of the site works.
2 Another problem with my plugin is that I can't get it to echo back the files in that directory. There are two files in there styles.css and new.css. I've used this method to display files in a folder before but I can't get it to work here.
1 My plugin is breaking my /wp-admin to where all I get is a white screen instead of forwarding to the login screen, which is also broken when this is enabled. The rest of the site works.
2 Another problem with my plugin is that I can't get it to echo back the files in that directory. There are two files in there styles.css and new.css. I've used this method to display files in a folder before but I can't get it to work here.
<?php
/*
Plugin Name: Call Custom CSS
Description: Call custom CSS files to your theme while still being to recieve theme development updates
Version: 1.1.0
Author: Michele Narup
Author URI: http://michelenarup.com
*/
function addcss(){
$directory = get_site_url() . "/wp-content/css/";
$stylesheets = glob($directory . "*.css");
wp_enqueue_style('styles' , get_site_url(). '/wp-content/css/style.css');
//echo $directory;
foreach($stylesheets as $stylesheet)
{
echo "<link rel='stylesheet'";
echo $stylesheet;
echo "type='text/css' media='all' />";
}
}
add_action('wp_head', 'addcss');
?>
Two issues with this plugin, please help... 1 My plugin is breaking my /wp-admin to where all I get is a white screen instead of forwarding to the login screen, which is also broken when this is enabled. The rest of the site works. 2 Another problem with my plugin is that I can't get it to echo back the files in that directory. There are two files in there styles.css and new.css. I've used this method to display files in a folder before but I can't get it to work here. As per a discussion in the comments below I changed the function to now read: |
/*
Plugin Name: Call Custom CSS
Description: Call custom CSS files to your theme while still being to receive theme development updates
Version: 1.1.0
Author: Michele Narup
Author URI: http://michelenarup.com
*/
function load_my_style () {
wp_register_style('customstyle', get_site_url() . '/wp-content/css/style.css');
wp_enqueue_style('customstyle');
}
add_action('wp_enqueue_scripts', 'load_my_style');
This works but does not fix the white screen problem. /wp-admin is
still not rendering anything at all on the page or page source. Also
note, problem #2 is now irrelevant based on the new function, I will
revisit that later. For now I'm focusing on getting the login screen to
work.
Add default WordPress tag meta box to User Profile
Unfortunately, I'd say the answer is no. You could hijack (copy + paste) the code from post_categories_meta_box() and try to adapt it to the user, however you'd spend more time trying to reconnect all the pieces. I'm pretty sure the post meta boxes use ajax to save and add new terms, so you'd have to hijack some javascript and modify that as well.I think your best bet is to continue down the path you're on. You can add an overflow:scroll; css property to your checkbox container so that it doesn't get too long.I reversed engineered the post meta boxes for the front end a few months ago, and it wasn't too hard. I wouldn't suggest trying to reuse the markup and php functions from the core though. Instead, use them as a guide if you get stuck. |
How to redirect non-logged users requesting for a specific page to another page?
How can we tell you where to put it if you didn't tell us what and where you want to display it? Whole posts? Pages? Custom parts of pages? Sorry... I guess my crystal ball isn't quite working today. Since you are, and I quote you: "a newbie to wordpress" you should rather learn, than to ask for direct answer. As for where you should read the reference 1 link. This will tell you which file you need to put it in. As for how to do it you should first read reference link 2 and 3. Overall it should look something like this: |
Of course the above code needs to go into a loop. You can build it up as complex or as simple as you want. For example instead of simple text if not logged in you can display whole sign up form for example or - as I would suggest - a divided screen where user can log in (since user can have an account but forgot to sign in) or sign up (if he doesn't have one). |
Tuesday, 28 January 2014
Are you willing to relocate/travel?
-Always say yes if you need the job
-You can ask whether they will compensate for relocation costs
-You can ask whether they will compensate for relocation costs
Are you a good team player?
Companies look for team players as well as those who are self starters and can work independently, so you need to be versatile:
-You should show that you enjoy working in a team. Say that you are open to suggestions from team members and seniors.
-It is always good to work in a team as one can get the support of other members and in times of crisis everyone can work together to achieve the goal.
-You should show that you enjoy working in a team. Say that you are open to suggestions from team members and seniors.
-It is always good to work in a team as one can get the support of other members and in times of crisis everyone can work together to achieve the goal.
Can you work independently?
-Yes, I can work independently without supervision or support from a team
Do not emphasize on working independently as that will be seen as an inability to work with others.
Do not emphasize on working independently as that will be seen as an inability to work with others.
Do you have any questions for us?
Always have a question ready to answer this one:
-You can ask whether the company allows for lateral and vertical role changes
-You can also ask whether the company encourages learning and development of employees
-Ask whether the company has plans for expansion
-You can also discuss your role in detail
-You can ask whether the company allows for lateral and vertical role changes
-You can also ask whether the company encourages learning and development of employees
-Ask whether the company has plans for expansion
-You can also discuss your role in detail
What is your current CTC and what are your expectations?
-Be honest about your CTC, as you will have to produce you salary slip as a proof of emplyment
-Be realistic when you state your expected CTC, you can ask for a 30-40% hike
-If you are underpaid at your current company you can look for the standard salary paid for the experience you have and ask for that amount
-Be realistic when you state your expected CTC, you can ask for a 30-40% hike
-If you are underpaid at your current company you can look for the standard salary paid for the experience you have and ask for that amount
Are you planning to go for further studies?
Be transparent in your answer.
-If you are pursuing further studies, say so. Tell them why you want to go for that course
-If you are taking up a distance education course or a part time course, they should know, as you will need to take leaves when you appear for exams
Tell us something about yourself, discuss 5 characteristics
List down points that will help you professionally:
-Independent
-Responsible
-Hard working
-Multi tasker
-Prompt
-Add your characteristcs
-Independent
-Responsible
-Hard working
-Multi tasker
-Prompt
-Add your characteristcs
Tell us something about your hobbies
Answer it with honesty, as they can go deeper into this discussion. You can include:
-Browsing the internet
-Blogging,
-Listening to music,
-Chatting with friends
-Reading newspapers,
-Reading books,
-Shopping,
-Watching movies….
-Browsing the internet
-Blogging,
-Listening to music,
-Chatting with friends
-Reading newspapers,
-Reading books,
-Shopping,
-Watching movies….
What is more important to you money or success?
This is tricky question, as money and success both are important and you cannot outweigh the importance of one over the other. Personally you might prefer money over success or success over money, but it is better to be neutral when answering this question in an interview:
You can say, that money and success both are important for you, but if you have to choose you would choose success. The reason being, if one is successful money often follows and you need not focus on money over success..
You can say, that money and success both are important for you, but if you have to choose you would choose success. The reason being, if one is successful money often follows and you need not focus on money over success..
How long can you commit to work with us?
I like new challenges and a chance to grow. As long I keeping getting these, I don’t think I’ll need to switch over. I’d like to believe that this relationship lasts for many years. However, I haven’t set a time limit as such.
If you are allowed to change one thing about your last job, what would it be?
I have been working at a senior level since last many years. These roles have always needed me to make real time decisions. Sometimes the facts, figures and other information in real time cases are not complete & still we have to make a decision. In such cases, there exists a probability of making inaccurate decisions.
Knowing this, I usually run down my old decisions to see the outcome. It makes sure that I don’t repeat a mistake ever again in future. While carrying out one such exercise, I realised that the product promotion strategy that I recommended would have been different, if I had had the complete data and figures but there was no way to get them in real time.
Knowing this, I usually run down my old decisions to see the outcome. It makes sure that I don’t repeat a mistake ever again in future. While carrying out one such exercise, I realised that the product promotion strategy that I recommended would have been different, if I had had the complete data and figures but there was no way to get them in real time.
Have there been instances, when your decision was challenged by your colleague or manager?
Yes, there have been many such instances. I like people who challenge my decisions rather than following me blindly. This keeps me ensured that I am surrounded by thinking brains rather than just a set of dumb followers.
When someone challenges your decisions, you are bound to rethink over it and the chances of reaching the best option are brighter.
When someone challenges your decisions, you are bound to rethink over it and the chances of reaching the best option are brighter.
Is there anything that you do not like about your last or current job?
I was quite enthusiastic while joining my last job. Towards the end, the number of challenges and opportunity to grow further started diminishing. A challenge loving and growth oriented person like me doesn’t enjoy this.
Can you tell us something about your previous boss?
All my bosses possessed some skills worth learning. I have always tried to learn something new from them including my previous boss.
Sunday, 26 January 2014
I see, there’s some gap in your work history. Why?
Yes, I was feeling exhausted after years of non-stop work. So, I decided to take a break and spend some time with my family on a rejuvenating vacation. I am happy to have returned fully recharged.
Have you ever had a problem with your peer? Can you give us an example?
Yes, it happened once. I was quite friendly with a colleague of mine from the other department. While talking to him during the lunch hour, I casually told him about the new marketing strategy that the marketing team was thinking about. He mentioned it to his boss and that caused a lot of confusion between the two departments. This taught me a lesson that you must not discuss any departmental strategies with anyone from other department unless you have been authorised by your boss.
Don’t you think, you are overqualified for this position?
You might feel that I possess more degrees than you require for this position. But, I believe that I grow everyday when I talk to my staff, customers and superiors. So, basically the learning process continues through out the life – I don’t think I am over qualified.
How would you improve upon our product/ company?
Since I’d be coming from an altogether new environment, I am bound to possess a new perspective towards everything here including the company, product, customers, environment, strategy etc. This will enable me to constructively question things which anyone else here might not do. This will help in improving the things and making the product & company better.
Having worked closely with product development team I understand how the research for product development is carried out and how is customer requirement analysed; I’d be able to provide a value addition there too.
Having worked closely with product development team I understand how the research for product development is carried out and how is customer requirement analysed; I’d be able to provide a value addition there too.
Assuming that you are selected, what will be your strategy for next 60 days?
If I am selected for this position, I’ll use my initial 60 days in understanding my role carefully in terms of the contribution to the business and increasing the overall profitability. I’ll sit with my line manager and other juniors to understand what has already been done and what its impact has been. From there on, I’ll formulate my strategy to growth in close conjunction with managers and see that it is properly implemented.
What is a JOIN? Explain types of JOIN in oracle.
A JOIN is used to match/equate different fields from 2 or more tables using primary/foreign keys. Output is based on type of Join and what is to be queries i.e. common data between 2 tables, unique data, total data, or mutually exclusive data.
Types of JOINS:
Simple JOIN
SELECT p.last_name, t.deptName FROM person p, dept t WHERE p.id = t.id;
Find name and department name of students who have been allotted a department
Inner/Equi/Natural JOIN
SELECT * from Emp INNER JOIN Dept WHERE Emp.empid=Dept.empid
Extracts data that meets the JOIN conditions only. A JOIN is by default INNER unless OUTER keyword is specified for an OUTER JOIN.
Outer Join
SELECT distinct * from Emp LEFT OUTER JOIN Dept Where Emp.empid=Dept.empid
It includes non matching rows also unlike Inner Join.
Self JOIN
SELECT a.name,b.name from emp a, emp b WHERE a.id=b.rollNumber
Joining a Table to itself.
What are cascading triggers?
A Trigger that contains statements which cause invoking of other Triggers are known as cascading triggers. Here’s the order of execution of statements in case of cascading triggers:
- Execute all BEFORE statement triggers that apply to the current statement.
- Loop for each row affected statement.
- Execute all BEFORE row triggers that apply to the current statement in the loop.
- Lock and change row, perform integrity constraints check; release lock.
- Execute all AFTER row triggers that apply to the current statement.
- Execute all AFTER statement triggers that apply to the current statement.
Advantage of a stored procedure over a database trigger.
Stored procedures can accept parameters and can return values. Triggers can neither accept parameters nor return values. A Trigger is dependent on a table and the application has no control to not fire a trigger when not needed. On the other hand, a stored procedure can be called as needed.
Write a PL/SQL program for a trigger
PL/SQL program for tracking operation on a emp table.
Create or Replace Trigger EmpTracking
Before Insert or Delete or Update on Emp
For each row
Declare
Begin
If Inserting then
/*Can perform operations just before record is inserted into the emp table*/
Else if Updating then
/*Can perform operations just before record is about to be updated*/
Else if Deleting then
/*Can perform operations just before record is about to be deleted*/
End If
End EmpTracking
Create or Replace Trigger EmpTracking
Before Insert or Delete or Update on Emp
For each row
Declare
Begin
If Inserting then
/*Can perform operations just before record is inserted into the emp table*/
Else if Updating then
/*Can perform operations just before record is about to be updated*/
Else if Deleting then
/*Can perform operations just before record is about to be deleted*/
End If
End EmpTracking
Row level and statement level trigger
A trigger if specified FOR EACH ROW; it is fired for each of the table being affected by the triggering statement. For example if a trigger needs to be fired when rows of a table are deleted, it will be fired as many times the rows are deleted.
If FOR EACH ROW is not specified, it is application to a statement and the trigger is executed at a statement level.
Row Level Trigger
Row Level Trigger is fired each time row is affected by Insert, Update or Delete command. If statement doesn’t affect any row, no trigger action happens.
Statement Level Trigger
This kind of trigger fires when a SQL statement affects the rows of the table. The trigger activates and performs its activity irrespective of number of rows affected due to SQL statement.
If FOR EACH ROW is not specified, it is application to a statement and the trigger is executed at a statement level.
Row Level Trigger
Row Level Trigger is fired each time row is affected by Insert, Update or Delete command. If statement doesn’t affect any row, no trigger action happens.
Statement Level Trigger
This kind of trigger fires when a SQL statement affects the rows of the table. The trigger activates and performs its activity irrespective of number of rows affected due to SQL statement.
Difference between trigger and stored procedure
- A stored procedure can accept parameters while a trigger cannot.
- A trigger can’t return any value while stored procedures can.
- A trigger is executed automatically on some event while a stored procedure needs to be explicitly called.
- Triggers are used for insertions, update and deletions on tables while stored procedures are often using independently in the database.
- A trigger cannot be written in a stored procedure. However, the reverse is not possible.
What do you mean by Redo Log file mirroring ?
- The process of having a copy of redo log files is called mirroring.
- It is done by creating group of log files together. This ensures that LGWR automatically writes them to all the members of the current on-line redo log group.
- In case a group fails, the database automatically switches over to the next group. It diminishes the performance.
- It is done by creating group of log files together. This ensures that LGWR automatically writes them to all the members of the current on-line redo log group.
- In case a group fails, the database automatically switches over to the next group. It diminishes the performance.
What is hot backup and logical backup?
Hot backup
- Backing up the archive log files when database is open is called Hot backup.
- To do this, the ARCHIVELOG mode is enabled.
- Following files are backed up - All data files, Archive log, redo log files and control files.
Logical backup
- Logical back ip is reading a set of database records and writing them into a file.
- An Export utility is required to take the backup while an Import utility is required to recover from the backup.
- Backing up the archive log files when database is open is called Hot backup.
- To do this, the ARCHIVELOG mode is enabled.
- Following files are backed up - All data files, Archive log, redo log files and control files.
Logical backup
- Logical back ip is reading a set of database records and writing them into a file.
- An Export utility is required to take the backup while an Import utility is required to recover from the backup.
What is the purpose of Save Points in Oracle database?
- Save Points are used to divide a transaction into smaller phases.
- It enables rolling back part of a transaction.
- Maximum 5 save points are allowed in Oracle Database.
- Whenever an error is encountered, it is possible to rollback from the point where the SAVEPOINT has been saved.
- It enables rolling back part of a transaction.
- Maximum 5 save points are allowed in Oracle Database.
- Whenever an error is encountered, it is possible to rollback from the point where the SAVEPOINT has been saved.
Differentiate between: a.) TRANSLATE and REPLACE. b.) What is Merge Statement used for?
a.) TRANSLATE and REPLACE.
- Translate is used to substitute character by character.
- Replace is used to substitute a single character with a word.
b.) What is Merge Statement used for?
- Merge statement is used to select rows from one or more data source to updating and insert into a table or a view.
- Translate is used to substitute character by character.
- Replace is used to substitute a single character with a word.
b.) What is Merge Statement used for?
- Merge statement is used to select rows from one or more data source to updating and insert into a table or a view.
What are the various Oracle Database objects?
Various database objects are as follows:
- Tables – This is a set of elements organized in vertical and horizontal fashion.
- Tablespaces – This is a logical storage unit in Oracle.
- Views – It is virtual table derived from one or more tables.
- Indexes – This is a performance tuning method to process the records.
- Synonyms – This is a name for tables.
- Sequences.
- Tables – This is a set of elements organized in vertical and horizontal fashion.
- Tablespaces – This is a logical storage unit in Oracle.
- Views – It is virtual table derived from one or more tables.
- Indexes – This is a performance tuning method to process the records.
- Synonyms – This is a name for tables.
- Sequences.
Explain the following: a.) BLOB datatype. b.) DML.
a.) BLOB datatype.
- It is a data type with varying length binary string, used to store two gigabytes memory.
- For BLOB, the length needs to be specified in bytes.
b.) DML.
- DML - it is also termed as Data Manipulation Language (DML).
- It is used to access and manipulate data in the existing objects.
- DML statements are insert, select, update and delete.
- It is a data type with varying length binary string, used to store two gigabytes memory.
- For BLOB, the length needs to be specified in bytes.
b.) DML.
- DML - it is also termed as Data Manipulation Language (DML).
- It is used to access and manipulate data in the existing objects.
- DML statements are insert, select, update and delete.
Explain: a.) Integrity constraint. b.) COALESCE function
a.) Integrity constraint.
- It is a declaration defined in a business rule for a table column.
- Integrity constraint ensures the accuracy and consistency of data in a database.
- It is of three types - namely - Domain Integrity, Referential Integrity and Domain Integrity.
b.) COALESCE function
- This function is used to return the value which is set not to be null in the list.
- Incase all values in the list are null the coalesce function will return NULL.
- Its representation:
Coalesce(value1, value2, value3,…)
- It is a declaration defined in a business rule for a table column.
- Integrity constraint ensures the accuracy and consistency of data in a database.
- It is of three types - namely - Domain Integrity, Referential Integrity and Domain Integrity.
b.) COALESCE function
- This function is used to return the value which is set not to be null in the list.
- Incase all values in the list are null the coalesce function will return NULL.
- Its representation:
Coalesce(value1, value2, value3,…)
Will you be able to store pictures in the database?Explain.
- Yes, pictures can be stored in the database using Long Raw Data type.
- This datatype is used to store binary data for 2 gigabytes of length.
- However, the table can have only one Long Raw data type.
- This datatype is used to store binary data for 2 gigabytes of length.
- However, the table can have only one Long Raw data type.
What is a sub query? What are its various types?
- Sub Query also termed as Nested Query or Inner Query is used to get data from multiple tables.
- A sub query is added in the where clause of the main query.
There can be two types of subqueries:
a.) Correlated sub query
- It can reference column in a table listed in the from list of the outer query but is not as independent as a query. .
b.) Non-Correlated sub query
- Results of this sub query are submitted to the main query or parent query.
- It is independent like a query
- A sub query is added in the where clause of the main query.
There can be two types of subqueries:
a.) Correlated sub query
- It can reference column in a table listed in the from list of the outer query but is not as independent as a query. .
b.) Non-Correlated sub query
- Results of this sub query are submitted to the main query or parent query.
- It is independent like a query
What suggestions do you have to reduce the network traffic?
Following are some of the actions which can be taken to reduce the network traffic:
- Use snapshots to replicate data.
- Use remote procedure calls.
- Replicate data in distributed environment.
- Use snapshots to replicate data.
- Use remote procedure calls.
- Replicate data in distributed environment.
What do you mean by a deadlock?
- When two processes are waiting to update the rows of a table which are locked by another process, the situation is called a deadlock.
- The reasons for it to happen are:
- lack of proper row lock commands.
- Poor design of front-end application
- It reduces the performance of the server severely.
- These locks get automatically released automatically when a commit/rollback operation is performed or any process is killed externally.
- The reasons for it to happen are:
- lack of proper row lock commands.
- Poor design of front-end application
- It reduces the performance of the server severely.
- These locks get automatically released automatically when a commit/rollback operation is performed or any process is killed externally.
What is a synonym? What are its various types?
synonym can be called as an alias for a table, view, sequence or program unit. It is basically of two types:
- Private - Only the owner can access it.
- Public - Can be accessed by any database user.
- Private - Only the owner can access it.
- Public - Can be accessed by any database user.
a.) What do you mean by a tablespace?
- These are the Logical Storage Units into which a database is divided.
- It is used to group together the related logical structures.
What are the varoius components of physical database structure of Oracle database?
Oracle database comprises of three kinds of files:
- Datafiles,
- Redo log files,
- Control files.
- Datafiles,
- Redo log files,
- Control files.
Explain i.)Rename ii.)Alias.
- Rename - It is a permanent name provided to a table or column.
- Alias - It is a temporary name provided to a table or column which gets over after the execution of SQL statement.
- Alias - It is a temporary name provided to a table or column which gets over after the execution of SQL statement.
What is ANALYZE command used for?
ANALYZE command is used to perform various functions on index, table, or cluster, as listed below:
- It helps in dentifying migrated and chained rows of the table or cluster.
- It helps in validating the structure of the object.
- It helps in collecting the statistics about object used by the optimizer. They are then stored in the data dictionary.
- It helps in deleting statistics used by object from the data dictionary.
- It helps in dentifying migrated and chained rows of the table or cluster.
- It helps in validating the structure of the object.
- It helps in collecting the statistics about object used by the optimizer. They are then stored in the data dictionary.
- It helps in deleting statistics used by object from the data dictionary.
What is AJAX and what problem does it solve?
Ajax is a set of client side technologies that allows asynchronous communication between client and web server. In synchronous communication, complete round trip happens with each request/response action event when small data of the page to be refreshed. Ajax has solved this problem of posting entire information every time through asynchronous communication.
XmlHttp Request is the basic fundamental behind Ajax. This allows browser to communicate with server without making post backs.
XmlHttp Request is the basic fundamental behind Ajax. This allows browser to communicate with server without making post backs.
Explain: a.) Integrity Constraints
It can be called as a declarative way in order to define a business rule for a table's column
b.) Index
- It can be called as an optional structure which is associated with a table for direct access to the rows- Index can be created for one or more columns in a table
c.) Extent
- It can be defined as a specific number of contiguous data blocks in single allocation.- It is used to store a specific type of information.
Friday, 24 January 2014
explains XML User Interface Language (XUL)
XUL is based on the core existing Web standards - CSS, DOM and JavaScript. XUL relies on Gecko implementations, and, hence, it is not interoperable with non-Gecko standards. XUL does not have any formal specification. Widgets running on the Mozilla platform can be developed using XUL and ported across different platforms. Components of XUL documents include: Content: The arrangement of UI components is defined in the documents that together constitute the contents of XUL files. Skin: Skin is regarded as the customizable set of colors or patterns that can be associated with a given XUL user interface defined in the form of skin files. It may include CSS and image files. Locale:Language changes can be incorporated in the user interface using internationalization and localization features provided by XUL.XUL files contain both XML and HTML elements in addition to XUL elements defined using the XUL namespace. A MIME type text/xul can be associated with XUL documents. An XUL interface defines a mechanism for programming a set of disconnected widgets. Simple scripting can be used like JavaScript, or complex C++ code can be used to define widget behavior.
What does XML User Interface Language (XUL) mean?
XUL is a user-interface language developed by Mozilla that enables developers to design cross-platform applications that can run in both online and offline modes. It is customizable using different graphics, text and layouts to support localized and internationalized markets.
explains XML Schema
XML schemas are expressed using Document Type Definition (DTD) language, which is native to the XML specification but with a fairly limited capability. An XML document can be associated with a schema language, either by markup in the XML document or through some external means.
The process of checking whether an XML document adheres to a schema is called validation. XML documents are valid if they satisfy schema requirements with which they are associated, including constraints such as:
The process of checking whether an XML document adheres to a schema is called validation. XML documents are valid if they satisfy schema requirements with which they are associated, including constraints such as:
- Structure as specified by a regular expression syntax
- Requirements for interpretation of character data
- Elements and attributes to be included along with their allowed structure
Definition - What does XML Schema mean?
An XML schema is the structural layout of an XML document, expressed in terms of constraints and contents of the document. Constraints are expressed using a combination of the following:
- Grammatical rules governing the order of elements
- Data types governing an element and content attribute
- Boolean predicates that the content has to satisfy
- Specialized rules including uniqueness and referential integrity constraints
explains XML Query Language (XQuery)
XQuery acts like an expression language since it specifies the exact flow of data and operations to achieve a desired result. It does not mention how the data is associated with a particular programming platform in terms of syntax. For example, an expression specifies the result value of an addition but does not deal with the declaration of variables, the data types used and commands or function calls.
XML documents can be created with the help of the syntax provided with XQuery. The XML documents are processed to extract structural information, which is classified as document nodes, elements, attributes, text nodes, comments, processing instructions and namespaces.
All data items or values are treated as sequences by default. Either atomic values or nodes are the type of data items present in an XML document. The atomic values like Boolean, integer and string are as per XML schema specification. Features such as full text based search and document updates are currently under development.
XML documents can be created with the help of the syntax provided with XQuery. The XML documents are processed to extract structural information, which is classified as document nodes, elements, attributes, text nodes, comments, processing instructions and namespaces.
All data items or values are treated as sequences by default. Either atomic values or nodes are the type of data items present in an XML document. The atomic values like Boolean, integer and string are as per XML schema specification. Features such as full text based search and document updates are currently under development.
Definition - What does XML Query Language (XQuery) mean?
XML Query Language (XQuery) is a query and programming language for processing XML documents and data. XML data and other databases that store data in a format analogous to HTML can be processed with XQuery. The main objective of XQuery is to provide query mechanisms for data extraction from real and virtual Web based documents. It aims to link Web and database technologies with the help of XML.
The World Wide Web Consortium is responsible for framing XQuery 1.0.
The World Wide Web Consortium is responsible for framing XQuery 1.0.
explains XML Data Island
In an HTML document, the XML element is written as:
Internet Explorer (IE) Mobile 6 is required for XML data islands to function properly; the same methodology may be used for IE Mobile 6.5.
It signifies the beginning of the XML data island. Following this, an ID attribute may be inserted to identify the data island:
An XML data island may be created by three methods: Inline XML; using an XML tag and using the script tag.Internet Explorer (IE) Mobile 6 is required for XML data islands to function properly; the same methodology may be used for IE Mobile 6.5.
Definition - What does XML Data Island mean?
An XML data island is an XML document residing within an HTML page. This avoids having to write code (i.e. a script) just to load the XML document, or having to load it through a tag. Client side scripts can directly access these XML data islands. These XML data islands can be bound to HTML elements also.
explains Extensible Markup Language (XML)
XML is designed to describe data but is not concerned with the data's visualization. The tags created in XML are self explanatory and the user is free to define their own tags - hence the extensible.
XML support is provided by many programming language platforms to create and process XML data. Simplicity, portability, platform independence, usability are some of the key features that have resulted in the increasing popularity of the use of XML based standards.
XML has been the main source of motivation for development of Service Oriented Architecture (SOA) platforms such as Web Services that are not tied to any particular language and collaborate effectively in heterogeneous environments. RSS, Atom, SOAP, XHTML are some of the standards influenced by XML.
XML support is provided by many programming language platforms to create and process XML data. Simplicity, portability, platform independence, usability are some of the key features that have resulted in the increasing popularity of the use of XML based standards.
XML has been the main source of motivation for development of Service Oriented Architecture (SOA) platforms such as Web Services that are not tied to any particular language and collaborate effectively in heterogeneous environments. RSS, Atom, SOAP, XHTML are some of the standards influenced by XML.
Definition - What does Extensible Markup Language (XML) mean?
Extensible Markup Language (XML) is a universal format maintained by the W3C used for representation and transfer of structured data on the web or between different applications.
The language uses a structured representation by allowing user to create custom defined tags according to XML Document Type Definition (DTD) standards. The structure of XML document can be represented in the form of a tree known as Document Object Model (DOM).
The language uses a structured representation by allowing user to create custom defined tags according to XML Document Type Definition (DTD) standards. The structure of XML document can be represented in the form of a tree known as Document Object Model (DOM).
explains Dynamic HyperText Markup Language (DHTML)
While DHTML enhances the website user’s experience, the technology may also be frustrating for users when it is used incorrectly. For example, a website menu with flashy DHTML animations can easily confuse user navigation. Another DHTML issue occurs when Web developers attempt to create cross-browser DHTML, which is very difficult.
For Web developers, DHTML poses the following problems:
For Web developers, DHTML poses the following problems:
- It can be difficult to develop and debug because of lack of Web browser and technological support.
- DHTML scripts may not work correctly in various Web browsers.
- The Web page layout may not display correctly when it is developed to display in different screen size combinations and in different browsers.
Definition - What does Dynamic HyperText Markup Language (DHTML) mean?
Dynamic HyerText Markup Language (DHTML) is a combination of Web development technologies used to create dynamically changing websites. Web pages may include animation, dynamic menus and text effects. The technologies used include a combination of HTML, JavaScript or VB Script,
CSS and the document object model (DOM).
Designed to enhance a Web user’s experience, DHTML includes the following features:
CSS and the document object model (DOM).
Designed to enhance a Web user’s experience, DHTML includes the following features:
- Dynamic content, which allows the user to dynamically change Web page content
- Dynamic positioning of Web page elements
- Dynamic style, which allows the user to change the Web page’s color, font, size or content
Definition - What does HTML5 Local Storage mean?
HTML5 local storage is a component of the Web storage application programming interface. It is a method by which Web pages locally store named key/value pairs inside a client's Web browser. Similar to cookies, this saved data exists - even when you close a browser tab, surf away from a current website, exit a browser tab or close a main browser. Unlike cookies, this data is not carried to the remote Web server unless it is sent manually. Because HTML5 local storage is natively integrated into Web browsers, it is available without third-party browser plug-ins. It is described in the HTML5 specifications.
Local storage is mainly used to store and retrieve data in HTML pages from the same domain. Even after restarting a browser, the data can be recovered from all windows in the same domain. This type of storage offers numerous options for Web apps.
Browsers, such as Firefox 3.5+, Internet Explorer 8.0+, Chrome 4.0+, Safari 4.0+, Mobile Safari (iPhone/iPad), Opera 10.5+ and Android 2.0+ support HTML5 local storage.
Local storage is mainly used to store and retrieve data in HTML pages from the same domain. Even after restarting a browser, the data can be recovered from all windows in the same domain. This type of storage offers numerous options for Web apps.
Browsers, such as Firefox 3.5+, Internet Explorer 8.0+, Chrome 4.0+, Safari 4.0+, Mobile Safari (iPhone/iPad), Opera 10.5+ and Android 2.0+ support HTML5 local storage.
explains HTML5 Local Storage
HTML5 local storage is structured on named key/value pairs, unlike other databases that make use of SQL-intense applications. Data is stored based on a named key. After that, data may be retrieved using the same key. The named key is in a string format. The data may be of any type supported by JavaScript, such as Booleans, strings, floats or integers. Even so, the data is generally saved as a string. If users store and retrieve anything other than strings, they must make use of functions, such as parseFloat() or parseInt(), to coerce the recovered data to the expected JavaScript datatype.
From the JavaScript code, HTML5 local storage may be accessed through a localStorage object on the global window object. The localStorage object stores the data without any expiration date. The data is not wiped, even after closing the browser, and may be accessed at any time. Because it is client-side, stored data is based on the browser that is used.
From the JavaScript code, HTML5 local storage may be accessed through a localStorage object on the global window object. The localStorage object stores the data without any expiration date. The data is not wiped, even after closing the browser, and may be accessed at any time. Because it is client-side, stored data is based on the browser that is used.
explains HTML5 Cookie
An HTML5 cookie generally serves a similar functionality as that of a standard website cookies, but it's much faster and more secure. It was designed to eliminate the security issues that come with a traditional cookie. An HTML5 cookie stores the data directly on the browser in two distinct forms:
- Session storage saves the data until the session expiry
- Local storage is persistent storage
Definition - What does HTML5 Cookie mean?
An HTML 5 cookie is a cookie-like storage options available in HTML 5. It consists of browser-based local storage and session storage, which is created and accessible by the Web page itself.
An HTML5 cookie is also known as HTML5 Web storage and is an alternative to the commonly used browser cookie.
An HTML5 cookie is also known as HTML5 Web storage and is an alternative to the commonly used browser cookie.
explains HTML 4.0
HTML 4.0 extended the previous HTML 3.2 revision into powerful capabilities including ideas never implemented from HTML 3.0 draft. On December 1999, HTML 4.0 was replaced by HTML 4.01 as a minor update correcting minor problems. Thus, HTML 4.01 is the final standard version recommended by W3C.
HTML4 (or HTML 4.01) is constantly evolving. The next revision is HTML 5.0 which has been debated for years and has a very complex process for implementation, though many browsers currently support some of the newer HTML5 features. While HTML 4 will be phased out eventually, it while be a while before everything moves to HTML5.
HTML4 (or HTML 4.01) is constantly evolving. The next revision is HTML 5.0 which has been debated for years and has a very complex process for implementation, though many browsers currently support some of the newer HTML5 features. While HTML 4 will be phased out eventually, it while be a while before everything moves to HTML5.
Definition - What does HTML 4.0 mean?
Hypertext Markup Language revision 4.0 (HTML 4.0) is a markup language that represents the structure and presentation of web pages. HTML 4.0 was published on December 1997 as a W3C Recommendation.
In addition to previous revisions of HTML, HTML 4.0 supports style sheets, scripting languages, object support, more multimedia options, and improved accessibility for users with disabilities, among other features.
In addition to previous revisions of HTML, HTML 4.0 supports style sheets, scripting languages, object support, more multimedia options, and improved accessibility for users with disabilities, among other features.
5 Things You Need to Know About HTML5
Takeaway: The rapid adoption of HTML5 - the successor to the now long-in-the-tooth HTML4 - is allowing programmers to create some impressive websites.
Whether you’re a programmer or someone who enjoys the wonders that HTML5 lets website designers create, the new markup language has a lot to offer. Here are five cool features of HTML5:
Geolocation Is Where It’s At
"Would Like To Use Your Current Location?" How many times have you seen that on your phone in the last few years? It’s HTML5’s convenient yet possibly intrusive geolocation feature, and you’re going to be seeing it even more. With an increasing percentage of traffic coming from mobile devices (the United States is at 12 percent, while India is more than 60 percent), it’s no wonder that many websites are using HTML5’s geolocation feature to hyper-localize a user’s Web or app experience. This site should pinpoint your position extremely well on a smartphone and surprisingly well on a desktop.HTML5 Will Improve Your SEO
Want to improve your Google page rank? Use HTML5. According to searchengineland.com, using HTML5 is a "godsend" for SEO, especially for sites that use a lot of Flash, since "searchbots will be able to crawl your site and index your content. All of the content that is currently embedded in animations will be readable to search engines. In basic SEO theory, this one aspect of HTML5 will do wonders for your website’s ability to drive organic search traffic." HTML5 also makes it easier for programmers to use audio and video on their sites, and search engines favor media-rich pages.It’s a Blank <Canvas> for Gaming
Programmer Josh Goldberg faithfully recreated Super Mario Brothers, a cherished childhood game, by using HTML5 and the <canvas> element. His impressive piece of programming went viral, attracting more than 300,000 unique, Mario-loving visitors per day. Unfortunately, he didn’t check with Nintendo before undertaking the year-long task of recreating the game. Mario’s owner, Nintendo, stated that the game was "illegal" and should be taken down immediately, as it violated their copyright. The site was taken down on November 1, 2013 - but not before nearly 2.7 million visitors had a chance to play the game. WebdesignerDepot.com has a list of 25 "incredibly addictive," legal HTML5 games. HexGL, a futuristic racing game, has stunning graphics for a browser-based game.Local Storage Means No More Cookies
Cookies have worked (reasonably) well for programmers since Netscape invented them in 1994, but they have significant drawbacks, including the need to be sent with every HTTP request, lack of encryption and size limitation (about 4k). While technically not part of the HTML5 standard (it was split off from HTML5 a couple of years ago), local storage overcomes the cookie’s limitations by storing data locally in the browser. The data is never sent to the server; no third-party plugins are required and the 5MB size limit is more robust. IBM has a cool sticky note example of local storage, while the curious should visit Dive Into HTML, which goes deep on local storage.Create a Garage Band Using Jam With Chrome
Invite some friends and form a band with Jam with Chrome, an HTML5 Web app with 19 different instruments, amazing graphics (the vibrating guitar string effect is mesmerizing) and surprisingly good sound. This Chrome-only game takes full advantage of HTML5 features, like Web Audio (which creates better sound from the browser), Websockets (to let band members interact in real time) and the Canvas feature, which allows for better graphics (including the aforementioned vibrating string effect).Web developers don’t seem to care that HTML5 is not a standard. In fact, the entire Web community is benefiting while developers happily use its rich new features to develop amazing websites and games.
Techopedia explains Web Browser?
A variety of Web browsers are available with different features, look-and-feel, and designed to run on different operating systems. Common browsers include Internet Explorer from Microsoft, Firefox from Mozilla, Google Chrome, Safari from Apple, and Opera. All major browsers have mobile versions that are lightweight versions for accessing the Web on mobile devices.
Web browsers date back to the late 1980s when an English scientist, Tim Berners-Lee, first developed the ideas that led to the World Wide Web (WWW). This consisted of a series of pages created using the HTML language and joined or linked together with pointers called hyperlinks. Following this was the need for a program that could access and display the HTML pages correctly - the browser.
In 1993, a new browser known as Mosaic was developed, which soon gained widespread usage due to its graphical-interface capability. Marc Andreesen, a member of the Mosaic development team, left in 1994 to develop his own commercial browser based on Mosaic. He called it Netscape Navigator, and it quickly captured over 90 percent of the nascent browser market. It soon faced stiff competition in 1995 from Microsoft's Internet Explorer, which was freely bundled with Windows 95 and has been a feature of every version of Windows since that time. It was pointless to buy Navigator when Internet Explorer was free, and as a result, Navigator (and Netscape) were driven into the ground. But while Mosaic an Netscape are no longer around, the age of the browser was launched and continues to this day, as more and more applications move to the Web.
Web browsers date back to the late 1980s when an English scientist, Tim Berners-Lee, first developed the ideas that led to the World Wide Web (WWW). This consisted of a series of pages created using the HTML language and joined or linked together with pointers called hyperlinks. Following this was the need for a program that could access and display the HTML pages correctly - the browser.
In 1993, a new browser known as Mosaic was developed, which soon gained widespread usage due to its graphical-interface capability. Marc Andreesen, a member of the Mosaic development team, left in 1994 to develop his own commercial browser based on Mosaic. He called it Netscape Navigator, and it quickly captured over 90 percent of the nascent browser market. It soon faced stiff competition in 1995 from Microsoft's Internet Explorer, which was freely bundled with Windows 95 and has been a feature of every version of Windows since that time. It was pointless to buy Navigator when Internet Explorer was free, and as a result, Navigator (and Netscape) were driven into the ground. But while Mosaic an Netscape are no longer around, the age of the browser was launched and continues to this day, as more and more applications move to the Web.
Definition - What does Web Browser mean?
A Web browser is a software program that allows a user to locate, access, and display Web pages. In common usage, a Web browser is usually shortened to "browser." Browsers are used primarily for displaying and accessing websites on the Internet, as well as other content created using Hypertext Markup Language (HTML) and Extensible Markup Language (XML), etc.
Browsers translate Web pages and websites delivered using Hypertext Transfer Protocol (HTTP) into human readable content. They also have the ability to display other protocols and prefixes, such as secure HTTP (HTTPS), File Transfer Protocol (FTP), email handling (mailto:), and files (file:). In addition, most browsers also support external plug-ins required to display active content, such as in-page video, audio and Flash content.
Browsers translate Web pages and websites delivered using Hypertext Transfer Protocol (HTTP) into human readable content. They also have the ability to display other protocols and prefixes, such as secure HTTP (HTTPS), File Transfer Protocol (FTP), email handling (mailto:), and files (file:). In addition, most browsers also support external plug-ins required to display active content, such as in-page video, audio and Flash content.
Techopedia explains Web Programming
Web programming can be briefly categorized into client and server coding. The client side needs programming related to accessing data from users and providing information. It also needs to ensure there are enough plug ins to enrich user experience in a graphic user interface, including security measures.
- To improve user experience and related functionalities on the client side, JavaScript is usually used. It is an excellent client-side platform for designing and implementing Web applications.
- HTML5 and CSS3 supports most of the client-side functionality provided by other application frameworks.
Definition - What does Web Programming mean?
Web programming refers to the writing, markup and coding involved in Web development, which includes Web content, Web client and server scripting and network security. The most common languages used for Web programming are XML, HTML, JavaScript, Perl 5 and PHP. Web programming is different from just programming, which requires interdisciplinary knowledge on the application area, client and server scripting, and database technology.
Tuesday, 14 January 2014
How does caching work in Drupal?
Drupal caching system allows customized settings to speed up website using different configuration with page caching, block caching and lifetime for cached pages.
Page caching:
Page caching:
- If enables, page caching will only be used for anonymous users.
- If you enable page caching, the entire HTML of each page will be stored in the database. This significantly reduces the amount of queries needed.
- This automatically means that blocks will also get cached, disregarded their own cache settings.
- If Varnish is configured, this will also enable varnish caching
- The page cache max-age will be used (see below) for each page.
- You can check the “X-Drupal-Cache” HTTP header to check if this cache is HIT.
- If you enable block caching, without enabling page caching, the block cache settings will be used (for anonymous and authenticated).
- The defaults for most blocks is “don’t cache” because that is the default for blocks who don’t have their cache settings specifically declared.
- You can use block_cache_alter module to set this for each block.
- When it’s block created by Views, you can set the cache settings for a block in Views.
- This is the amount of time before the page cache is cleared.
- Page caches are cleared on each cron run (system_cron).
- Be warned: incorrect settings of your cron and this setting might kill your website performance. See also this issue.
- This only applies for external caching mechanisms, for example your browser cache or Varnish.
- It sets the Cache-Control max-age value in the HTTP-HEADERS.
- This setting only takes effect when page caching is turned on.
What are hooks in Drupal ?
hooks are drupal api code which allows module to interact with the Drupal core.
Drupal’s module system is based on the concept of “hooks”. A hook is a PHP function that is named foo_bar(), where “foo” is the name of the module (whose file name is thus foo.module) and “bar” is the name of the hook. Each hook has a defined set of parameters and call back functions to trigger functionality on specific event. For example if you use form with submit button, on submit event you can have specific functionality.
Drupal’s module system is based on the concept of “hooks”. A hook is a PHP function that is named foo_bar(), where “foo” is the name of the module (whose file name is thus foo.module) and “bar” is the name of the hook. Each hook has a defined set of parameters and call back functions to trigger functionality on specific event. For example if you use form with submit button, on submit event you can have specific functionality.
What modules do you always recommend and why?
- Views - This module is essential in every website I build. It makes displaying lists of content very easy. If you want an image slideshow, a list of blog posts, a list of products, etc., views is the best place to start.
- Panels - Panels gives you the ability to create custom pages easily. These custom pages can have multiple regions of content. For example, you may want to create a home page that has a Slideshow on the top, and a two column layout below.
- Ctools - On its own, Ctools does not seem to do a lot. However, it is actually a very powerful framework if you begin developing your own modules. I have used Ctools in the past for developing multi-step forms, modal dialog boxes, and even multi-step forms inside of modal dialog boxes.
- Token - Tokens are little snippets of text that can be used as replacement patterns. For example, if your website sends out emails and you want to add in the users name, or you want fill in a link path with a node id to provide a helpful link to content, tokens will save the day.
- Pathauto - The Pathauto module is a necessity for any website that frequently adds new content. It is also especially important if you have a website that allows users to create content using content types. Pathauto simplifies creating clean and search engine friendly URLS for the various content you add to your site.
- Webform - If you want to provide easy to fill out forms for the visitors of your site, the Webform module will help you out.
- Rules - Drupal rules will allow you to set up condition actions.
- Date - This is useful for allowing the easy selections of dates in content types (with a nice date popup). It also integrates nicely with the views module.
- Quicktabs - Makes it easy to add tabbed content without having to write your own Javascript/Jquery. What more do I have to say?
- Libraries - Makes organizing your various libraries of functionality easy (see Jquery UI above for an example).
- Google Analytics - I don’t build a Drupal website without adding Google Analytics. This module makes it very simple. What gets measured, gets improved after all.
What is a Module in drupal ?
A module is software (code) that extends Drupal features and/or functionality. Drupal Supports – Core modules – included with the main download of Drupal, and you can turn on their functionality without installing additional software. Contributed modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation. You can also create your own module – CustomModules” using PHP programming, and Drupal’s module API.
What makes “Search” in drupal as an excellent feature than Other CMS?
Drupal uses search indexing using content type, classification information from taxonomy system and the content meta data.
Drupal treats its content as fine-grained semantic information that Drupal knows about can be used to fine-tune search results.
Also, you can tweak and override the search system to adjust the user interface, the way content is ranked, and the way results are displayed. That said, Drupal integrates well with external search engines such as Apache Solr, Xapian, and Sphinx if the built-in search does not meet your needs very easily.
How to debug code in Drupal?
Simple using print_r or var_export , you can debug code within Drupal.
<?php
$node = node_load(123);
print_r($node);
?>
Drupal devel module provides dsm and dpm functions to debug code within drupal.
<?php
$node = node_load(123);
dpm($node);?>
drupal latest version provides debug inbuilt function to print errors, notices and warnings as well.This could be in the page or in the logs depending on how php is configured.
For example,
<?php
$node = node_load(123);
debug($node);
?>
The full options for debug function are:
debug($data, $label, $print_r);
The $data is pretty self explanatory. It can be anything you could pass through print_r or var_export. The $label allows for a custom label to be added. This is ideal when you are sending the information to a log and you want a key to search the logs for. The 3rd argument is whether to use print_r or var_export. The default is var_export. If you are interested between the two I’d suggest reading the manual pages.
<?php
$node = node_load(123);
print_r($node);
?>
Drupal devel module provides dsm and dpm functions to debug code within drupal.
<?php
$node = node_load(123);
dpm($node);?>
drupal latest version provides debug inbuilt function to print errors, notices and warnings as well.This could be in the page or in the logs depending on how php is configured.
For example,
<?php
$node = node_load(123);
debug($node);
?>
The full options for debug function are:
debug($data, $label, $print_r);
The $data is pretty self explanatory. It can be anything you could pass through print_r or var_export. The $label allows for a custom label to be added. This is ideal when you are sending the information to a log and you want a key to search the logs for. The 3rd argument is whether to use print_r or var_export. The default is var_export. If you are interested between the two I’d suggest reading the manual pages.
How do you handle upgrades?
Steps to Upgrade drupal minor version.
- backing up the site,
- putting it into maintenance mode
- downloading the new version of the module
- uncompressing it
- running update.php
- testing the site
- taking the site out of maintenance mode
- Backup your existing site and database.
- Log in as user ID 1
- Put your site in maintenance mode
- Change all themes to Garland
- Disable non-core modules
- Remove default settings file
- Remove all old core files and directories
- Remove uninstalled modules
- Download Drupal 7
- Re-apply modifications to core files
- Make your
settings.php
file writeable - Run the update script
- Backup your database
- Upgrade fields
- Update contrib modules and themes
- Check the Status Report
- Make sure settings.php is secure
- Check Drupal Core Modules
- Remove your site from Maintenance Mode
What is Database abstraction layer in Drupal ?
Allow the use of different database servers using the same code base.
Drupal provides an abstraction layer with the ability to support multiple database servers easily. The intent of this layer is to preserve the syntax and power of SQL as much as possible, while letting Drupal control the pieces of queries that need to be written differently for different servers and provide basic security checks.
Most Drupal database queries are performed by a call to db_query() or db_query_range(). Module authors should also consider using pager_query() for queries that return results that need to be presented on multiple pages, and tablesort_sql() for generating appropriate queries for sortable tables.
Drupal provides an abstraction layer with the ability to support multiple database servers easily. The intent of this layer is to preserve the syntax and power of SQL as much as possible, while letting Drupal control the pieces of queries that need to be written differently for different servers and provide basic security checks.
Most Drupal database queries are performed by a call to db_query() or db_query_range(). Module authors should also consider using pager_query() for queries that return results that need to be presented on multiple pages, and tablesort_sql() for generating appropriate queries for sortable tables.
How database system of Drupal works ?
In Drupal, each type of information has its own database table. For instance, the basic information about the nodes of your site are stored in the Node table, Comments and Users also have their own database tables, and roles, permissions, and other settings are also stored in database tables.