RejectedSoftware Forums

Sign up

What framework is similar to vibed?

Hi,

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.

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.

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.

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.

Best,
--Kirill

Re: What framework is similar to vibed?

On Thu, 10 Jul 2014 07:23:42 GMT, Kirill Igumenshchev wrote:

Hi,

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:

Re: What framework is similar to vibed?

On 2014-07-10 08:51, Sönke Ludwig wrote:> On Thu, 10 Jul 2014 07:23:42 GMT, Kirill Igumenshchev wrote:

Hi,

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.

Most of the magic these days happens within the Javascript, and with good reasons, browsers can render the html and take tons of load off the internet connection and server. I'm probably late to the party here but I just found https://redditjs.com/ which is a great example vs the regular site

What's interesting is the source code:

https://github.com/BenjaminAdams/RedditJS/

It's mostly backbone and marionette javascript MVC. Almost nothing in the backend, 500 lines of nodejs code or so, all of which is so similar to the vibe.d interface it could be translated line by line without thinking too much (.. which is less fun). This would serve as a great example.. it'll be faster and cleaner too. I think the strength of vibe.d though is in the portability, the apps become suitable browser-based UI for desktop applications.

Re: What framework is similar to vibed?

On Fri, 11 Jul 2014 04:13:46 GMT, Etienne Cimon wrote:

On 2014-07-10 08:51, Sönke Ludwig wrote:> On Thu, 10 Jul 2014 07:23:42 GMT, Kirill Igumenshchev wrote:

Hi,

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.

Most of the magic these days happens within the Javascript, and with good reasons, browsers can render the html and take tons of load off the internet connection and server. I'm probably late to the party here but I just found https://redditjs.com/ which is a great example vs the regular site

Fun side fact for Opera: "Click here to try again"

Personally, I'm still a big fan of sites that work flawlessly without JS, but are augmented with client side scripting to make things convenient/fast/pretty.

However, the photo gallery that I was talking about is actually highly client side JS heavy. And I certainly agree that it is basically a good direction to offload as much computation as possible to the client.

What's interesting is the source code:

https://github.com/BenjaminAdams/RedditJS/

It's mostly backbone and marionette javascript MVC. Almost nothing in the backend, 500 lines of nodejs code or so, all of which is so similar to the vibe.d interface it could be translated line by line without thinking too much (.. which is less fun). This would serve as a great example.. it'll be faster and cleaner too. I think the strength of vibe.d though is in the portability, the apps become suitable browser-based UI for desktop applications.

Hmm, "faster and cleaner" than what?

I have to say, while this is also a nice general example in a way, it also makes a pretty bad vibe.d example for exactly the reason you mentioned - there isn't much vibe.d involved. If I were to make something, I'd rather go for something that is maybe 50-50 w.r.t. server and client side code, so that you get a good overview of the client side things, too, but still keep the main focus on vibe.d.

Re: What framework is similar to vibed?

Fun side fact for Opera: "Click here to try again"

Personally, I'm still a big fan of sites that work flawlessly without JS, but are augmented with client side scripting to make things convenient/fast/pretty.

Strange, I don't get the "Click here to try again" in opera

Hmm, "faster and cleaner" than what?

Faster and cleaner than the mostly static reddit.com. I think you're right though about it not putting enough focus on vibe.d heh.

However, the photo gallery that I was talking about is actually highly client side JS heavy. And I certainly agree that it is basically a good direction to offload as much computation as possible to the client.

I have to say, while this is also a nice general example in a way, it also makes a pretty bad vibe.d example for exactly the reason you mentioned - there isn't much vibe.d involved. If I were to make something, I'd rather go for something that is maybe 50-50 w.r.t. server and client side code, so that you get a good overview of the client side things, too, but still keep the main focus on vibe.d.

There's a resource out there though for choosing javascript MVCs where it's about 500 lines of javascript, and I think it would take about 500 lines of vibe.d to make a persistent back-end

https://github.com/tastejs/todomvc/tree/gh-pages/labs/architecture-examples/backbone_marionette

It doesn't really show much back-end power, but with added persistence it does have the potential to show off mongodb/redis/json serialization/vibe.web/sessions, etc., interfacing with a front-end Javascript MVC which is what I (personal opinion) consider good practice for web apps in 2014.

Perhaps the true power will be when vibe.d will allow building browser GUI for desktop applications in a standalone portable application allowing lazy initialization of remote resources while extending the bandwidth capacity of the network (I'm on this since the beginning).

Re: What framework is similar to vibed?

On Fri, 11 Jul 2014 13:46:38 GMT, Etienne Cimon wrote:

There's a resource out there though for choosing javascript MVCs where it's about 500 lines of javascript, and I think it would take about 500 lines of vibe.d to make a persistent back-end

I have a bias towards jquery because of existing templates based on foundation and bootstrap which require it, but I'd mention that the AngularJS example is much cleaner (easier to read code), although soon enough it'll all be dart =)

http://todomvc.com/labs/dependency-examples/angularjs_require/

Re: What framework is similar to vibed?

I know this is an older post, but I think everyone should have a look at http://intercoolerjs.org/

It's a JS ajax library which allows you to use AJAX as though it were a simple html tag.

If you look at the various examples you can see the different ways in which it can be used.

I wouldn't call it "reactive", as in the Backbone way of doing things. But still, it does open up some nice and elegant possibilities.

yc

On Fri, 11 Jul 2014 14:09:38 GMT, Etienne Cimon wrote:

On Fri, 11 Jul 2014 13:46:38 GMT, Etienne Cimon wrote:

There's a resource out there though for choosing javascript MVCs where it's about 500 lines of javascript, and I think it would take about 500 lines of vibe.d to make a persistent back-end

I have a bias towards jquery because of existing templates based on foundation and bootstrap which require it, but I'd mention that the AngularJS example is much cleaner (easier to read code), although soon enough it'll all be dart =)

http://todomvc.com/labs/dependency-examples/angularjs_require/

Re: What framework is similar to vibed?

Am 17.03.2017 um 22:43 schrieb yves cloutier:

I know this is an older post, but I think everyone should have a look at http://intercoolerjs.org/

It's a JS ajax library which allows you to use AJAX as though it were a simple html tag.

If you look at the various examples you can see the different ways in which it can be used.

I wouldn't call it "reactive", as in the Backbone way of doing things. But still, it does open up some nice and elegant possibilities.

yc

Looks like a nice and lean solution. I was thinking about doing
something between/including this and a more higher level (Angular or
Backbone) approach at compile time on the server.

So the page code would be written as a Diet template and would include
the same special attributes or tags as found in the JS frameworks, but
there would be an AST transformation pass that replaces these with
generated tags and script calls before the page gets compile to actual
HTML. This would greatly reduce the DOM transformation pressure on the
client side and could make the client side script a lot simpler/smaller.