ArchStanton's avatar

Lumen for brochure sites

Hi,

Is lumen a suitable framework for 8-10 page brochure site?

It will have all the basic stuff, contact forms, few different forms, maybe a couple of API calls.

Anyone else using it in this way? I have a couple of small things on the horizon and think it would work well, but wonder if I have misunderstood the framework.

0 likes
16 replies
sukonovs's avatar
Level 6

Just use Laravel, you will gain nothing by using Lumen if it is just a few pages.

ArchStanton's avatar

Hi I did read these posts but they did not really answer my question, I suppose I don't really see the point of lumen yet.

frezno's avatar

Lumen (as other micro/mini Frameworks) is a very basic setup of a framework with a very basic functionality, maybe best suited for APIs and/or stuff very you really just need the very basics.
But as soon as it becomes more 'general', eg you need forms, database orm, acl, templates etc etc you have to add this to the mini frameworks. ie the more 'add on's' you need, the less sense does a mini framework make.
Though the advantage of a mini framework is, that you can choose, what components you want to use by adding what you want. eg if you want TWIG as a template engine, add it. That way you can build a bigger framework which suits your needs and you feel comfortable with.

At least, that's my definition of it.

Ozan's avatar

@sukonovs You are totally wrong, it's better to use lumen if it's just a few pages. :(

1 like
sohelamin's avatar

@LeBlaireau you can use lumen for your few pages site cause it's features are quite larger than other micro-framework. But if you have any plan to extend the site in future then start it with laravel from now.

jekinney's avatar

You could use lumen, up to you.

I currently have a lumen app that runs scheduled command to get data from a huge (30 plus GB) database, manipulate the data and insert or update the database base for a laravel site.

After testing running the commands in the main app would cause some lag issues with slow loading pages. Not any more.

Plus if the way I get the data or requirements for how I manipulate the data changes I don't have to touch the main app. Just the lumen. It doesn't use any controllers or routes etc. Just artisan commands and a few models and eloquent queries with two helper classes for manipulating the data (sum, avg etc)

frezno's avatar

@sohelamin it's not about how many pages the app will have but what should be done/achieved
the tasks determine what to use not the size

sohelamin's avatar

@frezno yup I agree with you. I just said that lumen is bit larger than other microframework and laravel is regular platform to build any kind of application.

sukonovs's avatar

@Ozan Listen to podcast about Lumen, even creator of it says, this micro framework is NOT suitable for small sites. It is created for APIs, services.

http://lumen.laravel.com/docs/introduction#when-should-i-use-lumen

[...]Lumen is designed to build blazing fast micro-services and APIs.[...] [...]Lumen is also a great fit for building fast JSON APIs since these applications do not typically require many "full-stack" features such as HTTP sessions, cookies, and templating.[...]

For sites you NEED sessions, cookies and templating. Does speed improvements matter on brochure sites? NO! I hate when people just assumes something and shits in forums before doing a research.

davorminchorov's avatar

Laravel seems like a better choice for small apps. No matter how small the app is, there's always a possibility of change in features and growth.

BrianDillingham's avatar

For a static site, why use a PHP framework at all? Extract components into their own files for things like headers, footers, sidebars and use some PHP includes and do it all in HTML. The only other thing I can think of that you would use Laravel for would be handling contact form submissions, and at that point it is just overkill. HTML would be simpler and more performant

1 like
sukonovs's avatar

Things like templating, Forge deployment, route closures, Facades and ton familiar methods adds up in very small projects. It is not overkill, its clear development speed advantage.

BrianDillingham's avatar

@sukonovs I think you overlooked the point of what I am saying. It is a 8 page "brochure" website.

From Wikipedia

Simple forms or marketing examples of websites, such as classic website, a five-page website or a brochure website are >often static websites, because they present pre-defined, static information to the user.

There are 0 dev speed advantages to writing routes to view files when linking to the file directly in browser has the same outcome without the time spent loading a framework. "Templating" is just PHP includes, which I touched on in my previous post. Forge deployment? FTP and done on standard hosting. And it sounds like you are saying that PHP rendered HTML is easier than writing HTML, which I don't agree with. I am curiously not seeing a clear advantage..

sukonovs's avatar

@BrianDillingham If it is static page, yes of course nothing easier than just using HTML. I simply know what "staitc page" means in real life, "can we edit this title if we want" ? :)

BrianDillingham's avatar

The OP was likely considering Lumen for its speed advantages, in which case nothing is faster for a static site than HTML if its in fact static, which is what was being discussed so I didn't consider client edge cases, may not even be a client involved in this scenario :) But if there were, it may be cheaper or more profitable to do the static job at hand and upsell dev work later :)

Please or to participate in this conversation.