Re: Re: PHP development practices from a Java Architects eyeApril 26th, 2005 In response to my post PHP development practices from a Java Architects eye, Jeff Moore had some thoughts. I posted my response (to his reponse to my post) in his post.
One Simple Way To Spot Bad ArchitectsJuly 2nd, 2007 This is a rejoinder to Frank's article on the same topic. He discusses 13 scenarios.
Announcement: Job Blog - Blog with latest job postings from various inner circlesDecember 25th, 2004 I have put a new blog which lists hot jobs postings associated with software & bioinformatics industry, job leads available by word-of-mouth, mailings lists of alumni associations, java architects, java user groups, vc mailings lists etc. In other words postings, often for high profile jobs, which are normally accessible to inner circle only.
Debunking Java Myths of PHP developersApril 26th, 2005 After my last post on the differences between Java and PHP development practices, I saw some strange notions surface in PHP developers regarding Java. This post is an attempt to dispel some myths about Java by PHP (and other non-Java) developers.
Java versus PHP versus Python versus Ruby - Job ComparisonApril 5th, 2006 An interesting chart comparing available jobs for these four popular languages - java, php, python and ruby. All of them are extensively used for web application development.
Java EE 5 (formerly J2EE 1.5) Unanimously Passes Public Review Ballot; Promises Ease of UseAugust 16th, 2005 Back to The POJO days and lots of goodies scheduled with Java Enterprise Edition 5.
Pitfalls of Software & Java Education in Engineering SchoolsFebruary 9th, 2006 I have been interviewing several freshers who were taught Java in engineering schools under computer science curriculum. Interviewing them highlighted serious problems with their education as well as with the system.
Few useful links on Java UI developmentJanuary 24th, 2004
A compendium of useful links on Java Human Interface (look and feel):
Papers on Java Software Human Interface Issues
Designing a cross-platform look and feel with Java
Forums to search for Swing answers:
Swing Forum
Swing Forum: Archive
Reverse Hyping Java - Myth and realitiesDecember 16th, 2005 It has become a fulltime jobs of some morons to reverse hype Java for several years now. First it was "Java is slow" myth which was perpetuated.
Test Driving Java Studio CreatorJuly 7th, 2005 An excellent article, with screenshots, describing in details the ease of use of Java Studio Creator and JSF (using Java Studio Creator). The author is pretty impressed with the product.
Top 10 Java LiesMarch 6th, 2006 Here are the top ten Java lies I have heard over the years. Feel free to add yours in the comments.
Bangalore & India Java Leaders of the World? Should JavaOne Shift to India?March 10th, 2008 It was well known that there is a significant amount of Java development in Bangalore these days. However it took me by surprise to find that it may actually be a world leader in terms of amount of Java and India too as a country.
Free Java IDE For StudentsNovember 20th, 2005 BlueJ is an integrated Java environment specifically designed for introductory teaching in object oriented development with Java. I think it has lots of potential.
Java or C#January 10th, 2004 On the old debate - C# versus Java
JDK1.6 / JDK6.0 Downloaded?January 12th, 2006 I just downloaded JDK1.6 aka JDK 6 (code name: Mustang). Now is a good time as any to get your feet wet with the latest version of Java platform and development kit.
April 22nd, 2005 at 11:44 am
I think you spotted the difference between PHP and Java/C#, the concept of making simple things easy, and complex ones possible. Rather than the approach of making everything complex, and relying on the IDE to help you out.
Alot of the things you spotted - hibernate / caching / session stuff. are all possible (see pear.php.net).
Persisent variable across multiple instances has been discussed, and generally considered more trouble than it’s worth to implement (and work properly..) although it’s feasible to use the shared memory lib’s to do something similar.
Remember that most PHP operations are temporary resource intensive, as it’s all cleaned up after each request.., so you dont ‘have’ to mess around with closing database connections etc. (although you can if you want..)
April 22nd, 2005 at 3:20 pm
Alan,
> Remember that most PHP operations are temporary resource intensive, as it’s all cleaned up after each request.
That works unless you have hundreds of simultaneous access, each opening scores of flat files and making twenty MySQL calls on the same database, some of them are updates. You get the picture
I saw but didn’t deleve into pear packages. I will. Thanks for the tip.
Angsuman
April 23rd, 2005 at 5:35 am
php-development-from-java-architects-eye
Simple Thoughts blog has a post on [URL=http://blog.taragana.com/index.php/archive/php-development-from-java-architects-eye/]PHP development from a Java architects eyes[/URL]. This post highlights the paradigm difference between programming in PHP and…
April 23rd, 2005 at 9:29 am
The fact of the matter is that the entire java setup has a high initial cost in terms of time and ressources. It does scale better on big machines with lots of ram and cpu’s. But time means you are moving slower to adapt to needs. Bug machines cost big dollars. So in the end the advantages of java, while there in theory, dont materialize. The advantage of PHP is that you are up and running quickly, being able to turn a profit quickly and learning your customers needs as you grow. In the java world you need to pump in alot more time and money before any customer is able to use your product (and provide valueable feedback).
April 23rd, 2005 at 2:36 pm
@Lukas
> The fact of the matter is that the entire java setup has a high initial cost in terms of time and ressources.
I disagree. That’s a myth not reality.
> It does scale better on big machines with lots of ram and cpu’s.
Umm. It works fine on limited CPU and memory too. When you are talking of scalability you are talking about multiple machine right?
> But time means you are moving slower to adapt to needs.
Again that’s a myth.
> The advantage of PHP is that you are up and running quickly, being able to turn a profit quickly and learning your customers needs as you grow.
That advantage is very much there in Java and more so.
> In the java world you need to pump in alot more time and money before any customer is able to use your product (and provide valueable feedback).
Again that is not based on reality.
I think you need to expand your horizons and delve into Java to find what it is all about rather than listening to or propagating some myths.
April 23rd, 2005 at 7:27 pm
No I was saying that Java prefers to scale with more cpu’s/memory in a single box where as php prefers to scale over multi machines. This brings advantages and disadvantages for both.
There are other aspects like security and robustness and this all ties in with my argument that it will always take you longer to get your Java app up and running. Due to the pro multi threaded approach of Java you need to make sure you dont screw up in coding since mistakes can take down your system fast and hard. It even creates security risks which need to be addressed.
PHP works around this by simply sticking each request in its own process. Its obviously inefficient from a theoretical point of view. However in practice it means you have more time to focus on the actual needs.
So what I am saying is that a well written Java app will be a very nice piece of code and that PHP code gets away with alot of uglyness und uncleanness. This has given PHP the image of not being fit for the enterprise. However the enterprise is focused on ROI and not academic design awards.
Java apps really want to be modelles properly. However to get a proper model you need proper requirements, a luxury that few people get or that will stick several months of time into your development time. It also requires the assumption that your client actually knows his customer. In my experience this is rarely the case so getting something up and running that the customers can already play with and that provides some value to them is the best way to learn the actual needs that have to be implemented. At the same time PHP obviously sucks if you do have very nicely specced out requirements and you want to model things in UML.
Disclaimer: Of course my argument is very much based on my fairly unexperienced look at Java. I seen Java apps servers being installed and I have seen Java apps struggle with stability and I have seen the same with PHP. I have seen PHP apps that run suprisingly well when internally there were alot of things that make me go “yuck”. But I earn my money with PHP.
April 25th, 2005 at 3:51 pm
@Lukas
> No I was saying that Java prefers to scale with more cpu’s/memory in a single box where as php prefers to scale over multi machines.
I disagree. There isn’t anything in Java which makes it unsuitable to PHP for scaling across multiple machines.
In fact we ran large scale genomic annotations at DoubleTwist.com on 40 4-cpu Sun boxes using Java.
On the other hand there isn’t anything in php which encourages scaling. In fact the current (bad) practice of indiscriminately using resources like files etc. makes them harder to scale.
The key point of scalability is how linearly a system can scale. In my experience with very large scale Java deployments, they scale pretty much linearly.
> There are other aspects like security and robustness and this all ties in with my argument that it will always take you longer to get your Java app up and running.
Again I disagree
Developing for security and robustness takes time in any development environment. php is almost as secure by default as JSP in terms of security. Having filters in jsp makes them easier to add security layers.
> Due to the pro multi threaded approach of Java you need to make sure you dont screw up in coding since mistakes can take down your system fast and hard. It even creates security risks which need to be addressed.
It doesn’t confer any disadvantage to Java. Rather the fact that you can easily embed strong security in Java is its advantage.
> PHP works around this by simply sticking each request in its own process. Its obviously inefficient from a theoretical point of view. However in practice it means you have more time to focus on the actual needs.
Security is much more then sticking each request in a process. If that were so cgi scripts would have been the most secure systems. Process based approach and lack of pooling means php do not optimally use the resources of a machine. This is why you can handle much more load per machine (and faster) with jsp then php, under identical hardware.
> However the enterprise is focused on ROI and not academic design awards.
Well enterprise is focussed on reliability and maintainability. And “alot of uglyness und uncleanness” of php code makes them unsuitable for that.
> Java apps really want to be modelles properly. However to get a proper model you need proper requirements, a luxury that few people get or that will stick several months of time into your development time.
This is again a myth. In fact there are more extreme programming projects using java then any other language. In xp you do not need big upfront design etc. Yes, (good) Java developers normally do not prefer to hack. But that doesn’t mean they always go for big upfront designs etc.
> Disclaimer: Of course my argument is very much based on my fairly unexperienced look at Java.
You bet
I think you should spend some quality time with Java. I am sure you will love it when you see how much fun it is
April 26th, 2005 at 5:38 am
[...]
In response to my post PHP development practices from a Java Architects eye, Jeff M [...]
April 26th, 2005 at 7:11 am
Read again what I said. All I said is that due to the different design of PHP means there are a few less security and a few robustness risks less. I didnt not say that it automatically makes PHP secure and robust.
My point here is that PHP is often compared to Java by looking at what Java has to offer forgetting that the architecture of Java has some disadvantages that are not relevant to PHP.
Anyways I tend to prefer a direct approach to problem solving, where I clean up later. This does mean that my projects are done in team no larger of 10 (a number that can move alot in short time, but obviously shuts me out of alot of big time enterprise projects). However I am not worried about this since I prefer smaller teams with projects turning out real world useable products in 6-month max release cycles. While small teams are doable with Java just as well, I stand by my claim that Java does not want to allow the direct approach .. it very much wants things done right .. always (some people would say that is a good thing, I personally dont like this).
However I am currently looking for a job where I will be able to diversify a bit more. Maybe I will see the light that seems to make it so hard for you to disagree with very argument I put up
April 26th, 2005 at 7:12 am
s/disagree with very/agree with any
April 26th, 2005 at 2:38 pm
@Lukas
You should take a look at “extreme programming” development methodology. It is fun, done in team size less then 10 (exactly what you like). Try extremeprogramming.org for a gentle introduction. For a high level overview take a look at my PowerPoint slides on XP. Customer centric development is done rapidly in pairs, with tests written first before code. It under emphasizes documentation etc. I have a feeling you will like it.
BTW: Most XP projects are done in Java today. However you can apply the principles to any language. It is not language centric per se.
Because there is nothing in the language which deters you from doing so and XP projects are examples of how rapid customer centric development can be done successfully in Java.
I disagree with ” Java does not want to allow the direct approach”
Wish you good luck with your job search.
BTW: I get tons of job reqs everyday from diiferent people and groups. I am still looking for an efficient solution to post them on the web without requiring time investment from my part.
April 29th, 2005 at 10:03 am
Hi,
I’m one of those PHP mumbo jumbers. I do not know Java. I haven’t got zillion hit per secont site.
Also I do know anything about programming before PHP. And I say know starting up that java is harder than PHP. But PHP to easy to start.
Currently my Php knowladge is good enough (from my point of wiev of course) and this will support my food and broadband. So if your java enough for your needs what is your problem about PHP.
That tool is good enough and tool is a tool. So if you want to prove you are better programmer, OK. Create some multi ziilon hit per day site, earn some toustands and be happy.
Currently I feel some shortage about php non memorized session data. However my needs is very extraordinary cause I’m gonna try to build one size fits all kind aplication.
My point of view is. That Java good for enterprises. I mean LAGRE enterprises who can buy Sun Starfire or more. Not my friends 1000+ a day shopping site.
And for the middle size companies there was a problem. Because your kind show your profession and elitism with name of java and eclipse their vision and bought them unnececary software (Oracle ,DB2 and other propetary java mumbo jumbo) and hardware.
Look in this business there where people using professionalism and Microsoft in same sentence and that guys earns lot and his boss happy his job.
So know you are very disturbed because of my worst english. sorry this is not perfect world you know.
I just say keep coding try to be happy. Left that arguments to users. Time will solve everything.
Sancar -Delifisek- Saran
May 1st, 2005 at 9:30 am
I do know XP pretty well.
“I disagree with ” Java does not want to allow the direct approach”
Because there is nothing in the language which deters you from doing so and XP projects are examples of how rapid customer centric development can be done successfully in Java.”
I disagree. Being typeless, having the option of using different programming styles (procedural, OO or even functional) are aspects that either frame you to a certain way of working or let you do things as you want. Not necessarily a good thing, but obviously plays a role in all of this.
June 9th, 2005 at 1:27 pm
Nice approach we are appreciating and want to link this with our offshore outsourcing site : http://www.satisnet.com
September 25th, 2005 at 4:04 pm
[...] Simple Thoughts blog has a post on PHP development from a Java architects eyes. This post highlights the paradigm difference between programming in PHP and programming in Java: In PHP multi-threaded programming using ticks is rather primitive, to put it politely. I couldn’t find any way to share data between multiple invocations of the script, without resorting to file or SQL. I missed saving in servlet context and singletons (evil!). I however kept looking for a uber-global which will allow me to persist data across sessions. I couldn’t find simple way to cache data in PHP. File or DB based caching was unattractive to me. [...]
November 16th, 2006 at 6:09 pm
maschera indirizzo ip trama puntate distretto polizia 6 caso bullying posto lavoro legale software per impianto termici tecnica costruzione dei muro pietra
August 16th, 2007 at 9:33 am
As someone who started out coding Java and then adapted to PHP in my spare-time projects to maintain some legacy code, I don’t understand why PHP gets so much hate from the enterprise, although this article was more balanced than most. I personally have a lot of use for Java as a cross-platform language with good support and language constructs that almost force you in to decent practices. I don’t like JSP near as much as PHP for a server-side language though.
My question is whether or not the author has revisited PHP since PHP5 has gained wide acceptance and many pear modules have popped up to take advantage of the new OO approach to PHP. Maybe it’s my Academic Java background, but my PHP apps end up looking exactly like Java EE apps from an architecture point of view. I’ve found and written PHP classes to do most of the things that Java forces you to do for maintainability. I use a well-defined MVC architecture (smarty templates are my JSFs) with all of the logic occuring in classes. I abstract out all of my database accesses. I write re-usable classes (that I’ve actually been able to re-use in the real world). The difference for me is that when I need to, I can very easily throw together a new screen using as much or as little of the good development practices as I need for the business case. If I need to bed rules to meet a deadline and then refactor my working code while the product is already in the customers hands, I can do it. With Java EE, I’ve had no success with that.
I feel like PHP requires you to know the language and community better if you want to follow good practices (using a template engine for example should be 100% required for any project that’s anything but a prototype, but it’s not widespread in the PHP world even now). I also feel like everything you need to develop enterprise-level web applications is available in PHP. You just have to go find it and it’s not all packaged up nicely in a standard way, and that makes it very tough to sell to any marketing type. When I talk about PHP, I might be talking about a very different way of developing than when others talk about it. With Java, you’ve got some assurance of consistency.