SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 58 of 58
  1. #51
    SitePoint Addict
    Join Date
    Jul 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    At one time I was trying to learn how to accomplish some stuff like this in oop. No one could give an answer. As stated, I am yet to see any complex database example done in oop. By now there should be tons of examples on the web. I just do not see examples like a real business would use. In any order entry system there should be a way to auto fill things like ship to fields and such as this. You talk about seperation of presentation layer and server php layer (I forget exact phrase). But the minute ajax or whatever is used for something complex, suddenly it's alright to mix everything up. I just want to see just one concrete example of oop where you can enter an order or something and do complex lookups. I do not disagree with oop. But for me to want to completely learn oop in php, I need to see and know how to accomplish at least a lookup. I don't see how it's possible without having some html and php combined within the same php file. Unless, php has it's own dropdown that isn't covered in the php manual. Otherwise, the second you have that dropdown contained in a php page, well you just broke your own rule of html and php seperation. And if this is true, but you have to use a dropdown to do a lookup, then oop doesn't exist. Therefore it's a paradox.
    I recently dabbled in a little java / jsp. Guess what, yes there are classes, but all of the examples still have to combine some html and java on the same page in order to accomplish a lookup in a dropdown. At least the examples I ran across. Isn't the truth about oop this: It takes some genuine oop techniques but a mix of procedural code is required. I mean java is supposed to be a lot more oop than php, but yet a lot of the java examples looks like my php code.
    Last edited by jim9; Jan 19, 2007 at 12:30. Reason: spell

  2. #52
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You were just given a working example of a lookup in PHP. With autofill. Everything you asked for. OOP has nothing to do with not having HTML in your PHP output. You're frustratingly clueless.

  3. #53
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NewsFlash
    "OOP Does Not Exist", Says Jim. "It's a paradox".

    Do you realise how silly you sound? Do you think that all of a sudden you are an authority on what is and isn't in the development world?

  4. #54
    SitePoint Addict
    Join Date
    Jul 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jordan said he'd post the code. I was waiting for the code, I would like very much to see it.

  5. #55
    SitePoint Addict
    Join Date
    Jul 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOP has nothing to do with not having HTML in your PHP output. You're frustratingly clueless.
    I was referring to having html and php code in the same file, not output.

  6. #56
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jim9 View Post
    I was referring to having html and php code in the same file, not output.
    Sorry, let me rephrase. Having HTML and PHP in the same file has nothing to do with OOP.

  7. #57
    SitePoint Addict
    Join Date
    Jul 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    logic earth had replied:
    What does this example case have to do with OO or procedural programming practice?
    I just want to know how it's done in a php-oop program. That is THE THING preventing me from progressing. I can do all sorts of stuff in procedual (what I call regular) php right now. My little test site isn't much compared to what you guys can code. But you can view, edit, add with a lookup. Now if someone (this stuff is not in a book, and it's not taught in school) could have a complete small example of this but in oop. Not just the oop part, but everything. In fact there's been a couple times I attempting some stuff in oop, but I didn't know how to get the more complex stuff to work. Anyone in a short time can code an oop database with an edit/add deal, but when you hit "edit" there's no lookup. I tryed cake php. All it gives is a regular edit screen where you have to manually type in everything. Now if I knew how to implement some advanced features I could learn. I guess my mind is targeted toward business/invoice/order entry type stuff, whereas a lot of you must be into forums / blog type of stuff. The kind of sites where a more complex lookup isn't required. Even the ajax thing, after filling fields you'd still need to submit the final record for updating or inserting into database. I don't know how it's done in ajax yet.

  8. #58
    SitePoint Addict
    Join Date
    Jul 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "OOP Does Not Exist", Says Jim. "It's a paradox".
    Ok, I admit this was silly.

    Look at this:
    http://jimdiane.byethost9.com/webcon...sheet_list.php
    If you go to edit a record, you'll see a dropdown for carrier. If you choose another carrier, the carrier field and all related fields, ie., phone/fax are also updated. (I put this online quick, so here only carrier and phone update). This is dependant dropdowns. I am trying to accomplish this without dependant dropdowns. Or at least pre-filter the carrier dropdown so all records aren't in dropdown. But how to do this in oop would be good to learn. I can't find this type of examples. In other words an oop example that goes from nothing and takes someone through all steps to final project. But, with the complex type lookups / filters / dropdowns, etc. Shucks, I could wip out a oop database in oop now with crud. But it would lack the advanced before mentioned features.
    Last edited by jim9; Jan 19, 2007 at 18:01. Reason: left out sentence.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •