Wednesday, December 21, 2011

PHP to Drupal: Get up to speed with drupal from a php developer background

While working on various projects with drupal I realized that there is really no one definitive place which lists the concepts that you need to become familiar with when dealing with drupal. So I decided that I would put them in one place for people who maybe are experienced php developers who are trying to learn to work with drupal for the first time.

The main important components when working with drupal on a serious project are:

1. Pages

A page is a unit that most web developers are most familiar with already. And that is the problem, because when you are creating a website with drupal, the code is not organized in these bite sized chunks. The beauty of the drupal model of work is that drupal separates what you need to write into re-usable chunks of code which can be used on numerous pages, and is not confined to one page in particular.

That being said, there are still instances where pages are used, but not in the same way as in a website you have to program from scratch. Often times pages are used instead as a means to configure areas of drupal, as admin pages etc.

2. Blocks

A block is a small chunk of code which can be placed on the same page as page content, or on a node (which I will explain next). The block is a handy thing because it is easy to put blocks across a large number of pages, and it is also possible to let the admin user configure the visibility of a block based on the user's permission level (called a user role) via the admin interface.

These properties make blocks powerful in that you can put them in almost any configuration on a page, but not care ahead of time what else is on the page. In effect leaving page design to a designer or site admin.

3. Nodes

A node is a very important part of drupal, because it ties in so deeply with the drupal structure. A node is an object in drupal. The node can be displayed and expanded and acted upon by modules. In the drupal module repository there are many modules which will act on nodes allowing for some really cool things.

The node can be a somewhat difficult concept to grasp, but thinking of it as a procedural object which can be acted upon, displayed, filtered, and restricted as a group. So a grouping of these "nodes" (known as a content type) can be exposed to different user roles. This means that if you want a bunch of pages which do the exact same thing you would create a new content type and then the individual nodes would all have the same structure.

4. Theming

Theming is important in drupal as it makes any code which is written and enables the designer to alter the output of that code, by adding tags, markup and css in order to make the website pretty. In this it is important to expose all html to drupal when you are writing it so that a designer can later open up the theme folder and overwrite your theming function adding these ever important tags.

The theming engine in drupal is quite powerful and it is possible to procedurally theme small subsets of a page consistantly on a website by using this theming technique.

5. Modules

A module is where the exciting things happen in drupal. Because as a drupal developer you will want to avoid hacking drupal core as much as possible. This makes upgrading simple and easy, as well as keeping the codebase clean for your modules, making it possible for them all to work together instead of having one module vs. another.

The module system in drupal again is very powerful because of the node structure, and drupal's ability to edit queries which are written in one area of drupal, or written in one module by another.

6. Menu

The menu structure in drupal is also important. This is the area of drupal which exposes certain menu items based on permissions, and also changes based on where you are in your website's tree structure. It is important to use the menu structure on your drupal websites because this structure is much more powerful than doing it by hand. And because of the permission based feature.

7. Testing

Going forward into drupal 7 testing is becoming increasingly important in the drupal community. This testing is becoming a part of the core list of modules, but also it is very helpful even in drupal 5 and drupal 6. Unit testing ensures that if you make changes to your code, that it does not effect the code you have already written.

There has recently been a big push for testing to increase the productivity of coding and reduce the number of errors in the code. Drupal's testing is mostly done with the simpletest module found at http://drupal.org/projects/simpletest.

So this is my broad overview of what concepts a php programmer needs to know when starting to work with drupal. Please let me know if I forgot anything.

src: http://www.westwesterson.com/blog/php-drupal-get-speed-drupal-php-developer-background

Saturday, July 2, 2011

CodeIgniter from Scratch, Day 10: The Calendar Library

Author: Burak Guzel
In this tenth episode of the CodeIgniter From Scratch screencast series, we will be exploring the Calendar library. We are also going to utilize the database class and jQuery AJAX. I will show you how to build a simple and CSS-styled calendar page, which will have the ability to store and display content for each day.

Day 10: The Calendar Library

Wednesday, June 29, 2011

CodeIgniter from Scratch, Day 9 : File Uploading and Image Manipulation

Author: Burak Guzel

In lesson nine of our CodeIgniter series, we’ll build a small image gallery that allows you to upload files, and automatically create thumbnails.

Day 9 : File Uploading and Image Manipulation

Monday, June 27, 2011

CodeIgniter from Scratch: Day 8 – AJAX

Author: Burak Guzel

The CodeIgniter from Scratch series was unexpectedly, and significantly popular. Today, I’m pleased to announce that, with the help of one of my best authors, Burak, we’ll be continuing the series! Additionally, the most often requested topic is the subject for today’s screencast: combining CodeIgniter and jQuery.
Remember, it is not required that you watch the previous lessons in order to understand today’s screencast. It’s a self-contained article. However, if you’re new to CodeIgniter, we do recommend that you start from the beginning!

