The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

PHP and compiled components

We've been doing classic ASP development for several years.  Typical setup is:
- ASP for front-end web app
- COM+ (VB6 written dlls) for business logic, data access
- MS SQLServer w/ sprocs

We are in the process of exploring new tools.  While .Net is the obvious choice, we are also looking at PHP/MySQL. 

The question is:  Does PHP have an equivalent of "compiled components" (ie. COM components or .Net assemblies) for encapsulating business logic and generally for improved performance? 

I haven't really undercovered anything yet, but again I'm just learning PHP. 

Monday, February 20, 2006
undercovered = uncovered
Monday, February 20, 2006
I think the Zend optimizer does some of what you want.
bankers hours
Monday, February 20, 2006
There are a number of byte-code caching products for PHP (some from Zend).  I've seen good performance improvements from a few of these products.
Almost H. Anonymous Send private email
Monday, February 20, 2006
Monday, February 20, 2006
I've run into this same thing, coming from ASP / COM to PHP.

First, know that PHP will do COM just fine on Windows.  See this:

Also, I know there's some way to use Java objects as well, though I've never tried it.

But -- more importantly -- ask yourself why you need to compile stuff.  You compiled a COM object to:

1. Provide more speed.
2. So you didn't have to include code all over the place.
3. So you could code in VB, rather than VBScript.
4. To protect your code in case you wanted to distrbute it.

1.  PHP is fast anyway, and there are a half-dozen PHP optimizers and compilers that will do this if you really want more speed.  Many of them free.

2. PHP5 introduced the _autoload function, in which you can define a function to automatically load classes when an undefined class is called.  It works beautifully, and now I have the luxury of just instantiating classes wherever I want and PHP effectively pulls them out of thin air.

3. PHP is so much better than VBScript that you really don't want for much.  I have run into very few syntax walls in PHP where I really thought a more capable language would help.

4. I've never had this situation, so I can't comment

I was slowly liberated of the need to have compiled components lying around.  It's a paradigm shift, but one worth making.
Deane Send private email
Monday, February 20, 2006
Deane Send private email
Monday, February 20, 2006
One last thing --

Don't rule out Ruby on Rails either.  Based on your experience, how you've architected things in the past, and what you're looking at, RoR might be just the thing.

And Ruby reflects like a mother too.
Deane Send private email
Monday, February 20, 2006
It's all here:
Berislav Lopac Send private email
Wednesday, February 22, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz