SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Zend Framework - Database Dilemma

    I apologize in advance if this is a newbie question:

    Am I missing something, or is it impossible to make Zend_Db read from database tables in a schema other than the one named "public"? I've been searching the zend manual, zf api docs, google, and ouija board for the past 5 horus and am about to have an aneurysm. I was going through the excellent tutorial made by Rob Allen (akrabat.com) and just assumed that Zend_Db would search all schemas for my table since it seems to provide no means of selecting a schema, but as sure as i am bald, everything worked beautifully after i recreated my table tin the "public" schema.

    Is it bad practice on my part to use schemas not named "public", or is the whole interweb conspiring to keep the secret of schema selection from falling into my hands?

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    A newbie question?

    Newbie at what for gods sake? You know of Akrabat? And you can say his name?

    Come on boy, cough it up... what is your skill level? Whats your background? What other PHP Frameworks have you come across and found wanting? and why?

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL, i didn't realize akrabat and his real name (as stated at the top of the tutorial's pdf file) were such well guarded secrets. (; I was pretty stoked to see that he had some posts on this board, but didn't want to trouble him directly- i'm sure he gets more than enough of that. Ah, the perils of writing a how-to article!!!

    I'd rate my skill level at intermediate w/ procedural PHP as i've been using it at work for years to make intranet applications and network monitoring doohickies, but i'm a newbie at OOP. I've been flirting with making the switch to OOP for quite some time (ever since i bought the php anthology), but only now have had time to get serious about it. I have not yet tried any other frameworks, but decided to start with Zend Framework because a) it seems to make URL rewriting a breeze, b) zend, c'mon, they made php, and c) kevin yank was using it in his ajax tutorial video (which is quite the endorsement).

    I suppose i'll have to try out another framework or just roll my own if zend is currently limited to the public schema. If that is the case, i would welcome any recommendations for alternatives to Zend Framework.

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Sorry for the delay.

    Looks like I'm a bit ahead of you in that I too have been recently learning OOP, and likewise - now I am grokking mvc, have decided to use a framework also.

    Now I stayed away from the ZF up till now, becuase it seems to be being worked on so much. I looked at a couple of frameworks - and went for codeigniter.

    This isnt the purest oop framework, but I have used it on a couple of projects and I am very comfortable with it. Of the others Cake looks as though it has the most zealots following it, AND I saw a job advert that mentioned it...

    I work on Win32 a lot, with IIS, and from what I have read there is dependency in ZF for mod_rewrite on one of the controllers. Now maybe I can work round that, but my next project will likely use Cake.

    CI leaves some things to be desired, but thats how we learn, right?

    For a fuller discussion search this forum for "igniter" and you will see plenty more pros and cons. See this Framework Comparison Chart.

    But honestly if you intend to stick with it - try and post that ZF question on a ZF board.

    Off Topic:

    The importance of seperating your application into "layers" is probably the most fundamental thing to learn.... 2 or 3 books, and a year later, the penny finally dropped with me. I wouldnt say that using CI as I do has done this for me, but I do understand what I want to happen.

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thanks for the info and link, Cups. After seeing the comparison chart and reading a bit about other frameworks, i'm thinking zend might not yet be the framework for me. Ah well, off to learn about the others!

  6. #6
    SitePoint Evangelist mrwooster's Avatar
    Join Date
    Jan 2006
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have started uising cake and it makes OOP a doddle - its also works with php4, which is what I am using.

  7. #7
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cake does seem like a pretty nice framework. I completed the tutorial about cake here at sitepoint and was impressed at how much easier cake is than zend... however i also checked out code igniter and my first impression is that it is even easier than cake and has better documentation. I guess time will tell which one is the best one for me.

    Thanks for your responses!


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
  •