This is a humorous page that describes why Delphi developers are having trouble deciding which web frameworks to use.. or more precisely why they are all running off having an affair with PHP.
First, let me say that the best thing going for Powtils right now is the fact that we have a community of friendly developers that discuss and extend powtils almost daily on the forums/mailing lists and wiki's. We have a great following. The other delphi frameworks never seem to have caught on.. and every 1 or 2 years a new incompatible framework pops up that everyone's excited about (but that no one uses). Powtils has been around since 2003-2004 when originally it was called PSP.
Since v1.5, Powtils focused on being a extensible web API that was backwards compatible framework from version to version. Migrating from 1.5 to 1.6 was a breeze. Versions 1.3 and 1.4 were similar earlier versions that went through syntax changes.
We haven't had complaints that using the Powtils API was hard. Most users are amazed at how easy it is to get a simple web program running.
Delphi Don't Work On Web
There seem to be many, and I mean many Delphi developers who will readily use and advocate PHP (or Ruby, or ASP)... but as soon as you mention something like Websnap to them they sort of ignore it, or they look at the demo site quickly (if it isn't a 404 error) and then go back to their regular Win32 development. Similar happens with intraweb, webbroker, g-framework, TCgiComponent's on torry, pascalscripts, and many others.. if those haven't been abandoned by the developers already.
So why not powtils? Well....
Powtils Is too Expensive
No really.. the code is open. There is no charge. Why? Because indirectly Z505 Software makes money from building websites that are powered by powtils. Z505 does consulting too. We have a business plan, we just don't sell expensive Powtils API's to you. API's can't be expensive. API's have to be accessible and hackable.
Is free too expensive? Okay, fine.. we also offer $100 if you put a Powtils logo on your site.
Powtils Ain't Pure
Some look at Powtils and wonder why it uses some procedures and functions instead of it all being pure methods part of pure classes using pure OOP.
Powtils is an API. We use whatever works. And you can use whatever external code you want with Powtils. Remember that Powtils is something you can tap into and use just like PHP. We prefer our code to be neater than PHP wherever possible. Of course that could depend on taste.
PHP is Hot! Why use Delphi/FPC?
Some assume that PHP is better/superior for web work since PHP offers $variables (even though Powtils offers those too). What they don't understand is the amount of existing offline delphi/fpc code that can be used in web programs with Powtils.
What's funny is that many Delphi advocates who use PHP claim that PHP is elegant and perfect, even though PHP is the exact opposite of Delphi/FPC. It's as if someone has formed a cult and started offering PHP brainwashing sessions for free.. and all the Delphi developers have been attending these sessions.
Why I find it funny? I find it ironic. PHP and Delphi have absolutely nothing in common! Nothing. Except a couple reserved keywords: function, for, array. Other than that, and the fact they are both programming languages.. nothing.
Powtils is Not Websnap
Then you've got the purists who come in and look at Powtils and think to themselves.. oh, that's not pure class Architectural Magical Adaption like websnap/webbroker so I'm not using Powtils because it won't win the OOP perfection award, dude.
Yes, some won't even touch powtils because that powtils stuff contains some, well procedural code in it. Oh that contains some procedural code? Oh, well then, we're not using it. Off to php we go! (and the irony..)
Powtils isn't pure and perfect websnap architecture nor is it perfect webbroker or intraweb or g-framework. Heck, I've lost count of the delphi web frameworks out there.. there are so many of them that you kind of forget which is which. Honestly, I don't even know what webbroker is so I shouldn't even mention it. I know all the others though.
Wrapping an API
Let me clear this up. PHP is garbage unless you wrap it. That's what makes PHP powerful. Even if you can wrap PHP, it still isn't that elegant in my opinion.. but it can work for those who make a compromise. And lots of people do.
It is nice to make calls directly to the API functions instead of having to wrap them always, though. Making a call to echo() directly should be easy. In Powtils that is the out() or webwrite() function. Imagine having to free and create a class just to send a message to standard out. Ooops.. that's basically what the other frameworks are all about and is one of the reasons that people aren't using them. It's a small reason, but it's one of them. The ruby puts() function for example is like a writeln() call that everyone loves. Without the puts() function ruby wouldn't be any good.
So one of the reasons people aren't using all the delphi web frameworks out there is because there isn't an echo() function or print() function available. Sad, and kind of funny. Powtils, of course, offers it.
More...
And you've also got those others that think you need to install some dedicated custom server to run Powtils programs which is completely false. All the programs run on typical CPanel $5/month hosting accounts.. in fact even some free servers support the programs.
PHP3 Rulz!! 31337!
Some Delphi developers even settle on using PHP3 and think any sort of PHP is great great stuff. But as soon as they open their Delphi IDE everything has to be pure OOP classes designed to absolute perfection, using strong static typing. And they are on the oodesign newsgroups asking questions about how to perfect their programs. Everything has to be like that websnap/webbroker code, and like that TWebAdapterToHtmlConverterClass funny stuff. But when they use PHP3 they seem to abandon all their ethics and use weak dynamic typing without any sort of structure. Odd.
We want a PHP3 Pascal Websnap-like Framework!
People in the know, see the irony. I want my cake, and I want the icing, but I want to eat it, and I want to preserve it, and I want to swallow it, and I want to save it too. All at once. And I want to poop without having to use toilet paper, but I don't want crusties. And I don't want to flush the toilet, but I don't want the smell either. I don't want to turn on the fan. I want to eat my cake and have it too.
"I want the world.. and I want it... (now?)... NOW!!! --Jim Morrison
Yes, we want a websnap/webbroker framework that is just like PHP3 and Perl! A proper perfect framework architected by the Borland magicians.. but at the same time they complain that websnap/webbroker is too complex and too hard to use and that PHP sucks. Powtils saves the day.
We Want the Perfect TArchitectural Web
Don't people make compromises any more and don't people have vision? You cannot have everything both ways in your so called TArchitecture. You cannot have a perfect API where all OOP laws are obeyed.
Think of an API as public pieces of code that people need to tap into and use whatever way they wish. And allow the API users to use the API flexibly, the way they want. Don't force anything on them. Try to offer a compromise that fits the best of both worlds.. which means wrappers on top of other wrappers, at times.
Laugh
The devil must have gotten to them.
"We are Delphi developers, and we will readily use and advocate PHP which disobeys every pascal law in the universe!"
Eeek. Scary. What I think is happening with Delphi developers is that they are so scared about Delphi's web future that they simply pretend everything is okay.. and they act extremely optimistic about PHP.. when in the back of their minds they really know that PHP is horrible terrible stuff.
Gotta Be Visual, Just like PHP3
Powtils doesn't offer visual design on day one? We're not using it!
Neither did PHP3 when it came out. TurboPHP (something created after the PHP api, not before) is broken. The PHP api is what is important. Then comes the visual tools. If there is a TurboPHP that's cool.. but first you have to have the API. PHP had the API. That came first. Powtils has the API. Some visual devel discussion and plans for Powtils components are surfacing all over the place in the forums. Developers are keen to implement it.. but we've got the API already. That's what's really important.
That other one..
And intraweb is, some of them say, too complicated. Others say it is for localhost intranet stuff, we think. Not sure if it's good for the net, or what. The latest excuse is that it's for intranet, not internet.
Me, I develop some intranet apps with powtils but I find the web browser much more useful on the internet.
Uhm.. Choices?
Well what is left then? Maybe Powtils. Maybe PHP. Maybe Ruby.
What is your choice? What are you left with?
Yeah, isn't it funny that at the end of the day, after all the moaning and complaining to yourself about the perfect TWebArchitecutre.. you realize that really you have to find some API like PHP or Powtils or Ruby. Or some other API that you can tap into. Some flexible API. So pick your compromise. Don't stay around waiting for the holy grail, the perfect solution. There isn't a perfect solution. There are just reusable API's out there to pick from.. all the other frameworks are just basically fads.
Create/Free and Other Line Noise
So why NOT use websnap/webbroker and friends? What is wrong with them? Why do people complain about them being hard to use?
Websnap style frameworks are complex and hard to use because they have lots of create/free/try code, public, private, interface, initialization, bloat in simple units, TThisThatAdapter created and declared everywhere, and another couple of TThisThatAdapters over there, and TAdapterHtmlObject's and TWebRequestHandlerAdapter's all over the place.
Powtils avoids this and offers a simple interface. We avoid line noise wherever possible. If you want to wrap the Powtils code into more complex classes then you can, if you want. We don't force that on you like the other frameworks seem to do.
Rearchitecting Frameworks
Powtils doesn't have the TWebAdpaterRequestHandler thing that needs to be rearchitected every new release. Unfortunately a lot of the Delphi web packages are Rearchitected and repackaged as new products with completely backwards incompatible syntax each year.
Rewritten frameworks.. my opinion on this is.. why do you have to rewrite a framework every year if it is any good in the first place?
Redo it again.
Make a brand new framework.
Rewrite that sucker. Rearchitect it baby!
Backwards Compatible
Each time someone invents a new framework like webbroker/websnap and g-framework, and intraweb, and that TWebPage component or the 50 other things on torry... or the TCGIProgram.. they are all new backwards incompatible incomplete subsets. None of it is an API.. they are all just limited subsets of web programming that are all completely incompatible with each other.
I've been using this wiki since year 2004 and upgrading the code that runs it.. using the same backwards compatible powtils API. Instead of sitting around waiting for the architecture, I use one now. I also program the lufdoc engine with the same backwards compatible API. I also run websites with over 2 million pages, and I don't fiddle around changing the source code to accustom to a new framework each year! I use an API over and over again. I'd likely hang myself if I had to continually update my web programs to take advantage of the latest new backwards incompatible XSS injection prone delphi web programming fad.
We Like But Don't Know Why
If you study API's and framework's hard enough, you will also see that the reasons people use PHP, WinApi, and Ruby is because these API's allow you to tap into the system and use code that others have written for you. Simplicity is offered...with procedures and/or classes that you can extend. But they don't lock you in.. and they don't continually make every part of the framework backwards incompatible with the last. The real reason people use Ruby, PHP, Powtils, Python, etc. is because they are flexible API's that we can tap into, utilize, extend, and add on to.
It's about tapping into API's.
My conclusion is that no delphi web framework thus far has been designed like a reusable general purpose API. Nor have many delphi web frameworks proven that they are really useful in the real world with many live websites being accessed daily by real world customers on the internet. Oh, except for Powtils. We did that. We do that. It's fun.