Студопедия

КАТЕГОРИИ:

АвтоАвтоматизацияАрхитектураАстрономияАудитБиологияБухгалтерияВоенное делоГенетикаГеографияГеологияГосударствоДомЖурналистика и СМИИзобретательствоИностранные языкиИнформатикаИскусствоИсторияКомпьютерыКулинарияКультураЛексикологияЛитератураЛогикаМаркетингМатематикаМашиностроениеМедицинаМенеджментМеталлы и СваркаМеханикаМузыкаНаселениеОбразованиеОхрана безопасности жизниОхрана ТрудаПедагогикаПолитикаПравоПриборостроениеПрограммированиеПроизводствоПромышленностьПсихологияРадиоРегилияСвязьСоциологияСпортСтандартизацияСтроительствоТехнологииТорговляТуризмФизикаФизиологияФилософияФинансыХимияХозяйствоЦеннообразованиеЧерчениеЭкологияЭконометрикаЭкономикаЭлектроникаЮриспунденкция

Elements and principles of Java




What is Delphi?

Delphi is the name of the commercial Integrated Development Environment (IDE) for RAD created by Borland. Borland sold out Delphi and other RAD tools in the year 2008 to a company called Embarcadero Technologies which is now focusing on the newer versions of Delphi and other tools.
RAD stands for Rapid Application Development, meaning that common develoment tasks, such as creating user interfaces, have been made much easier. For instance, without RAD you would have to specify XY coordinates for every button and screen element, RAD allows you to drag and drop buttons onto screens using your mouse similar to a Mr. Potato Head.
The programming language in Delphi was Object Pascal, which is similar to the old "Structured" Pascal created by Niklaus Wirth in 1970. Though earlier their was a distinction made between Object Pascal being used as the language of Delphi and Delphi being considered as the IDE for the object pascal language but according to the definition used in the help files in Delphi 7 versions onwards we can see that infact Borland itself rebranded Delphi itself as a language. So, Delphi now becomes a language with a dedicated IDE available for it.
Delphi allows you to create Standard windows programs, ISAPI applications (web applications), Web Services, NT Services, console applications, DLL's, ActiveX controls, and COM objects.
The last version of the software "Delphi" was the Delphi 8 for .NET. After this it become sold as a part of the Borland Developer Studio (or simple BDS) in the versions 2005 and 2006, with the ability to compile for other platforms. At this time, the language stops to calls itself Object Pascal, but Delphi Language instead due the Microsoft .NET Framework support.
There is also a limited-but-free version of the BDS 2006 called Turbo Delphi. Its price is more attractive, but it does not have all the features that your Big Brother has: the languages that it supports aren't integrated, there are separated versions for each language and they can't be installed at the same machine (there is a protection to avoid this). There is another protection that doesn't let you to install additional "features" (Components) in the IDE, but this protection can be removed at a little charge.
The newest version of Delphi as of now is Delphi XE with its launch in 2010 it provides various capabilities to the language. However, there are still certain things missing with Delphi that its competing cousins are having which are - 64 bit support for application development, mobile phone application development and cross platform development to name a few. Though Embarcadero suggests that the Delphi compiler is going to undergo a complete overhaul and restructuring in the coming up releases so people might be seeing 64 bit support in Delphi in not much time. The 64 bit version is promised to be out in the first half of 2011.

 

 







PASCAL

PASCAL is an imperative computer programming language developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. It is based on the ALGOL programming language and named in honour of Mathematician and Philosopher, Blaise Pascal. C programming language on the other hand is a generalpurpose programming language developed in 1972 by Dennies Ritchie at Bell Telephone Laboratories for use with the Unix Operating System. It is predominantly used for system software and has greatly influenced many other popular languages especially C++ which was designed as an enhancement of C. The BASIC programming language, an acronym for Beginner’s All-Purpose Symbolic Instruction Code refers to a family of high level programming languages which was originally designed in 1963 by John George Kemeny and Thomas Eugene Kurtz to provide access to computer for nonscience students. Certain features are common to all high level programming languages. These features are explained as follows: Features of Pascal, Basic and C programming languages.

