Any disadvantage to using Zend for a very small website [closed]
Asked Answered
L

5

7

I'm using Zend and want to know if there's any disadvantages to using it for a small website. The website is maybe 4 pages: a couple of forms and a couple of static pages.

Will Zend still speed up development for such a small website? or the opposite?

Does the whole bootstrapping flow and MVC structure and routing overburden performance for such a small website?

I see it being useful for a big website serving lots of content, but for a brochure website, does it still make sense to use the framework. It's sitting on the server so there's no initial cost to adding it to the project, but is there performance and implementation issues (maybe longer implementation time) for such a small project I'm not noticing yet?

I'm getting suggestions for other frameworks. I'm sure Codeigniter, Kohana, and modx are great, but they require time to learn their API. I already know and use Zend so the choice is between it and plain PHP.

Lysin answered 28/9, 2010 at 6:6 Comment(3)
I would suggest Codeigniter if the project is that small.Loment
And I would suggest Kohana, if the project is any size.Swithbart
Codeigniter is a great light weight framework, but I would only use a framework when generating dynamic content. If your stuff is static just throw it in a light weight cms system and let the cms take care of routing.Brickey
F
12

I opt for the framework on nearly all sites.

In my experience, a site rarely stays as small and static as one might think when starting out. Using the full framework on a small site might seem like overkill, but it still assists in rapid application development.

Even if the site - as currently envisioned - is only a few pages, those pages probably share a common layout. So use the layout/template functionality of the framework.

Handling the forms and their submissions is easier in an MVC environment. The framework helps there.

And ultimately I find it aesthetically pleasing to truly separate concerns: bootstrapping, controllers, layouts, views, etc. Gotta put all that code/information somewhere. Why not in a set of standard places?

The most compelling argument against using a full framework for a small site would be if you had to actually "learn" the framework to do it. But since you are already familiar with Zend Framework, there is no learning curve associated to getting up and running; you get the RAD benefits right out of the gate.

In short, I find that it's faster to use the framework and it gives me the firm foundation to grow the site.

Fluorometer answered 28/9, 2010 at 13:42 Comment(2)
That's what I eventually figured out as wellLysin
It is worth noting that many of the new-ish breed of micro-frameworks - Slim, Silex, and Phlyty, for example - have view layers and hook/event systems that allow much of the separation benefit while staying comparatively light-weight.Fluorometer
V
3

It might speed up development, but it might be funny having a 27Mb library on a site with only 4 pages.

Vidette answered 28/9, 2010 at 6:7 Comment(3)
Well the library already exists on the server. I just call it into any project so there's no initial cost for deciding to use it. I'm more worried about the website being maybe "clunky" or some similar effect, if any.Lysin
For small website is not required all Zend Library files.Woods
also. no framework loads all files into memory at once anyway. It'll load only what classes are necessary. Your regular Zend app memory RAM footprint will be around 2-5 Mb. it's exactly the same as if you'd use "smaller" frameworks like CI. or at lest this is what I saw in my tests. 27Mb is merely php "hdd" library size, not RAM to be used. Even cheapest shared hosts nowadays supposedly give you "unlimited" hdd space.Miscarry
H
3

Do you really need a framework for a basic 4 page site? You say yourself that a couple of those pages will be static.

This seems like overkill to me. I don't see whats wrong with taking a no framework approach to such a small task.

I'm not sure if this will speed up development either, and a 4 page website (with a couple of static pages) running on bare bones PHP will be much faster then its framework counterpart, that is assuming no caching.

Hesperidium answered 28/9, 2010 at 7:33 Comment(1)
I quite agree. Start with the bare minimum and add a framework only when you actually need it.Hirudin
R
2

Zend is slower, but (at least in my case) it speeds up development. You can always use Request cache on such a simple website.

Resourceful answered 28/9, 2010 at 18:19 Comment(0)
B
1

Use something like modx for speedy development of such a small site. Just delete all the example stuff and throw your content into the content management system.

I propose this for speed of development. As for performance it is likely slower than a framework like codeigniter.

In response to your edit:

Q: Which will be faster for development?

A: Which are you more familiar with (Zend or standard PHP)? The final answer depends on your level of reliance on Zend to perform standard php tasks.

Q: Which has better performance for static content?

A: Likely standard php since you will only call the libraries you need and no framework overhead.

Brickey answered 28/9, 2010 at 6:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.