* Avoid Object-Relational-Mapping tools such as Hibernate or iBatis, since PHP isn’t comfortable with ORM yet.
The claim: php is 70% as competent as java, in terms of OO features to model and design a system. I think it’s below 70%.
* polymophism, dynamic bind` @@
* strongly typed — fundamental to OO system design
* A java return type can be declared as an interface/abstract type, so clients can safely use an expected service of the interface
* inner class for OO design
* more access modifiers
* Constructor chain reaction up to Object@@
* custom classloader
* factory, singleton and other patterns
* java proxy to implement AOP
* distributed components — RMI, corba… important for some enterprise systems.
each object’s wait set
custom exception@@ yes
smarty is an extremely well-defined, simple and above all, concrete, implementation of many abstract concepts. Suprisingly, I used and studied struts many times more than smarty but I understand smarty better.
We can use smarty as a starting point or reference point to understand views in struts MVC.
In fact, jsp Expression Language and JSTL also mirror smarty.
* request object = a huge nested php object passed into smarty template
* afward = a logical name (no such thing in smarty) for a “physical” view
* forward request to a view =
* controller as request router =
similar to DBI/DBD — one vendor-independent component + one vendor-specific component
how PDO compares to other popular abstraction layers out there, for example, PEAR DB or ADODB. pdo is lighter than either of those, both in terms of API and in terms of performance.
mysql stored procedure is ok with pdo but not pear::db
Many folks resort to a data abstraction layer, such as Pear::DB or DBX. Using a data abstraction layer is a good thing, but its main goal is to make the RDBMS transparent, allowing you to change database vendors fairly easily.
Thanks. They did ask about xml, object-oriented php …
q: any object-oriented php framework you used, such as zend framework
q: what’s the object-oriented MVC architecture?
q: how object-oriented is the data access layer?
This xml question was tough, because they decided to drill down right to the limits of the interviewee’s understanding of a past project.
q: in your project, how did xml help flash-php integration.
—– Original Message —–
> Hi, how was your php interview? Guess you must have done it well. Did you meet any unexpected tough questions?
include vs require
how to define a class
xml functions, oo or otherwise
static property — same as a java static property
static var ] non-oo function. No java counterpart. consider it an abuse of “static”
static var not declared inside anything is private to the file scope.
[[practical c++ programming]] has a full list of meanings.