1. Vocabulary: These are set of characters and words from which programs are written.

 2. Control Structure: All programming languages has a way of transferring control from one section of the program to another using selection, sequencing and iteration.

3. Character Set: These are set of valid characters used in a program written in a language such as letters, decimal digits with differences in special characters.

4. Reserved Words: These are words that have pre-defined meaning for special operation and cannot be used for any other purposes.

 5. Operation: It is through here that data items and data are manipulated with rules for order of procedure for operation.

6. Data: Data item could be a variable which can change throughout the execution of a program or consent in which case its value does not change throughout the execution of the program. The variable names are called identifiers. Programming language such as PASCAL wants you to declare your variable in the early part of the program before they are being used in any part of it. All programming languages has data types such as real integer, constant, character, Boolean etc.

7. Structure: The way program are written or constructed is called its structure using set of rules called syntax. 8. Input/Output: These are ways of transferring data into or out of the computer.

The Choice of Programming Languagedepends on the type of problem to solve determines the choice of programming language to use. C is a good system implementation language, and can easily be computed in a straight forward manner using a relatively simple compiler, provide low level access to memory, generate only a few machine languages instructions for each of its core language elements and does not require extensive run-time support. It is therefore suitable for many applications that had traditionally been implemented in Assembly language. PASCAL programming languages is distinguished from C by being much more Algol-like. Pascal has ‘and’, ‘or’ and ‘mod’ where C uses ‘$$’, ‘!!’ and ‘%’. In PASCAL also, semicolon separates individual statement within a compound statement whereas in C, they are syntactically part of the statement itself (transforming an expression into a statement) i.e. there can never be a semicolon directly before ‘else’ in PASCAL, wherein it is mandatory in C (unless a block statement is used), and the last statement before an ‘end’ is not required to be followed by a semicolon. Some programming may however put a semicolon on the last line before ‘end’ thereby formally inserting an empty statement. This is however discouraged by some educators as it may confuse students’ perception of the formal role of the semicolon. BASCIC on the other hand was designed to provide access for non-science students as well as beginners, as it shield the users from the operating system, provide clear and friendly error messaged, very interactive and general-purpose programming language.

What is PHP?

PHP is a programming language that you can use to write Web applications. A Web application can be anything from a simple "contact us" form through to a fully-fledged blogging system, online store, or forum system.

PHP was originally an acronym for Personal Home Pages, but is now a recursive acronym forPHP: Hypertext Preprocessor.

PHP was originally developed by the Danish Greenlander RasmusLerdorf, and was subsequently developed as open source. PHP is not a proper web standard - but an open-source technology. PHP is neither real programming language - but PHP lets you use so-called scripting in your documents.

To describe what a PHP page is, you could say that it is a file with the extension .php that contains a combination of HTML tags and scripts that run on a web server.

How does PHP work?

The best way to explain how PHP works is by comparing it with standar

PHP is a server-side language

PHP is known as a server-side programming language. This means that it runs on the Web server. Most Web programming languages are server-side, but some, such as JavaScript, are client-side, which means they run on the Web browser.

Server-side languages give you more flexibility as they can do many things that are hard to do with JavaScript — for example, working with files and databases, or manipulating images. That said, JavaScript is coming along in leaps and bounds these.

Server-side code is also potentially more secure than JavaScript code. Since JavaScript code is sent to the Web browser it's easy for a visitor to view and edit the code. Server-side code, on the other hand, remains on the Web server and isn't accessible to visitors to the site.

PHP is open source

The PHP engine — that is, the code that sits on the Web server and runs PHP scripts — is open source, which means anyone can access and work on the engine's source code. This helps to ensure that PHP will be around for a long time to come.

PHP is free to download and use, which is one reason why it is so popular among Web hosting companies. You'll find that the vast majority of Web hosting accounts support PHP.

PHP is geared towards the Web

While many programming languages can be used to build Web applications, PHP is one of the few languages specifically designed for the Web. To this end, it includes a lot of useful Web-related features out of the box, such as:

Easy ways to read and handle Web forms and cookies