Day 8: AJAX

CodeIgniter from Scratch Day 7: Pagination

Author: Jeffrey Way

In these last two weeks, I’ve received bunches of requests for a CodeIgniter pagination screencast; so that’s what we’ll be reviewing today! As a bonus, we’ll also take a look at the super convenient HTML Table class.

Day 7: Pagination

Sunday, June 26, 2011

CodeIgniter From Scratch: Day 6 – Login

Author: Jeffrey Way

In today’s hour long video tutorial, we’ll be doing a lot! We’ll implement a login and signup form that will allow us to lock down certain sections of our fictional site. As you’ll find, working with sessions in CodeIgniter is a cinch!

Day 6

Watch the video here!


P.S. The Logout Button
I forgot to add the “logout” button during the screencast. There was so much to cover, that I was bound to forget something! Luckily, it’s really easy. Simply add a link, to the “members” area, which links to the login class, and a “logout” method (login/logout). Then, all we must do is destroy the user’s session, and redirect them back to the login form. Download the source code if confused.

function logout()
{
$this->session->sess_destroy();
$this->index();
}

Hope you Enjoy it!
Keep in mind that we’re just scratching the surface, in terms of flexibility and security. We can – and very well may – take things much further. But this should get you started!

Saturday, June 25, 2011

CodeIgniter From Scratch: Day 5 – CRUD

Author: Jeffrey Way

The most requested tutorial for day five of our CodeIgniter screencast series was for an introduction to CRUD operations. We’ll review how to easily create, read, update, and delete records using CI’s active-records class.

Day 5: CRUD Operations

Friday, June 24, 2011

CodeIgniter From Scratch: Day 4 – Newsletter Signup

