KillerPHP.com - Killer PHP for web designers

Two thumbs up for the Zend Framework Nerds.

January 26th, 2010

microphone-podcast-icon

Hi,

I’ve been busy with things and so not too many updates lately. Not to worry thought, we have a brand new course and lots of free videos coming out soon on advanced MySQL.

In the following podcast (it was a video but I changed my mind …), I talk about the pragmatism of the Zend Framework dudes.

MP3: zendframework-and-doctrine

Short and sweet.

Stefan Mischook
www.killerphp.com

Killersites University – Video Library

January 20th, 2010

killersites university logo

Hi,

I’ve been out of the picture for a little while, mainly because we’ve been busy with our new video tutorial subscription service.

Some PHP nerd details:

We built the web application from scratch using a basic MVC model with straightforward database work – no ORM was required for such a simple project.

The most time consuming aspect of this project was getting the UI to look good and work well – jQuery came in handy once again.

Anyway, you will find most of our PHP tutorials in there … and soon, a bunch of new video tutorials we are working on now.

The official announcement:

After a couple of months of hard work, we finally got the new video tutorial subscription system up and running.

About the University:

The Killersites University is a subscription based service that gives you total access to our GROWING collection of web design and web design related training videos. Not just a collection of tips and tricks videos, we provide complete video courses on popular subjects like:

* HTML
* CSS
* Dreamweaver
* PHP
* Javascript
* and much more

You can learn more about it here:

http://www.killersites.com/university/

What’s next?

Now that we have the University up and running, we will be able to focus a lot more time on new videos. Subscribe to the RSS feed or one of my newsletters to keep up-to-date.

Thanks,
Stefan Mischook
www.killersites.com

Merry Xmas from Stefan.

December 24th, 2009

Hi,

I just wanted to wish everyone happy holidays and a merry xmas – if applicable.

:)

In other news .. well, we’ve been working hard on stuff and should have a bunch of new videos in January.

Thanks,
Stefan Mischook

What are ORM Frameworks – the video!

December 15th, 2009

Hi,

I decided to create a video based on my recent article on ORM frameworks. I shot this in HD … so select the HD option if you got big pipes.

Let me know what you think.

Stefan Mischook

What are ORM Frameworks?

December 8th, 2009

Database Image

In the following article we will learn a few things about ORM frameworks:

  • What they are.
  • What they do.
  • When and why to use them.
  • And finally, what ORM options PHP’ers have.

Let’s start …

If you’re working with PHP, you will certainly find yourself working with relational databases (like MySQL) sooner or later. Anyone who has ever built a reasonably complex web application knows, that the SQL can get really hairy at times – especially when you consider all the data filtering that you have to deal with!

ORM frameworks to the rescue!

ORM is yet another nerd-acronym, it is short for Object Relational Mapping. In a nutshell, an ORM framework is written in an object oriented language (like PHP, Java, C# etc…) and it is designed to virtually wrap around a relational database. If you look at the name (ORM), it basically translates into: mapping objects to relational tables.

There are many different competing ORM frameworks out there, because many nerds have their own ideas as to how to best do things – nothing new here! But you know what, some of these nerds are right … not all ORM frameworks are created equal.

Read the rest of this entry »

Defending against SQL Injection attacks

December 2nd, 2009

First, let me just say that this is not a tutorial, this is an article meant to give you an overview with a few options thrown in.

Ok, let’s start …

You should protect your relational databases (like MySQL) from the dreaded SQL injection attack. These attacks are conducted by evil sniveling nerds, trying to insert damaging SQL code into your HTML form fields (and query strings too) to do things like … drop database tables or even wipe out your database altogether!

… These attacks are very real!

My Recent Experience

We recently put up our new shopping cart system … I personally keep on eye on activity, and to my surprise, we can get 25-30 attempted attacks a day! Man, if I could just get my hands on one of these guys ….

:)

Fortunately, there are a few code-centric steps you can take to protect yourself from these SQL injection attacks:

  • Use this function: mysql_real_escape_string() and wrap your input variables with it.
  • Use an object-relational mapping (orm) system to basically avoid writing SQL to begin with. I hear the best one for PHP’rs today is Doctrine
  • use a prepared statement that basically processes everything and cleans it up for you. PHP has the PDOStatement class for this.

