×

Top 30 TurboGears Framework Interview Questions for 2024

1) What is TurboGears Framework?

TurboGears is a Python Framework. It is used to create rapid web application. It consists of several WSGI (Web Server Gateway Interface) components. It is developed by Kevin Dangoor in 2005.

2) In which language TurboGears was written?

TurboGears was written in Python programming language.

3) What is MVC (Model View Controller) in TurboGears?

MVC model is a software design pattern. It is used to develop web applications. It consists of three parts:
  • Model: It is a business entity which is used to represent the application data.
  • View: It is the presentation layer of MVC.
  • Controller: Request sent by the user always scatters through controller and its responsibility is to redirect to the specific view using View () method.

4) What is the stable version of TurboGears?

The stable version of TurboGears is 2.3.10 and released on 4 December 2016.

5) What are the latest libraries and tools to built TurboGears?

There are various libraries and tools to built TurboGears that are:
  • SQLAlchemy
  • Genshi
  • ToscaWidgets
  • Gearbox

6) What is SQLAlchemy in TurboGears?

In TurboGears, SQLAlchemy is an open source SQL kit that provides Object relation mapping (ORM) for Python code.

7) What are the TurboGears project directories?

TurboGears project directories are listed below table:
Config It is used to project setup and configuration.
Controllers It manages controller the logic of web application.
i018n It supports the languages of translation files.
Lib It provides utility python functions and classes.
Model: It contains database models.
PublicStatic Files It contains CSS, JavaScript and images.
Templates It manages the templates exposed by our controllers.
Tests It is used to test the project.
Websetup It provides the function to execute at application setup.

8) What is the default files installed at the time of project set up?

The following default files are installed at the time of project set up:
  • Beaker
  • Genshi
  • zope.sqlalchemy
  • sqlalchemy
  • alembic
  • repoze.who
  • tw2.forms
  • tgext.admin = 0.6.1
  • WebHelpers2
  • babel

9) What are the default port supported by TurboGears?

TurboGears supported by default port 8080.

10) What are the HTTP methods of TurboGears?

HTTP methods of TurboGears are:
HTTP Methods Descriptions
GET It is used to sends data in unencrypted form to the server.
HEAD It is same as GET
POST It is used to send HTML form data to server.
PUT It replaces all current representations of the target resource with the uploaded content.
DELETE It removes all current representations of the target resource given by a URL

11) What is the use of ToscaWidgets2 and its module?

ToscaWidgets2 is used to define the form field into Python script and render them into a HTML Template. The following modules are:
  • tw2.core: It provides core functionality.
  • tw2.forms: It is a basic forms library that contains widgets for fields, field sets and forms.
  • tw2.dynforms: It contains dynamic forms functionality.
  • tw2.sqla: It is an interface for SQLAlchemy database.

12) What are the various validator classes in TuroGears?

There are various validator classes in TurboGears:
Types of Validators Descriptions
LengthValidator It is used to check prescribe length.
RangeValidator It is used to check the range of the field.
IntValidator It is used to validate the integer types data.
OneOfValidator It is used to select a value from the available options in the list only.
DateValidator It avoids the user to input an invalid date.
EmailValidator It avoids the user to input an invalid email.
UrlValidator It validates the user input for a valid URL.
MatchValidator It is used to confirm whether the value of field is matched with the other.

13) What is ORM in TurboGears?

In TurboGears, ORM stands for Object Relational Mapping. It is a technique of mapping object parameter to underlying RDBMS table structure.

14) What are the CRUD Operations Methods in TurboGears?

In TurboGears, The CRUD operation methods are:
  • DBSession.add(model object): It is used to insert a record into mapped table.
  • DBSession.delete(model object) : It is used to delete the records from the table.
  • DBSession.query(model).all(): It is used to retrieve all the records from table.

15) What are Paginations in TurboGears?

TurboGears provides a convenient decorator called paginate(). It is used to divide the output in the pages. The number of records per pages is decided by value of items_per_page attribute.

16) Which template engine is used to construct the front-end of TG application?

Genshi template engine is used to construct the front-end of TG application.

17) Which method is used to map the root of our first application?

Index() method is used to map the root of our first application.

18) Which package is used to create of web widgets directly from the database schema?

Sprox package is used to create of web widgets directly from the database schema.

19) Which database supports TurboGears?

TurboGear supports MongoDB and SQL dbms database.

20) What are the PyMongo tools to work with MongoDB?

There are various PyMongo tools to work with MongoDB that are listed below: Declarative Models
  • Schema Validation and Conversion
  • Schema Evolution
  • Pure InMemory MongoDB Implementation
  • Unit of Work
  • Identity Map
  • One-To-Many, Many-To-One and Many-To-Many Relations

21) What are the ways to plug behavior inside the existing application in TurboGear?

In TurboGear, there are three ways to plug behavior inside the existing application.
  • Hook
  • Controller Wrapper
  • Application Wrapper

22) Which command is used to create a pluggable application?

The following code is used to create a pluggable application.
gearbox quickstart-pluggable plugtest

23) What is a RestController in TurboGear?

In TurboGear, RestController is a mechanism to access the request's method like GETPOSTPUTand many more.

24) Which method is used to render the page in TurboGear?

In TurboGear, @expose() decorator method is used to render the [age.

25) What is Kajiki in TurboGear?

In TurboGear, Kajiki provides a XML-based template language. It is inspired by Kid and Genshi.

26) How can we create a Text Field object?

We can create a Text Field object by using following constructor.
twf.TextField(size, value = None)

27) What is the default port of TurboGear?

The default port of TurboGear is 8080.

