Serenity web framework - early feedback wanted

Jacob Carlborg doob at me.com
Thu Dec 30 12:12:34 PST 2010


On 2010-12-29 04:20, Robert Clipsham wrote:
> Hey all,
>
> I've just uploaded the source code to a pet project I've been working on
> over the past few weeks - an MVC web framework written with D.
>
> https://bitbucket.org/mrmonday/serenity/src
>
> It's by no means ready for production use, I'm posting here primarily
> for some early feedback on how things work/how they should work/any
> issues I'm overlooking.
>
> The primary files to look at are:
>
> - bootstrap.d: Entry point for the web app - this *is* going to change,
> haven't decided how yet.
> - example/controllers/Home.d: A hybrid Hello world/show some blog posts
> controller
> - example/models/Home.d: The model which the home controller is powered by.
>
> Currently features include:
> - A minimal ORM (lots of work needed here, works for the basics though)
> - An HTML document builder - remove the need for ugly/inefficient
> templating systems, and allow output to HTML5/4/JSON/XML/XHTML to be
> easily switched between (only HTML5 currently works, and is slightly
> broken due to laziness, see comments in the implementation)
> - A minimal SQL abstraction layer - currently supports SQLite, functions
> similarly to the HTML document builder
>
> Obviously there's still a lot to do, things that come to mind are
> logging, caching, configuration, security, administration, <insert huge
> list of functionality todays web frameworks have>.
>
> Any feedback on what I have so far is welcome, I'm also looking for
> feedback on future directions, issues I'm likely to hit, ways you think
> it can be improved from what it is now, things you think will be
> important etc.
>
> Thanks,

I have to say that I'm a bit septic to all/most web frameworks, because 
in my opinion they're trying to create a Rails implementation in the 
given language but they all fail due to the language is not powerful 
enough. But I think you have taken a different route and created an API 
that doesn't try to be exactly like Rails, which just might be the right 
solution to create a good web framework in another language than Ruby. I 
think it looks interesting, a coupe of questions/comments:

* In example.models.Home, if I understand things correctly Home is a 
model and Post is the actual representation of the table? If that's the 
case, why the separation?

* Is it always wise to create a model?

* Shouldn't Controller.view return Document instead of HtmlDocument?

* You list removing the templating system as a feature but this will 
loose the separation of the view code (the view) and the code for the 
logic (the controller)

I'm using D1 and Tango but I have to say that I think D2 as some nice 
features that will make it possible to create an ORM implementation with 
quite a good API (opDispatch, template this parameter, Variant to 
mention a few).

BTW, how is it working out with doing web development in a statically 
typed language?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list