Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Model Centric Perl Web Framework

16 views
Skip to first unread message

Ilias Lazaridis

unread,
Oct 29, 2011, 10:17:40 AM10/29/11
to
I am looking for a perl web application framework, and found this
overview here:

https://www.socialtext.net/perl5/web_frameworks

I have two basic requierements:

a) "Model Centric".

"Model Centric" means, that the Model (and thus the OO Classes) is the
central point of development, and that the database is *not* a "point
of development" (or only optional if wanted, e.g. when dealing with a
given db-schema).

If I specify my model, I can then create the underlying database using
automations.

The same is true for CRUD functionality, which should be created
either dynamically at runtime, or via generators - using the classes
and metadata specified in the model.

An ideal implementation would allow me to continue incrementally,
creating automaticly updates of db-schemas and CRUD's, whilst
preserving data and my custom-changes made to the CRUD's.

b) "Authentication Functionality" (Modules / Components)

I would need modules for Open Auth Systems (Opent Auth, Open ID) and
modules for popular sites like facebook, twitter, google etc.

-

Can anyone tell me which framework fullfills the requirement "a" and
ideally requirement "b", too) ?

Thank you in advance.

.

--
http://lazaridis.com

Ilias Lazaridis

unread,
Nov 4, 2011, 1:24:01 PM11/4/11
to

George Mpouras

unread,
Nov 4, 2011, 8:11:07 PM11/4/11
to
Your question is very generic. For me the simple CGI with some DBI
module is enough.

Ilias Lazaridis

unread,
Nov 6, 2011, 7:43:30 PM11/6/11
to
On 5 Νοέ, 02:11, George Mpouras
<antispam.gravital...@hotmail.com.nospam.me> wrote:
> Your question is very generic. For me the simple CGI with some DBI
> module is enough.

the question is quite concrete. I do not ask "what perl webframework
do you prefere" but "which perl webframework is model-centric".

It's sad, if I've really to go through every documentation.

--
http://lazaridis.com

Ben Morrow

unread,
Nov 6, 2011, 8:22:30 PM11/6/11
to

Quoth Ilias Lazaridis <il...@lazaridis.com>:
> On 5 Νοέ, 02:11, George Mpouras
> <antispam.gravital...@hotmail.com.nospam.me> wrote:
> > Your question is very generic. For me the simple CGI with some DBI
> > module is enough.
>
> the question is quite concrete.

I agree. I only didn't respond because I don't think I've got a good
answer.

> I do not ask "what perl webframework do you prefere" but "which perl
> webframework is model-centric".

IIUC you aren't just looking for something which puts the business logic
in the model (which is simply good practice in an MVC system) but you
more specifically want a system which will generate and update a
database schema out of thin air given only a set of objects to store.

If you just want a good MVC system, I'd recommend Catalyst. Cat supports
lots of Model classes: the one usually used in the examples is based on
DBIx::Class. DBIC is, I think, exactly what you *aren't* looking for:
while it will generate DDL for you, and it gives you an OO interface to
the database, it will only do so after you've set up a 'schema' which
ends up mostly equivalent to an SQL schema.

Perhaps what you want is Catalyst::Model::KiokuDB? I've never used it,
with or without Catalyst[0], but Florian (who appears to be the current
maintainer) certainly knows what he's doing.

Ben

[0] and probably wouldn't want to. IMHO if you're using an RDBMS just to
serialise a handful of objects you're wasting it: the whole point of SQL
is it lets you ask questions you weren't expecting when you put the data
in the database. If all the important bits are stuffed into blobs you
might as well have been using BDB or something simple like that from the
start. (In fact, I see KiokuDB supports BDB as a backend...)

Rainer Weikusat

unread,
Nov 7, 2011, 8:46:08 AM11/7/11
to
Ben Morrow <b...@morrow.me.uk> writes:

[...]

> IMHO if you're using an RDBMS just to serialise a handful of objects
> you're wasting it: the whole point of SQL is it lets you ask
> questions you weren't expecting when you put the data in the
> database.

The irony of SQL is that it was designed in order to enable people to
perform complex data analysis tasks without having to learn how to
write programs in an imperative programming language but that it is
mostly used by people who know how to do the latter and are not
exactly keen on learning the former.

[SCNR]

Ilias Lazaridis

unread,
Nov 7, 2011, 11:18:17 PM11/7/11
to
On 7 Νοέ, 03:22, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Ilias Lazaridis <il...@lazaridis.com>:
>
> > On 5 , 02:11, George Mpouras
> > <antispam.gravital...@hotmail.com.nospam.me> wrote:
> > > Your question is very generic. For me the simple CGI with some DBI
> > > module is enough.
>
> > the question is quite concrete.
>
> I agree. I only didn't respond because I don't think I've got a good
> answer.
>
> > I do not ask "what perl webframework do you prefere" but "which perl
> > webframework is model-centric".
>
> IIUC you aren't just looking for something which puts the business logic
> in the model (which is simply good practice in an MVC system) but you
> more specifically want a system which will generate and update a
> database schema out of thin air given only a set of objects to store.

like you write, but "out of the class definition and related meta-
data" (and some version information about the database which the
framework keeps internally)

