Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5848

Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony).

From The Natural Philosopher <tnp@invalid.invalid>
Newsgroups comp.lang.php
Subject Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony).
Date 2012-05-07 23:46 +0100
Organization albasani.net
Message-ID <jo9jc2$7gr$1@news.albasani.net> (permalink)
References <rDUpr.4667$YB6.39@newsfe17.iad> <a0qlfcFkboU1@mid.uni-berlin.de> <hUVpr.177395$KQ2.54777@newsfe15.iad> <12fgq7lcv4savgsosf8ha4l76rfhr9df52@4ax.com> <QdXpr.1120$HW6.992@newsfe20.iad>

Show all headers | View raw


Daniel Pitts wrote:
> On 5/7/12 2:25 PM, r.mariotti@fdcx.net wrote:
>> On Mon, 07 May 2012 13:03:25 -0700, Daniel Pitts
>> <newsgroup.nospam@virtualinfinity.net>  wrote:
>>
>>> On 5/7/12 12:18 PM, M. Strobel wrote:
>>>> Am 07.05.2012 20:37, schrieb Daniel Pitts:
>>>>> Hello everyone,
>>>>> I've been told we are changing our platform from one based in Java 
>>>>> to one based in
>>>>> PHP.  I consider myself expert in Java and OOP, and I'm a little 
>>>>> concerned about the
>>>>> transition to PHP.  Personally, I'm in a position where I can 
>>>>> remove myself from the
>>>>> code-base (I'm starting to be in more of a management position).  
>>>>> However, I have
>>>>> always liked to know the details of what is being worked on.
>>>>>
>>>>> What are the best resources for an expert programmer (with many 
>>>>> different languages,
>>>>> idioms, and philosophies under his belt), to learn "clean" PHP.  Is 
>>>>> developing in
>>>>> "pure" PHP significantly different than developing in symfony.
>>>>
>>>> "best resources for an expert programmer" - is the php.net 
>>>> documentation. You will
>>>> fully understand everything there. PHP is an imperative scripting 
>>>> language taking
>>>> features from all the neighbors. You might find the OO aspects simple.
>>>>
>>>> Symfony gives you a persistence framework, a CRUD generator, and and 
>>>> a clear
>>>> convention based configuration.
>>> So, its a bit like Rails? From the docs I've seen, it seems to provide
>>> some good abstractions, but sometimes real-world use-cases don't fit
>>> abstractions in some frameworks.
>>>>
>>>> Without a framework - what many here are doing IMO - you would start 
>>>> to develop your
>>>> own solutions to the different patterns, creating your own 
>>>> framework. Not difficult
>>>> either.
>>> I've developed many frameworks myself. That is (for better or worse)
>>> something our CTO wants us to get out of doing.
>>>>
>>>>> Also, a few concerns I have are related to performance.  One of the 
>>>>> things our
>>>>> current architecture does is make multiple parallel HTTP requests 
>>>>> to XML based APIs
>>>>> that provide the data.  I know PHP doesn't exactly support 
>>>>> concurrency like this, but
>>>>> I'm wondering if there is some other way to manage this kind of 
>>>>> process. It is easier
>>>>> in Java to create many worker threads that each make a HTTP 
>>>>> request, but I can
>>>>> imagine in PHP doing something with a bunch of async IO and select 
>>>>> calls. Is that
>>>>> feasible? Is there something already created for this?
>>>>>
>>>>> What other tips do people have for performance and scalability?  
>>>>> Many of our
>>>>> applications serve more than 3 million requests per day, and we 
>>>>> have many
>>>>> applications. I'd estimate our current platform as a whole serves 
>>>>> 300-500 sustained
>>>>> requests per second.
>>>>
>>>> Big question mark here. Some top sites are running PHP, by I would 
>>>> see the
>>>> environment you are used to as an upgrade path for PHP programmers 
>>>> with need for big
>>>> iron.
>>> Yup, that is the sentiment of many of the front-line developers here.
>>>>
>>>> Very questionable decision to downgrade this way. Do they think PHP 
>>>> programmers are
>>>> cheaper? If they are, there is a risk that they are less skilled.
>>>
>>> Preaching to the choir. The thing is, we are a large company with many
>>> branded sites.  I just happen to be in the department that needs the big
>>> guns, but the majority of the other sites don't require them.  The
>>> difficulty is in proving that's the case enough to justify our
>>> department alone being different.   Who knows, we've got enough talent
>>> here that maybe we'll turn the tide and make PHP more performance
>>> oriented ;-)
>>>
>>>
>>> Well, thanks for the feedback.
>>>
>>> Daniel.
>>
>> Daniel,
>>
>> Long time developer here starting with web banking back in the
>> mid-90's.  IMHO I believe you will find php running under apache
>> (hopefully) to be considerably more responsive than anything with
>> java.
>>
>> While I admit I haven't developed in java, all the projects my
>> coworkers have been involved with that were in java and in my own user
>> experience, the performance "hit" with java was tremendous.
> Hmm, that hasn't been our experience. Perhaps the Java you experienced 
> wasn't designed the best way to support high levels of continuous 
> traffic.  Apples-to-apples comparisons are sometimes difficult to manage 
> when you're working with different langauges/frameworks.
>>
>> As far as running production sites written in php...  I've done them
>> from 16 core AMD 64 bit with 24GB ram to as little as 1 core with 2GB
>> ram.  And surprisingly they ALL hold their own.
> We're estimating that we're going to need a load-balanced tier of dozens 
> of 16 core servers. Our current processes tend to be IO bound, but with 
> CPU not to far behind.  PHP seems to be more CPU intensive for the same 
> amount of work.
>>
>> I've never run into any issues running clean code including very
>> dynamic sites.  And that includes those with 15-20 million
>> transactions per day.
>>
>> Just remember to create good solid code and you won't be disappointed.
> My code is usually good solid code, but we're a large company with many 
> developers of varying levels of skill.  I'm not worried about being 
> disappointed, I'm worried about management being disappointed
> 
consider building your own libraries in C and binding into  PHP.

If that's not going against the grain.

I heard from one person in such a sitation that the web designers liked 
to have simple atomic PHP statements that did a lot..these were handled 
by proper programmers either as PHP libraries or as PHP/C libraries.

> Thanks,
> Daniel.


-- 
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-07 11:37 -0700
  Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-07 21:18 +0200
    Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-07 13:03 -0700
      Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). r.mariotti@fdcx.net - 2012-05-07 17:25 -0400
        Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-07 14:34 -0700
          Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). The Natural Philosopher <tnp@invalid.invalid> - 2012-05-07 23:46 +0100
          Re: Transitioning from Java/JSP (spring, struts, hibernate) to PHP (symfony). Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-07 20:23 -0400

csiph-web