Functions for creating and manipulating graphics

The ability to talk to popular databases such as MySQL

Functions for working with HTML.

Uses of PHP

You can use PHP to write practically any type of Web application or script. Common PHP applications include:

Blogging software such as WordPress

E-commerce systems like Magento

Content management systems including Drupal and Joomla!, and

Forum software such as phpBB.

In addition, many popular websites, including Yahoo!, Wikipedia, Facebook, and Digg, use PHP code extensively.

Swift

 

Swift is a fantastic way to write software, whether it’s for phones, desktops, servers, or anything else that runs code. It’s a safe, fast, and interactive programming language that combines the best in modern language thinking with wisdom from the wider Apple engineering culture and the diverse contributions from its open-source community. The compiler is optimized for performance and the language is optimized for development, without compromising on either.

Swift is friendly to new programmers. It’s an industrial-quality programming language that’s as expressive and enjoyable as a scripting language. Writing Swift code in a playground lets you experiment with code and see the results immediately, without the overhead of building and running an app.

Swift defines away large classes of common programming errors by adopting modern programming patterns:

Variables are always initialized before use.

Array indices are checked for out-of-bounds errors.

Integers are checked for overflow.

Optionals ensure that nil values are handled explicitly.

Memory is managed automatically.

Error handling allows controlled recovery from unexpected failures.

Swift code is compiled and optimized to get the most out of modern hardware. The syntax and standard library have been designed based on the guiding principle that the obvious way to write your code should also perform the best. Its combination of safety and speed make Swift an excellent choice for everything from “Hello, world!” to an entire operating system.

Swift combines powerful type inference and pattern matching with a modern, lightweight syntax, allowing complex ideas to be expressed in a clear and concise manner. As a result, code is not just easier to write, but easier to read and maintain as well.

Swift has been years in the making, and it continues to evolve with new features and capabilities. Our goals for Swift are ambitious. We can’t wait to see what you create with it.

How to learn and use Swift

You'll need a Mac, and if you will be developing for iOS, watchOS, or tvOS, you'll need one of those devices.

After you download and install Xcode, the Objective-C and Swift compiler (LLVM) is installed on your Mac. At this point, opening Xcode will present options for beginning projects in either Swift or Objective-C.

The first place to start is with Playgrounds and the Swift REPL, where you can learn by playing with Swift's features in an environment that won't mess up any in-flight apps, and without the need to create any full testing iOS or OS X project.

Be sure to take advantage of Apple's great Swift resources, which include two books: one on getting started and one on integrating Swift with existing Objective-C apps.

Summary: Swift is the newest programming language from Apple; it offers better type safety, security, and performance. Swift is available for developing iOS, OS X, watchOS, and tvOS apps.

JScript

Microsoft JScript is designed for Web page scripting. JScript conforms to the ECMA 262 language specification. JScript is a powerful scripting language specifically targeted at the Internet. Like VBScript, JScript is an interpreted, object-based scripting language that processes source code embedded directly in HTML pages. JScript runs on both Internet Explorer and Netscape browsers.

Like VBScript, JScript talks to host applications using Windows Script Host. With Windows Script Host, browsers and other host applications do not require special integration code for each scripting component. Windows Script Host enables a host to compile scripts, obtain and call entry points, and manage the namespace available to the developer.

JScript is a loosely typed language. Loosely typed means you do not have to declare the data types of variables explicitly. In fact, you cannot explicitly declare data types in JScript. Moreover, in many cases JScript performs conversions automatically when needed. For instance, if you add a number to an item consisting of text (a string), the number is converted to text.

JScript .NET is the next generation of Microsoft's implementation of the ECMA 262 language, developed in conjunction with ECMAScript Edition 4. It is designed to run within the common language runtime to manage the execution of code and provide services that make the development process easier. With JScript .NET you get features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services.

Combining the existing feature set of classic JScript (it is fully backward compatible) with the common language runtime and the best features of class-based languages, JScript .NET gives you the best of all worlds. Improvements in JScript .NET include true compiled code, typed and typeless variables, classes (with inheritance, function overloading, property accessors, and more), packages, cross-language support, and access to the .NET Framework.

