n3k0lai / WebDevCourse

This contains the code for my web development course, CS418 - ODU Spring 2015
0 stars 0 forks source link

Add an HTML templating method #15

Open n3k0lai opened 9 years ago

n3k0lai commented 9 years ago

From my transition back from Meteor, I have my HTML templated. I still wish to use templates, and it would clean a lot of the mess from the PHP html echos. I am still leaning towards MVC methods, and I am considering utilizing Laravel. If I were to use it, this milestone would have me implement Blade along with the needed routing. My senior project is utilizing this system as well, allowing me to compress my workflow.

@machawk1 is this ok with you? If it is not, here are my other options, listed by order of preference:

  1. Jade utilized as is suggested here. It is very pretty, and the functionality fits the project.
  2. Handlebars, based off the classic Moustache templating system.
  3. Twig. Abrasive to look at, but easiest to slot in.
machawk1 commented 9 years ago

@CatLover91 Do you believe these will work with the Docker-based deployment system? I am not opposed to templating systems so long as I can evaluate your code. If you can include these systems as libraries rather than having to modify the system-level environment, that would be preferrable.

n3k0lai commented 9 years ago

From what I gather, Laravel can run from local files. The server dependencies are as listed:

I think Composer and Artisan are needed as well in order to handle packaging. They list Bower as situational.

Jade can run off a local install.

machawk1 commented 9 years ago

@CatLover91 Mcrypt, OpenSSL, Mbstring, and Tokenizer are enabled in the PHP configuration within the Docker environment. Please ensure that your code works there and include any dependencies locally with your code.

n3k0lai commented 9 years ago

Added in laravel in latest commit. Leaving this issue open to test docker deployment.

n3k0lai commented 9 years ago

Home page now presents itself locally. Still working through syntax errors for site interactions. @machawk1 I do not think the docker deployment engine is functioning as intended. When I dockerize my code, I am presented a directory of of what I assume to be all of the students' code. I did not look in the others, but my dockerized directory is out of date in comparison to my github, in combination with this concerning issue..

machawk1 commented 9 years ago

@CatLover91 - something changed on the docker machine's configuration again that required the repo's name to be quoted. It works now but simply spits out the directory listing for your code. There does not look to be an index.php file in your repo. What is the starting page?

n3k0lai commented 9 years ago

In customized installs, it will auto load. For a virtualized environment such as docker, you must navigate to /public/index.php. I assume this is due to an unset route configuration file. This can be configured for docker later on in the course.

n3k0lai commented 9 years ago

I forgot to mention, my /configuration/database.php file is set to connect through Xampp's settings for development. The database connection settings are listed in the file.

Dump="milestone2dump.sql" Host="localhost" Username="root" Password=""

I will switch the database settings to those used by docker tonight when I get off work.

n3k0lai commented 9 years ago

Db="ngcs418"

n3k0lai commented 9 years ago

I am still facing issues with Docker. My Docker directory is missing several core files that reside within my repo. dockerissue

machawk1 commented 9 years ago

@CatLover91, you did not specify which files you're missing but I noticed the public directory was missing from the directory listing returned from Apache on the docker machine.

screen shot 2015-03-25 at 11 23 27 am

The directory is present but does not display in the web listing.

screen shot 2015-03-25 at 11 23 37 am

Content in that directory should be publicly accessible, the directory is simply not displayed in the listing. This could be a precaution by Apache. It looks like there is an error in the index.php file, which causes Apache to spit out an error when accessing the public directory.

screen shot 2015-03-25 at 11 23 45 am

This is different than what would occur were the public directory non-existent; for example, if I try to access a non-existing directory, I get a 404 instead of an error.

screen shot 2015-03-25 at 11 23 50 am

n3k0lai commented 9 years ago

Is there any way to check the docker server error logs? If you do not want to allow students access (understandable for something that handles student evaluation), could I have access to your docker box to check logs locally?

machawk1 commented 9 years ago

@CatLover91, I updated the deployment system to make the logs for your container available. When deploying your code, you will see a link to a page to display the logs. link

Selecting the link should help you debug your code deployment.

log

n3k0lai commented 9 years ago

You no longer need to redirect to /public/ in order to hit the index.php as of commit ee9690286ead849e0a78e5971c48c73e87cc9a82

The database selection error was due to omission of the database checking line listed in your readme and has been fixed.

I am hitting a CRIT pid error with docker, more details described in #16