×

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 GET, POST, PUTand 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 Android Interview Questions for 2024

1) What is Android? It is a software package and open-source operating system that is used in mobile devices. It is also a Linux kernel-based system operating system and application executes within...

3 minutes read.

Top 14 Materialize CSS Framework Interview Questions for 2024

1) What is Materialize? Materialize is a CSS framework that contains library file. It is created with CSS, JavaScript and HTML. It helps to create attractive, reliable and functional web pages...

7 minutes read.

Top 40 IoT Interview Questions and Answers in 2024

Q.1 What is IoT? IoT stands for the Internet of things refers to the interconnection of the network of various devices that can recognize, collect and transfer data over the internet...

13 minutes read.

Top 28 Prototype Interview Questions for 2024

1) What is Prototype? Prototype is a JavaScript framework which is used in dynamic web applications. It is a namespace and a module that is used to manage HTML forms. It is also...

4 minutes read.

VB.NET Interview Questions

1) What is VB.NET? VB.NET stands for Visual Basic .NET. It is an object oriented programming language. It is implemented on .NET framework and launched by Microsoft in 2001. 2) Who is...

3 minutes read.

Top 15 ASP.NET MVC Framework Interview Questions for 2024

1) What is ASP.NET MVC Framework? ASP.NET MVC framework is a software architecture pattern for developing web applications. It is used to split the application's implementation logic into three components: models,...

4 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 15 Bootstrap Interview Questions for 2024

1) Explain what is Bootstrap? It is a Framework which is used for building the web application with minimal effort. Bootstrap is also used for developing responsive, mobile-first web sites. 2) What...

10 minutes read.

Bugzilla interview Questions

Frequently asked questions about Bugzilla Q1. What are reports in Bugzilla? A1. Reports can be defined as an interface between the user and the database of Bugzilla. It helps to examine and...

4 minutes read.

Top 25 MySQL Interview Questions for 2024

1) What is MySQL? MySql is defined as multi-user DBMS which is built and distributed my MySQLab now acquired by Oracle Co. 2) Enlist the features of MySQL. Cross-Platform Support Wide range...

3 minutes read.

Top 30 JSF Interview Questions for 2024

1) What is JSF? JSF stands for Java Server Faces is a Java-Based web application framework. JSF (Java Server Faces) provides a facility to connect UI widgets with data sources. 2) What are...

4 minutes read.

Top 15 Meteor Interview Questions for 2024

1) What is Meteor or MeteorJS? Meteor is a JavaScript platform used for developing web and mobile applications. Applications develop using Meteor framework supports different platforms (like windows, android, ios). Meteor...

4 minutes read.

Symfony PHP Framework Interview Questions

1) What is Symfony? Symfony is an open source, web application framework. It is written in PHP and used to design PHP applications. It was first released on18 October, 2005. 2) What...

5 minutes read.

Top 25 PL/SQL Interview question for 2024

1) What is PL/SQL? It is defined as SQL having Procedural features of Programming Language i.e. Procedural Language extension of SQL. 2) Enlist the section of PL/SQL block. It consist of three block ...

4 minutes read.

Top 14 Material Design Lite Interview Questions for 2024

1) What is Material Design Lite? Material Design Lite is UI component Library. It is created with CSS, JavaScript and HTML. It is used for design purpose. It is developed by...

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 AWS Interview Questions for 2024

1) What is AWS? AWS stands for Amazon Web Services. It is a cloud web hosting platform that offers flexible, scalable, reliable, easy-to-use, and cost-effective solutions. 2) What is Cloud Computing? It is...

2 minutes read.

Top 30 Sencha Touch Interview Questions for 2024

1) What is Sencha Touch? Sencha Touch is an UI (User Interface) JavaScript library. It is written in JavaScript. It is used to build mobile interface quickly and easily. It works...

6 minutes read.

Top 15 JCL (Job Control Language) Interview Questions for 2024

1) What is JCL? JCL refers to Job Control Language. It is a command language which describes job (unit of work) for the Multiple Virtual Storage (MVS) operating system. It is...

3 minutes read.

Top 10 WCF Interview Questions for 2024

  1. What is WCF? Windows Communication Foundation (WCF), earlier known by the name Indigo, is a run-time platform and a set of APIs in the .NET Framework for building, configuring, and...

7 minutes read.