Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Posts

    1115
  • Joined

  • Last visited

  • Days Won

    27

Posts posted by Edward

  1. I think everyone would love to see you write a book on a fully developed website using oop code. There are also only two Yii Framework books available right now, I'm sure if you did one it would be a big hit. Even making a full working site using oop code intergrating into Yii. :rolleyes:

  2. I think your error is actually on line 7, but PHP doesn't notice until it hits the semi-colon on line 8.

     

    I think line 7 should be:

    $newProject=new Project();

     

    Are you using Yii or any other kind of framework for your projects?

  3. Yesterday i experienced the worst day ever, i had to install PEAR, then PHPUnit and lastly Selenium.

     

    Well i started out early working through Agile Web Application Development with Yii and PHP. Anyway i got stuck on installing PEAR, then it looked like it installed, and i was working on PHPUnit and that looked like it installed but i was continuously getting errors and fixing errors. After hours and hours of going through online help and getting error after error i got to the point at which there was no more help. I was completely stressed out, i had been working on this for around 5 hours, i had a major headache. I don't know about PEARS, but this was driving me Banana's. I decided after a short break that the best thing would be to reinstall install XAMPP completely, so i downloaded there most up to date version. Finally after i got that installed, i found that PEAR and PHPUnit were already all setup, i was like whall this is just amazing, i spend almost 6 hours messing around and then it all works in one go with the new XAMPP. Well regardless of what happened i did feel satisfied when i finally got it installed after all that time spent.

     

    Okay for those of you working through Yii, i have a question, im on page.70 (Agile Web Application Development with Yii and PHP), using PHPUnit to run a test on a ProjectTest.php

     

    in command prompt we need to type in

     

    % cd Webroot/protected/tests

    % phpunit unit/ProjectTest.php in

     

    after running this im getting an error

     

    Parse error: syntax error, unexpected T_VARIABLE C:\xampp\htdocs\yii\trackstar\protected\tests\unit\ProjectTest.php on line 8

     

    here is a copy of ProjectTest.php

     

    <?php
    class ProjectTest extends CDbTestCase
    {
    public function testCRUD()
    {
     //Create a new project
    	$newProject=new Project
    		$newProjectName = 'Test Project 1';	 // Line 8
    	$newProject->setAttributes(
    	 array(
    			'name'=> $newProjectName,
    						'description' => 'Test project number one',
    						'create_time' => '2010-01-01 00:00:00',
    						'create_user_id' => 1,
    						'update_time' => '2010-01-01 00:00:00',
    						'update_user_id' => 1,
    			  )
    	 );
    	 $this->assertTrue($newProject->save(false));				  
    }
    }
    

     

    Do you know what the problem is here?

  4. This is an interesting question. I will be interested to hear what Larry has to say for this. If you look at the most popular sites online it has taken them at least 10 years to build up a massive community. I guess the best way for this is to start out small and restructure the tables later on if the site is to become so massively popular. Search optimization and marketing takes time a few years to work well, since now there are so many websites, so unless you have large money to invest and possibly get some adds on the TV, i guess this is something that shouldn't be worried about right now. Just keep things as simple as possible.

  5. Can i just interrupt please! I thought you might like to see this, its something we are all waiting for:

     

    http://www.amazon.co...28470294&sr=8-5

     

    I also noticed you had finished the 3rd Edition book, well i just recently received the 4th Edition, and in there is a chapter on jquery, this is a javascript library that have been made for us to use so we don't need to reinvent the wheel.

  6. Well this is error is indicating that the index.php require is not locating the config.inc.php file at that location, and therefore your receiving the Fatal error.

     

    Your index.php file should be below the includes directory and in your html root directory.

     

    require ('./includes/config.inc.php'); I am using XAMMP and this is my location of config.inc.php

     

    This should be a simple case of just tiding up file locations and moving files.

    • Upvote 1
  7. I got my PHP and MySQL for Dynamic Web Sites (4th Edition) in yesterday with 3 of Larry Ullman's other books, when i saw this book it has nearly brought tears to my eyes. I thought Effortless E-commerce was good, well this book just goes beyond awesome for me, it covers everything, more than everything. I really felt sad when i saw this book knowing that i learnt my stuff from another author's dynamic PHP and Mysql and saw how much stuff i have missed that was in Larry's book. I purchased all my books from Amazon and i did use the Click to view inside the book first before i bought, but its not the same looking at that and actually having the book to physically hold and feel. I was lucky to find Larry, i wish i could have found him earlier, but to anyone buying books on dynamic websites in mysql and php, this is a book that should certainly not be missed. If you buy another book and see this one, you are going to suffering from the same emotional regrets i have.

     

    Well my plan now is too read through this book because i don't want to miss anything, this knowledge is just too valuable. I rank Larry's work and performance at the same level as Yii Framework and Steve Jobs.

  8. If you are going to start learning the Yii Framework the following tutorials and books are recommended.

     

    Larry's Finest "Learning the Yii Framework Series"

     

    http://www.larryullm...-yii-framework/ "Awesome tutorials packed with more information on getting started on Yii than you will probably need"

     

    From the official Yii Framework Website the Screencasts

     

    http://www.yiiframew...om/screencasts/ "Simple video tutorials to start of with by Jefffrey Winesett"

     

    Two Yii books that can be purchased from Amazon.com

     

    http://www.amazon.co...28273173&sr=8-1 "A must have for everyone learning Yii by Jeffrey Winesett"

     

    http://www.amazon.co...28273173&sr=8-2

  9. Thanks I have family in Oslo to. I just got object orientated solutions in today by David Powers and PHP Ojects, Patterns, and Practice by Matt Zandstra but not sure which one is best to read yet. I worked through a bit of the Object-Orientated with PHP 5 by Hasin Hayder a few months back but that book seemed to go on more about the php library to support oop. I am also working on Yii framework, I am aware it's not easy but Yii actually helps you to see where it is useful by extending their classes. You are right it seems to be difficult to learn oop and know how to use it for the bigger website.

  10. Hi guys

     

    Before I dive head first into the book, I've been doing a little research on PHP overall and how it has developed since I last had a 'dabble' several years ago.

     

    I can't help but notice that there is a lot of discussion on frameworks and this 'MVC' term, which I vaguely follow the concept of.

     

    I guess my question is, do I need to be considering using a framework (Zend) or concerning myself with the MVC model during my 'first steps' in PHP & mySQL learning, or is it something that I am more likely to consider as an optimisation step much further down the road when(if) writing large scale, complicated projects?

     

    The project I have in mind as a starting point for learning php & mySQL (discussed in a previous post) could be considered complicated I guess, but my intention is to start off with a basic idea and enhance it over the coming months as my programming knowledge increases.

     

    Interested in hearing from anyone with an opinion on the above.

     

    Thanks in advance

     

    Danny

     

    Whoops i apologize i was in a rush earlier and misread your question. Yes you would really need to a have a strong foundation in php and mysql first before you look into frameworks. Larry has two awesome books that are worth checking out PHP for the Web (Fourth Edition) and PHP and MySQL for Dynamic Web Sites (Forth Edition).

  11. Hi Danny, yes if you are going to be building a fairly complex website, it would be best building into a framework, it will save you the time of reinventing the wheel, and not only that you website will be much more secure. you may find some this post helpful

     

    http://www.larryullm...-like-the-most/

     

    I have not used frameworks myself before as you, but have had a look at Zend, Codeignitor and Yii. I have decided myself to go through with the Yii framework, it started up in 2008, so its not been around as long Zend, however the Yii guys have had time to rethink the structure of a framework and help us more with the common programming tasks. The other advantage of Yii is that it does allow you to incorporate Zend into it and it is Larry Ullman favorite framework a man of experience.

     

    If you are unsure of the MVC don't worry about that now, there are easy ways to see how that works with Yii framework for example you can check these out

     

    http://www.yiiframew...om/screencasts/

     

    http://www.larryullm...-yii-framework/

     

    Larry Ullman tutorials are in the second link which are well written. All of the frameworks Yii, Zend and Codeinigitor are based in object orientated code.

  12. Okay one more thing, what about the BASE_URL for a localhost, just put it like:

     

    define ('BASE_URL','http://localhost/knowledge_is_power/');

     

    so Lynae

     

    should be

     

    define ('BASE_URL','http://localhost/');

     

    "lol i have more problems with paths and directories than i do with programming, funny stuff this, yes it looks worrying but i do get it now. I just finished the knowledge is power site, so onto the MVC coffeeshop now with a bit more experience."

    • Upvote 1
×
×
  • Create New...