12 Ekim 2009 Pazartesi

Script Nedir?

Script'in ne olduğunu ve sizin neden bunu yazabiliyor olmanız gerektiğini anlatabilmek için isterseniz script'in önce sözlük anlamından konuşarak başlayalım. Script'in Türkçe karşılığı olarak bilişim sözlüklerinde 1) Yazılı yönerge,
2) Adım izlencesi ve Betik gibi iki açıklama uygun görülmüş. "To script" ingilizcede senaryo yazmak anlamına gelir. Bir tiyatro oyununa ait senaryo, yani script, aslinda bir plan, oyunu sergilemek için oluşturulmuş bir talimatlar serisidir. Tüm gerekli kelimeleri, oyuncuların oyun boyunca ne yapacakları ve nerede duracaklarını içerir. Scipt planı sunar ancak yetenekli oyuncularin işi yapabilmesine dayanır.
Yazılım dünyasında script benzer bir anlam taşır.

Tahmin edebileceğiniz üzere script'ler bilgisayar programı olarak adlandırılabilirdi ancak script kelimesi daha önce bahsettiğimiz noktaları vurgular:

• Düz İngilizce olarak yazılmışlardır.
• Oldukça "yüksek seviye" olarak yazılmışlardır.
• Onlar zor işleri yapabilmek için yetenekli aktörlerden yararlanırlar. Script'ler sadece bu oyunculara ne yapmaları gerektiğini söyler.
• İşinizi yapmanız için size güçlü araçlara erişim sağlarlar.

AutoCAD'den z/OS'a kadar çok değişik programlar ve iştetim sistemleri script özellğini eklemişlerdir. Windows dünyasında ise Windows 95 Service Release 2 sürümünden itibaren Windows Script Host (WSH) Windows kullanıcılarına sağlanmıştır.

Script'ler basit bir metin düzenleyecisiyle-mesela Notepad- düzenleyebileceğiniz metin dosyalarıdır. Bu metin dosyalarında belli bir scripting dilinde yazılmış talimatlar bulunur. Seçiminize bağlı olarak kullanmak isteyebileceğiniz çok sayıda script dili mevcuttur. Seçeneklere burada değineceğim ama öncelikle şu soruyu bir soralım:

C++ gibi standard bir derlenmiş programlama dili ile script ile yapacağınız bir işi yapabilirsiniz. Yorumlanır bir dil-JavaScript gibi- ile derlenir bir dil-C++ gibi- arasındaki fark nedir?

Yorumlanır diller bilgisayarda düz yazı olarak saklanır ve her koşturmada bilgisayar tarafından ne yapması gerektiğini anlamak için satır satır incelenir.

Derlenmiş programlar ise bir kere analiz edilir ve işlemcinin hemen anlayabileceği donanım seviyesinde "makine komutları"na dönüştürüldüklerinden çok daha hızlı çalışırlar.

Fakat, yorumlanır diller dönüştürme adımına ihtiyaç duymazlar ve bu size kod yazarken vakit kazandırır. Ayrıca, yorumlanır diller öğrenilmesi ve kullanılması daha kolay dillerdir ve ihtiyacınıza göre değiştirilebilirler.

Limitations of Scripting
While high level languages contain an extensive library or set of functions, scripting languages only contain subsets of their counterparts or comparables. Scripting languages do not usually supply graphical interface elements, such as forms, dropdown lists, checkboxes, and so on. Finally, scripting languages do not typically provide advanced programming features such as object orientation, early binding, and threading.

When to Use Scripts
Scripting languages are designed to be lightweight and easier to work with than their compiled counterparts. In some cases, scripts can even perform tasks more quickly than can be performed with compiled programs simply because scripts do not contain a lot of extra baggage. Scripting is best used when you need quick solutions without a full blown interface or intensive processing. If you find a script is using a lot of system resources, taking a long time to complete, or is simply unmanageable due to its size or complexity, you should consider using a compiled program.

VBScript
The "VB" in VBScript stands for Visual Basic, a programming language that has evolved far from its origins at Dartmouth University in 1964. Nearly 40 years later, Basic is still a good "beginners" programming language. VBScript is probably the easiest scripting language to learn, and it's probably the best first language to learn if you use Microsoft desktop products. Any experience you may have writing either macros or scripts will translate easily to the other.

JScript
JScript is a programming language modeled after Netscape's JavaScript language. (Microsoft made its own variant to match its archrival's capabilities but made it slightly different, just to keep things interesting and incompatible.) The language was designed as a way of building programming capabilities into Web pages. Have you ever seen Web pages whose menus or pictures change when you move your mouse around? That's most likely done through the use of JScript or JavaScript, because it's the scripting language that most Web browsers support.
Note:
JavaScript and JScript are not Java. JavaScript is a completely separate language that bears some superficial similarities to Java, but it's not the whole proverbial ball of wax. As mentioned, JScript is a variety of JavaScript, so it's not Java either.

Perl
Perl was developed in 1987 by developers in the Unix community. From the very start, Perl was an "open" language—its writing, debugging, and subsequent development were carried out by the public, for free. It's a wildly popular, very powerful language that's especially well suited for manipulating text. It has extensive string- handling and pattern-matching capabilities as well as all the other features of a major programming language. The Linux community has embraced and advanced Perl, and huge repositories of free Perl scripts are available on the Internet. Chances are, whatever you want to do, there's a Perl script already out there
that will do it.

Python
Python is a very popular scripting/programming language that originated at the National Research Institute for Mathematics and Computer Science (CWI) in Amsterdam. It's a portable object-oriented language, much less cryptic than Perl, and has made big inroads in the Linux community.

Ruby
Ruby is a fairly new language that originated in Japan. It's currently more popular in Europe and Japan than in the U.S., but it's picking up steam.

RAD Nedir?

RAD Rapid Application Development