> If you just want a good MVC system, I'd recommend Catalyst. Cat supports
> lots of Model classes: the one usually used in the examples is based on
> DBIx::Class. DBIC is, I think, exactly what you *aren't* looking for:
> while it will generate DDL for you, and it gives you an OO interface to
> the database, it will only do so after you've set up a 'schema' which
> ends up mostly equivalent to an SQL schema.

Another person wrote: "You may want to look at DBIx::Class which is a
mature and feature-rich Perl ORM that lets you generate your model
classes automatically from your database schema or vice-versa."

So, DBIC need the "schema" section in addition to the class-
definition. I understand.

> Perhaps what you want is Catalyst::Model::KiokuDB? I've never used it,
> with or without Catalyst[0], but Florian (who appears to be the current
> maintainer) certainly knows what he's doing.

ok, will take a look.

Maybe I ask a different way: which existent framework (or ORM) come
nearest to "Model-Centric"?

> Ben
>
> [0] and probably wouldn't want to. IMHO if you're using an RDBMS just to
> serialise a handful of objects you're wasting it: the whole point of SQL
> is it lets you ask questions you weren't expecting when you put the data
> in the database. If all the important bits are stuffed into blobs you
> might as well have been using BDB or something simple like that from the
> start. (In fact, I see KiokuDB supports BDB as a backend...)

I want to use an sql db, in order to be able to switch to other
frameworks, languages etc.

--
http://lazaridis.com

Ben Morrow

unread,
Nov 8, 2011, 6:40:19 AM11/8/11
to

Quoth Ilias Lazaridis <il...@lazaridis.com>:
> On 7 Νοέ, 03:22, Ben Morrow <b...@morrow.me.uk> wrote:
>
> > Perhaps what you want is Catalyst::Model::KiokuDB? I've never used it,
> > with or without Catalyst[0], but Florian (who appears to be the current
> > maintainer) certainly knows what he's doing.
>
> ok, will take a look.
>
> Maybe I ask a different way: which existent framework (or ORM) come
> nearest to "Model-Centric"?

As I said, I don't know. It's not a property I would consider desirable,
so it's not something I've looked into.

> > [0] and probably wouldn't want to. IMHO if you're using an RDBMS just to
> > serialise a handful of objects you're wasting it: the whole point of SQL
> > is it lets you ask questions you weren't expecting when you put the data
> > in the database. If all the important bits are stuffed into blobs you
> > might as well have been using BDB or something simple like that from the
> > start. (In fact, I see KiokuDB supports BDB as a backend...)
>
> I want to use an sql db, in order to be able to switch to other
> frameworks, languages etc.

Well, in that case, don't you want to put a bit more thought into
designing the DB schema properly? Kioku will give you a schema which
looks approximately like

CREATE TABLE entries (
id varchar PRIMARY KEY,
data blob
);

plus some additional bookkeeping, where the "data" field contains a
serialised object. While the default serialisation is JSON-based, and so
in principle portable between languages, it's not likely to be very easy
to pull a usable object out of the DB from some other language since the
database structure is not in any way related to the actual structure of
your data.

Ben

Ilias Lazaridis

unread,
Nov 11, 2011, 1:01:39 AM11/11/11
to
On 8 Νοέ, 13:40, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Ilias Lazaridis <il...@lazaridis.com>:
>
> > On 7 Νοέ, 03:22, Ben Morrow <b...@morrow.me.uk> wrote:
>
> > > Perhaps what you want is Catalyst::Model::KiokuDB? I've never used it,
> > > with or without Catalyst[0], but Florian (who appears to be the current
> > > maintainer) certainly knows what he's doing.
>
> > ok, will take a look.
>
> > Maybe I ask a different way: which existent framework (or ORM) come
> > nearest to "Model-Centric"?
>
> As I said, I don't know. It's not a property I would consider desirable,
> so it's not something I've looked into.

ok

> > > [0] and probably wouldn't want to. IMHO if you're using an RDBMS just to
> > > serialise a handful of objects you're wasting it: the whole point of SQL
> > > is it lets you ask questions you weren't expecting when you put the data
> > > in the database. If all the important bits are stuffed into blobs you
> > > might as well have been using BDB or something simple like that from the
> > > start. (In fact, I see KiokuDB supports BDB as a backend...)
>
> > I want to use an sql db, in order to be able to switch to other
> > frameworks, languages etc.
>
> Well, in that case, don't you want to put a bit more thought into
> designing the DB schema properly?
[...]

No, want to write classes, and get the rest done. Just as within an
OODBMS. I use ORM/SQL just because those OODBMS systems are not that
much available.

Thank you for your for your answers.

--
http://lazaridis.com

Ilias Lazaridis

unread,
Dec 3, 2011, 10:22:06 PM12/3/11
to
Instead of opening a new thread, I post it here, as it's directly
related.

I just refere to php's Doctrine2 ORM because it showcases what I am
looking for

In Doctrine2, you write a usual clall ("Person" in the example). After
this, you declare (via metadata) the mapping. This metadata can be
added in 3 different ways: separate XML file, separate YAML file, or
directly in sources via annotations (my main intrest):

http://symfony.com/doc/2.0/book/doctrine.html

Is there a similar ORM available for perl?

If not, which toolkit (library, product etc.) would come closest to
the functionality mentioned above?

And finally: is there a annotation system/standard available for perl?


On 29 Οκτ, 16:17, Ilias Lazaridis <il...@lazaridis.com> wrote:
0 new messages