JavaScript, not to be confused with Java, is a scripting language that was developed in the 90s byBrendan Eich, formerly of Netscape Communications and now of the Mozilla Foundation. JavaScript is one of the fundamental technologies on which the web as we know it is based. Don't be fooled though—JavaScript exists outside of the browser as well, but largely in the context of connected applications and services. The language itself is dynamic, and gives programmers the flexibility to use object-oriented programming styles (as the language itself is mostly object oriented) as well as functional and imperative ones. It derives much of its syntax from C, and if you plan to do any development for the web in any fashion, learning JavaScript should be on your list.

Fortunately, JavaScript is relatively easy to learn, is already right there in your browser for you to play with, and even though it's been around for a while, it's rapidly gaining popularity. Many of you who nominated it noted that your bang for the buck when learning JavaScript is huge, because you can start using it right away to build things for the web—which may very well be what many people are learning to code for.

6. What is C++

C++ is an "object oriented" programming language created by BjarneStroustrup and released in 1985. It implements "data abstraction" using a concept called "classes", along with other features to allow object-oriented programming. Parts of the C++ program are easily reusable and extensible; existing code is easily modifiable without actually having to change the code. C++ adds a concept called "operator overloading" not seen in the earlier OOP languages and it makes the creation of libraries much cleaner.

C++ maintains aspects of the C programming language, yet has features which simplify memory management. Additionally, some of the features of C++ allow low-level access to memory but also contain high level features.

C++ could be considered a superset of C. C programs will run in C++ compilers. C uses structured programming concepts and techniques while C++ uses object oriented programming and classes which focus on data.

C++ was designed to serve as an enhanced version of the C language. It is object oriented and is considered a high level language. However, it features low level facilities. C++ is one of the most commonly used programming languages.

The development of C++ actually began four years before its release, in 1979. It did not start out with this name; its first name was "C with Classes." In the late part of 1983, C with Classes was first used for AT&T’s internal programming needs. Its name was changed to C++ later in the same year. The language was not released commercially until the late part of 1985.

Developed at Bell Labs, C++ enhanced the C programming language in a variety of ways. Among its features are classes, virtual functions, templates, and operator overloading. The language also counts multiple inheritance and exception handling among its many features. C++ introduced the use of declarations as statements and includes more type checking than is available with C.

Considered a superset of C, C++ maintains a variety of features that are included within its predecessor. As such, C programs are generally able to run successfully in C++ compilers, although there are some issues that may cause C code to perform differently. In fact, it is possible for some C code to be incompatible in C++.

The C++ computer programming language was created for UNIX, providing programmers with the advantage of being able to modify code without actually changing it. The code is reusable. Library creation is also cleaner. The language is considered portable and does not require the use of a specific piece of hardware or just one operating system.

Another important feature of C++ is the use of classes. Classes help programmers organize of their code and avoid mistakes. There are times when mistakes do slip through, but classes can be instrumental in finding bugs and correcting them.

The original C++ compiler, called Cfront, was written in the C++ programming language. Compilation in this language is considered efficient and fast. Its speed can be attributed to its high-level features in conjunction with its low-level components. When compared to other computer programming languages, it can be viewed as quite short. This is due to the fact that it leans towards the use of special characters instead of keywords.

What is C#?

Have you heard of C# (pronounced See-Sharp)? It would not be unusual if you didn't know a lot about the language. Released to the public in June 2000, C# has not been around for very long.

C# is a new language created by Microsoft and submitted to the ECMA for standardization. This new language was created by a team of people at Microsoft led by Anders Hejlsberg . Interestingly, Hejlsberg is a Microsoft Distinguished Engineer who has created other products and languages, including Borland Turbo C++ and Borland Delphi. With C#, they focused on taking what was right about existing languages and adding improvements to make something better.

C# is a powerful and flexible programming language. Like all programming languages, it can be used to create a variety of applications. Your potential with C# is limited only by your imagination. The language does not place constraints on what you can do. C# has already been used for projects as diverse as dynamic Web sites, development tools, and even compilers.

