JScript .NET, Part I: The Mechanics
The .NET Framework
The .NET framework is a new computing platform that is intended to simplify application development, Web applications in particular. Microsoft has tagged the following objectives to .NET:
- Preserve consistency between objects that are stored and executed locally, objects that are Internet-distributed but are executed locally, and objects that are stored and executed remotely on a server.
- Avoid deployment and versioning conflicts. No DLL update upon deployment. Solve the DLL Hell syndrome.
- Guarantee safe execution of code, even if written by an unknown semi-trusted third party.
- Avoid the slowness of scripted or interpreted languages.
- Preserve development environment consistency between Windows-based applications and Web-based applications.
- Use industry standards in all communication protocols, to make the code easily integrated with other sources.
The .NET Framework includes two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. The runtime is common to three languages: Visual Basic, JScript, and C# (pronounced "C Sharp"). The common language runtime manages the code at execution time. It does the memory management, thread management, and runs the code on different platforms (client or server). It enforces strict variable type definitions, security, and robustness. For example, the runtime automatically manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common C++ application errors, memory leaks and invalid memory references. The runtime can be hosted by both client applications (Internet Explorer), as well as server applications (Microsoft SQL Server, IIS, ASP.NET). The runtime also accelerates developer productivity. Programmers can write applications in their development language of choice (JScript, of course), yet take full advantage of the class library and components written in other languages by other developers. Current hosts (such as ASP.NET) provide a wealth of reusable components that are ready to be used.
The .NET Framework class library is a collection of reusable types that are tightly integrated with the common language runtime. The class library is object oriented, easy to use, and accelerates your development. For example, the .NET Framework collection classes implement a set of APIs that you can use to develop your own collection classes. The .NET Framework class library enables you to accomplish a range of common programming tasks such as string manipulation, data collection, database connectivity, and file access. You can also use this library to develop console applications, Windows Forms, ASP.NET applications, XML Web services, and Windows services. A classic example is the Web Forms classes. They simplify form development in ASP.NET development projects.
Next: How to take advantage of JScript .NET