Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Edward

  1. If that is pg.37 you are on, you don't require ajax for that, you can use basic javascript to simply reference a HTML page element then update its value on forum submission. If there was an error showing you would have your javascript code return false so the forum was not submitted but only the error output was displayed. <input type="text" name="result" id="result"> (In this example adding output to a text element) In normal javascript we can do this by: document.getElementById('result').value = errorMessage; I haven't done this in jquery yet, but here is the page from W3Schools site with the stuff: http://www.w3schools.com/jquery/jquery_dom_get.asp Larry has a new Modern Javascript Develop and Design book on this stuff, the book is awesome, really its worth reading through.
  2. I found this SlideShare Survey Antonio on database Technologies you might like to take a look at:
  3. Yes Antonio i am sorry you are right it is. I think i have what i want to do so hard coded into my brain that i am almost fighting to defend points i believe in. But the trouble is like yourself you have your own ideas, your own Scale of project which you would like to build to so sometimes we don't converge. I built my project both ways with produral code and oop both work 100% as i tested so far. Even if you build your own project, it seems to me that the way things are done are pretty much the same as the framework is done anyway. Most web sites just run the same way and i think with Yii's lazy loading technique, do you really need to ask for more. I could code my own MVC like that if i wanted but why bother when its already done and now version 1 is probably almost bug free. "Sometimes there is a time to stop asking questions and take a step foward," Edward
  4. I have a friend also who is a coder that knows more than any of us here and even he uses a framework working for a larger company. They use the framework to save development time and reinventing the wheel because "Time is Money" The framework can also be customized and useful plugins can be installed. There are other useful frameworks like CSS grid frameworks, jquery etc are you not going to use those and just make all those yourself? Seems you are more interested in coding than actually get your ideas to work. I will be honest i don't even care for PHP, SQL they are not my languages but as far as i am concerned they get the job done. Also with regards to Yii, i wouldn't say that's easy to learn that's full blown OOP code i heard a friend of mine saying he was struggling with the Yii code, it takes time to learn. Anyway guys, here is a link to the Yii Performance page, its worth a read: http://www.yiiframew...om/performance/
  5. Seriously these threads you are making are completely pointless a waste of time there is really nothing to talk about. If you actually even had a website and could even put to the test what you were talking about. It would be at least be more interesting if we a certain number of records to test our queries on and at least get a time for completion back. If our query was taking 10 seconds then yeah we should probably have a talk on here about what was better but you guys have nothing so what are you talking about?
  6. I typed last message on my iPad message is between yours AC, sorry about that. Disregard this fixed the above statement, by the way no hard feeling. Just saying sometimes it's better we get on and use what we have rather than bitching about it.
  7. Hey AC, Ive got an idea why don't you make a more efficient framework for us? I think you will find Yii is slightly much better than codeignitor. I don't even understand why would you use codeignitor when it is less superior especially considering the fact that learning a framework would take time and effort. Some good sites have been built with frameworks I disagree that people less experienced use them. I built my own Object orientated mvc and it worked fine for me. But in my opinion it would be smarter to use a framework for developing a fairly large site as it has been tested in more conditions by more users therefore bugs will be fixed and site will be more stable. And with regards to code ignitors query builder statements those are fine just think of what is the end result a string is concatenated and pasted to SQL. I bet that would be faster than the time a query would take on a large number of with a records.
  8. Well its a state not really a page so the browser is correct in what it is doing. It's however useful if the user bookmarks that link, they can get directly to that page state without clicking around. Yes i do like that myself its an interesting feature.
  9. I remember this old topic and today i am reading on PG.331 of how to do this stuff using window.location.hash. Its a way that tabs can be referenced via the URL.
  10. Since you question has changed, well if i was doing what you were saying, i would write a general database helper class then i would extend this and override the parent class to work the basic crud features with MySQL. I would split up the main features of on the website into their own separate classes for User, Authentication, URL, Template, Product, Category etc.
  11. Yeah because he edited his post and cut out about 15 lines. Earlier the post was more on improving database performance. Thanks Hartley i will make any statements I like so long as I am not offending others - this is an open board.
  12. Yeah i guess you can build anything you want into the framework but for starters, we have to see if we can even get our idea to work before we work on its performance. Like i said there are 1000's of these Web Sites up now, and everyone can write the same code, so why would any of our idea's work so easily? If i had a Web Site with high traffic, i would be happy to discuss this with you in more details, but quite frankly if I was to discuss such features I would just be talking in the air. You remember you said to me about my project don't worry about blocking swear words and stuff now, well later on I came to realize that you are right, those kind of features can be implemented at any time, the most important point now is to get a working model up and see what can be improved for the final. Do you think Mark at Facebook was thinking about these kind of database features when he built version 1? Anyway no harm in your thread but we have to think more about the reality of the situation and what ideas are actually feasible for the present time.
  13. Nice picture did you use adobe photoshop to connect the picture's together? Other than that what were you doing at Google, out of curiosity?
  14. Edward

    Yii Ebook

    Thanks i can't tell you how grateful i am. Don't be too hard on yourself, these books of yours are coming out fast, its hard for us all to keep up. I think this Yii eBook is going to be your most useful book up to date because this is book is about applying all we have learned so far PHP, MySQL and Javascript then coding it into a stable environment ready for deployment.
  15. Edward

    Yii Ebook

    How are your tutorials on Yii coming on? Any idea when they will be released?
  16. Its nice to have a talk about relational databases but anyhow we need to build our sites into a stable environment framework etc, so what kind of framework would support such a method? Your idea's are cool but we will make more progress if we make do with what is available. How are you even going to get people on a website with all the competition these days. Everyone is doing SEO and its getting much harder to get ranked next to big competitors. I really think this kind of database efficiency is something we should consider talking about down the road if we have a high traffic website. My advise you to you Antonio is "Get your web site Build"!
  17. I think best thing is you get Larry's 3rd edition PHP book there is lots of object orientated practice in there. If you read that you will understand.
  18. Functions are methods but they are in objects. Each object contains different functions and properties. The best thing to do is practice some object orientated programming then you will understand it. The difference between functions is they arebstand alone, methods arebpart of an object.
  19. An extension of the words from my mouth. I think to be honest that you have to have done a reasonable amount of practice with Object Orientated programming before you can really understand the Document Object Model. You can call a function from the properties of the object you are using, but as Hartley and i showed you can only invoke functions from object methods, yes if they are called you will get an error. For example Assigning a function call to a object property: Assuming public. var watchthis = function() { return 1; }; document.getElementById('result').value = watchthis();
  20. Larry Ullman's PHP and MySQL for Dynamic Web Sites 4th Edition http://www.amazon.co...on larry ullman would gear you up with the tools for a Web Site like that if you are looking for a custom job. Otherwise why not sign up for something like MailChimp.com http://mailchimp.com/, it may save you all the time and hassle of learning and coding.
  21. 1. Ref. PG 245. var getTwo = function() { return 2; } Calling getTwo function: getTwo() Returns result of 2 Invoking getTwo getTwo (Returns function() { return 2; }) So with our regular examples in the book with window.onload = init don't you see here that we are invoking the function not calling it directly. 2. If you you do not add value you would be storing a reference to the object element for later use, so you could then access it later to fetch a value. Adding .value to the end will take out the value at the specific selected element. Firebug you may be able to find a YouTube tutorial on how to use that correctly.
  22. I got my book in yesterday from Amazon it was shipped on Tuesday and arrived on Friday, not bad for being i am on the other side of the World. The 3rd Edition is an improvement on the 2nd Edition, the opening cover is very warm and welcoming. Do you know what the Egyptian Hieroglyphics actually mean? I can see a guy see one guy holding an Eagle, one guy that looks like he is reaching or trying to make a decision on whether he should use the knife or ancient crowbar that is above his head. Another guy either making a soup or washing his hands, a guy possibly a teacher like you writing on his blackboard, and another guy on the far left column is pointing his finger. Whatever these guys are doing its interesting to try and interpret this. I also noticed that you added the OOP design patterns chapter in, I really appreciate that, it was one of my early recommendations for this book thank you for listening to me. Well the book is perfect and it smells good to, well i will be starting this first thing on monday, can't wait. Well done Larry, thanks Again for your Awesomeness.
  23. Well these systems now can handle millions of records with no bother as you did state before, so if its something that is perform related we can worry about that if our sites are ever to become that busy, which looks highly unlikely with all the competition out there. Anyway there is no harm in trying, gives us something to keep us busy.
  24. Something like this? This is a drop down generated from your SQL statement it also holds its stickiness. $q = "SELECT id, size FROM sizes"; $r = $mysqli->query($q); // Run the query. while ($row = $r->fetch_object()) { echo "<option value=\"$row->id\" "; if (isset($_POST['size']) && ($_POST['size'] == $row->id)) echo 'selected="selected"'; echo ">$row->size</option>\n"; } $r->free(); // Free up the resources. unset($r); $mysqli->close(); // Close the database connection. unset($mysqli);
  25. "Unfortunately the one browser that doesn't have addEventListener() is...Internet Explorer, prior to version 9." They forgot to add IE8 to the garbage list, may be one of us could give them a call to remind them.
  • Create New...