C# was created as an object-oriented programming (OOP) language. Other programming languages include object-oriented features, but very few are fully object-oriented. In my book you can learn how C# compares to some of these other programming languages. My book also covers what it means to use an object-oriented language as well as the details of doing object-oriented programming with C#.

Many people believed that there was no need for a new programming language. Java, C++, Perl, Microsoft Visual Basic, and other existing languages were believed to offer all the functionality needed.

C# is a language derived from C and C++, but it was created from the ground up. Microsoft started with what worked in C and C++ and included new features that would make these languages easier to use. Many of these features are very similar to what can be found in Java. Ultimately, Microsoft had a number of objectives when building the language.

C# removes some of the complexities and pitfalls of languages such as Java and C++, including the removal of macros, templates, multiple inheritance, and virtual base classes. These are all areas that cause either confusion or potential problems for C++ developers. If you are learning C# as your first language, rest assured -- these are topics you won't have to spend time learning!

C# is simple because it is based on C and C++. If you are familiar with C and C++, or even Java, you will find C# very familiar in many aspects. Statements, expressions, operators, and other functions are taken directly from C and C++, but improvements make the language simpler. Some of the improvements include eliminating redundancies. Other areas of improvement include additional syntax changes. For example, C++ has three operators for working with members: ::, ., and ->. Knowing when to use each of these three symbols can be very confusing in C++. In C#, these are all replaced with a single symbol--the "dot" operator. For newer programmers, this and many other features eliminate a lot of confusion.

The keys to an object-oriented language are encapsulation, inheritance, and polymorphism. C# supports all of these. Encapsulation is the placing of functionality into a single package. Inheritance is a structured way of extending existing code and functionality into new programs and packages.Polymorphism is the capability of adapting to what needs to be done. Understand, these are very simplistic definitions. The implementation of these is a bit more complicated.

What is Python?

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception. When the program doesn't catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on. The debugger is written in Python itself, testifying to Python's introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.

At Treehouse we are gearing up to launch a new course called ‘Python Basics’. It will be released later in July but for now teacher Kenneth Love talks about why you should consider learning the programming language named after Monty Python.When I need to build a web app, I reach for Python. When I need to automate some small task on my system, I reach for Python. When I want to find the most common colors in an image, I reach for Python. When I…OK, I think you get the picture. Basically, when I need to code something and the language doesn’t matter, I use Python. So what is Python?

Python is a general purpose programming language created in the late 1980s, and named after Monty Python, that’s used by thousands of people to do things from testing microchips at Intel, to powering Instagram, to building video games with the PyGame library. It’s small, very closely resembles the English language, and has hundreds of existing third-party libraries.So what are the major reasons why I, personally, choose Python and recommend it to as many people as possible? It comes down to three reasons.

Python very closely resembles the English language, using words like ‘not’ and ‘in’ to make it to where you can very often read a program, or script, aloud to someone else and not feel like you’re speaking some arcane language. This is also helped by Python’s very strict punctuation rules which means you don’t have curly braces ({ }) all over your code.

Also, Python has a set of rules, known as PEP 8, that tell every Python developer how to format their code. This means you always know where to put new lines and, more importantly, that pretty much every other Python script you pick up, whether it was written by a novice or a seasoned professional, will look very similar and be just as easy to read. The fact that my Python code, with five or so years of experience, looks very similar to the code that Guido van Rossum (the creator of Python) writes is such an ego boost.

Python has been around for over 20 years, so a lot of code written in Python has built up over the decades and, being an open source language, a lot of this has been released for others to use. Almost all of it is collected onhttps://pypi.python.org, pronounced “pie-pee-eye” or, more commonly called “the CheeseShop”. You can install this software on your system to be used by your own projects. For example, if you want to use Python to build scripts with commandline arguments, you’d install the “click” library and then import it into your scripts and use it. There are libraries for pretty much any use case you can come up with, from image manipulation, to scientific calculations, to server automation.

Java