Another option (that I like to use), is to just remove the database from any possible external interaction. Sometimes this is not possible but when it is, it works well. So for instance, our cart does not talk to a relational database at all, so all these SQL injection attacks we get just makes me giggle like a little school girl.

Stefan Mischook
www.killerphp.com

Live Webinar on Google Wave and the Zend Framework

November 16th, 2009

Hi Guys,

My good buddy and right-hand-nerd, Jon is being flown down to do a live webinar for the Zend geeks at Intuit. It seems the accounting giant has recognized Jon’s ability to take the complex and make it seem simple.

Just in case you don’t know, Jon is the author of our crazy cool shopping cart tutorial and our new series on advanced PHP.

… Jon is starting to realize that my choice to go with the Zend Framework a few years ago made sense. Actually, it made dollars and cents!

:)

OK, bad nerd humor … I know. I’m just low on material that isn’t profanity laced.

If you want to know WHY, after looking at all the other PHP frameworks out there, that I thought the Zend Framework was the best choice long term (even back when Zend was still in Beta) .. you’re going to have to ask!

Anyway here is the official announcement:

Jon Lebensold, author of the popular PHP Shopping Cart and founder of Zendcasts.com will be writing a Google Wave Gadget in Boston at Intuit’s East coast office. Intuit is setting up a live webinar which you can attend by registering on the Zendcasts website.

Zendcasts.com began this year with the hope of assisting intermediate PHP developers further their Zend Framework skills. If you’re a PHP developer interested in building apps on Google Wave or want to watch someone build an AJAX application with web services like Google Wave and Intuit’s QuickBase, this free webinar will be worth spending a lunch hour at your desk.

The webinar takes place Wednesday, November 18 at 12:00 (noon) Eastern Standard Time (GMT -05:00).Register online now.

Here’s the banner:

qb-gwave-promo

Just in case you are not familiar with Quickbase … just click on the link.

That’s it for today. But coming soon, I will have some pretty big news … actually, the biggest thing to come to killerphp.com since we ordered that huge pizza! Ok, even bigger than that!!

;)

Stefan Mischook
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 7

November 6th, 2009

Hi,

In our never ending quest for pure PHP nerdness, we continue our look at advanced PHP. This is video 7 of a series of videos where we explore PHP6 and other advanced PHP concepts, concepts often seen in PHP frameworks like Zend, PHP Cake and others.

The video:

More to come.

Stefan Mischook
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 6

November 1st, 2009

Hi,

They just keep on coming! This is video 6 of a series of videos where we explore PHP6 and other advanced PHP concepts, concepts often seen in PHP frameworks like Zend, PHP Cake and others.

The video:

Yes, I’m using Youtube … it saves me bandwidth! I’ve been pushing 250 GB a month just on Killerphp.com!

Many more to come,

Stefan Mischook
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 5

October 27th, 2009

Hi,

As promised, this is video number FIVE of a series of videos where we explore PHP6 and other advanced PHP concepts, concepts often seen in PHP frameworks like Zend, PHP Cake and others.

You can expect this series to continue over the next several weeks.

Thanks for watching!

Stefan
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 4

October 23rd, 2009

Hi,

As promised, this is the FOURTH video of a series of videos where we explore PHP6 and other advanced PHP concepts, concepts often seen in PHP frameworks like Zend, PHP Cake and others.

You can expect this series to continue over the next several weeks.

Thanks,

Stefan Mischook
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 3

October 21st, 2009

boxshot-advphp

Hi,

As promised, this is the third video of a series of videos where we explore PHP6 and other advanced PHP concepts, concepts often seen in PHP frameworks like Zend, PHP Cake and others.

You can expect this series to continue over the next several weeks.

Thanks,

Stefan Mischook
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 2

October 20th, 2009

boxshot-advphp

Hi everyone,

As promised, here is my second installment of our new PHP video tutorial course that covers more advanced PHP subjects including:

- PHP 6
- Advanced PHP architectures seen in PHP frameworks like Zend, CakePHP etc …
- Magic methods
- anonymous functions
- namespaces

Etc …

The second video:

Just in case you missed it, here is the link to the first part of Getting into PHP6.

Thanks for watching,

Stefan Mischook
www.killerphp.com

Getting into PHP6 and Advanced PHP Concepts Part 1

October 16th, 2009

boxshot-advphp

Hi everyone!

I’m back again (after my big move across town) and this time, I’ve got a new set of PHP video tutorials!

