On Thu, 10 Jul 2014 07:23:42 GMT, Kirill Igumenshchev wrote:
I'm learning how to build web apps and at some point would like to do it in vibed. Having no experience in webapps, starting with vibed seems a little dry. for example python flask or dijango books have a chapter on example app that goes in detail of building a social networking or blog app. it helps because they describe extensively what happens, as oppose to commented code in vibelog. I do understand that a tutorial like that would be time consuming to make so I thought I would go through learning of another framework to understand how things work. I mean things like handling requests/responses, passing url logic, xhtml requests/ajax, authentications and so on.
Yeah, this is definitely something that needs to be worked on. But unfortunately such things require a lot of time, and time for me is already a premium, so functionality and bugfixes still have priority. So in the near future, someone else would have to stand up and pioneer this.
Speaking of which, a friend of mine once implemented a very nice photo gallery with node.js. Maybe I can get him to do an implementation in D/vibe.d for fun, so that it can serve as the basis for a tutorial.
my question is the following:
What popular framework has the closest resemblance to vibed? flask? node.js?
I'm asking because I think it would be easier to learn the framework and abstractions and then switch to vibed.
To be frank, I don't know. It took some inspiration from node.js/express in the beginning, but then went on with a pretty original design (quite very similar to others in most cases). Due to the I/O model and its use of message passing, Go is probably closer overall than node.js, though, but since Go has a very different approach to OO and polymorphism, the actual code can look quite different.
However, I think that all those frameworks are similar enough that once you really know how it works in one of them, it will be pretty simple to switch over to another one. If you should do this and find that the documentation is lacking in certain parts, just post here and I'll try to fix it up immediately. It's always good to have a little force applied to do the boring stuff ;) and over time I also kind of lost the feel for where the documentation still needs more work.
Also what path or books/tutorials would you suggest to learn as a prerequisite to use vibed for more than a toy project.
specifically, i'm trying to build blog/photo_gallery/social site.
For vibe.d probably the best overview resource is the high level documentation and the web framework example.
All of the vibe.d specific tutorials that I know of are usually targeted at the absolute beginner or are more a high level description rather than a step by step tutorial. For some actual code references, you could also have a look at the vibelog (simple blog engine, currently no AJAX) and vibenotes (uses web sockets to communicate from browser to server, currently has some bugs) projects. Both are quite small, so that it is relatively easy to to see how certain things are implemented.
currently I'm doing it in Wt, which has a widget centric approach but I like D better than C++ and would prefer to switch at some point.
I had though about implementing something similar, but abandoned the idea, at least for now, due to lack of time.
If you need a lot of dynamic (AJAX style) HTML generation (e.g. for lazy rendering of the photo gallery during scrolling), you could also have a look at the arsd package, which I've heard has a nice DOM generator that may or may not be more suitable for such things than a template language such as vibe.d's Diet templates.
Hope this helps somewhat. Unfortunately I can't really help much in terms of tutorials or books, because I mostly only learned everything web-related piece by piece. Maybe someone else knows more in that direction.
For reference, these are the articles/videos specific to vibe.d that have a tutorial character and that I remember from the top of my head: