Re: crate.d a draft for a mvc library

2014-11-30 Thread gedaiu via Digitalmars-d-announce

On Sunday, 30 November 2014 at 00:20:57 UTC, Dylan Knutson wrote:

On Thursday, 27 November 2014 at 19:16:24 UTC, gedaiu wrote:

Hi,

In the last weeks I tried to make a draft for a mvc library. I 
tried to take advantage of templates, uda and ctfe to make the 
interaction with the database and the routing easier. There is 
still a lot of work to do for making it ready to work in 
production... but anyway.. what do you think?


https://github.com/gedaiu/crate.d

Thanks,
Bogdan


Hi,

I noticed you had your own templating library to parse the .dh 
files, so I thought I'd mention my project Temple which does 
something similar: https://github.com/dymk/temple
It's perhaps a bit more feature complete, and can handle stuff 
like capturing blocks of code, render to arbitrary output 
ranges, etc. That being said, your solution is very nice; it's 
amazing what you can do in so few lines of code in D :)


MongoModel in the model part of crate.d is interesting, and I'm 
glad to see there's a more structured way of interacting with 
MongoDB than just poking at untyped objects. I think D is still 
missing a really good ORM (Rikki's dvorm is a start), but 
there's nothing out there that conforms to the "activerecord" 
pattern as far as I can tell.


Hi,

I seen the Temple library and I was thinking to use it, but I did 
not had time to look in more details on it. It looks very nice 
and I will use it for sure.


The solution that I found with the dh files is just a temporary 
and it should be rewritten as soon as I will find a good solution 
for the models.


Regarding the models I tried to implement something that comforms 
with "activerecord" in the past, but I failed big time... I 
intend to do a similar interface for relational databases too, 
but I don't know right now how I should treat the joins...


@Rikki nice job with your projects. I did not know about them and 
I will take a look on them these days.


Thanks,
Bogdan




Re: crate.d a draft for a mvc library

2014-11-29 Thread Rikki Cattermole via Digitalmars-d-announce

On 30/11/2014 1:20 p.m., Dylan Knutson wrote:

MongoModel in the model part of crate.d is interesting, and I'm glad to
see there's a more structured way of interacting with MongoDB than just
poking at untyped objects. I think D is still missing a really good ORM
(Rikki's dvorm is a start), but there's nothing out there that conforms
to the "activerecord" pattern as far as I can tell.


There is hibernated around, but something about it always made me go 
yeah no. But so does actual hibernate so meh.


Dvorm was meant as a very simple interface completely abstracted out 
from the database engine itself :) It does this very well, even can 
send/receive emails!


I would like to eventually build another library that is backwards 
compatible with Dvorm but with a lot more features. And far less 
database engine abstracted away.

Mostly so things like Cmsed don't need a full rewrite.
But alas, I'm trying to improve the situation for gui's atm.


Re: crate.d a draft for a mvc library

2014-11-29 Thread Dylan Knutson via Digitalmars-d-announce

On Thursday, 27 November 2014 at 19:16:24 UTC, gedaiu wrote:

Hi,

In the last weeks I tried to make a draft for a mvc library. I 
tried to take advantage of templates, uda and ctfe to make the 
interaction with the database and the routing easier. There is 
still a lot of work to do for making it ready to work in 
production... but anyway.. what do you think?


https://github.com/gedaiu/crate.d

Thanks,
Bogdan


Hi,

I noticed you had your own templating library to parse the .dh 
files, so I thought I'd mention my project Temple which does 
something similar: https://github.com/dymk/temple
It's perhaps a bit more feature complete, and can handle stuff 
like capturing blocks of code, render to arbitrary output ranges, 
etc. That being said, your solution is very nice; it's amazing 
what you can do in so few lines of code in D :)


MongoModel in the model part of crate.d is interesting, and I'm 
glad to see there's a more structured way of interacting with 
MongoDB than just poking at untyped objects. I think D is still 
missing a really good ORM (Rikki's dvorm is a start), but there's 
nothing out there that conforms to the "activerecord" pattern as 
far as I can tell.


Re: crate.d a draft for a mvc library

2014-11-27 Thread Rikki Cattermole via Digitalmars-d-announce

On 28/11/2014 8:16 a.m., gedaiu wrote:

Hi,

In the last weeks I tried to make a draft for a mvc library. I tried to
take advantage of templates, uda and ctfe to make the interaction with
the database and the routing easier. There is still a lot of work to do
for making it ready to work in production... but anyway.. what do you
think?

https://github.com/gedaiu/crate.d

Thanks,
Bogdan


I had a look at it, it looks very simplistic. But I assume it would be 
rather fast for linking. Which is a good thing.


I would recommend if you haven't already to look at my projects, 
Cmsed[0], livereload[1], skeleton[2] and dvorm[3].

I started dvorm end of last year and is fairly complete at this point.
Cmsed is due for rewrite (got most of the code done if you are 
interested) but I'm waiting on a PR for dmd before doing more.


[0] https://github.com/rikkimax/Cmsed
[1] https://github.com/rikkimax/livereload
[2] https://github.com/rikkimax/skeleton
[3] https://github.com/rikkimax/dvorm


crate.d a draft for a mvc library

2014-11-27 Thread gedaiu via Digitalmars-d-announce

Hi,

In the last weeks I tried to make a draft for a mvc library. I 
tried to take advantage of templates, uda and ctfe to make the 
interaction with the database and the routing easier. There is 
still a lot of work to do for making it ready to work in 
production... but anyway.. what do you think?


https://github.com/gedaiu/crate.d

Thanks,
Bogdan