Ado? What is it?

For the last several months I had some more free time during the long (for me) nights in Central Europe. I didn't have to work any more additionally to cover some expenses. Having done several projects on Mojolicious, looking at the code, I clearly saw same patterns — repeating over and over again — in the code of my projects.

I had also, I would say, successful previous open source project on GitHub (which code had the same "issue" and some more), but I just left it after some time. I think I disappointed some people. Apologies. I left it because it was looking to me too monolithic, too "hard-codded", promising to be hard to maintain, and test...

I wanted something more flexible, implementing the same ideas and functionality, something more, hmm.. professional, easy to start with, well covered with tests, installable via CPAN or manually, imposing good coding practices, extensible, scalable, light on dependencies, enterprisey...

Contradictory requirements, you may say, this would be such an ado.

Why should I do it? There are already sooo many really good web frameworks, applications, systems that do whatever you may think of in whatever way you may want to choose, embracing even unthought new technologies and techniques. Well, not so many applications, written in Perl, even less written in, you may argue, simple, Modern Perl. Not so many at least trying to stay flexible and looking forward to stay maintainable when it grows, having tens or hundred of contributors, abiding to some coding rules etc. Yes I am using in this very moment one such good system to write this article. Still I do not know of such application, written in Perl, installable by just unpacking it on a cheap shared hosting account with only Apache and cgi (oh no), ok mod_fcgid and being able to run it in 5 minutes.

Perl does not have so many popular open source enterprise-grade applications as some other languages. Far from that. Look at Wikipedia for lists of CMS, ERP CRM etc...

Yes, this is too ambitious. But why not try it? I can always leave it if I got bored. No, not again. I wanna get free. This will be my freedom. I may even make some money as it happened already previously. I may even do this full time at some point. I want to do it. I believe it can happen. I know many people doing it with their own open source software. I only need a community around this project. This is the hard part. It will be hard till I say "I". I should say "We".

Stop.

I am realistic. I realize I can not do it alone. I am not that good programmer neither. Nobody is good enough to do such thing alone. I only have ideas. Everybody has ideas...
To summarise:


  • It is a fuss, ado... Ado

  • It is Yet another Perl module on CPAN

  • It is a Mojolicious application.

  • It will be a A CMS!, A CRM!, An ERP!.. whatever it turns to grow to

An Ado system starts as a lightweight but well structured application that can turn into an ERP, a CMS, a CRM or all in one by just adding plugins along the way, as the organization, which is using it grows.

Back to the thoughts from the beginning of this article.
So, in a full Mojolicious application you always have to implement your startup method. there you do the same thing over and over again.
Let us do it once and just improve it if we need to:


# This method will run once at server start
sub startup {
my $app = shift;
$app->load_config()
->load_plugins()
->load_routes()
->define_mime_types();
# do something else
return;
}


This is the first thing Ado provides — Glue code, that you otherwise write every time you start a new Mojolicious project. The second is a configuration file in etc/ado.conf.
Third: A database in etc/ado.sqlite. MySQL or PostgreSQL can be used.

....

I can not say everything at once, not in one article, which I doubt anyone will get to the end of it. So I will continue soon.

Because my spoken English is not good enough, I decided to try to compensate it with a few articles that would mitigate my failure as a presenter on YAPC::EU this month.

Let us not forget that what I started would not be possible without the Mojolicious project and the underlying Mojo toolset. I received some attention from them already, but it would be splendid if they give some further feedback, recommendations, any two cents.

The Mojo description says:
"A flexible runtime environment for Perl real-time web frameworks, with all the basic tools and helpers needed to write simple web applications and higher level web frameworks, such as Mojolicious."

Well, Ado is an even higher level, cough... framework in its infancy.

Thank you!

To be continued...

Leave a comment

About Krasimir Berov

user-pic Perl and Bulgarian are my native languages. I naturally read and understand most Slavic languages like Russian, Serbian and recently Czech... as well as I write JavaScript, HTML, CSS, SQL...