Difference between revisions of "6CS028 Workshop - Web Frameworks"

From mi-linux
Jump to navigationJump to search
 
(190 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Main Page]] >> [[6CC001|Advanced Web Technologies]] >> [[6CC001 - Workbook|Workbook]] >> Week 02
+
[[Main Page]] >> [[6CS028|Advanced Web Development]] >> [[6CS028 - Workbook|Workbook]] >> Week 03
  
Consider using a PHP framework for your assessment. Here are some popular ones:
+
== PHP Web Frameworks and databases ==
  
==CodeIgniter ==
+
=== CodeIgniter ===
  
*[http://codeigniter.com/ CodeIgniter homepage]
+
This week, go through the following steps of the tutorial:
*[http://ellislab.com/codeigniter/user-guide/tutorial/static_pages.html Getting started tutorial]
+
* [https://codeigniter.com/user_guide/tutorial/news_section.html News Section]
 +
* [https://codeigniter.com/user_guide/tutorial/create_news_items.html Create News Items]
  
==Yii==
+
Then read the following sections of the documentation, to consolidate the above:
 +
* [https://codeigniter.com/user_guide/database/index.html Working With Databases]
  
*[http://www.yiiframework.com/ Yii homepage]
+
=== Laravel ===
  
==CakePHP==
+
This week, read the following sections of the documentation:
 +
* [https://laravel.com/docs/10.x/database Database]
  
*[http://cakephp.org/ CakePHP homepage]
+
And work through the remaining sections of the Bootcamp tutorial:
*[http://book.cakephp.org/2.0/en/getting-started.html Getting started tutorial]
+
* [https://bootcamp.laravel.com/inertia/editing-chirps Editing Chirps]
 
+
* [https://bootcamp.laravel.com/inertia/deleting-chirps Deleting Chirps]
===mod_rewrite===
+
* [https://bootcamp.laravel.com/inertia/notifications-and-events Notifications & Events]
 
 
Note that because of the way mod_rewrite is set up on the server you need to '''add a RewriteBase line''' in the '''existing''' .htaccess file, as follow:
 
 
 
<pre>
 
<IfModule mod_rewrite.c>
 
  RewriteEngine on
 
  RewriteBase /~0123456/cake
 
  RewriteRule    ^$ app/webroot/    [L]
 
  RewriteRule    (.*) app/webroot/$1 [L]
 
</IfModule>
 
</pre>
 
 
 
IMPORTANT: Replace "0123456" with your student number and "cake" by the folder in which you have uploaded the framework.
 
 
 
Alternatively you could NOT use mod_rewrite, the tutorial above tells you how (see "A Note on mod_rewrite" section)
 
 
 
===Cache===
 
 
 
If you are getting the following error message:
 
 
 
<pre>
 
Warning: _cake_core_ cache was unable to write 'cake_dev_en-gb' to File cache in /studhome/staff/acad/in9352/public_html/cake/lib/Cake/Cache/Cache.php on line 309
 
</pre>
 
 
 
You need to make the "app/tmp" folder (and all its sub-folders) '''writable''' by all in order to solve this.
 
 
 
If you are still getting cache errors/warnings after this, it might be because the version of PHP running on the server is too old, and caching doesn't work (we have 5.2.4 and the documentation says it should be 5.2.8 or more). You could always disable the cache in the Config/core.php file. Simply '''remove''' the following blocs located at the bottom of the file.
 
 
 
<pre>
 
/**
 
* Configure the cache used for general framework caching.  Path information,
 
* object listings, and translation cache files are stored with this configuration.
 
*/
 
Cache::config('_cake_core_', array(
 
'engine' => $engine,
 
'prefix' => $prefix . 'cake_core_',
 
'path' => CACHE . 'persistent' . DS,
 
'serialize' => ($engine === 'File'),
 
'duration' => $duration
 
));
 
 
 
/**
 
* Configure the cache for model and datasource caches.  This cache configuration
 
* is used to store schema descriptions, and table listings in connections.
 
*/
 
Cache::config('_cake_model_', array(
 
'engine' => $engine,
 
'prefix' => $prefix . 'cake_model_',
 
'path' => CACHE . 'models' . DS,
 
'serialize' => ($engine === 'File'),
 
'duration' => $duration
 
));
 
</pre>
 
 
 
Not ideal though :/
 
 
 
==Symfony==
 
 
 
*[http://symfony.com/ Symfony homepage]
 
 
 
==Akelos==
 
 
 
*[http://www.akelos.org/ Akelos homepage]
 
 
 
==Zend Framework==
 
 
 
*[http://framework.zend.com/ Zend Framework homepage]
 
 
 
'''IMPORTANT''': So far I have not managed to successfully install Zend on mi-linux :(
 

Latest revision as of 12:44, 17 January 2024

Main Page >> Advanced Web Development >> Workbook >> Week 03

PHP Web Frameworks and databases

CodeIgniter

This week, go through the following steps of the tutorial:

Then read the following sections of the documentation, to consolidate the above:

Laravel

This week, read the following sections of the documentation:

And work through the remaining sections of the Bootcamp tutorial: