Fat-Free Framework is an open-source web framework distributed under the GNU General Public License. It is written in PHP.

Fat Free Framework interview questions

1) What is Fat-Free?

The Fat-Free is a powerful, open-source, and easy-to-use PHP micro-framework that is designed to help to build fast dynamic and robust web applications. It is distributed under the GNU General Public License and hosted by GitHub and Sourceforge.

2) Enlist few features of Fat-Free Framework?

Few features of Fat-Free Framework are listed below:

  • URL router
  • Cache engine
  • Support for multilingual applications
  • plug-ins that extend its functionality as well as data mappers for SQL and NoSQL database.
  • Characteristics to Create Powerful Apps
  • Write Less Code
  • Blazing Fast Kick-start
  • Rocket Science Included
  • Full-featured toolkit
  • Super lightweight code base with just ~65kb
  • Easy to learn, use and extend

3) List minimum requirement to install Fat-Free Framework?

Minimum system requirement to install Fat-Free Framework with APACHE Web-Server are listed below:

  • PHP 5.4 or higher
  • PCRE 8.02 or higher
  • GD library (for Image plug-in)
  • CURL, sockets or stream extension (for Web plug-in)
  • Nginx and Lighted configurations are also possible

4) What is F3?

F3 gives you a solid foundation, a mature code base, and a no-nonsense approach for writing Web applications.

5) Enlist few system variables available in Fat-Free Framework?

Few system variables available in Fat-Free FRamework are listed below:

  • AGENT - Type: string, Read-only
  • AJAX - Type: bool, Read-only
  • ALIAS - Type: string
  • ALIASES - Type: array
  • BASE - Type: string, Read-only Default: auto-detected
  • BODY - Type: string, Read-only
  • CASELESS - Type: bool Default: TRUE
  • CLI - Type: bool, Read-only
  • CONTAINER - Type: callable|Prefab|Psr
  • CORS - Type: array
  • DEBUG - Type: integer Default: 0
  • DNSBL - Type: string Default: '', empty string
  • ENCODING - Type: string Default: 'UTF-8'
  • ERROR - Type: array, Read-Only
  • ESCAPE - Type: bool Default: TRUE
  • FALLBACK - Type: string Default: 'en'
  • FORMATS - Type: array
  • HALT - Type: bool Default: TRUE
  • HEADERS - Type: array,Read-Only

6) What is Autoloader in F3?

Autoloader is a composer in Fat-Free Framework.

7) Enlist few template directives available in Fat-Free Framework?

Few template directives available in Fat-Free Framework are listed below:

  • “include” template directive
  • “exclude” template directive
  • “check” template directive
  • “repeat” template directive

8) How to include a text block in HTML?

You can create or include the text box by following steps:

  • <form>
  • Student Name:
  • <input type="text" name="Name">
  • <br> <br>
  • Course:
  • <input type="text" name="Course">
  • </form>

 

9) Please provide syntax to Connecting Database in Fat-Free Framework?

To connect to a MySQL database in Fat-FRee FRamework follow these syntaxes:

$db=new\DB\SQL('mysql:host=localhost;port=3306;dbname=mysqldb','username','password');
Connecting to a SQLite database would look like:
$db=new \DB\SQL('sqlite:/path/to/db.sqlite');
The 4th parameter is an array of options you can use to set additional PDO attributes: $options = array( \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, // generic attribute \PDO::ATTR_PERSISTENT => TRUE, // we want to use persistent connections \PDO::MYSQL_ATTR_COMPRESS => TRUE, // MySQL-specific attribute ); $db = new \DB\SQL('mysql:host=localhost;port=3306;dbname=mysqldb','username','password', $options);

10) How to perform transactions in Fat-Free Framework?

Use the code given below to perform transactions in Fat-Free Framework:

$db->begin();
$db->exec('DELETE FROM diet WHERE food="cola"');
$db->exec('INSERT INTO diet (food) VALUES ("carrot")');
$db->exec('SELECT * FROM diet');
$db->commit();

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.