Advanced Search

View RSS Feed

traq

  1. HedgeClipper [part 2]!

    Hey guys, I hope everyone has had a great start to the new year.

    If you're just joining us, we're making hedgeclipper: a user log-in system. Last time, we outlined the basics of how hedgeclipper will work, and wrote a controller function for the whole thing. This time, we're going to focus on checking if the user is logged in or not. Before we start demanding a username and password, we're going to check if our user already logged in on a previous page visit. Have a look:
    ...
  2. A Really Big PHP Tutorial [...part 1]

    .
    Who Is This For?

    I'm going to make some assumptions about you, as a programmer:
    • You're probably not an expert with PHP, but you know at least "the basics."
      If you're a copy+paste PHP coder, that's okay, but hopefully you won't be once we're done.
    • You have some patience. Yes, you want to see results; but you can trust that they're coming.
    • You're "okay" with doing things you've never tried before.

    There are some things I would like you to know ...

    Updated 01-13-2013 at 11:30 PM by traq (added 'expiry' config option)

    Categories
    PHP coding , Web Design issues
  3. Not My Type... : )

    Yes, the tutorial is still coming. It's big. It's in progress.

    I read this recently and was intrigued. Don't know if anyone else would care or not ...

    The author, nikic, does a great job summarizing the difficulties and potential benefits of type hinting, as well as giving a good explanation as to why PHP's implementation is incomplete. Personally, I look forward to being able to type-hint any type. It could save me a lot of code validating args, and I could ...

    Updated 12-01-2012 at 03:48 AM by traq

    Categories
    PHP coding , Off beat topics
  4. Before You Start: the basics, for PHP in particular and for programming in general

    I wanted to take a few moments to talk about some of "the basics" that are all-to-often glossed over...

    A Matter of Style

    In general, I find that most PHP programmers fall into one of three main programming styles:
    • procedural: a simple ordered set of instructions, nested if's/ else's, etc.
    • functional: functions are little code containers that you can call on when needed. You [usually] give them arguments, they [usually] return values to you.
    • object-oriented:
    ...

    Updated 12-17-2012 at 02:49 AM by traq

    Categories
    PHP coding
  5. Taking Control

    Last week, I wrote about taking a "PHP-first" approach to programming - program first, output last. But what should go first in your program?

    M-V-C
    You may have heard about something called "MVC" (Model-View-Controller). If not, here's your crash course:

    Model

    Your Model is all of the information needed/used by your program. [Hopefully], the Model is well-organized. Think of it in terms of note-taking: notes are easier to ...
Page 1 of 2 12 LastLast