Jump to content

Hall of Famer

Members
  • Posts

    314
  • Joined

  • Last visited

Posts posted by Hall of Famer

  1. Using logic code in .tpl file is not recommended. It's a good practice to provide one more layer of separation of responsibility. Create a controller or view class that handles php code processing, the .tpl file is better off simply outputting html elements and assigned php variables.

  2. TS:This is one of the better concept I have read,too bad w3school school is at the top of the page.

     

    http://www.tutorialspoint.com/php/php_object_oriented.htm

     

    This looks nice, although the document on killerphp.com is probably easier for amateurs to understand. Anyway an intermediate skilled programmer needs to understand all the concepts in the tutorial you posted and apply them nicely in real php applications. Without OOP, a coder is at best a beginner/amateur.

     

    So I heard that a new book called Pro PHP MVC would be released by Oct 31st, cant wait to grab one. This is perhaps a good way for intermediate skilled programmers aspiring to improve into advanced programmers.

  3. Well Id say PHP 6 needs to make Array and String as objects by default. For Arrays, numeric arrays are accessed using the square bracket notation($array[0], $array[1]), while for associative arrays the ->operator should be used($array->field1, $array->field2). Also I am surprised no one on php rfc has ever suggested inner/nested classes, which is kinda surprising seeing how even static class was brought up a while ago. Anyone interested in making a push for inner/nested class?

  4. Well there must be a reason why it was Godaddy instead of HostGator and other hosting companies.

    Do you actually read things before you post?

     

    Of course I do, and apparently you failed to realize what I was actually talking about.

     

  5. Why dont we migrate to VB3.8? It is still by far the best forum software to me. But I am definitely fine with IPB, it seems to be getting more and more popular especially with VB fighting against Xenforo on the court.

     

    SMF is really an inferior forum software, it has no class or object in its source code AT ALL. It's just so unbelievable, not surprised if the script is already unable to maintain and upgrade at this point. 

    :wtf:

  6. I also use jQuery, but it sounds like this is something that helps you write the PHP page that responds to the request? I've never had a need for that.

     

    I think Cjax integrates JQuery? If not there should be a plugin anyway.

  7. As far as I know, two common indent styles exist in the programming world: K&R and Allman. Well not to be disrespectful for other indent styles, I am just talking about the two most widely used ones. For me, I've been coding with K&R styles throughout my life, and find it more comfortable personally. I do, however, realize that most PHP frameworks use Allman indenting style, good examples are Zend Framework, Symfony and Codeignitor. CakePHP is perhaps the only framework stick to K&R intent style.

     

    I was wondering though, how many of you here are advocates for K&R or Allman style. And why? I was told before that it was just a matter of preference, like the color we choose for our shirts. But is it really so? Are there any other important reasons behind this preference? Is it just a coincidence that CakePHP is the only popular PHP framework using K&R? 

  8. umm I think PHP borrows lots of its idea of object oriented programming syntax from Java

     

    Again, what part of PHP's OOP syntax did it take from Java?

     

    Java didn't invent OOP. Java took its ideas from something else as well.

     

    Well I believe abstract class/method, final class/method and interface are all concept/syntax PHP borrowed from Java? I know static is not, since C++ has that too.

  9. Well lately I've been searching into PHP AJAX framework, which can be quite helpful for me. Don't get me wrong, I can code in both PHP and Javascript, but when they are integrated together I am totally confused. This is where PHP AJAX framework comes to play in my mind, as they can separate PHP completely from javascript(and some actually allow you to code without much javascript). I find this cjax as the most popular framework for PHP AJAX and good news is that it's still being developed(unlike dead projects like PHPlivex and half-dead projects like Xajax). The project description and download links can all be found from its official site. Seems that CakePHP and Codeignitor both use this third party library.

    http://cjax.sourceforge.net/

     

    So I was wondering, how many of you prefer using a PHP-AJAX library/framework like cjax? If you were building a custom MVC framework of your own, would you use cjax in your project? And why?

     

  10. umm I think PHP borrows lots of its idea of object oriented programming syntax from Java, and of course it has evolved from them. The concept of trait is not available in Java, the namespace system also works differently from Java's package system. It's really hard to say which one is a more powerful programming language, especially considering one is primarily used for web development while the other is for designing desktop softwares. Would be nice if PHP is as much object-oriented as Java though, but I can see why it's not happening at least yet(compensation for amateur programmers struggling with objects, you bet).

  11. Hall of Famer, are you in the states?

     

    That's interesting, my states main engineering school UF is just down the road, I wonder what they would say? My son doesn't go to UF but was probably talking about freshman because that was who was there mostly this summer. The Fall semester started this week.

     

    On a lark last night I looked at Apple laptops, they cost real money.

     

    Yeah, I was attending a school in Pennsylvania for the past four years, now it is Cornell for me.

  12. Well this is weird, about 70% of my classmates use Windows 7, it is also common in my school's library. Of course if you count different types of students the number may vary. More than 50% of graphical art students use Apple/Mac, but for Business and Engineering students the usage of Windows is common.

  13. I believe this was not an idea originated from Java.

     

    Neither was the majority of PHP's OOP implementation.

     

    OOP existed long before Java did.

     

    Of course I know about this, but Java did introduce some nice OOP syntax and concept that makes it more convenient and useful to program in OOP. If OOP exists for the mere purpose of information hiding, then perhaps we dont really need it at all as you can do the same job with functions.

  14. Well PHP is not a fully object-oriented programming language, which is a huge drawback.
    Why?  Go ahead, tell us why the ability to program with or without objects is a drawback, instead of a feature.  My car isn't fully a forward-moving car, it has reverse.  major drawback?

     

    Bad analogy my friend, a car without reverse-moving mechanism is a huge drawback, while a programing language that prohibits procedural programming is an improvement of standard and quality. Let's think about a University that used to accept only high school seniors with great academic performance and excellent extracurricular activities, but now also takes in kids with poor intelligence and lots of extra issues like drug-usage. Of course the school increases its 'diversity' on campus and is apparently earning more money. Would you call this an improvement, from quality point of view?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.