ohffs
ohffs
1 year ago (258,180 XP)

@MikeHopley and I used to think you were a serious dev too - how I was misled! You should go over to reddit and learn how the pro's do it... ;-p

MikeHopley

@ohffs Very kind of you, but I'm certainly not a "serious dev". Very much an amateur in fact.

Serious dev is serious

No can haz frameworkz

Serious dev cat

endian
endian
1 year ago (3,620 XP)

Having dependencies you aren't using makes a huge difference when maintaining a project. It adds unnecessary complexity. Programming is all about taming complexity, so when unnecessary complexity is added it's never good.

Anyone who's worked on long term projects, been air-dropped into one, or has hired programmers to work in one understands this.

Having a project that is built with the correct necessary components is easier to understand, more decoupled, has less glue code to put things together, has less chance of failing in the future when components can no longer be found, etc...

Frameworks are for helping you prototype and deliver your app, they are not your app.

For devs who don't have experience designing and structuring apps, I can understand why Laravel is used more than the prototyping platform it should be used as. It's not easy to engineer something, to choose the right components, to make them work together properly, etc... Having one size fits all solutions to engineering projects attacks the problems the wrong way (top down instead of bottom up), but arduino and Laravel show that some people need that crutch. And, that's perfectly fine.

For many, having a maintainable clean code base 2 years down the line is not important. They just want a site rolling tomorrow.

endian
endian
1 year ago (3,620 XP)

MikeHopley wrote - "Seriously, no harm at all. It makes bugger-all difference to performance in most cases."

Performance is not something you should even care about when starting a project, except in the rare cases you are building a performance critical app. What you should care about is building a properly designed app. Performance optimization is something you do at the end of the app creation cycle.

MikeHopley

Having a project that is built with the correct necessary components is easier to understand, more decoupled, has less glue code to put things together, has less chance of failing in the future when components can no longer be found, etc...

I can relate to that.

I use several packages in my application. I use them because it would take me much longer to write everything myself, and in many cases they are better designed than what I would have made.

For example, I use a markdown parser. It makes no sense for me to write this myself. It would take me ages, and I would never do as good a job as this package.

However, I don't like to install a million tiny packages for every little task. In several cases, I have found my application was improved by removing packages and reducing dependencies. It's about finding a sensible balance.

Now what about Laravel? Laravel is a bit different. As a web application framework, it solves many common problems. For example, almost any application will want a routing layer.

It's possible to decouple your application logic thoroughly from Laravel -- even in your controllers, by being strict about injecting services. I haven't bothered with this, but even so I don't think it would be horrendously difficult to swap Laravel for another framework, or indeed a collection of framework components (which is what Laravel actually is).

Here are two extremes of development:

  • Use a package for everything. Avoid writing your own code whenever possible.
  • Write everything yourself, even the framework stuff ("not invented here" development).

Both of these extremes are silly. Purely package-based coding is unlikely to fulfil the unique needs of your project, and creates a "house of cards" with too many unnecessary dependencies. But "not invented here" development means you do a huge amount of work solving common problems that have already been solved many times over.

but arduino and Laravel show that some people need that crutch.

Frankly, I think that is a patronising and pompous thing to say.

For many, having a maintainable clean code base 2 years down the line is not important. They just want a site rolling tomorrow.

I switched from my custom "spaghetti code" codebase to using Laravel precisely because I wanted a maintainable and clean codebase.

Now, Laravel didn't solve everything; I needed to learn to code better for that -- thanks Jeffrey! Laravel provided a useful foundation, and helped a lot with organisation.

endian
endian
1 year ago (3,620 XP)

You're making a false dichotomy between custom "spaghetti code" and Laravel. There's a huge world in-bewteen. Your pointing out the two extremes.

Custom "spaghetti code" is like trying to build a car by making all the parts yourself. Laravel is like building a car from another car.

You should not reinvent the wheel. That's bad. We agree. At the same time, your project should have as little dependencies as possible.

The reason I compared Laravel and Arduino is because they are prototyping platforms. They both have everything you need for plug and play.

