Is this no-framework skeleton app good enough for tutorials?

We write a lot of tutorials here at SitePoint. We throw in some light content now and then, like the occasional sourcehunt, but generally, everything we do is of a highly technical nature.

These technical posts usually include demonstrations of independent tools and packages, and their implementation into existing apps, no matter how simple those apps. However, without fail, people ask us for demos in framework X when a demo has been done in framework Y. Naturally, we cannot accommodate all the use cases; while any decent framework will be set up in a way that’s friendly to simple and easy installation of third party components, some people just cannot even bear running a certain framework on their machine.

With that in mind, we started a new work-in-progress project called nofw - it’s a “no framework skeleton app” that’s constructed entirely of independent third party packages, and thus serves the purpose of a common framework, but doesn’t rely on one.

What’s more, every component can be switched out for an alternative one, except the user authentication part - that’s one of the “work in progress” parts - which lends itself perfectly to our tutorials.

From now on, you’ll be seeing much more of nofw in our posts. It’ll be the base for many of our upcoming applications and demos, but it’s production-safe enough to be used in your own applications as well. In fact, two commercial projects are already using it, and one open source one that’s about to be released soon - more on that at a later date. Here’s a teaser:

Why tell you about this here and now? Well, we’d love it if you could take a look and give us some feedback, submit a PR or two, help us out with structuring everything so it’s even more extensible but at the same time better structured than it is now. We’d also love it if you could try and use it and give us feedback on what works, what doesn’t, and where we need to improve things. The aim is to have this as a good (but optimizable) starter app for any project.

Have a look and let us know in the project’s issues or here, will you?

With that in mind, we started a new work-in-progress project

Sorry, but I can’t help it %)


The name, to my taste, is rather misleading. What you have is a framework and you even admit it. So I would name it “SitePoint Demo Framework” to make things straight, unless you want to call it “no-framework” on purpose, to deceive some framework-reluctant users.

1 Like

This, basically :wink:

But yeah, I’ll give the name some consideration when I decide to push it over to SitePoint’s organization. Needs an upgrade or two first.

The first thing I noticed is that the antiquated ORMs docs are 404ing…

http://book.cakephp.org/3.0/en/orm/

I haven’t heard anything about cake in a long time. Using Cake for anything seems like a poor decision to me but to each their own.

Whoops, gotta fix that link, thanks. Here’s the real one: http://book.cakephp.org/3.0/en/orm/database-basics.html

Actually, Cake3’s ORM is very good, and in very active development. In many ways, it parries Laravel’s Eloquent - only Cake’s can be used outside Cake as well, something you can’t say for Laravel components. Coupled with the extremely quick start and the very easy way to configure everything, CakeORM was a perfect choice for a started database access layer - but it’s still optional. Currently, it’s only used to power the database-saved cronjobs.

Which ORM would you have chosen, if any?

I don’t buy it – seems like a step backward but sure.

I’m not really a fan of Eloquent or ActiveRecord. I think ActiveRecord quickly becomes useless for most applications. Right now I prefer Doctrine for the completeness and separation between persistence and domain models. Also the repository pattern which lends itself better to applications than ActiveRecord. With AR anything beyond simple selects quickly becomes messy in my experience.

Maybe still I feel that most applications grow beyond that starting point and typically require something more robust like Doctrine. if you give someone Cake to work with and their needs extend beyond the usage than you end up putting them on a path to disaster.

Doctrine is the king of PHP ORMs. Very stable and well used. It gets my vote!

Scott

Agreed

I love laravel doctrine.

Screw ActiveRecord…

Have you tried it?

Yes a lot of people seem to be regurgitating this mantra, and yet I’ve never seen an actual use case where ActiveRecord proved to be such a horrible mistake even for large projects.

Either way, like I said, the CakeORM layer is 100% optional and you can plug Doctrine in there if you want. You may like Doctrine, and that’s fine, but I don’t, and that’s fine too - that’s why that part (and almost everything else in nofw) is entirely optional.

1 Like

How about a thread to ask for names for the framework from the community?

Scott

That’s what I thought - a skeleton is framework, isn’t it? Maybe the size is smaller but the basic meaning is the same, so a no-framework skeleton doesn’t make sense because by definition a skeleton is a framework :).

I’m curious - why does laravel need laravel doctrine to use doctrine? Why can’t you just use doctrine?

The laravel doctrine website does a better job of explaining that than I ever could.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.