April 29, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Etienne Attachments: | On Tue, 29 Apr 2014 11:55:11 -0400
Etienne via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> That's funny b/c most people say RoR made them love web development. If the D community could organize itself the same way RoR is around web dev, I doubt any other web scripting language could pursue existence.
no, please, no! the latest thing D needs is a bunch of php-coders!
|
April 29, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Attachments: | On Tue, 29 Apr 2014 14:41:17 +0000 James via Digitalmars-d <digitalmars-d@puremagic.com> wrote: just show him vibe.d. it's what node.js wants to be, but failed. ;-) |
April 29, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On 2014-04-29 17:27, Adam D. Ruppe wrote: > I recently started a Ruby on Rails job and using it makes me really, > really miss the high productivity and ease of use D offers. I'm curious to why you think D is more productive and easier to use. -- /Jacob Carlborg |
April 29, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On Tue, 2014-04-29 at 20:04 +0200, Paulo Pinto via Digitalmars-d wrote: […] > I was already doing RoR back in 1999, but it was with our own in-house TCL Apache/IIS module in a Portuguese startup, far far away from Silicon Valley and loosely based in AOL Server concepts. […] > We already had Active Record and MVC with security layers and scaffolding, just in TCL and unknown to the world. Californians insist that everything is invented in California, and all other USAnians believe them. It is about time Europeans stopped believing them. Especially as everything in the future will be invented in China. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder |
April 29, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Tuesday, 29 April 2014 at 15:28:00 UTC, Nick Sabalausky wrote:
>
> Show him forum.dlang.org (written in D) and point out that modern HTML5/JS sites are freaking horrid. </admitted-curmudgeon>
forum.dlang.org is written in HTML/JS too.
|
April 29, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Tuesday, 29 April 2014 at 19:06:59 UTC, Jacob Carlborg wrote:
> I'm curious to why you think D is more productive and easier to use.
A lot of things, mostly focusing around having the compiler to help refactor with confidence (the importance of this really can't be understated) and having libraries that fit better. The speed is a nice bonus too, having to spend half a minute just waiting for the tests to run really grates me.
But wrt libraries, ActiveRecord is unbelievably awful, for example. It is a bad idea from the ground up: why, oh why are we reinventing the database? erb templates are painful to use too, and so is the routing. I don't understand why routing isn't done automatically for the common case.
The scaffolding is a pain too. Contrast to what web.d does: given a function signature, it automatically generates a form for it (using type information to select correct widgets) and can format the response in several forms automatically including plain text, html list, html table, json, xml, csv, and a custom template.
Maybe Rails can do this stuff and I'm too much of a n00b, but the other experienced team members say the way we're doing it is pretty standard and I'm just not impressed.
I can just get stuff done in D in a fraction of a time it takes to do even less in RoR.
|
April 30, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to JN | On 4/29/2014 3:48 PM, JN wrote:
> On Tuesday, 29 April 2014 at 15:28:00 UTC, Nick Sabalausky wrote:
>>
>> Show him forum.dlang.org (written in D) and point out that modern
>> HTML5/JS sites are freaking horrid. </admitted-curmudgeon>
>
> forum.dlang.org is written in HTML/JS too.
Anything on the web involves HTML, the difference is whether the HTML is the platform (ie HTML5) or just the renderer.
And forum.dlang.org uses very little JS (and only optionally). It's certainly not built out of JS.
|
April 30, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to James | On Tuesday, 29 April 2014 at 14:41:19 UTC, James wrote: > I have a friend that is a web developer. I, however want to collaborate with him, so I am trying to get him to learn D. I don't know how to persuade him! How can D be used to greatly assist an HTML5/JavaScript web developer? I decided to go here to get some good answers. How can D be used to interopt with modern web development? If you want to show him what's possible with D, just show him Cmsed[0] ;) All I'm saying is, if you ever not want to write ajax code again, Cmsed is your friend [1]. [0] https://github.com/rikkimax/Cmsed [1] https://gist.github.com/rikkimax/11043210 |
April 30, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rikki Cattermole | On Wednesday, 30 April 2014 at 02:43:43 UTC, Rikki Cattermole wrote:
> All I'm saying is, if you ever not want to write ajax code again, Cmsed is your friend [1].
My web.d does some javascript generation too.
D:
import arsd.web;
class Foo : ApiProvider {
export int add(int a, int b) { return a+b; }
}
mixin FancyMain!Foo;
Javascript:
Foo.add(1, 2).get(alert); // calls alert(3) when it returns
The generated JS code creates an object with the same name as the D class with all the export functions as methods that return a proxy object, setting the arguments. You can then modify it and eventually fire off the request with methods like get, getSync, and getHtml which take a function to call with the result.
Just one of the many things I miss when doing RoR instead of D :(
|
April 30, 2014 Re: D For A Web Developer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Wednesday, 30 April 2014 at 03:09:43 UTC, Adam D. Ruppe wrote:
> On Wednesday, 30 April 2014 at 02:43:43 UTC, Rikki Cattermole wrote:
>> All I'm saying is, if you ever not want to write ajax code again, Cmsed is your friend [1].
>
> My web.d does some javascript generation too.
>
> D:
> import arsd.web;
> class Foo : ApiProvider {
> export int add(int a, int b) { return a+b; }
> }
> mixin FancyMain!Foo;
>
> Javascript:
>
> Foo.add(1, 2).get(alert); // calls alert(3) when it returns
>
> The generated JS code creates an object with the same name as the D class with all the export functions as methods that return a proxy object, setting the arguments. You can then modify it and eventually fire off the request with methods like get, getSync, and getHtml which take a function to call with the result.
>
> Just one of the many things I miss when doing RoR instead of D :(
We should probably work together on this sort of stuff! As we seem to have similar ideas
|
Copyright © 1999-2021 by the D Language Foundation