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.

Dynamic web technology adoption

Why do people still use CGI, when more advanced options for dynamic content are available?  What factors help determine what technology to use (CGI, ASP, PHP, servlets, JSP, MVC frameworks, scripting languages, ASP.NET, JSF, etc) when an organization needs to select the technologies to use for a new web application?  I'm curious as to why there are so many "dead" options available that are still widely used.
Yack
Monday, January 10, 2005
 
 
I understand why you quoted dead, but surely if these technologies are dead then nobody would be using them at all.

I think the factors that determine what language an organisation uses for a new web application revolve around what is appropriate for the job in hand, staff/developer familiarity, and cost in both time and money. Occasionally, as a developer, opportunities arise allowing experiments with other languages which may lead to better applications; but I'd think that usually one would have to do this exploration phase in their own time.
Gavin Laking Send private email
Monday, January 10, 2005
 
 
Because thats what they know. Most people dont cope well with changing to a new technology, and it is often hard to make a business justification to do so.
Craig Send private email
Monday, January 10, 2005
 
 
Two reasons for seeing cgi lately:

Not everyone needs to scale.  It's true, some people don't worry about scaling and just go with what works.  A cgi script puts what is already working locally onto the web quickly which is often more important than pristine design.

Secondly, if you are saying this because you see file extensions of .cgi, a lot of these are just being out there out of habit.  Lots of people programming using modperl continue to use .cgi file extensions instead of .pl.

