PDA

View Full Version : web server applications


PingOfPong
9th August 2008, 01:56 PM
Lately I've been dabbling in web site design. A friend wanted something done for his site so I did some research and found that there were several options: PHP, ASP, JSP, and PERL. PHP was the natural choice for me because I'm a C pro and PHP is designed with C in mind. It only took a few days for me to become proficient at using PHP and maybe a few evenings to perform the task my friend needed. I liked how PHP got the job done but I was dissapointed that there weren't any really good IDE's for it.

JSP, on the other hand, can be used with Netbeans or Eclipse to design/debug the presentation, business logic, and database layers all at once. I really like that. The availability of IDE's is always a major selling point when I'm choosing a language/project. The problem is that I keep reading about how JSP is slower (yet more scalable) than PHP. Most of the information on the internet seems to come from fan boys of one language or another. The information they provide may not be trustworthy.

I'm thinking about putting web server apps on my resume so I put the question to the board. Which ones should I learn? Also, what performance issues, if any, should I be aware of? One last thing, which database server is best: MySQL, Postgre, other?

Nick Bogaerts
10th August 2008, 05:30 AM
A friend wanted something done for his site so I did some research and found that there were several options: PHP, ASP, JSP, and PERL.

Off the top of my head, you missed Python and Ruby, which should also be seriously considered for web development

I liked how PHP got the job done but I was dissapointed that there weren't any really good IDE's for it.

There is the PDT project for Eclipse. Except for the fact that they're morons and they missed the Ganymede (3.4) release by several month leaving you stuck with Eclipse Europa for the time being, it's quite decent.

The information they provide may not be trustworthy.

The information I provide may not be trustworthy.

I'm thinking about putting web server apps on my resume so I put the question to the board. Which ones should I learn?

Are you talking web servers or web application frameworks?

One last thing, which database server is best: MySQL, Postgre, other?

It used to be that people went to MySQL for efficiency, and Postgres for reliability, but I'm not sure it's true anymore, they've been converging a lot lately. MySQL is by far the much more popular server, especially for web development. The Postgres community is smaller, but sometimes seen as being of higher quality than MySQL's.

PingOfPong
10th August 2008, 11:16 AM
Are you talking web servers or web application frameworks?



Frameworks.


Off the top of my head, you missed Python and Ruby,


The plot thickens. Ruby looks interesting.

The information I provide may not be trustworthy.



Bummer. I was hoping to get the "straight dope". There are so many choices.

It used to be that people went to MySQL for efficiency, and Postgres for reliability, but I'm not sure it's true anymore, they've been converging a lot lately. MySQL is by far the much more popular server, especially for web development. The Postgres community is smaller, but sometimes seen as being of higher quality than MySQL's.


Thanks.

Cleon
10th August 2008, 01:53 PM
I'm a professional web app developer. Been doing it for over a decade now.

My $.02: To get the hang of development quickly, I'd suggest what they call LAMP - Linux, Apache, MySQL, and PHP. It's a very common platform, all free software, and frequently when you rent shared hosting solutions (ie Godaddy.com), LAMP is what you get.

I would very strongly suggest learning the principles behind app development beyond just the language itself; particularly MVC (Model-View-Controller) development, web app security (that's a biggie), session management, advanced database programming (beyond simple create/read/update/delete SQL), etc.

If you want to get into Java development, that's almost a world into itself. (I do mostly Java myself these days.) I'd recommend becoming familiar with Struts (probably the most popular MVC framework), Maven and Ant (java build tools), and Hibernate (DB persistence and object mapping), in addition to the language itself, platform, servlet development, JDBC, etc. Just learning JSP by itself might let you develop some simple applications, but you'll miss out on many of the Java platform's most powerful and useful features.

A word on the IDE aspect; don't let that stop you. Eclipse was developed with Java in mind, but the software is so flexible and customizable that it's not limited to Java by any means. There are PHP, Ruby, C/C++, Perl, and various other extensions available for Eclipse that make it a great IDE for really any platform. (I've heard that you can even do .NET programming with it, though I've never done it myself.)

There are also other IDEs available; I'm told Zend has a pretty sweet PHP-centric IDE, though again I've never used it myself (I'm an Eclipse junkie).

I'm not going to lie to you--there is a lot to learn if you want to get into serious web app development. A lot. And believe it or not, the platform and language you're working with is the least of it.

HTH!

Nick Bogaerts
10th August 2008, 04:08 PM
My $.02: To get the hang of development quickly, I'd suggest what they call LAMP - Linux, Apache, MySQL, and PHP. It's a very common platform, all free software, and frequently when you rent shared hosting solutions (ie Godaddy.com), LAMP is what you get.

Not a bad call. I'd suggest, if you haven't already done so, to install your favourite flavour of Linux on your development machine (I use Ubuntu on desktops and Debian on servers), and get familiar with Apache (because, unless you're in rather specialised circumstances or locked down by a convicted monopolist, it's very likely you'll be using it).

PHP is a fairly non-controversial choice, and it has one of the most solid communities out there, though I must admit my fondness for it has been declining recently, despite me being employed as a PHP developer. If I were to suggest something fun and interesting for a newbie to learn, I would name Ruby on Rails, but that's possibly just the fanboi in me speaking.

I would very strongly suggest learning the principles behind app development beyond just the language itself; particularly MVC (Model-View-Controller) development, web app security (that's a biggie), session management, advanced database programming (beyond simple create/read/update/delete SQL), etc.

Ditto. Also, you'll want to know something about HTML and CSS, usability, accessibility, standard compliance, as well as unobtrusive Javascript, even if you don't end up doing those yourself.

Cleon
10th August 2008, 04:20 PM
Not a bad call. I'd suggest, if you haven't already done so, to install your favourite flavour of Linux on your development machine (I use Ubuntu on desktops and Debian on servers), and get familiar with Apache (because, unless you're in rather specialised circumstances or locked down by a convicted monopolist, it's very likely you'll be using it).

Ditto. :)

Though if you don't want to take the Linux plunge, Apache works just fine and dandy on Windows and MacOS. (So does Tomcat, if you're going the Java route.)


PHP is a fairly non-controversial choice, and it has one of the most solid communities out there, though I must admit my fondness for it has been declining recently, despite me being employed as a PHP developer. If I were to suggest something fun and interesting for a newbie to learn, I would name Ruby on Rails, but that's possibly just the fanboi in me speaking.


Y'know...I tried it, I really did. And I came to the conclusion that I don't like the Ruby language, and I really don't like the configuration-instead-of-code style of RoR.

Maybe it's just me. *shrug*


Ditto. Also, you'll want to know something about HTML and CSS, usability, accessibility, standard compliance, as well as unobtrusive Javascript, even if you don't end up doing those yourself.

Funny story...Stuff like HTML, CSS, and Javascript is so inherent in web app development that I frequently find myself forgetting to mention it.

I wound up job hunting recently (my choice), and I even forgot to include HTML and CSS on my resume. I was thinking to myself, "hell, I'm a web application developer, obviously any employer is going to figure out that I already know that stuff, just like they'd assume I knew how to work a keyboard."

Needless to say, I found myself in a number of interviews being asked "do you know HTML and CSS?" "Uh, yeah." :D Still got a decent gig, though.

PingOfPong
10th August 2008, 04:52 PM
I tried Eclipse and the Zend build for PHP development. I couldn't get the debuger to work. NetBeans has a build called Early Access for PHP that did the job.

I would very strongly suggest learning the principles behind app development beyond just the language itself; particularly MVC (Model-View-Controller) development, web app security (that's a biggie), session management, advanced database programming (beyond simple create/read/update/delete SQL), etc.



MVC, I'll get on it!
security, check!
sessions, righto!
advanced DB, umm, I've only seen and used simple DB functions. I don't know what advanced DB programming is about.

HTML and CSS, done!


About choosing servers, I use Xampp (http://http://www.apachefriends.org/en/xampp.html) as my development server right on my own PC. I've been playing with GlassFish for JSP too. Sorry but I'm a PC clown.


What about scalability, speed, and robustness? Let's say two people want two different things. One would like an online inventory system and company newsletters for the use of hundreds maybe thousands of employees and customers. The other wants a small online retail store with a blog and comments section. Which tools should I pick for either job? It could all be done in PHP of course. However, I don't want to be a one trick pony. Is there any heuristic for choosing languages/frameworks to better suit a project?

Worm
10th August 2008, 06:03 PM
Damn, I was about to make a contribution by recommending Xampp. Too slow... :)

Cleon
10th August 2008, 08:52 PM
MVC, I'll get on it!
security, check!
sessions, righto!
advanced DB, umm, I've only seen and used simple DB functions. I don't know what advanced DB programming is about.

I'm not talking in terms of advanced database administration (though some experience in that certainly helps), so much as advanced stored procedure, trigger, and view coding. The reason why this is good is in terms of scalability, especially where PHP is involved.


About choosing servers, I use Xampp (http://http://www.apachefriends.org/en/xampp.html) as my development server right on my own PC. I've been playing with GlassFish for JSP too. Sorry but I'm a PC clown.

Never heard of xampp before, but that's a pretty good idea of bundling Apache, PHP, and MySQL together.


What about scalability, speed, and robustness? Let's say two people want two different things. One would like an online inventory system and company newsletters for the use of hundreds maybe thousands of employees and customers. The other wants a small online retail store with a blog and comments section. Which tools should I pick for either job? It could all be done in PHP of course. However, I don't want to be a one trick pony. Is there any heuristic for choosing languages/frameworks to better suit a project?

Well, it's complicated, and as you note there's no "right" answer all the time.

If you're developing a system where you're expecting a lot of simultaneous database transactions, I would prefer Java. PHP is stateless; once the server runs the PHP script, it's done. Which means that every time someone hits a PHP page, one or more DB sessions is opened, the transactions are run, and the session is closed--so for a large application, there are sessions constantly being opened and closed, which can overwhelm your DB.

With a Java framework, there is an application server (Tomcat, JBoss, Weblogic, etc) running constantly, so you can take advantage of DB connection pooling. This allows a background process to manage a limited set of connections, and when you need to make a transaction, you put your request in the queue, and the DB Pool will send it through to the DB and deliver the response. You can do something similar with a PHP app, if you're really set on it, but that would require writing a separate server-side program to manage the pool.

That's just one consideration to look at. There are many, many others, depending on your exact requirements and available resources. There are very few things you can do on one platform that you simply "can't" do on another (or at least fake it). It's just that certain platforms make certain tasks easier.

Now, your second example - the small online retail store with a blog and comments section - you have to think about whether or not you want to reinvent the wheel. :) There are many, many content management systems developed for all sorts of platforms that fulfill those requirements and are freely available (open source, usually). For example, the JREF uses Joomla (http://www.joomla.org), which allows them to do exactly what you're talking about; run a store and have a blog with comments. (Not to mention an events calendar and oodles of other functions.)

So sometimes it's not even necessary to develop an application all on your own, but simply customize and tweak an existing piece of software to accomplish what you need.

PingOfPong
10th August 2008, 09:34 PM
Good stuff, thanks all for your comments. Not that this thread has to be over. If anyone else wants to add something then I'd love to hear it.

you have to think about whether or not you want to reinvent the wheel.

Sometimes I do like to reinvent the wheel. Understanding someone else's code in an unfamiliar area is sometimes more difficult for me than writing my own from scratch. Plus I get to intimately know all the nuts and bolts of the project.

grmcdorman
11th August 2008, 11:26 AM
To add to the recommendations about LAMP, you can download a free pre-setup virtual machine (what they call a "virtual appliance") and the free VMware Player (or VMware Server - or, now, VMware ESXi) from [url=http://www.vmware.com]VMware[/com]. It has the advantage that, aside from being already all set up for, it is pretty much isolated (and you don't need to dedicate a machine to it).

aggle-rithm
11th August 2008, 08:58 PM
Lately I've been dabbling in web site design. A friend wanted something done for his site so I did some research and found that there were several options: PHP, ASP, JSP, and PERL. PHP was the natural choice for me because I'm a C pro and PHP is designed with C in mind.


What's wrong with CGI? That way, you can do it in C.

Anyway, that's the way I started doing DHTML development.


One last thing, which database server is best: MySQL, Postgre, other?

You should get a bunch of Excel files, preferably different versions, and link them together with a hellish, unstructured mixture of absolute and relative file paths so that any change you make to one file will break all the others.

....

Kidding. But that's the way they like to do it where I work. Don't ask me why.

PingOfPong
11th August 2008, 09:30 PM
What's wrong with CGI? That way, you can do it in C.


I have no idea how to set up a suitable environment to design/debug CGI. Setting things up for PHP was a snap.

Most hosting providers advertise support for one of the following: PHP, JSP, and ASP. Is CGI widely supported? Incidentily, I checked the admin panel at my friend's host and found that it does in fact support CGI.

You should get a bunch of Excel files, preferably different versions, and link them together with a hellish, unstructured mixture of absolute and relative file paths so that any change you make to one file will break all the others.


Ouch! I hope you have one of those squeezeable stress reliever toys.

the JREF uses Joomla

I set up a Joomla/VirtueCart bundle on my development server. So far I like it. I like it alot.

Blue Mountain
11th August 2008, 09:47 PM
Also check out the Daily WTF (http://thedailywtf.com). Very often you can learn what to do by seeing what not to do!