Deprecated: Constant E_STRICT is deprecated in /home/saglikliyasalim/public_html/system/core/Exceptions.php on line 76

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 102

Backtrace:

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 128

Backtrace:

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$hooks is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$config is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$log is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$uri is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$router is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$output is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$security is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$input is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$lang is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$db is deprecated

Filename: core/Loader.php

Line Number: 397

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_DB_mysqli_driver::$failover is deprecated

Filename: database/DB_driver.php

Line Number: 372

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 1284

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 10
Function: __construct

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Posts::$veritabani_model is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 11
Function: model

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$ViewFolder is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$db is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$veritabani_model is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 193
Function: view

File: /home/saglikliyasalim/public_html/application/helpers/tools_helper.php
Line: 1579
Function: {closure:Posts::detail():125}

File: /home/saglikliyasalim/public_html/application/controllers/Posts.php
Line: 125
Function: file_cache

File: /home/saglikliyasalim/public_html/index.php
Line: 289
Function: require_once

Delegates Nedir? Ne İşe Yarar? Ne İçin Kullanılır?

Delegates Nedir? Ne İşe Yarar? Ne İçin Kullanılır?

Delegates, .NET platformunda sıklıkla kullanılan bir özelliktir. Delegate'ler, bir yöntemi referans alarak başka bir yöntemi çağırmak için kullanılır. Bu sayede kodun modülerliği ve yeniden kullanılabilirliği artar. Delegates'ler, olay tabanlı programlamada da sıkça kullanılır.


Delegates Nedir? Ne İşe Yarar? Ne İçin Kullanılır?

Günümüzün hızla gelişen teknolojik dünyasında, yazılım geliştirme alanında çeşitli kavramlar ve teknolojiler ortaya çıkmaktadır. Bu kavramlardan biri de "delegates" olarak adlandırılan bir yapıdır. Delegates, özellikle C# programlama dili üzerinde sıkça kullanılan ve programcılara büyük bir kolaylık sağlayan bir özelliktir.

Delegates, diğer programlama dillerinde de farklı isimlerle (fonksiyon göstergeleri, callback fonksiyonları gibi) kullanılmasına rağmen, C# üzerinde en yaygın olarak kullanılan isimdir. Delegates, bir fonksiyonu veya metodu, başka bir fonksiyona veya metoda argüman olarak geçebilmemizi sağlar.

Delegates'in en önemli özelliklerinden biri, çok çeşitli senaryolarda kullanılabilmesidir. Örneğin, bir olayın gerçekleştiğinde belli bir işlevin tetiklenmesi gerektiğinde delegates kullanılabilir. Bu sayede yazılım geliştiriciler, olayları işlemek için özel işlevler yazabilir ve bu işlevleri olaylarla ilişkilendirerek olayın gerçekleştiğinde otomatik olarak tetikleyebilirler.

Bir diğer kullanım alanı ise asenkron programlamadır. Delegates, asenkron programlamanın önemli bir parçasıdır. Asenkron programlama, bir işlemin sonucunu beklemek yerine arka planda işlemi gerçekleştirerek diğer işlemlere devam etmeyi sağlayan bir teknik olarak tanımlanabilir. Delegates ile asenkron olarak çalışan fonksiyonlara geri dönüş değerleri işlenebilir ve sonuçlar elde edilebilir.

Bunun yanında delegates, genişletilebilirlik ve esneklik sunar. Örneğin, farklı sınıflardaki fonksiyonları tek bir arayüzde birleştirmek için delegates kullanmak mümkündür. Bu sayede, birden fazla nesneyle çalışan bir fonksiyonu çağırırken her bir nesne için ayrı ayrı metodlar yazmak yerine, delegates aracılığıyla dinamik olarak işlevler atanabilir.

Delegates kullanmanın bir diğer avantajı, bir fonksiyonun geri dönüş değerini değiştirmeye gerek kalmadan farklı bir fonksiyonla değiştirilebilmesidir. Yani, bir işlemin çıktısını almak istediğimizde delegates üzerinden çağrılan fonksiyonu değiştirerek istediğimiz sonucu elde edebiliriz.

Delegates, birçok özellik ve kullanım alanına sahip olmasıyla yazılım geliştiricilere büyük kolaylık sağlar. Delegates sayesinde yazılımlar daha modüler ve esnek bir yapıya sahip olabilirler. Ancak, delegates kullanımının da bazı dikkat edilmesi gereken noktaları bulunmaktadır. Örneğin, delegates ile gereksiz karmaşıklıklar ortaya çıkabilir ve kod kalitesi düşebilir.

Özetlemek gerekirse, delegates C# programlama dili üzerinde sıklıkla kullanılan ve çeşitli senaryolarda büyük kolaylık sağlayan bir yapıdır. Olay tabanlı programlama, asenkron programlama ve modülerlik gibi konuları destekler. Uzman bir yazılım geliştirici olarak, delegates'in avantajlarını ve doğru kullanımını öğrenmek, yazılım projelerinizde daha etkili ve esnek çözümler üretmenizi sağlayabilir.


Sıkça Sorulan Sorular

1. Delegates nedir?

Delegates, C# ve .NET platformunda kullanılan bir tür referans tipidir. Başka bir metodun işlevini çağırmak için kullanılan bir delege objesi oluşturmanıza izin verir.

2. Delegates ne işe yarar?

Delegates, olay tabanlı programlamanın (event-driven programming) temel bir öğesidir ve olayların dinamik olarak yönetilmesine olanak sağlar. Bir delegeyi kullanarak, bir olayın tetiklendiğinde çağrılacak bir veya daha fazla metodun belirlenmesi ve ardından bu metotların olayın gerçekleştiği noktada çalıştırılması mümkündür.

3. Delegates ne için kullanılır?

Delegates, .NET framework tarafından sağlanan olay yönetimi mekanizmasının temel bir yapı taşıdır. Genellikle fonksiyon çağırma zincirine sahip olayları yönetmek için kullanılırlar. Ayrıca, farklı tipte metotları çağırmak ve işlevlerin birlikte çalışmasını sağlamak için kullanılabilirler.

4. Delegates nasıl tanımlanır?

Bir delege tanımlamak için aşağıdaki sözdizimi kullanılabilir:

delegate geriDönüşTipi DelegeAdı parametreTipi1 parametreAdı1, parametreTipi2 parametreAdı2, ...;
5. Delegates geri dönüş değeri olmadan nasıl tanımlanır?

Eğer bir delege geri dönüş değeri olmayacaksa, geri dönüş tipi olarak "void" kullanılır. Örneğin:

delegate void DelegeAdı parametreTipi1 parametreAdı1, parametreTipi2 parametreAdı2, ...;

Diğer Ne İşe Yarar Yazıları
Ne İşe Yarar