vibe.d: How to get the conent of a file upload ?
aberba
karabutaworld at gmail.com
Sat Sep 19 20:17:06 UTC 2020
On Friday, 18 September 2020 at 22:31:09 UTC, mw wrote:
> On Friday, 18 September 2020 at 00:07:12 UTC, wjoe wrote:
>
>> Are there other frameworks besides vibe that can do what I
>> want?
>
> Just FYI, there is also:
>
> https://code.dlang.org/packages/hunt-framework
>
>
> I never used myself, you need to investigate.
Yeah, I'm aware of hunt too. Its like laravel in php whilst
vibe.d feels more like express in nodejs. Infact I believe Sonke
wrote vibe.d after using express or similar framework by design.
And yes, almost all frameworks work in a certain way. Arsd cgi.d
might be what you want if you want to it your way as its more
low-level interface-wise.
I personally (and many others in the industry... judging by
popularity of express (node.js) and the plentiful third-party
libraries,..do prefer the router.get() design. Also having
everything abstracted in a convenient and consistent way...is
very desirable. vibe.d's web interface API is something I've
always praised and thanks to how powerful D is compare to say
JavaScript. Diet templates is also an example.
However that power is not tapped in enough (yet) to favour using
D conveniently over node (js). And web developers are interested
in getting things done (at least my kind of web devs) rather than
getting it our way...or squeezing every bit of efficiency out of
it. Part of why v8 is fast by default (for us).
Unike express (which is a thing layer with interface for
third-parties to hook in and extend with libs), vibe.d became a
monolith with everything included... making it harder to maintain
and extend in other ways. Plus too much hard-coding by default
currently. Unfortunately Sonke doesn't work on it like he used
to...and its quite an huge accomplishment...the work he's done
for D.
I wish vibe.d could be positioned and sponsored officially or by
community cus its the killer app.
Staying lean and being extensible will open up for more
innovation around it. Eg. a form handler for files library that
works like how Ikod suggested...a customizable stream.
Unless you're doing usual routing and database things, using
vibe.d for a full stack projects can lead to a dead end unless
you're positioned to write your own stuff to supplement. Of
course its only a matter of time before this change for the good.
Personally I use vibe.d for basic side projects. Looking to use
it more going forward. But that's how I see it.
More information about the Digitalmars-d-learn
mailing list