Fat-Free Framework Interview Questions and Answers - PHP Framework

Fat-Free Framework Interview Questions and Answers - PHP Framework

What Is Fat-Free Framework?
A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust web applications - fast!

Fat-Free Framework is an open source PHP framework, written by “Bong Cosca” from 2009 to now. The philosophy behind the framework and its approach to software architecture is towards minimalism in structural components, avoiding application complexity and striking a balance between code elegance, application performance and programmer productivity.

Fat-Free Framework is engineered specifically with usability and user experience as its primary design goals. Out comes a full-featured toolkit for web artisans that will make your daily work a lot easier, no matter if you're a beginner or expert.

F3 has stable enterprise-class architecture, unbeatable performance, user-friendly features and a lightweight footprint.

It is also community-driven software.

What Is Fair Licensing?
Fat-Free Framework is free and released as open source software covered by the terms of the GNU Public License (GPL v3).

What Are the F3 packaged with other optional plug-ins that extends its capabilities?
1.      Fast and clean template engine
2.      Unit testing toolkit
3.      Database-managed sessions
4.      Markdown-to-HTML converter
5.      Atom/RSS feed reader
6.      Image processor
7.      Geodata handler
8.      On-the-fly JavaScript/CSS compressor
9.      OpenID (consumer)
10. Custom logger
11. Basket/Shopping cart
12. Pingback server/consumer
13. Unicode-aware string functions
14. SMTP over SSL/TLS
15. Tools for communicating with other servers
16. Data Validation

What Are the Advantages of Fat-Free Framework?
1.      Full-featured toolkit
2.      Super lightweight code base with just ~65kb
3.      Easy to learn, use and extend

What Are the System Requirements of Fat-Free Framework?
F3 needs at least the following server configuration:

APACHE Web-Server:
1.      PHP 5.4 or higher
2.      PCRE 8.02 or higher (usually shipped with PHP package, but needs to be additionally updated on CentOS or Red Hat systems) mod_rewrite and mod_headers enabled
3.      GD library (for Image plug-in)
4.      cURL, sockets or stream extension (for Web plug-in)
5.      Nginx and Lighted configurations are also possible.

How To Install Fat-Free Framework?
In order to use the Fat-Free Framework, you need to install it into your project. I prefer to use the Composer package management solution, so this is what we use for the tutorials. You can find installation instructions using this link…

What Are the Features of Fat-Free Framework?
1.      Create Powerful Apps
2.      Write Less Code
3.      Blazing Fast Kick-start
4.      Rocket Science Included

What’s New In Fat-Free 3.6 Framework?
NEW: Log, added timestamp to each line
NEW: Auth, added support for custom compare method
NEW: cache tag support for mongo & jig mapper
NEW: Allow PHP functions as template token filters
NEW: Added Dependency Injection support with CONTAINER variable #221
NEW: configurable LOGGABLE error codes #1091
NEW: JAR.lifetime option
NEW: Recaptcha plug-in
NEW: Allow OPTIONS method to return a response body
NEW: [cli] request type
NEW: WebSocket server
NEW: until() method for long polling
NEW: abort() to disconnect HTTP client (and continue execution)
NEW: SQL Mapper->required() returns TRUE if field is not nullable
NEW: User-defined AUTOLOAD function
NEW: ONREROUTE variable


What Are the System Variables in Fat-Free Framework?
The lists of System Variables are:
1.      AGENT - Type: string, Read-only
2.      AJAX - Type: bool, Read-only
3.      ALIAS - Type: string
4.      ALIASES - Type: array
5.      AUTOLOAD - Type: string|array     Default: './'
6.      BASE - Type: string, Read-only     Default: auto-detected
7.      BODY - Type: string, Read-only
8.      CACHE - Type: bool|string     Default: FALSE
9.      CASELESS - Type: bool     Default: TRUE
10. CLI - Type: bool, Read-only
11. CONTAINER - Type: callable|Prefab|Psr
12. COOKIE, GET, POST, REQUEST, SESSION, FILES, SERVER, ENV - Type: array
13. CORS - Type: array
14. DEBUG - Type: integer     Default: 0
15. DIACRITICS - Type: array     Default: array(), empty array
16. DNSBL - Type: string     Default: '', empty string
17. EMOJI - Type: array     Default: array(), empty array
18. ENCODING - Type: string     Default: 'UTF-8'
19. ERROR - Type: array, Read-Only
20. ESCAPE - Type: bool     Default: TRUE
21. EXEMPT - Type: string     Default: NULL
22. EXCEPTION - Type: object     Default: NULL
23. FALLBACK - Type: string     Default: 'en'
24. FORMATS - Type: array
25. FRAGMENT - Type: string     Default: NULL
26. HALT - Type: bool     Default: TRUE
27. HEADERS - Type: array,Read-Only
28. HIGHLIGHT - Type: bool     Default: TRUE
29. HOST - Type: string,Read-Only
30. IP - Type: string,Read-Only, It is Remote IP address.
31. JAR - Type: array, It is Default cookie parameters.        
32. LANGUAGE - Type: string     Default: auto-detected
33. LOCALES
34. LOGS
35. ONERROR
36. ONREROUTE
37. PACKAGE
38. PARAMS
39. PATH
40. PATTERN
41. PLUGINS
42. PORT
43. PREFIX
44. PREMAP
45. QUERY
46. QUIET
47. RAW
48. REALM
49. RESPONSE
50. ROOT
51. ROUTES
52. SCHEME
53. SEED
54. SERIALIZER
55. TEMP
56. TIME
57. TZ
58. UI
59. UNLOAD
60. UPLOADS
61. URI
62. VERB
63. VERSION
64. XFRAME


Example for Hello, World
Time to start writing our first application:-
<?php
$f3 = require('path/to/base.php');
$f3->route('GET /',
    function() {
        echo 'Hello, world!';
    }
);
$f3->run();

You can find more examples on Github, https://github.com/topics/fat-free-framework
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

www.code-sample.com/. Powered by Blogger.
^