28) What is Scaffolding?

Scaffolding is the process of creating a new component of our web application through a template or preset.

29) How to create an Extension in TurboGear?

The following code is used to create an Extension in TurboGear.
$ gearbox tgext -n myextension -a "My Name" -e "my@email.com"

30) How to store Flash Message?

The following code is used to store Flash Message.
tg.flash('Message', 'status')

31) How to create TurboGear admin?

TurboGear admin is created as object of AdminController class. Example:
from tgext.admin.controller import AdminController  
class RootController(BaseController):  
   admin = AdminController(model, DBSession, config_type = TGAdminConfig)

32) What is Repoze in TurboGear?

In TurboGear, Repoze is used to handle security (identification and authentication). Users can define authorization rules based on predicates attached to controllers

Related Topics

Top 25 CoffeeScript Interview Questions for 2024

1) What is CoffeeScript? It is a language that compiles into JavaScript. CoffeeScript is an attempt to expose good parts of JavaScript so, that user can code more easily. 2) Name the...

3 minutes read.

Top 15 Hadoop Interview Questions for 2024

1) What is Hadoop? Hadoop is a framework which is used to store and process Big Data. It is a distributed computing platform and helps in analyzing Big Data. 2) What are the...

2 minutes read.

Top 15 C Interview Questions for 2024

1) What are different storage class specifiers in C? Register,auto, static, extern are the storage class specifiers in C. 2) What is scope of a variable? How are variables scoped in C? Scope...

3 minutes read.

Top 16 Arduino Interview Questions for 2024

1) What is Arduino? Arduino is an open source electronic platform. It is based on easy-to-use hardware and software. It able to read input signal. It is used to write and...

2 minutes read.

Top 29 Phalcon Framework Interview Questions for 2024

1) What is Phalcon? Phalcon is an open source framework based on the MVC (Model-View-Controller) pattern. It is the combination of PHP and C language. It is developed by Andres Gutierrez...

6 minutes read.

Top 15 VBA Interview Questions for 2024

1) What is VBA? VBA stands for Visual Basic Application. It is an event-driven programming language. It is mainly used with Microsoft Office applications such as MS -Excel, MS-Word and MS-Access. 2)...

3 minutes read.

Top 30 Go Programming Language Interview Questions for 2024

1) What is Go Programming language? Go programming language is an open source programming language. It is developed at Google in 2007. It is designed for system programming language. 2) Who designed...

4 minutes read.

Top 16 OpenStack Interview Questions for 2024

Most Frequently Asked OpenStack Interview Questions and Answers for Freshers 1. Describe OpenStack. OpenStack is designed as the future of cloud computing and developed as free and open-source software that facilitates a...

8 minutes read.

Top 28 LISP Interview Questions for 2024

1) What is LISP? LISP is the high-level programming language after Fortran. LISP is stands for List Processing. This programming language was invented by John McCarthy in 1958 at the Massachusetts Institute of...

3 minutes read.

Top 25 jQuery Interview Questions for 2024

Most Frequently asked jQuery Interview Questions and Answers for Fresher and Experienced 1) Define Find and Children Method? In DOM tree if you have to find all the method we use Find...

4 minutes read.

Top 15 XHTML Interview Questions for 202

1) What is XHTML? XHTML (Extensible Hyper Text Markup Language) it is similar to the HTML but has some strict rule than HTML. It is said to be HTML defined as...

3 minutes read.

Top 31 Flask Interview Questions for 2024

1) What is Flask? Flask is a micro web framework written in Python. It is based on Werkzeug toolkit and Jinja 2 template engine. 2) Who is the developer of Flask? Armin Ronacher...

6 minutes read.

Top 30 FuelPHP Framework Interview Questions for 2024

1) What is FuelPHPFramework? FuelPHP Framework is an open source web application and written in PHP scripting language. It is based on the HMVC (Hierarchical Model View Controller) design pattern. It was released...

6 minutes read.

Top 26 SEO Interview Questions for 2024

Most Frequently asked SEO Interview Questions and Answers for Fresher and Experienced 1) What is SEO? SEO stands for Search Engine Optimization. It is a set of processes followed by website owners...

4 minutes read.

Top 30 TurboGears Framework Interview Questions for 2024

1) What is TurboGears Framework? TurboGears is a Python Framework. It is used to create rapid web application. It consists of several WSGI (Web Server Gateway Interface) components. It is developed...

5 minutes read.

Top 15 Java Collections Interview Questions for 2024

1) What is Collections in Java? It is a framework which is used to store and manipulate the group of objects. 2) What are the commonly used methods of Collection interface in...

2 minutes read.

Top 30 Zend Framework Interview Questions for 2024

1) What is Zend Framework? Zend is an open source, object-oriented web application framework. It is implemented in PHP 5. It was developed in 3 March 2006. 2) What is the use...

6 minutes read.

Top 20 C Programming | Coding Interview Questions for 2024

Most Frequently asked C programming | Coding Interview Questions and answer for Fresher C is a powerful high-level programming language.  It is a fast, portable and available for all platforms. C...

15 minutes read.

Top 30 DBMS Interview Questions for 2024

1) What is DBMS? DBMS (Data Base Management System) is a technology for managing data of database i.e. Create, Update, Delete, Alter. 2) What is a Database System? It is defined as collection...

4 minutes read.

Top 18 UiPath Interview Questions for 2024

RPA UiPath Interview Questions and Answers for Fresher  1. What is RPA? RPA is an acronym for Robotic Process Automation. Robotic In RPA, Robotic is termed as an entity or machine which tries to...

7 minutes read.