The chances are your app will not require everything that is in Laravel, and there's also a huge chance that some modules don't give you the type of functionality your app needs. They are generalized solutions so that many people can use them, because of this, the code is more bloated to cover more corner cases. The auth for example is quite complex, has many files, etc.. Many you have an app that needs all that, maybe you have an app that only requires a very simple auth, in that case another package might be better.

Engineers build from the ground up using what they need for an app, This package + that package, etc... If you read the article I posted earlier it explains clearly how a framework is at the other end of the complexity scale. It's like starting with an app, then using only part of that + custom code to make another app.

I don't think it's pompous to say some people need Arduino or Laravel (perhaps I should not have used the word crutch, I'll give you that). Not everyone can build a circuit or roll out his own mini framework by assembling different packages. And for prototyping it makes no sense to do that. You want an app done as fast as possible to test the idea. In such a case, maintenance is not that important. You rewrite after using something like Slim3 + the packages you really need. Keeping this tight and maintainable for a long time.

endian
endian
1 year ago (3,620 XP)

About the serious dev bit. A quick way to know if you're a serious dev is to be honest with yourself and ask questions like:

Did I dabble with many different languages and frameworks before choosing PHP and Laravel for my web dev career, or did I just pick PHP cause it was easy, did some spaghetti code, then chose Laravel cause others said it was good. In other words, are you basing your career on choosing PHP + Laravel for valid reasons (I'm sure there are some) after having tried different alternatives?

After I decided to use Laravel as my main web dev framework, my bread and butter for my career, did I take many days to read Laravel's entire source code to understand it as much as possible?

A person who uses Laravel on a daily basis to make websites without ever having read Laravel's source is not a serious dev in my opinion. And, I'm sure many are doing just that.

MikeHopley

All seems rather unhelpful and superior to me.

You're almost certainly a better and more serious dev than I am. Congratulations. Can I go now?

endian
endian
1 year ago (3,620 XP)

Talking about coding structures, best practice, etc... is extremely useful. Question whether a framework should be used or not, etc... extremely useful.

This is not a competition about who it better or not. Not sure why you think that? I'm by no means a great dev. I have tons of things to learn. Learning on a daily basis. There are good chances you are a much better programmer than I.

Of course you can go. No one is forcing you to have this discussion.

endian
endian
1 year ago (3,620 XP)

Were you offended because I criticized Laravel? I think that's healthy no? It's just a framework, not the be all and end all of web development. Just a tool. It has great advantages and great disadvantages like any other tool.

StefanVoinea

Choosing a framework can be a personality problem too.I recommend to choose the framework that you feel comfortable from the start.

Screenbeetle

@endian

Can I get you started on your thoughts about using Wordpress for a project?

endian
endian
1 year ago (3,620 XP)

It depends on the project. Wordpress certainly has its uses. You don't want to re-invent the wheel, so if Wordpress provides what you need for a certain project, go for it.

Vineky
Vineky
1 year ago (26,710 XP)

Choosing a framework can be a personality problem too.I recommend to choose the framework that you feel comfortable from the start.

Not really. I've learn only 3 framework, CodeIgniter, Zend Framework and Laravel.

My favorite is still Zend, maybe because i've used it for many years when i'm pretty new in the laravel world (start with version 4) but I still use it only because people say "laravel is the best framework". So like a sheep i go for it ^_^ .

Ruffles
Ruffles
1 year ago (297,250 XP)

@endian Most of the features Laravel offers are used in bigger-than-just-a-blog projects at some point of the project's development cycle. If you work on an ERP / CRM app for a while, you'll notice that.

The only reason I am using a framework is because I wanna finish the project on time before the deadline hits. I could build everything from scratch but it will take a lot of time and effort. I might get stuck at some point but the client won't be like "Good job man, you are a serious developer. You are not using a framework".

All clients care about is a working project, they don't really care about the technical stuff. It's up to the developers to make their life easier.

Please sign in or create an account to participate in this conversation.