How D may replace PHP & ASPX on the Web!!!

Adam Ruppe destructionator at gmail.com
Mon Jul 18 11:00:32 PDT 2011


Matthew Ong wrote:

> Now, SugarCRM is being use not because all web pages are CRM
> product, but to show how a professional product is implemented in PHP.

Yes, I've had to work with it's code before... it was so brutally
slow and overcomplicated that we ended up deciding to just throw
more hardware at the problem instead! It was moderately painful
hooking it into the external application too. Blargh.

>     1.3) date time format / timezone automatically calculated.

What I did for timezone was to use a little javascript to set a
cookie based on the users' local clock.

Incredibly simple and worked very well.

> 2) Support skin theme switching and customization. This will

With my D sites, I was able to express the vast majority of changes
in css, and the rest through a DOM post-processor and separate
template directories when appropriate.

The post-processor is the special thing - most apps treat templates
as strings, which maybe could do these things, but I doubt it'd be
as clear and easy as with the higher level structures.

> Support customization of forms and also building new module on the
fly.

web.d attacks this by letting you alias in other classes to your
main app, and of course, with dom templates editing forms is easy.

> 5) Allow developer to paste in new code updates into some form of hooks

web.d exposes your public functions via javascript, which makes this
pretty simple.

When I integrated sugarcrm with my D application, I used web.d's
javascript functionality and a standard onclick handler to bring
the D functions in very easily. Dealing with PHP made it harder
than it had to be, but it was still pretty simple.

(that thing goes both ways btw - web.d's functions are easily accessed
with a small PHP library too, that uses curl.)

> 7) Support multiple platforms including some mobiles devices.

Any website that doesn't work on mobile devices already is garbage.
The whole point of the web is device independence!


BTW: I started writing a higher level explanation of my cgi.d.

http://arsdnet.net/web.d/cgi.d.html

Still a work in progress, of course. Once it's done, I'll write
a similar document for web.d.


More information about the Digitalmars-d mailing list