Language BasicsLanguage Basics

This page is part of an incremental translation project. Body text not yet translated to Turkish falls back to English even in TR mode.

Bu bölüm, TROIA Programlama Dilinin konseptlerini ve key term'lerini tanıtmayı amaçlar. Alt konuların çoğu ilerleyen bölümlerde detaylıca ele alınacaktır.This section aims to introduce concepts and key terms of TROIA Programming Language. Most of subtopics will be discussed in detail in next chapters.

Basic Language ElementsBasic Language Elements

ClassClass

TROIA, object oriented bir dildir, bu yüzden programcıların bir task'ı yerine getirmek veya bir business entity'yi modellemek için class tanımlamasına izin verir. Diğer object oriented dillerde olduğu gibi, class'ların member'ları ve method'ları vardır, inheritance ve encapsulation'ı destekler.TROIA is an object oriented language, so it allows programmers to define classes to perform a task or model a business entity. Like any other object oriented language, classes have members and methods and they support inheritance and encapsulation.

TROIA class'ları her türlü business entity'yi ve davranışlarını modelleyebilse de, class'lar genellikle bir TROIA programming convention olarak method setleri şeklinde kullanılır. TROIA Programcıları, table kullanmanın avantajları nedeniyle genellikle bir entity'nin field'larını saklamak için table kullanır.Although TROIA classes able to model any kind of business entity and its behaviours, classes are usually used as a set of methods as a TROIA programming convension. TROIA Programmers usually use tables to store an entity’s fields because of advantages of using tables.

DialogDialog

Dialog, bir web form veya swing dialog gibi bir task'ı yerine getirmek için tasarlanmış bir user interface form'udur. Genellikle dialog, textfield, button, combobox, checkbox, table, chart gibi basit veya complex TROIA control'lerinin bir kombinasyonudur.Dialog is a user interface form designed to perform a task on, like a web form or a swing dialog. Usually, dialog is a combination of simple or complex TROIA controls such as textfields, buttons, comboboxes, checkboxes, tables, charts etc.

Dialog'ların class'lara benzer method'ları vardır, bu yüzden TROIA programcıları dialog'lar üzerinde method tanımlar ve çağırır. Ayrıca önceden tanımlı event'leri vardır. Event'ler, "form load", "button clicked" gibi belirli bir action gerçekleştiğinde TROIA runtime tarafından çağrılan TROIA method'larıdır.Dialogs have methods similar to classes, so TROIA programmers define and call methods on dialogs. Additionally they have predefined events. Events are TROIA methods which are called by TROIA runtime when a specific action performed like “form load”, “button clicked” etc.

TROIA screenshot

ComponentComponent

Programcılar, farklı dialog'lar için mevcut kodları kopyalayıp yapıştırmaktan kaçınmak amacıyla bir control setini farklı dialog'larda yeniden kullanmaya ihtiyaç duyabilir. Custom bir TROIA component'i, belirli bir action'ı yerine getirmek için bir veya daha fazla basit control içeren, yeniden kullanılabilir custom bir ui control'üdür.Programmers may need to reuse a set of controls on different dialogs to avoid copying and pasting existing codes for different dialogs. A custom TROIA component is a reusable custom ui control which contains one or more simple controls to perform a specific action.

ReportReport

Report'lar, ui çıktısı bir PDF dosyasına, text dosyasına veya printer'a yönlendirilebilen, dialog'a benzer öğelerdir. Dialog'lar gibi, önceden tanımlı event'leri vardır ve method tanımlama/çağırmayı destekler. Report'un ayrıca label, symbol field, image, barcode, shape gibi control'leri vardır ve bunlar bir graphical user interface'de tasarlanır.Reports are similar items to dialog, whose ui output can be redirected to a PDF file, text file or printer. Like diailogs, they have predefined events and also support defining and calling methods. Report also has controls such as labels, symbol fields, images,barcodes, shapes etc, and they are desinged in a graphical user interface.

TransactionTransaction

Transaction, basitçe standalone bir TROIA application'ı tanımlayan bir database record'udur. Bir transaction'ın ana attribute'ları isim, açıklama ve start dialog'dur.Transaction is simply a database record that defines a standalone TROIA application. The main attributes of a transaction are name, description and start dialog.

