JITBrain – Login Reloaded

The login page is functional and skinned! You can now login, sign up, retrieve your password, and if you were trying to do something that requires an authentication, you will be able to resume that once you authenticate. The corresponding articles have been added to the ongoing series: Delayed Requests, Password Recovery and Stylesheets.

The next step is to design the core of the JITBrain application: the form that lets the user add an issue to the tracker. It has to be carefully balanced for optimal usability, so expect a lot of tweaking and AJAX programming (and an introduction to jQuery).

So far, JITBrain is 1286 lines of PHP (not counting the CSS, obviously):

   20 config/db.php
   54 config/domain.php
   17 config/error.php

   19 controllers/confirm.php
   50 controllers/do-login.php
   99 controllers/do-reset-password.php
   78 controllers/do-signup.php
   43 controllers/files.php
    3 controllers/index.php
   17 controllers/login.php
   25 controllers/reset-password.php

   83 models/authentication.php

   77 objects/lazy.php

  115 utils/db.php
   67 utils/error.php
   52 utils/pervasive.php
   27 utils/redirect.php
   88 utils/request.php
   40 utils/session.php

   27 views/confirm.php
   68 views/loginpage.php
   17 views/page404.php
   37 views/plainpage.php
  105 views/resetpassword.php
   58 views/twocolform.php

 1286 total

Enjoy your read!

6 Responses to “JITBrain – Login Reloaded”


  1. Your login page jitbrain.nicollet.net generates the following error on my work’s proxy:

    “Content Encoding Error (content_encoding_error)

    Server response could not be decoded using encoding type returned by server. This is typically caused by a Web Site presenting a content encoding header of one type, and then encoding the data differently.”

    • Victor Nicollet - April 18, 2009 at 12:09 pm - Reply

      Nice catch!

      The reason for this was the while(@ob_end_clean()); loop that empties all output buffers before a redirect. I don’t know why, but the E_NOTICE generated by the clean function when there are no more buffers was not suppressed by the @ operator, so it was output directly in plain text (but the ob_start(‘ob_gzhandler’) had already notified the proxy that the content would be gzipped). The correction is simply a slightly longer while (ob_get_level()) ob_end_clean();.

      You should be able to see it work now.

  2. Thanks, works great now. :-)

  3. Hey victor,

    Thanks for the fantastic, simple and yet complete explanation of a MVC php app. I am not much of a web developer so had a difficult time understanding the MVC and OOPs side of PHP.

    The demo site is not working any more. Is there a place where you have uploaded the source code for me to study it along as I go though the explanation?

    Thanks,
    zrow

  4. Awesome!!! Thank you so much. I appreciate that.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



1150 feed subscribers
(readers who polled a feed this week)