And one last bonus reason is that there is an abundance of free cgi stuff out there that can be quickly deployed with minimum knowledge and minimum access to the server.
Lance Send private email
Monday, January 10, 2005
 
 
CGI is simple. Plop it in a directory. Read the form attributes. Spit out html. I don't need to worry about anything else.
son of parnas
Monday, January 10, 2005
 
 
So at what point do people starting thinking about moving into Java, .NET, and etc?  What factors drive that decision (which is not made lightly I'm sure)?
Yack
Tuesday, January 11, 2005
 
 
Personally, I would only move into an unknown (to me) language if the benefits or suitability of the language to the task itself was worth the time I would take learning it.  I happen to see learning languages as 'good fun' in some respects so I'm naturally wanting to pick something up for the experience, but other developers are not quite as 'enthusiastic' as me.

So, to me, chosing the correct language for a job comes when I have identified what I want to achieve. This evaluation can be as easy as using a hammer to hit a nail, or as complex as selecting the correct chisel to manipulate the wood on the lathe. Oh! This forum is about programming not woodwork...
Gavin Laking Send private email
Tuesday, January 11, 2005
 
 
First, I can't say too much about .NET.  I imagine some of it going along the lines of "we are a Microsoft shop.  .Net is what we're going to use."

It would seem that sales and marketing drive the adoption of J2EE.  My ears bleed from buzzwords when this wave of change passes through the company.  All of a sudden we're in need of things we never knew we needed.

Scalability, nevermind the fact that our current product is load tested to 10x our current max capacity.  We must be prepared for orders of magnitude more customers.  A semi-valid point, but ask me if I'd rather spend $1M now for sure or $1.5M possibly in the future or toss $1M on the floor now and roll around in it.

Portability.  Yea, because we're going to toss those sun servers out on the lawn.  Seriously, when was the last time some place really decided to ditch their all their servers for something else.

Robust.  XXX technology sucks (even if it's working for you already), this is better, just check out these magazines.

Code Reuse, OO, EJB's.  I see some of this advertised for both J2EE and .NET.  The idea that you make little objects and all of a sudden they are going to play well with each other.

Of course, I've been making a good living implementing J2EE systems that people want.  I'm just a little bitter that in the majority of the cases it seems that the decisions are being made for what's in the best interest of the consultants and developers.  Forgive me if I'm bitter, I've recently quit a consulting job where the company was using the fear and ignorance of the customer in order to fleece them (using fear may be ok as a method of sale, but using the client's ignorance feels more like breach of duty since I'm being paid for expertise).

Other reasons: 

Delusions of grandeur.  $50k for WebLogic.  It must be good, and we're going to be so good we need it.

Java (or .NET) programmers will be easier to find.  Based on how happy people have been when they finally found me for a Perl contract, Perl programmers must be hard to find.  This may be the most legitimate reason I've seen for a group that needs to staff a lot of programmers.

Now, it may seem that I have some agenda against Java in all this.  Well that's true but I think the phenomenon goes beyond just Java vs other technology.  It goes on between WebLogic/WebSphere and anything lesser.  The same reasons people choose J2EE over another language are the same reasons they choose to spend outrageous amounts of money on WebLogic right off the bat without considering JBoss or JRun (first one free, second one inexpensive with very responsive support).

I strongly suggest that instead of looking at what WebLogic will give you, first decide what you need and see what technologies will fill that need.  I don't think this is how it is done in most companies.  It seems to be a checkbox war, with irrelevant checkboxes winning.

Good luck, I've switched to LISP.
Lance Send private email
Tuesday, January 11, 2005
 
 
Will you be using LISP for web applications?
Yack
Tuesday, January 11, 2005
 
 
> Why do people still use CGI, when more advanced options for dynamic content are available? [...] I'm curious as to why there are so many "dead" options available that are still widely used.

I'll try to answer: FastCGI addresses speed, and EVERY web server on the planet supports CGI scripts, just about always unmodified (as long as the language implementing the script is portable).

Looking at an advanced dynamic web technology like ASPX, you'll see people using it in a minimalistic way that suggest perhaps CGI would suffice. Some developers use ASP.NET's ASHX and IIS hooks to do web plumbing rather than coding pretty web forms all day. These things could have been done with CGI (and ap/isapi), to a degree, it's just easier with ASPX.
Li-fan Chen Send private email
Wednesday, January 12, 2005
 
 
Good points, Lance and Li-fan.  It seems that the point is that marketing is driving the use some of the other technologies, rather then what is really needed (app requirements).  I definitely agree for small apps that using FastCGI with, maybe Perl scripting, would be manageable, but what about for very large applications?  Does anybody have any recent experience building large CGI (or mod-perl, or PHP, and so on...) web applications?  If so can anybody speak comparatively on how much easier/harder the same work would have been on say J2EE w/ Struts, or ASP.NET, to name a few examples?  I'm pretty sure I read here at one time that amazon.com is most built on CGI and C....
Yack
Wednesday, January 12, 2005
 
 
"Does anybody have any recent experience building large CGI (or mod-perl, or PHP, and so on...) web applications?"

What's considered large?  I build some pretty big applications in PHP but then I also have a large framework which is comparable to the .NET framework for ASP.NET applications or JSP/etc/etc for Java. 

The only asnwer to whether it's harder or easier than other technologies is "it depends".  There are far too many factors to consider.
Almost Anonymous Send private email
Wednesday, January 12, 2005
 
 
After reading the post above on Java, I'm extremely happy with our C# solution.

Couldn't ask for a better set of tools, and our customers seem to enjoy the functionality we bring.

I can write PHP, Java, C#, C++ - I like C# simply because I spend more time working on solutions.  All of these work well depending on your environment.

Wednesday, January 12, 2005
 
 
I think for the average private citizen PHP or ASPX is fine. Enterprise developers can choose between ASPX & JSP. If the enterprise developer's boss is somewhat enlightened, PHP will be an option. For comp sci scientists and high scalability architects they should probably feel free to use or hate all of the above.
Li-fan Chen Send private email
Thursday, January 13, 2005
 
 
PHP has no middle tier object layer like Enterprise Java Beans or COM+ correct?

Perhaps when this occurs it could get treated more like an enterprise solution.

(excuse me but I am new to looking at PHP and assume there is no 'dll' or EJB,etc..)
C#Bigot Send private email
Thursday, January 13, 2005
 
 
"PHP has no middle tier object layer like Enterprise Java Beans or COM+ correct?"

Correct, this is the major drawback to PHP at this time.  Although PHP does have interop support for web services, COM, and Java classes, it still does not make much sense to write a business layer in PHP.
Sassy Send private email
Thursday, January 13, 2005
 
 
"it still does not make much sense to write a business layer in PHP."

What else is PHP for?  The presentation layer is HTML/CSS/Javascript!  PHP *is* the middle tier...

Ok that's an exaggeration but I don't see why people try and stuff the classic client-server 3-tier model onto the web.  One of the greatest advantages of the web is statelessness (it's also the biggest pain in the ass).  The average 3-tier model tries to make the stateless web stateful and turning it into a standard client-server problem.  This removes the pain in the ass but at the cost of scalability.

Rather than papering over the statelessness of the web, PHP embraces it.  PHP is itself as stateless as HTTP.  Managing this statelessness requires some planning and might not be as effecient as other methods but it's more scalable (remembering that being scalable is not the same as being effecient).  You can literally just throw more boxes at PHP sites and it will scale to them without much overhead.
Almost Anonymous Send private email
Thursday, January 13, 2005
 
 
code reuse

Thursday, January 13, 2005
 
 
What if you are writing a class that computes amortized mortgage payment schedules?

Why would you not want it in a class that can be used in a desktop app, web app, as a distributed object?
Sassy Send private email
Thursday, January 13, 2005
 
 
Why would I want to?  Is that a requirement? 

I develop web applications and web sites and I have a lot of code reuse (10 sites running on the same code base).

If I needed web/desktop source code compatability I'd obviously use a different technology.  However, that's a pretty rare requirement for most people.  I personally don't need that, so I can use the best tool for the job of building web applications.  ;)
Almost Anonymous Send private email
Thursday, January 13, 2005
 
 
"Why would I want to?  Is that a requirement?"

Pretend it is :-)

Basically that's the stuff I consider my "real job".  The rest of it is pretty much UI and plumbing, no?
Sassy Send private email
Thursday, January 13, 2005
 
 
"Pretend it is :-)"

I'd use C++ for the component and import it where I need to.  ;)

"Basically that's the stuff I consider my "real job".  The rest of it is pretty much UI and plumbing, no?"

Well I consider building a usable and responsive web UI part of my "real job". 

And I actually like doing the plumbing; creating entity objects, infastructure code, etc.  "A class that computes amortized mortgage payment schedules" sounds rather uninteresting to me.

But even if I wrote something like that in PHP, the hard part is not spitting out the code.  To translating that solution into Java, C, C++, or whatever isn't all that difficult.
Almost Anonymous Send private email
Thursday, January 13, 2005
 
 
Points taken - and for the most part I agree - but I work in a 'corporate' IT shop where I don't necessary control the technologies involved.  Fact is, once we write a biz object, people find out about it, and they start saying stuff like: "the salespeople loved that web app, make a desktop version mmmkay?".
Sassy Send private email
Thursday, January 13, 2005
 
 
Well I was kidding about using C++ -- If I needed desktop/web capability I'd go with .NET.

But I work for dotcoms -- so the only desktop work I have to do is hooking into web services.
Almost Anonymous Send private email
Thursday, January 13, 2005
 
 
Having worked (a bit) with both PHP and ASP.NET, I found a huge difference when it comes to maintaining the codebase or working in teams. Both let you be quick for small 1 person shoot from the hip type things. But when you move beyond this, PHP seems to trip over itself because of the inadequacy of the language constructs, the relative clunckyness of its development environment and the very poor consistency of its libraries.
Just me (Sir to you) Send private email
Friday, January 14, 2005
 
 
I do a lot of initial work to make PHP more maintainable.  I write my own libraries (and port/refactor existing libraries), I don't use include() statements directly, etc. 

I've been working with PHP for 5 years and for alot of that I've been working on the same application.  I know the ins and outs.  How I write PHP is very different from the code you see out in the wild.

The code you see in the wild for PHP is crap.  But PHP is pretty free-form.  Where ASP.NET and various Java frameworks force you into good design patterns.  PHP is very much like C++ in this way.  Rarely anybody codes in C++ without using some kind of external library and there are many to choose from (STL, MFC, Boost, etc).  If you code in bare C++ it's not going to be very maintainable.  If you code in bare PHP, it's also not going to be very maintainable.

The project I'm currently working on will be very ASP.NET like.  I'm also implementing a XAML-like module for static object-tree creation.  In ASP.NET you, of course, get this all for free.  But then ASP.NET only runs on Windows and I'm not about to go there again.  Java, while cross platform, is an ugly alphabet soup of technologies!
Almost Anonymous Send private email
Friday, January 14, 2005
 
 
How important is portability for web applications?  Is portability just another way of expressing scalability, as in "If my PHP app is too slow on a Windows server, I can always run it on a Sun server (or whatever) and it will scale further"?
Yack
Friday, January 14, 2005
 
 
Yack, you are baiting us now. A giant Solaris cluster will probably require some special programming to take advantage of. Think NUMA. So not exactly that direction. However if you took your website to LAMP-platforms that backs to a master RDBMS like Oracle sitting on some serious SAN solution, it will take the hits like a real man.
Li-fan Chen Send private email
Friday, January 14, 2005
 
 
"How important is portability for web applications?"

I wouldn't say it's that important.  I have had clients run our software on Solaris boxes even though our typical deployment is Linux or FreeBSD.  We've also run it on Mac OS X because our demonstration laptop was an iBook.  I never really think about it much but I do really like being able to develop, test, debug on Windows and then deploy to Linux.
Almost Anonymous Send private email
Saturday, January 15, 2005
 
 
"I never really think about it much but I do really like being able to develop, test, debug on Windows and then deploy to Linux."

I hadn't thought about it that way but I can see that would be a big plus for development.
Yack
Saturday, January 15, 2005
 
 
asp.net and java are good enterprise solutions, I'm not convinced that PHP is.  For the guy running Apache with his isp for $5 a month, sure - PHP sounds ok.

Perhaps because in my corporate and gov't experience it was either Windows Server or Unix.

The two options have always been between java, C ++, .net

I tend to find Java to be much more expensive to run

Are we talking small shop or data warehouse - or just your Oracle/MS SQL setup?
NotConvinced
Sunday, January 16, 2005
 
 
ASP.NET is so much better than all the others. Why would anybody need anything else?
anonymous
Wednesday, January 19, 2005
 
 

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

Other recent topics Other recent topics
 
Powered by FogBugz