Bir transaction'ı çağırdığınızda/başlattığınızda, bu transaction'ın start dialog'u otomatik olarak açılır.When you call/start a transaction, start dialog of this transaction is opened automatically.

Some Key TermsSome Key Terms

TraceTrace

Trace, çalışan TROIA code'unun log record'larını içeren bir dosyadır. Trace'leri kullanarak, developer'lar code çalıştıktan sonra tüm flow'u inceleyebilir.Trace is file that contains log records of running TROIA code. Using traces, developers are able to review whole flow after code executed.

Trace oluşturmak opsiyoneldir ve runtime'da ayarlanan basit bir configuration'a bağlıdır, bu yüzden programcıların application'larını release veya debug modunda build etmesine gerek yoktur. Productive environment'larda trace almak da mümkündür.Creating trace is optional and it depends on a simple configuration which is set on runtime, so programmers do not need to build their application in release or debug mode. It is also possible to get trace in productive environments.

Varsayılan olarak, kullanıcıların trace dosyası oluşturmasına izin verilmez; trace on/off ui item'larına erişmek için kullanıcının "TRACE" permission'ına sahip olması gerekir. Trace dosyaları, TROIA IDE trace tool'u veya 'DEVT31 Trace (Files)' transaction'ı kullanılarak server'dan okunabilir/yönetilebilir/indirilebilir.As default, users are not allowed to create trace files, to access trace on/off ui items user must have “TRACE” permission. Trace files can be read/managed/downloaded from server using TROIA IDE trace tool or ‘DEVT31 Trace (Files)’ transaction.

TROIA Interpreter debugging'i de desteklese de, TROIA developer'ları genellikle TROIA Application'larındaki bug'ları tespit edip düzeltmek için trace kullanır.Although TROIA Interpreter also supports debugging, TROIA developers usually use traces to detect and fix bugs of TROIA Applications.

Convert/SaveConvert/Save

TROIA'da converting, dialog, report, class gibi bir TROIA item'ının parse edilip compile edilmesidir. Bu süreçte, TROIA code'ları TROIA Interpreter tarafından çalıştırılabilen binary bir forma dönüştürülür ve bu binary bilgi geçici olarak saklanır.In TROIA, converting is parsing and compiling a TROIA item such as dialog, report, class. In this process, TROIA codes are transformed into a binary form that can be executed by TROIA Interpreter and this binary information is stored temporarily.

Convert süreci TROIA code'u ve akışıyla ilgilidir, bu yüzden tamamen language independent'tır. TROIA code'u parse hatası içeriyorsa, sistemin binary code oluşturamayacağı ve convert operation'ının başarısız olacağı açıktır.Convert process is related about TROIA code and it’s flow, so it is totally language independent. It is obvious that, if TROIA code contains parse errors, system can not create binary codes so convert operation fails.

Save süreci convert işleminden sonra gerçekleşir; bu aşamada binary code'lar language element'lerle konsolide edilir ve ortaya çıkan içerik '.dlg' & '.cls' uzantılı dosyalara yazılır. '.dlg', bir TROIA dialog'unun (& report & component'in) control, event, method gibi tüm bilgilerini içeren, çalışmaya hazır binary bir dosyadır. '.cls' dosyası benzerdir, ancak TROIA class'ları içindir.Save process is performed after converting, in this stage binary codes are consolidated with language elements and resulting content is written to files with ‘.dlg’ & ‘.cls’ extensions. A ‘.dlg’ is a ready to run binary file that contains all information about a TROIA dialog (&report&component) such as controls, events, methods etc. ‘.cls’ file is similar, but its for TROIA classes.

Development ToolsDevelopment Tools

TROIA IDETROIA IDE

TROIA IDE, TROIA Platformunun temel development tool'udur. Ana işlevi, dialog, class, report gibi TROIA item'larını tanımlamak/düzenlemektir. Ayrıca optimization tool'ları, code comparing tool'ları, import/export tool'ları gibi faydalı araçlar içerir.TROIA IDE is the primary development tool of TROIA Platform. It’s main functionality is defining/modifying TROIA items such as dialogs, classes, reports etc. Additionally, it contains useful tools such as optimization tools, code comparing tools, import/export tools etc.

