RejectedSoftware Forums

Sign up

Hello and Prema

Hello Vibe Tribe!

I just got my first Vibe project ready for publication: Prema Prediction Market.

My experience as a Vibe newcomer: It does its job well. I'm familiar with more opinionated frameworks like python-django. Compared to Django, Vibe lacks in documentation and examples and extensions. With Django they explain in more detail how to create your first project and how to go from there. I made my Persona authentication myself (and discovered Sönkes project later). However, I don't think a Django comparison is a good thing. Vibe feels lower-level to me. Maybe someone will build some stuff on top, which provides for example an auto-admin-interface.

SQL is a pain point. Afaik there is no generic SQL interface for D, which would let me switch easily between SQLite and PostgreSQL and MySQL. I used d2sqlite3. Apart from all the "bind" typing, I mostly missed some type system support. Somehow infering type info from the schema would be great, but I have no idea how to approach this.

Overall, I think Vibe is fine. It could obviously need more features for a full-stack web framework, but what is there is solid. I did not run into any Vibe bugs.

If anybody has the time to look into my code, I would appreciate feedback.

Re: Hello and Prema

On Wed, 18 Nov 2015 13:54:54 GMT, qznc wrote:

Hello Vibe Tribe!

I just got my first Vibe project ready for publication: Prema Prediction Market.

My experience as a Vibe newcomer: It does its job well. I'm familiar with more opinionated frameworks like python-django. Compared to Django, Vibe lacks in documentation and examples and extensions. With Django they explain in more detail how to create your first project and how to go from there. I made my Persona authentication myself (and discovered Sönkes project later). However, I don't think a Django comparison is a good thing. Vibe feels lower-level to me. Maybe someone will build some stuff on top, which provides for example an auto-admin-interface.

SQL is a pain point. Afaik there is no generic SQL interface for D, which would let me switch easily between SQLite and PostgreSQL and MySQL. I used d2sqlite3. Apart from all the "bind" typing, I mostly missed some type system support. Somehow infering type info from the schema would be great, but I have no idea how to approach this.

Overall, I think Vibe is fine. It could obviously need more features for a full-stack web framework, but what is there is solid. I did not run into any Vibe bugs.

If anybody has the time to look into my code, I would appreciate feedback.

Thanks for writing up a review! Regarding a better introduction, I have a tutorial in the works that will be published in the next days. It goes from zero to a simple, but fully usable web application. While not going into every detail, I think it should be very valuable to newcomers of both vibe.d and D in general.

BTW, if you remember some concrete omissions that you stumbled over, it would be great to have them as a reference for further improvements. We are trying to improve the documentation standards for all new code, but over time it has become difficult to spot the missing pieces in the existing documentation.

There have been some attempts at providing a DB abstraction layer, but I'm unsure of their current development status: DVORM, DB, DDBC
At least DVORM and DDBC have support for direct serialization to D types. The latter may be the most promising candidate, but I personally haven't used any of them, so I can't tell for sure.*

I just had a very brief look at Prema and was wondering if you had already discovered the vibe.web.web module and registerWebInterface in particular? It would allow you to remove a lot of boilerplate code for handling form fields, session values and error handling. There are four examples targeted at this module (the ones with the "web" prefix).

Another thing that might be interesting is that you can directly embed Markdown code into Diet templates using the filter syntax:

h1 Testing MarkDown

markdown:
    This is **MarkDown**!

* Then there is also my own attempt, which tries to go a bit further with its abstraction, but I had to abandon it for the time being, because it became too big of a task. I also wasn't really happy with the query language/API. But maybe I'll pick that up again at some point.