… Yes, people started to wonder why killerphp.com had a bunch of Javascript videos coming out; shouldn’t those videos belong on killerjavascript.com!?

;)

Anyway, I am happy to announce our new set of PHP videos that cover more advanced PHP subjects including:

- PHP 6
- Advanced PHP architectures seen in PHP frameworks like Zend, CakePHP etc …
- Magic methods
- anonymous functions
- namespaces

Etc …

The ultimate goal of these techniques is to learn how we can write more compact PHP code.

The first video:

That’s all for now.

… Now if only I can figure out why my new external drive is clicking?

Stefan Mischook
www.killerphp.com

New Javascript Basics Video Tutorial Course Released!

October 5th, 2009

php video

PHP nerds,

I’m back … and ready to shamelessly promote!

… I’m quickly settling into my new place (the loft life is over after a decade!) and so time is freeing up for newsletters, videos and articles.

In my continued attempts to transform you guys from know-nothing-wannabe’s, to full fledge web programming guru nerds, I’ve release a new set of video tutorials on Javascript … a complementary language to PHP in the web programming world.

While PHP handily handles the backend/server-side of the web programming equation, Javascript is the language that is used to broker the communication between the browser and PHP … when it comes to all those fancy Ajax effects.

.. Think Google maps, modern blogs, youtube comment functionality etc ..

Anyway, as usual, you can try before you buy by watching a bunch of free sample videos from the course:

http://www.killerjavascript.com/videos/

If you have any questions, you know how to reach me.

PS: I have a whole bunch of free and NEW advanced PHP videos coming out very soon – say a week.

Thanks,

Stefan Mischook
www.killerphp.com

Javascript DOM basics Video Tutorial

September 21st, 2009

Hi,

Not directly related to PHP, but nonetheless many a PHP programmers will probably (at some point) have to have their PHP scripts ‘talk’ with some client side code; whether it be to a Flash application or straight to the browser using Javascript.

The DOM is a virtual map of a web page. The DOM along with Javascript allows you to navigate and dynamically change things about the page:

- tags
- text
- attributes of tags

I just released a new video on the DOM from my upcoming beginners course on Javascript and basic DOM scripting:

You can find the entire Javascript beginners course at killerjavascript.com.

Thanks for reading and I hope you find the video useful.

Stefan Mischook

www.killerphp.com

JQUERY Video Tutorial Course.

September 3rd, 2009

jquery-box-shot-medium

Hi,

I like to announce our new JQuery video tutorial course.

Though not strictly related to PHP, JQuery is a very popular Javascript library that many PHP programmers find themselves working with.

Besides straight JQuery videos, we do get into some PHP specific subjects:

  • PHP and Ajax
  • PHP and JSON

The table of contents:

* Getting jQuery: Part 1 – 8:22 minutes
* Getting jQuery: Part 2 – 8:57 minutes
* Events: Part 1 – 14:43 minutes
* Events: Part 2 – 13:23 minutes
* Dom manipulation – 10:39 minutes
* Ajax introduction – 10:16 minutes
* Ajax with PHP – 17:59 minutes
* Introduction to JSON – 14:47 minutes
* PHP classes with JSON – 21:21 minutes

-

This is not a one of my completely free courses but I released about 40 minutes of free videos from the course.

About the course:

jQuery is the predominate AJAX / Javascript library that is used by Adobe, Microsoft and many other companies and organizations.

Learning jQuery will make it easy for you to create all kinds of cool DOM and Ajax affects with very little effort. Beyond the canned menus and affects, jQuery also makes it easier for hard-core Javascript and AJAX programmers to get things done.

Thanks for reading,

Stefan Mischook
www.killersites.com

My Killer PHP Learning Tips

September 3rd, 2009

php logo

Hi,

Learning to program can be a frustrating process for a lot of people; especially for designer types wanting to learn a little PHP. The following tips should help a lot of you along the way to becoming a PHP nerd. My PHP learning tips:

1. Be patient:

Patience is a virtue, especially when learning to program. Don’t be discouraged if something doesn’t sink in right away. It will come with time.

2. Learn to write code on faith:

… That means writing PHP code that you may not fully understand. The process of actually writing out the code, seems to help the brain take it in.

3. Learning PHP programming is a lot like learning a sport; you can pick up stuff by sitting on the sidelines and watching, but you don’t really know what you’re doing until you actually get into the game. In PHP, that means actually writing code and not just sitting listening or reading about it.

4. Take a breather:

If something is not sinking in right away, move on to something else and come back to it later … actually, give it 24 hrs to sink in. I find that the brain will work on problems over night and almost magically, things that you could not understand the day before, will become obvious.

5. Try variations in your code:

Play with different ways of doing things, try to add variation to your code. If for instance you are learning something as simple as a conditional statement .. like the ‘if’ statement, try some examples with mathematical equations and then maybe try something using a function that returns a true/false value.

6. Break your code:

One of the best ways to learn any programming language is to purposefully break code. Why? Basically it comes down to seeing what type of error messages you get for certain types of mistakes in your code. In time, you will see that particular errors will give you consistent error messages. Once you know these, debugging code will be a lot easier.

I’ve found that breaking things on purpose and in a controlled manner, can really help down the road when you run into real errors, because you will recognize the error messages.

PHP vs. Perl vs. Java – a student’s question.

August 17th, 2009

Once and a while, I get a question from a student about PHP and programming that I use in a blog post … here we go again:

… you mentioned that you used to use mostly Java but have switched to mostly PHP. Would you recommend learning PHP as a primary method of creating dynamic web pages or is its strength in data base manipulation. I was learning Perl form processing which led me to your site when I was having trouble with mySQL, and I noticed PHP is very similar (at least in the basics) as Perl. Do you have much experience in using Perl to help create web pages and would you recommend using it at all?

About PHP vs. PERL vs. Java:

PHP is the way to go. Perl is a good language but it was not designed initially for web development – that functionality was added later.

Whereas PHP (which borrows from Perl btw) was designed specifically for web development, and so Perl is just clunkier compared to PHP when it comes to creating dynamic web sites.

I’ve used Perl in the past, mostly creating simple string parsing scripts and other little things. But I would NOT call myself an Perl programmer – so take that into consideration.

That said, I’ve always liked a common strategy used in Perl, where they generate static pages from dynamic code. For example, in our web designers directory, I used a Perl based directory script that uses that strategy.

… What’s interesting is that it generates the directory pages as static HTML pages. The advantage of this is that the directory itself is more portable and much less resource intensive because for the most part, the directory is just of pages that people just read … no need for them to be dynamically generated every time a user request it.

Read the rest of this entry »

What makes a professional programmer?

August 11th, 2009

I recently got an email question put to me by someone wanting to know what makes a professional programmer:

Since I have started my career, I have been working for managers who really don’t know how to program. I have been improving myself through tutorials and books. However, I still don’t know whether i’m a good programmer or just better than the guys i’m working with.

Can you tell me what makes a good programmer? Better yet, please tell me what level should a PHP programmer be at after three years of development?

The short answer:

A good programmer is able to put out clean code that works and is easy to update. Simplicity is a sign of professionalism in any profession or discipline.

In the same email, he continues to ask:

Can you give me a list of books or subjects I should know by now (three years of development). Any advice you give would be much appreciated.

Beyond PHP basics (and the core functionality), I would suggest that PHP programmers should work to learn the following:

  1. Object Oriented PHP
  2. Learn about design patterns. Important ones include: MVC, decorators and factories.
  3. Learn an MVC framework like the Zend Framework or PHPCake etc …
  4. Get deeper into PHP; understand how it works under the hood. This will help you later on when trying to decided how to most effectively build applications.

Notes:

Like any other language, PHP sometimes gives you a few ways to do the same thing. It makes sense to learn the advantages and disadvantages of each for the sake of optimized code. For example, PHP provides a few different ways to interface with MySQL … you have the classic libs but you also have new object oriented methods.

When it comes to learning design patterns, it might be easier to learn a PHP framework at the same time. Why? Many of these frameworks often times provide great examples of popular design patterns.

Final comment:

Though the above is ideal, I’ve have seen many PHP programmers who don’t have half the skills I mention above, but were still effective programmers who got the job done.

Stefan Mischook

www.killerphp.com

© 2010 - Killersites.com - All rights reserved
  • Hosting and domain name support:
  • (480) 624-2500

PayPal Customer Support: 1-888-221-1161

Killersites.com has been a PayPal Verified Merchant since 2001. We also accept payment via check or money order.

Please send payment to:

Killersites.com Inc. 4156 Dorchester #2 Westmount, Quebec Canada H3Z 1V1

The more you learn, the more you earn!

Subscribe to our newsletter
Unsubscribe