Coding without a Framework

Cosmic

Manners maketh man
Joined
Jul 4, 2009
Messages
12,888
Reaction score
951
FP$
29
Do you do this very often?

By that, I mean designing a website from scratch. No framework, no template, nothing. Instead of using MVC, you can use PHP includes like this:

Code:
<?php chdir(".."); require_once("inc/header.php"); ?>
<!-- Page goes here -->
<?php require_once("inc/footer.php"); ?>

It's actually a pretty simple way to code websites. I use it pretty frequently, especially when no login is needed.

What about you?
 
Still to this day, I code websites from the very foundations (blank canvas), to their completion. Until I have no other choice, I have no interest in "web builders" or "pre-structured/pre-designed" templates.

All the best,
Cal 🙂
 
I use them only when giving a job where a site uses. Other then that, i basically upgrade my code ir modify it as new things cone out which sort if is like its own Framework, but way more simplified.
 
I will for quick static projects where the functionality is limited to a contact page or something. I used to do everything from scratch, but now all my bigger PHP projects use a framework. Abstraction from the database and the convenience of migrations are huge for me that I could no longer live without.

Calman said:
Still to this day, I code websites from the very foundations (blank canvas), to their completion. Until I have no other choice, I have no interest in "web builders" or "pre-structured/pre-designed" templates.
At least given how you talk about them, I think you may not understand what frameworks are helpful for. While I would agree they're bulky for large projects, web frameworks implement an MVC model and provide useful common utilities with writing for the "modern web" in mind. You can still do all the same things with them, but they force organization and a readable pattern.

If you like to develop and you haven't used a framework before, I would highly recommend taking a look at Laravel.
 
Actually, I think I have it covered, but thanks for your informative input anyway Carson! 😉

All the best,
Cal 🙂
 
Cosmic said:
Do you do this very often?

By that, I mean designing a website from scratch. No framework, no template, nothing. Instead of using MVC, you can use PHP includes like this:

Code:
<?php chdir(".."); require_once("inc/header.php"); ?>
<!-- Page goes here -->
<?php require_once("inc/footer.php"); ?>

It's actually a pretty simple way to code websites. I use it pretty frequently, especially when no login is needed.

What about you?
that is pretty much how I code a website, cept I make my own theme system and i do use classes and function files. Best way to put it is I use my own framework. but for showing header and footer i use a class and some methods to do that for me.
 
Yes, i do it all the time.

Include for the header
Include for the footer
Include all the fuctions
And the main content, right there for each page
 
If I am doing a small site, I will do something similar.

I use the main template, and include "content.php"; where the content goes and have it decide what content pages are needed to run/display IF ALL my pages are ran from index.php which they usually are..
 
Back
Top Bottom