Author: Jeffrey Way
@(http://net.tutsplus.com/articles/news/codeigniter-from-scratch-day-4-newsletter-signup/)

Continuing on from Day 3, we’ll expand our little application into a simple newsletter signup form. This will allow us to taker a closer look at both the email and the form_validation classes. Learn it all in this 30 minute screencast.

Day 4

CodeIgniter From Scratch: Day 3. Sending Emails

Author: Jeffrey Way
source: http://net.tutsplus.com/articles/news/codeigniter-from-scratch-day-3/

At the request of some of our readers, this week, we’ll examine just how easy it is to send emails with attachments using Gmail. With raw PHP, this would be a long and tedious task. However, with CodeIgniter, it’s a cinch! I’ll show you how in this eighteen minute video tutorial.

Day 3

Thursday, June 23, 2011

CodeIgniter From Scratch: Day 2

Author : Jeffrey Way
source: http://net.tutsplus.com/articles/news/codeigniter-from-scratch-day-2/

Continuing on from day 1, today, I’ll teach you five different ways to write select statements for your database. If you haven’t watched the first entry in this video series, don’t worry; each video can function on its own as a single tutorial. Having said that, I highly recommend that you watch each screencast.

DAY 2

CodeIgniter From Scratch: Day 1

Author: Jeffrey Way

Source: http://net.tutsplus.com/articles/news/codeigniter-from-scratch-day-1/

After numerous requests, today we are launching a new screencast series on Nettuts+ that will focus exclusively on the CodeIgniter PHP framework. Over the course of about 10 videos, I’ll teach you exactly how to use this framework. Ultimately, we’ll work our way up to building a custom CMS. Without further ado, here’s day one!

Day 1

Thursday, January 20, 2011

Ten Tough Interview Questions and Ten Great Answers

The following answers are provided to give you a new perspective on how to answer tough interview questions. They are not there for you to lift from the page and insert into your next interview. They are provided for you to use as the basic structure for formulating your own answers. While the specifics of each reply may not apply to you, try to follow the basic structure of the answer from the perspective of the interviewer. Answer the questions behaviorally, with specific examples that show that clear evidence backs up what you are saying about yourself. Always provide information that shows you want to become the very best _____ for the company and that you have specifically prepared yourself to become exactly that. They want to be sold. They are waiting to be sold. Dont disappoint them!

1. Tell me about yourself.
It seems like an easy interview question. Its open ended. I can talk about whatever I want from the birth canal forward. Right?

Wrong. What the hiring manager really wants is a quick, two- to three-minute snapshot of who you are and why youre the best candidate for this position.

So as you answer this question, talk about what youve done to prepare yourself to be the very best candidate for the position. Use an example or two to back it up. Then ask if they would like more details. If they do, keep giving them example after example of your background and experience. Always point back to an example when you have the opportunity.

Tell me about yourself does not mean tell me everything. Just tell me what makes you the best.

2. Why should I hire you?
The easy answer is that you are the best person for the job. And dont be afraid to say so. But then back it up with what specifically differentiates you.

For example: You should hire me because Im the best person for the job. I realize that there are likely other candidates who also have the ability to do this job. Yet I bring an additional quality that makes me the best person for the job--my passion for excellence. I am passionately committed to producing truly world class results. For example . . .

Are you the best person for the job? Show it by your passionate examples.

2. What is your long-range objective?
Make my job easy for me. Make me want to hire you.

The key is to focus on your achievable objectives and what you are doing to reach those objectives.

For example: Within five years, I would like to become the very best accountant your company has on staff. I want to work toward becoming the expert that others rely upon. And in doing so, I feel Ill be fully prepared to take on any greater responsibilities which might be presented in the long term. For example, here is what Im presently doing to prepare myself . . .

Then go on to show by your examples what you are doing to reach your goals and objectives.

3. How has your education prepared you for your career?
This is a broad question and you need to focus on the behavioral examples in your educational background which specifically align to the required competencies for the career.

An example: My education has focused on not only the learning the fundamentals, but also on the practical application of the information learned within those classes. For example, I played a lead role in a class project where we gathered and analyzed best practice data from this industry. Let me tell you more about the results . . .

Focus on behavioral examples supporting the key competencies for the career. Then ask if they would like to hear more examples. Enhance your career opportunities by getting the training you need, find top degrees and schools near you!

4. Are you a team player?
Almost everyone says yes to this question. But it is not just a yes/no question. You need to provide behavioral examples to back up your answer.

A sample answer: Yes, Im very much a team player. In fact, Ive had opportunities in my work, school and athletics to develop my skills as a team player. For example, on a recent project . . .

Emphasize teamwork behavioral examples and focus on your openness to diversity of backgrounds. Talk about the strength of the team above the individual. And note that this question may be used as a lead in to questions around how you handle conflict within a team, so be prepared.

5. Have you ever had a conflict with a boss or professor? How was it resolved?
Note that if you say no, most interviewers will keep drilling deeper to find a conflict. The key is how you behaviorally reacted to conflict and what you did to resolve it.

For example: Yes, I have had conflicts in the past. Never major ones, but there have been disagreements that needed to be resolved. I've found that when conflict occurs, it helps to fully understand the other persons perspective, so I take time to listen to their point of view, then I seek to work out a collaborative solution. For example . . .

Focus your answer on the behavioral process for resolving the conflict and working collaboratively.

6. What is your greatest weakness?
Most career books tell you to select a strength and present it as a weakness. Such as: I work too much. I just work and work and work. Wrong. First of all, using a strength and presenting it as a weakness is deceiving. Second, it misses the point of the question.

You should select a weakness that you have been actively working to overcome. For example: I have had trouble in the past with planning and prioritization. However, Im now taking steps to correct this. I just started using a pocket planner . . . then show them your planner and how you are using it.

Talk about a true weakness and show what you are doing to overcome it.

8. If I were to ask your professors to describe you, what would they say?
This is a threat of reference check question. Do not wait for the interview to know the answer. Ask any prior bosses or professors in advance. And if theyre willing to provide a positive reference, ask them for a letter of recommendation.

Then you can answer the question like this:

I believe she would say I'm a very energetic person, that Im results oriented and one of the best people she has ever worked with. Actually, I know she would say that, because those are her very words. May I show you her letter of recommendation?

So be prepared in advance with your letters of recommendation.

9. What qualities do you feel a successful manager should have?
Focus on two words: leadership and vision.

Here is a sample of how to respond: The key quality in a successful manager should be leadership--the ability to be the visionary for the people who are working under them. The person who can set the course and direction for subordinates. The highest calling of a true leader is inspiring others to reach the highest of their abilities. I'd like to tell you about a person whom I consider to be a true leader . . .

Then give an example of someone who has touched your life and how their impact has helped in your personal development.

10.If you had to live your life over again, what one thing would you change?
Focus on a key turning point in your life or missed opportunity. Yet also tie it forward to what you are doing to still seek to make that change.

For example: Although Im overall very happy with where Im at in my life, the one aspect I likely would have changed would be focusing earlier on my chosen career. I had a great internship this past year and look forward to more experience in the field. I simply wish I would have focused here earlier. For example, I learned on my recent internship… …then provide examples.

Stay focused on positive direction in your life and back it up with examples.

In reviewing these responses, please remember that they are only to be viewed samples. Please do not rehearse them verbatim or adopt them as your own. They are meant to stir your creative juices and get you thinking about how to properly answer the broader range of questions that you will face.

wrote by : http://www.linkive.com, CollegeGrad.com

dreamhost review