TROIA screenshot

TROIA IDE'yi açmak için, varsayılan olarak görünmez olan "MENU > TROIA" IDE menü öğesine tıklayın. TROIA IDE'ye iki erişim seviyesi vardır: ilki, kullanıcıların yalnızca mevcut TROIA item'larını ve code'larını okumasına/görüntülemesine izin veren "read-only"dur. İkincisi, TROIA code ve item'ları oluşturmaya/değiştirmeye izin veren read-write'tır. "TROIA IDE" menüsü yalnızca bu erişim haklarından birine sahip kullanıcılar için görünürdür.To open TROIA IDE, click “MENU > TROIA” IDE menu item which is invisible as default. There are two access levels to TROIA IDE, first one is “read-only” which allows users only read/view existing TROIA items and codes. Second one is read-write which allows create/modify TROIA codes and items. “TROIA IDE” menu is only visible for users which has one of this access rights.

IDE AccessPermission*
No access
Read-OnlyDEVELOPMENT(READ-ONLY)
Read-WriteDEVELOPMENT

(*) Permission'lar ilerleyen bölümlerde detaylıca ele alınacaktır.(*) Permissions will be discussed in detail on next chapters.

SYS & DEV Transaction'larıSYS & DEV Transactions

TROIA development ile ilgili işlemlerin çoğu TROIA IDE üzerinde gerçekleştirilebilse de, TROIA kullanılarak implement edilmiş faydalı tool'lar da vardır.Although most of operations about TROIA development can be performed on TROIA IDE, there are useful tools which is implemented using TROIA.

En çok kullanılan TROIA Application'ları aşağıda listelenmiştir; tüm application'lar için lütfen SYS ve DEV prefix'iyle başlayan tüm transaction'ları kontrol edin. (SYS & DEV Module'leri)Most used TROIA Applications are listed below, for all applications please check all transactions that starts with SYS and DEV prefix. (SYS & DEV Modules)

NameDescriptionNote
SYST00System Transactions & Gadgets
SYST01System Locksalso an TROIA IDE tool
SYST02System Messages
SYST17Release Notes
DEVT01Database Browser (ODBA)also available on TROIA IDE for limited operations
DEVT02Dialog Translator
DEVT04Dialog-Tools
DEVT06Hotline Management
DEVT07Search on Codesalso an TROIA IDE tool
DEVT30Runcode Test Transaction(use DEVT11 for the releases before 9.03)
DEVT31Trace (Files)also an TROIA IDE tool
DEVT40Execute SQL

HotlineHotline

Hotline, TROIA Platformunda "Change Request"tir. Hotline'lar 'DEVT06 Hotline Management' transaction'ında (application) oluşturulur/yönetilir ve database'de saklanır.Hotline is “Change Request” in TROIA Platform. Hotlines are created/managed on ‘DEVT06 Hotline Management’ transaction (application) and they are stored in database.

Bir change request olmadan herhangi bir TROIA Item'ını (dialog, class vb.) değiştirmeye izin verilmez. Tüm development tool'ları, değişiklikten önce programcıdan hotline seçmesini ister ve değişiklikler seçilen hotline ile ilişkili olarak loglanır.It is not allowed to change any TROIA Item(dialog, class etc.) without a change request. All development tools ask programmer to select hotline before modification and modifications are logged related with selected hotline.

TROIA'da Comment'lerComments in TROIA

TROIA Code'una comment eklemenin tek yolu /* */ block'unu kullanmaktır.Using /* */ block is the only way to add comment to TROIA Code.

/* bu tek satırlık bir comment'tir *//* this is a single line comment */

RESULT = THIS.CALCULATE(P1, P2);RESULT = THIS.CALCULATE(P1, P2);

/*/*

çok satırlı comment'in ilk satırı first line of multiline comment

çok satırlı comment'in ikinci satırı second line of multiline comment

*/*/

RESULT = RESULT * 3;RESULT = RESULT * 3;

// , # veya başka herhangi bir karakter(ler)le satır comment'i desteklenmez.Line comment with // , # or any other character(s) is not supported.