Java is a general purpose, high-level programming languagedeveloped by Sun Microsystems. A small team of engineers, known as the Green Team, initiated the language in 1991. Java was originally called OAK, and was designed for handheld devices and set-top boxes. Oak was unsuccessful, so in 1995 Sun changed the name to Java and modified the language to take advantage of the burgeoning World Wide Web.

Later, in 2009, Oracle Corporation acquired Sun Microsystems and took ownership of two key Sun software assets: Java and Solaris.

Today Java is a commonly used foundation for developing and delivering content on the Web. According to Oracle, there are more than 9 million Java developers worldwide and more than 3 billion mob. phones run Java.

Programs created in Java offer portability in a network. The source code is compiled into what Java calls bytecode, which can be run anywhere in a network on a server or client that has a Java virtual machine (JVM). The JVM interprets the bytecode into code that will run on computer hardware. In contrast, most programming languages, such as COBOL, C++, Visual Basic or Smalltalk, compile code into a binary file. Binary files are platform-specific, so a program written for an Intel-based Windows machine cannot on run a Mac, a Linux-based machine or an IBM mainframe. The JVM includes an optional just-in-time (JIT) compiler that dynamically compiles bytecode into executable code as an alternative to interpreting one bytecode instruction at a time. In many cases, the dynamic JIT compilation is faster than the virtual machine interpretation.

 

Elements and principles of Java

The code is robust. Unlike programs written in C++ and some other languages, Java objects contain no references to data external to themselves or other known objects. This ensures that an instruction cannot contain the address of data storage in another application or in the operating system itself, either of which would cause the program and perhaps the operating system itself to terminate or crash. The JVM makes a number of checks on each object to ensure integrity.

Java is object-oriented. An object can take advantage of being part of a class of objects and inherit code that is common to the class. Objects are thought of as "nouns" that a user might relate to rather than the traditional procedural "verbs." A method can be thought of as one of the object's capabilities or behaviors. Being object-oriented is relatively common in today's programming landscape, but back in 1996, only a handful of languages were implementing object-oriented concepts and design patterns effectively. The ability to develop with a language created from the ground up with object-orientation as its explicit purpose made Java an exciting platform upon which to program.

· Applet offers flexibility. In addition to being executed on the client rather than the server, a Java applet has other characteristics designed to make it run fast.

· Developers can learn Java quickly. With syntax similar to C++, Java is relatively easy to learn, especially for those with a background in C.

 

Rubi

Many Ruby developers find it fun to work with Ruby, and fun is a great motivator when learning to code. Ruby is a very high level language, which means Ruby abstracts away (i.e. handles for you) most of the complex details of the machine. Thus, you can quickly build something from scratch with less lines of code.

Ruby was made popular by the Ruby on Rails framework, a full-stack web framework that makes prototyping a breeze, making it a web framework of choice for many startups and coding beginners alike.

Ruby was originally designed with the goal of making programming fun, and in Japan, where it came from, Ruby was used to make games. Ruby is succinct and reads like English, which makes the code easy to understand for coding beginners.

Since you'll be able to build prototypes quickly with Ruby on Rails, many find coding in Ruby a satisfying experience.

As a dynamically typed language, Ruby does not have hard rules on how to build features, and it is very close to spoken languages. You'll have more flexibility solving problems using different methods. Furthermore, Ruby is also more forgiving of errors, so you'll still be able to compile and run your program until you hit the problematic part.

Because Ruby is a dynamically typed language, the same thing can easily mean something different depending on the context. As a Ruby app grows larger and more complex, this may get difficult to maintain as errors will become difficult to track down and fix, so it will take experience and insight to know how to design your code or write unit tests to ease maintainability. However, you can learn how to design code better by working with an experienced Ruby mentor.

As a dynamically typed language, Ruby is slow because it is too flexible and the machine would need to do a lot of referencing to make sure what the definition of something is, and this slows Ruby performance down. Rails is in general more resource-hungry as well.

At any rate, there are alternatives such as JRuby, which is a faster implementation of Ruby. While this is probably still not as fast as Java, for example, it's still a vast improvement.

