When a CGI Script is the Most Elegant Solution
An anonymous reader writes "Writing local Web applications can be quick, easy, and efficient for solving specific Intranet problems. Learn why a Web browser is sometimes a better interface than a GUI application and why experienced Web developers find themselves struggling to learn a GUI toolkit, and descover that a simple CGI script would serve their needs perfectly well, if not better."
When everything else is not.
Quick web scripts are way easier than developing an application if only for the fact that you don't need to figure out how to use networking in whatever language you'd be working in. Plus, you don't need to "distribute" the application once it's done, and you don't need to provide updates to every user on your network who's using it: update your script, update the application.
Plus, developers think in program logic, not in program design. A web script let's the developer write their output in HTML, then go back in later and add some CSS for presentation once they've got the program actually working. I say, it's a good way to do things.
Not to mention that a lot of web scripting languages are easier to use than full-blown application languages, and there are many packages that let you attach native GUIs to web scripts. There isn't a compelling argument not to go that route if your application a) uses networking, and b) is distributed over an intranet.
I don't understand either the problem space, or the solution. I've read the article twice -- though it is apparent by most of the comments that people have not read the article.
It sounds like the author is recommending a single instance web server application running on a local machine that uses a file store instead of a database and CGI as the programming interface. (In other words, this is NOT an intranet application for multiple users!) Doesn't sound that simple at all. In order to do this, you must:
- Know at least one programming language for CGI.
- Know HTML including forms, postback and session.
- Understand the limitations of web browser UI elements. (There are many.)
- Install and maintain a webserver on your local machine.
- Build a robust file store interface. (Even loading / saving / parsing XML files with backups takes time...)
- Install and maintain permissions for the file store.
- And more...
Sounds like all of the disadvantages of the web with none of the advantages.
Why would you not use PERL and CSV IN/OUT files for simple (or complex) command line processing -- and if you needed a really simple UI, then Excel with Visual Basic. (This isn't easy, but it's a lot less technology to learn and maintain.) Anything more complex: Java, the free version of Microsoft VS or xcode. Anything worth doing is worth doing well.
You're just jealous because our stuff actually is used by a lot of people, whereas your toaster-controller, written in C, with a user-interface noone understands only got five downloads from Tucows. And one of them was your cat jumping up on your keyboard.
...and then you would be right to say,
if (you == inHouseProgrammer)
"Well you cocksuckers should have told me all this shit up front so I didn't waste my weekend writing a useless web app. If you want it fixed, do it yourself"
else if (you == consultant && you == chargingTimeAndMaterials)
"I'll be happy to add those new requirements for you, but I'm afraid that's going to impact the schedule."
else if (you == consultant && you == chargingFixedFee)
"Thanks for the feedback, bit I'm afraid we will have to address those new requirements in a follow-on contract."