1

I usually use Zend Framework to develop. However in the job that I am going to start on, it will require that I use PHP without Zend. Maybe develop my own framework. Are there any resources to help me get started? I will probably need MVC best with ORM (or will just using PDO be good enough, also keeping things simple)?

Also maybe in the later part, caching perhaps any others?

Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
  • 3
    Build your own framework? In this day and age? For commercial programming? I would think long and hard about that: It will take a lot of time to develop it, a lot of time to fix bugs, and when you leave your employer or you hire somebody new, you'll have to invest a lot into training. – Pekka Feb 11 '11 at 13:58
  • Is there any reason you can't use Zend? What about other frameworks, there are many out there.. – Jacob Feb 11 '11 at 14:00
  • @Pekka & @Jacob, it wasn't my decision not to use Zend. I use Zend and find that v1 is not perfect, but nothing is, I think v2 looks promissing. It was during my interview of the job I am starting on Mon that I was asked if its ok for me to use just PHP or perhaps develop an own framework. I don't really agree to fully too, but I just thought I should learn abit on developing my own framework fust in case – Jiew Meng Feb 12 '11 at 08:32
  • fair enough. This may provide some input: http://stackoverflow.com/questions/3468837/what-is-the-basic-principle-of-a-core-on-framework – Pekka Feb 12 '11 at 14:10

3 Answers3

0

What exactly are the non-functional requirements of the project that you can't use Zend? "No frameworks?" or "Don't use the ZEND framework?"

Kevin Worthington
  • 457
  • 2
  • 5
  • 17
mhughes
  • 630
  • 3
  • 11
  • I am not sure yet. But from what I was asked during my interview was that if I could develop my own – Jiew Meng Feb 12 '11 at 08:32
  • I think you should ask for the rationale behind this design decision. Based on the concerns of your future employer, you can take informed decisions. If it's a performance issue, for example. If it's company policy... Make sure they understand the implications of creating a framework from scratch. Cost-wise i mean. – mhughes Feb 16 '11 at 17:17
0

I am a big fan of the Yii Framework.

www.yiiframework.com

It has a very large set of built in functions and I got up and coding the core of my first application with it within a few hours.

mrkmg
  • 241
  • 4
  • 14
0

If your employer is so against using tried & true open-source technologies then perhaps you should reconsider..

But, if you choose to move forward, the best resources I can offer would be:

Organize your application like a Ruby on Rails application - it's just a very nice way to organize things:

  • application
    • controllers
    • helpers
    • views
    • models
  • public
    • stylesheets
    • javascripts
    • images
  • vendor

That's the basic application structure I've used in the past when developing custom MVC frameworks. At the root level you would have a .htaccess file that would define your rewrite rules to forward all requests to the appropriate controller/action.

In so far as the views are concerned, I've had very good experiences with Smarty in the past. It's a very solid framework and it has plugin support, caching, and a fairly robust settings system. And, it will fit nicely into this structure. The only annoying (at times) thing with Smarty is that you can't have inline PHP code in the templates.. if that's a deal breaker, then perhaps just name your view files *.phtml so you know for certain it's a view and have it use straight PHP.

Jason Palmer
  • 731
  • 4
  • 17