First of all, community size is important, because the larger a programming language community is, the more support you'd be likely to get. As you step into the programming world, you'll soon understand how vital support is, as the developer community is all about giving and receiving help. Moreover, the larger a community, the more people will be building useful tools to make development in that particular language easier. As of now, there are over 600 notable programming languages world-wide.

As an open source project, Rails is actively worked on with a relatively fast update cycle, and Ruby on Rails 5 beta version was just recently released on December 18th, thus Ruby's ability to stay technically relevant is still strong.

With the rise of Node.js, Ruby on Rails' popularity has diminished somewhat, but thanks to the ease of prototyping with Ruby on Rails, tech startups continue to love Ruby on Rails.

Scala

Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do.

To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them. There’s a REPL and IDE worksheets for quick feedback. Developers like it so much that Scala won the ScriptBowl contest at the 2012 JavaOne conference.

At the same time, Scala is the preferred workhorse language for many mission critical server systems. The generated code is on a par with Java’s and its precise typing means that many problems are caught at compile-time rather than after deployment.

At the root, the language’s scalability is the result of a careful integration of object-oriented and functional language concepts.

Object-Oriented

Scala is a pure-bred object-oriented language. Conceptually, every value is an object and every operation is a method-call. The language supports advanced component architectures through classes and traits.

Many traditional design patterns in other languages are already natively supported. For instance, singletons are supported through object definitions and visitors are supported through pattern matching. Using implicit classes, Scala even allows you to add new operations to existing classes, no matter whether they come from Scala or Java!

Functional

Even though its syntax is fairly conventional, Scala is also a full-blown functional language. It has everything you would expect, including first-class functions, a library with efficient immutable data structures, and a general preference of immutability over mutation.

Unlike with many traditional functional languages, Scala allows a gradual, easy migration to a more functional style. You can start to use it as a “Java without semicolons”. Over time, you can progress to gradually eliminate mutable state in your applications, phasing in safe functional composition patterns instead. As Scala programmers we believe that this progression is often a good idea. At the same time, Scala is not opinionated; you can use it with any style you prefer.

Seamless Java Interop

Scala runs on the JVM. Java and Scala classes can be freely mixed, no matter whether they reside in different projects or in the same. They can even mutually refer to each other, the Scala compiler contains a subset of a Java compiler to make sense of such recursive dependencies.

Java libraries, frameworks and tools are all available. Build tools like ant or maven, IDEs like Eclipse, IntelliJ, or Netbeans, frameworks like Spring or Hibernate all work seamlessly with Scala. Scala runs on all common JVMs and also on Android.

The Scala community is an important part of the Java ecosystem. Popular Scala frameworks, including Akka, Finagle, and the Play web framework include dual APIs for Java and Scala.

Functions are Objects

Scala’s approach is to develop a small set of core constructs that can be combined in flexible ways. This applies also to its object-oriented and functional natures. Features from both sides are unified to a degree where Functional and Object-oriented can be seen as two sides of the same coin.

Some examples: Functions in Scala are objects. The function type is just a regular class. The algebraic data types found in languages such as Haskell, F# or ML are modelled in Scala as class hierarchies. Pattern matching is possible over arbitrary classes.

Future-Proof

Scala particularly shines when it comes to scalable server software that makes use of concurrent and synchronous processing, parallel utilization of multiple cores, and distributed processing in the cloud.

Its functional nature makes it easier to write safe and performant multi-threaded code. There’s typically less reliance on mutable state and Scala’s futures and actors provide powerful tools for organizing concurrent system at a high-level of abstraction.

Fun

Maybe most important is that programming in Scala tends to be very enjoyable. No boilerplate, rapid iteration, but at the same time the safety of a strong static type system. As Graham Tackley from the Guardian says: “We’ve found that Scala has enabled us to deliver things faster with less code. It’s reinvigorated the team.”

 










Последнее изменение этой страницы: 2018-04-12; просмотров: 190.

stydopedya.ru не претендует на авторское право материалов, которые вылажены, но предоставляет бесплатный доступ к ним. В случае нарушения авторского права или персональных данных напишите сюда...