Webdesign MVC - going in the right direction?


I am trying to learn webdesign using the MVC design pattern. Right
now, I am stuck at a point where my code gets more complex, and I am
unsure about the structure and where to put which code parts.



I started with an index.php file as my controller, which right now
does not much more than loading the Slim framework to render the
different views



$app->get('/', function() use ($app){  
$app->render('header.php');
$app->render('content.php');
$app->render('footer.php');
});
$app->run();


Then I built a complex content.php where I do a lot of form data
logic,
reading from a server directory, and echoing the results mixed with
html tags. That surely will violate the MVC pattern, right?



What is the general approach to this? Should I put all the logic
inside the index.php, store the results in an array, and pass that to
the framework's render function, like this:



$app->get('/', function() use ($app){ 

//Do something and store results in an Array

$app->render('header.php', anArray());
$app->render('content.php', anArray());
$app->render('footer.php', anArray());
});
$app->run();


How can I prevent index.php becoming too complex when doing so? Is
there a different approach to take?

where can I go to find cheap webdesign? I was looking and everything
is over $100, I'm thinking of starting a small business and have next
to no money to start it but I need a website. Is there anyplace I can
go for a CHEAP website? I already have hosting and my design needs are
very simple. If I can't go any place to get one cheap enough is there
any place I could go were I could negotiate with people i.e $30 + 5%
of my company.
Ubuntu
For anyone interested in web design, Ive created a (still beta) site
for ya. lemme know what you think! -> http://webdesignforums.tk
Ubuntu
Hi I was wondering if any website designers want to help me create a
site, or if anyone could point me to any good tools. I have a killer
website idea but no skillz or money. Mainly looking for tools I guess,
unless someone wants to build it :P
Ubuntu
This summer I'm going to set up a little webserver at home and start
focussing on webdesign.
Now my question is if anyone knows any
good forums to sign up at. I'm looking for forums which are helpful,
loaded with info and with a nice community. Sort of like this one, but
revolving around webdesign.
Mainly looking for php-, perl-, JS
forums. Perhaps a place for the visual aspect of it all too. />Thanks in advance :)
Ubuntu
I wanted to begin blogging so I got a domain then a host and I am
using Wordpress 4.1 to design and as an interface for my site.



Site I am referencing: target="_blank" class="externalLink"
rel="nofollow">www.livetouplift.com




I have firebug but I don't know much about how to use it. I would
like the secondary navigation/ the buttons that say "Home",
"Contact Me" to have their own colors. I kind of wanted them
to be like the colors of the uplift logo- grey and black. Or I wanted
to add an "About Me" page and have the colors transition
from black...



href="https://forums.digitalpoint.com/threads/i-know-next-to-nothing-about-webdesign-assistance.2742554/"
target="_blank" class="internalLink">I know next to nothing about
webdesign. Assistance?
Webmasters

I am trying to learn webdesign using the MVC design pattern. Right
now, I am stuck at a point where my code gets more complex, and I am
unsure about the structure and where to put which code parts.



I started with an index.php file as my controller, which right now
does not much more than loading the Slim framework to render the
different views



$app->get('/', function() use ($app){  
$app->render('header.php');
$app->render('content.php');
$app->render('footer.php');
});
$app->run();


Then I built a complex content.php where I do a lot of form data
logic,
reading from a server directory, and echoing the results mixed with
html tags. That surely will violate the MVC pattern, right?



What is the general approach to this? Should I put all the logic
inside the index.php, store the results in an array, and pass that to
the framework's render function, like this:



$app->get('/', function() use ($app){ 

//Do something and store results in an Array

$app->render('header.php', anArray());
$app->render('content.php', anArray());
$app->render('footer.php', anArray());
});
$app->run();


How can I prevent index.php becoming too complex when doing so? Is
there a different approach to take?

Programming Languages

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow