What is meant by framework, programming language and scripting language? - terminology

What is meant by framework, programming language and scripting language?

I think Daniel Pryden's points are excellent - I voted him up. I'd just like to add a couple of minor additions.
Programming languages, like C and C++, used to have a compiling and linking step that rendered the source code into a machine-language form that was run by the operating system.
Scripting languages, like the Unix Bourne, Korn, and C shell, were not compiled or linked like C and C++. (Thanks to Daniel Pryden's correction and citation of the Unix scripting languages.)
Since virtual machines have become so common in languages like Java, Python, and C#, the distinction between scripting and programming has been blurred.
As for the distinction between libraries and frameworks: your code links in libraries and calls them. This is different from a framework, because your code is plugged into the framework. It's known as the Hollywood principle: "Don't call us, we'll call you."

The distinction between programming languages and scripting languages is ill-defined. In my opinion, we should dispense with the term "scripting language" and just call them all programming languages.
A framework, on the other hand, is a collection of code that uses an inversion-of-control mechanism to help you structure your code. Frameworks are similar to libraries in that they provide building blocks you can use to build a bigger system.

Frameworks are libraries or templates of pre-written stuff you can re-use. They often come with a pre-imposed structure and philosophy of how to approach a domain of problems.
Programming language is a superset of scripting language and includes anything you yourself write that makes a computer do something.
Scripting languages are traditionally interpreted meaning they are useful for smaller more light-weight purposes, but that definition is getting vaguer since JavaScript - a 'scripting language', for example, is not interpreted so much these days.

Framework is a combination of class libraries and runtime environment to execute code by independent on operating system. It is placed on operating system, mask functionalities of OS.
Scripting language is a language, it has script nothing but a support to another language its not used individual, like JavaScript, asp.net server side scripting, these are all give support and prompting to other languages, like JavaScript give prompting to html.
Programming language is instruction to computer and then computer execute that one

Framework is a combination of class libraries and runtime environment to execute code by independent on operating system. It is placed on operating system, mask functionalities of OS.
Scripting language is a language, it has script nothing but a support to another language its not used individual, like JavaScript, asp.net server side scripting, these are all give support and prompting to other languages, like JavaScript give prompting to html.
Programming language is instruction to computer and then computer execute that one

Related

What is an embedded scripting language?

What is an embedded scripting language? What are some advantages it would have over the domain specific language?
"A number of languages have been designed for the purpose of replacing application-specific scripting languages by being embeddable in application programs." -Scripting language (wiki)
Javascript.NET is one such example. It can be used in place of c# for example. However, what constitutes the difference between a scripting language, and an embedded scripting language? Moreover, why would javascript be more desirable than C# - or any other domain specific language?
An embedded scripting language would be a scripting language (or more specifically an interpreter for such a language) that can be embedded into applications. Thus, the interpreter has an API that can be used to integrate it into the application, allowing scripts to control all or parts of the application.
the advantage is that application developers only have to provide the interfacing with the language; they don't have to implement the actual language. This allows more complex and feature-rich languages to be used, since there's no development time (from the application developer point of view).
For users, it means they know the pros and cons, the quirks and benefits of the scripting language, provided we are talking about a commonly used one.
For your core business, you probably should not use an embedded language, but there are other upsides of using an embedded language. Most importantly, in my experience, it is beneficial to have an easy-to-use language on which other users can build against your system. While theoretically it is possible to build against your system with proper definition of interfaces, it is a lot more user-friendly to let inexperienced people play with JavaScript and Lua, instead of having to set-up an entire environment to deploy in .NET.
Of course, it is easy to hot-swap embedded languages and it can speed up your testing considerably; it is also possible to see your changes immediately without reloading your application, because you just reload a small virtual machine for that embedded language.
I personally employed this to allow people to write assisting scripts against a game.

What open source web programming languages are more restrictive than PHP?

I learned some java first, and now I'm learning PHP. I am not comfortable with how "free" it is, with things like loose typing. I really liked the way java forces you into good practice. Are there any open source web programming languages that are more restrictive than PHP, in the same way java is?
How about... Java? :D
If normal Java-driven frameworks are (for some reason) unacceptable, then how about Google Web Toolkit - you write code in Java (with all the benefits of the language), but the application is compiled to JavaScript, which can be run on any modern browser. Additionally, it performs some optimization, etc - really worth looking into if you are familiar with Java and want to use that language to write "light" web applications.
If I didn't make it clear before: you write code in Java (you can use all the design patterns, object-oriented features, strict typing, etc., the compiler warns you if there are compilation-time errors, there's very mature Eclipse integration and so on), but the application is compiled to JavaScript - no need for Java plugin in the browser (no Java applets whatsoever). The compilation part additionally optimizes and obfuscates the output JS code so you'll get faster and smaller code, then if you wrote it by hand. The server side is up to you - while it is easiest to use Java there (especially with all the cool stuff coming in GWT 2.1), you easily use PHP, RoR or Django (via JSON or XML).

Language for web site development C++ or php?

I want to develop a forum like web site. I know C, C++ well but I havent used in web development.I know PHP little bit. Which language should i use?
C++ can and has been used to successfully develop highly scalable web applications. That said, one of the main reasons C++ is not so popular in this category is to do with the lack of standard tools and libraries. There is simply no feature rich library which includes all the necessary boiler-plate code needed to write web applications.
PHP is everything that C++ isn't when it comes to web development - a high-level scripting language designed mainly for web development. The description of PHP on the homepage sums it up nicely:
PHP is a widely-used general-purpose
scripting language that is especially
suited for Web development and can be
embedded into HTML.
If you're developing a simple forum, this decision is a no-brainer: PHP. In addition to the obvious advantages to using it, you'll find the syntax familiar as it is C-like. However, if you have all the time in the world, you're feeling brave and this is for hobbies' sake, do it with C++!
Out of those, for web development, PHP for sure.
C and C++ is not the correct choice to develop for web, so if you know PHP it's better.
also you can try python, ASP.net etc...
To add most hosting does not support c++ and they will not in most case so if you were me I will go for PHP and almost(nearly) all hosting service support it.
Also the lack of function for web development in c++ is also a pull down.
Actually, I wonder why you're not considering to use both! Use PHP for the web interface and write special C++ methods for the more complex actions that you want to take. (Although PHP can handle most of those too.) Basically, this would require less knowledge of PHP and your C++ knowledge stays usable.
Do keep in mind the hosting restrictions of your webhost, unless you're going to host your site on your own system.
Also, do realize that the use of C++ for web development would restrict you to the more general C++ libraries. C++ can be used to write platform-independent code, just like PHP. But not all libraries are supported on every platform.
Finally, PHP already is a powerful language and there are plenty of add-ins for PHP that you can re-use instead of writing it yourself. Still, most of PHP and all the add-ins are written in C++, even though many people just forget about the fact that the code behind PHP had to be written in some language too. Image manipulation, encryption, complex math, etc... It's all been done before for PHP. But it should not stop you from writing your own extensions...
PHP, Python, ASP, JSP, C#.net all should work
C++ is not commonly used for this purpose. Most shared hosting providers won't allow you to run native executables created by C++ for reasons of security (though I suspect this would be manageable with fine-tuned rights) and portability (eg. you'd have to know which OS the shared hoster's webserver runs on and possibly install additional libraries).
Even if you have your own dedicated server with root access, it might still be difficult to properly integrate an executable as CGI into Apache or IIS.
If you're not bound to PHP or C/C++ for some other reason, you could also try C#. Picking up C# from C++ is very easy and ASP.NET allows you to write your complete website in C#. With ASP.NET MVC, you even have an MVC framework comparable in productivity to Ruby on rails. Many shared hosting providers support ASP.NET and through Mono, it's even possible to host ASP.NET web sites in Linux (I'm doing this with my blog ;-))

What is the Difference between PHP and ASP?

ASP is a Compiled Language or isnt it? sure it is.
PHP is a Interpreted Language.
I also developed once an asp app with the VS 2008 IDE.
But there is a Big difference between ASP and PHP.
What are the Differences?
ASP is a Compiled Language or isnt it? sure it is.
No, it isn't.
The first reason why ASP is not a compiled language is because there is no such thing as a compiled language. A language is neither compiled nor interpreted. A language just is. A language is a bunch of abstract mathematical rules. Interpretation or Compilation are traits of a language implementation, they have nothing to do with the language. Every language can be implemented by either a compiler or an interpreter; most modern high-performance language implementations actually use both and switch between them depending on which one is faster in a particular context.
The second reason why ASP is not a compiled language is because it is not a language. It is a framework. You can write code for ASP in any language for which an ActiveScripting engine exists (e.g. Ruby via ActiveRuby), but most commonly one would write code in either VBScript or JScript.
Which brings us to the third reason: The implementations of VBScript and JScript that ship with Windows, as well as ActiveRuby and all other ActiveScripting engines that I know of, are pure interpreters, they cannot compile. So, even though I wrote above that any language can be implemented using either a compiler or an interpreter, all the language execution engines that are supported by ASP are interpreted.
PHP is a Interpreted Language.
Again: no, it isn't.
Reason one is the same as above: there simply is no such thing as an interpreted language.
And, in contrast to ASP, the vast majority of PHP implementations actually do contain a compiler. Some even are pure compilers, they don't even have an interpreter. (Phalanger, for example always compiles straight to CIL, with no interpretation whatsoever. P8 can either interpret or compile straight to JVM bytecode or both: interpret, gather profile data while interpreting and then JIT-compile to JVM bytecode.)
But there is a Big difference between ASP and PHP. What are the Differences?
ASP is a (language-independent) framework, PHP is a language. That's a rather big difference. (Actually, PHP contains one small bit that would in other languages usually considered to be part of a web framework: webserver integration.)
PHP is highly portable across operating systems, CPU architectures and webservers: there is a PHP implementation for nearly every execution environment, from the JVM to the CLI to Parrot to running natively on pretty much every operating system under the sun. ASP is pretty tightly bound to Microsoft Internet Information Server, Microsoft Windows and the PC platform. (There were some other implementations but they are pretty obscure and no longer available.)
PHP has lots of different implementations (Phalanger, Quercus, Pipp, PHC, P8, Zend), ASP has only one. (Like I said, the two other ones are no longer available.)
The vast majority of PHP implementations are Open Source (I think the only exception is P8), while all three ASP implementations that I know of are proprietary.
PHP is actively developed and maintained, whereas ASP is largely obsolete and has been superseded by ASP.NET.
You could be more specific with your question.
The biggest difference is of course that ASP is programmed in a .NET language and uses the .NET framework as a basis. PHP of course is programmed in PHP and with it's library.
.NET is compiled into bytecode and that bytecode is interpretted/jitted at runtime. There are also bytecode caches for PHP (e.g. APC) and there is an active project that aims to generate native code from it using LLVM.
ASP is interpreted ASP.NET is compiled. ASP is not a language but a framework, you can code ASP.NET in a bunch of languages. ASP.NET runs only on IIS (unless you use Mono and who remembers Chilisoft ASP here?)
I have noticed when trying to add hosting on GoDaddy.com, PHP is for a Linux package and ASP was for Windows package.
ASP is a proprietary, closed-source implementation, PHP is not.

Language Agnostic API Generation

I am currently working on a design for a collection of subsystems, and I would like to be able to offer the API's exposed by a given subsystem for use by other subsystems.
In the past, I have used SWIG to expose C api's to a variety of other languages. This has worked well for me, but ultimately the API is defined in C. So basically one side of the API is language agnostic, and the other isn't.
What I would really like is to have something similar to SWIG that could generate the interface between 2 arbitrary languages based on some description of the API.
I don't want to use web services.
For example, I would like to call a 'function' from java, and implement the 'function' in Python. I'd like to be able to generate the language interop using a code generator.
Is there anything that exists which can do this today? At least for simple 'function' calls - ignoring the more complex cases like callbacks and situations where you need to maintain references outside of the 'function' call itself.
I found this after following gooli's link to Protocol Buffers .
This looks so compelling I'm going to propose it as an answer to my own question.
http://incubator.apache.org/thrift/
Thrift is a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml.
From the whitepaper:
...we were presented with the challenge of building a transparent,
high-performance bridge across many
programming languages. We found that
most available solutions were either
too limited, did not offer sufficient
datatype freedom, or suffered from
subpar performance
Also from the whitepaper:
A. Similar Systems The following are software systems similar to Thrift.
Each is (very!) briefly described:
SOAP. XML-based. Designed for web services via HTTP, excessive XML
parsing overhead.
CORBA. Relatively comprehensive, debatably overdesigned and
heavyweight. Comparably cumbersome
software installation.
COM. Embraced mainly in Windows client softare. Not an entirely open
solution.
Pillar. Lightweight and high-performance, but missing
versioning and abstraction.
Protocol Buffers. Closed-source, owned by Google. Described in Sawzall
paper.
The last part about Protocol Buffer's is out-of-date - its been open sourced
COM (and to a lesser extent Firefox's XPCOM) might be what you are looking for. In COM, you define the API using a language called IDL which can then be compiled into different languages. When using the same language the calls usually degenerate into efficient function calls.
However, COM is a very complex and dying piece of technology that I would never use for a new project.