[UPHPU] Java and Frameworks (was: MVC)

John lists at strictlyrockymountain.com
Thu Nov 11 19:17:18 MST 2004


Dave, can you explain to me what transactions are.  I know what they are
in MySQL/Postgresql, but from your explanation below I have done what I
think your saying.  I have written a function that charges a credit
card, update the master transaction table and sends an email.  I've even
go farther into making each their own function.

I want to say that I completely understand the re-usability of code
stored in memory as an object, and PHP doesn't do that.  However that
would be awesome and make PHP OO programming much much more, IMHO.

--
Thanks
John

> <quote who="John David Anderson">
>> From all I can tell (and I'm no big PHP or Java guru), but PHP is
>> just as good as Java. I personally like PHP because its more flexible
>> and way less verbose.
>> System.out.println.righthere.astext.please("hello") vs. echo "Hi."
>> :o)
>
> PHP and Java Servlets are fundamentally different from eachother by
> design. There is one big factor: persistent objects. In a Servlet,
> when you create an instance of a class, it can remain in memory to be
> reused by subsequent HTTP requests. In PHP, such instances must be
> serialized and persisted to a session (typically written to a file,
> relational DB, or a ramdisk). This design makes Servlets able to
> handle *huge* volumes of users concurrently because objects don't have
> to be deserialized and re-created to be reused. They just "stick
> around" in memory. This is why Java excels in the enterprise web
> arena. That, and it has a huge marketing department and much more
> "official" support.
>
> Not to mention, when you talk about Enterprise Java (J2EE), you aren't
> just talking about web applications and JSP, you're also taking about
> transaction support. And PHP certainly does not have that. How can you
> write a PHP transaction that credits a credit card, modifies an
> inventory record, updates an internal accounting system, and emails
> notification, all as one atomic unit. That is not easy in PHP. It's
> not easy in Java either, but it's at least supported.
>
> --Dave
>
>
> _______________________________________________
>
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>
> Sponsored by hostinginferno.com!






More information about the UPHPU mailing list