Pages

Advertisement

Showing posts with label Downloads. Show all posts
Showing posts with label Downloads. Show all posts

Wednesday, July 11, 2007

Add, Edit, and Delete in DataGridView

The application has the following outline:

  1. Gets all SQL servers' instances from the network.
  2. Gets all databases from the selected instance. If the user provide an empty user name or password or wrong user name or password, the same list of SQL server instances will be returned. The code is available.
  3. Gets all tables from the selected database.
  4. Gets all records from the selected table.
  5. Adds, edits, or deletes records from the DataGridView.
  6. Pages with the number of records per page is also provided.
Asynchronous Architecture

The application uses an async calling mechanism to make database calls. Because the SQLEnumerator does not supporting async calling, I have added delegates to call those methods asynchronously. In .NET 2.0, SqlCommand object supports async calling to the database. I use this feature to get all tables from the selected database. Delegates are the best practices to design the async architectures because most things are handled internally by CLR and you do not have to bother much about them.

Application Structure

When you start reading the code from the beginning, there is an enum named CallFor. This enum is used to set a private variable called when making calls to the SQL server list, databases, and tables. This is done because only one call back method handles all call backs from async calls. A switch case statement manages the behavior of different call backs.

I have designed this application with SqlCommandBuilder because I have some questions about using SqlCommandBuilder. Builder will automatically generate insert, update, and delete command, provided that you select a primary key in your select query.

I have faced a very common problem of cross thread exception. In my previous project, I implemented the same architecture and .NET 2.0 provides the .InvokeRequired and Invoke() functions to overcome this problem. You have to declare a delegate with a similar signature of call back method and call the same method by using the control's Invoke() method. This is push all call stack to the parent thread from the executing thread and puts the parent thread into working status.

You need to follow the sequence, like this:

  1. Get all SQL server instances.
  2. Get all databases from the selected instance.
  3. Get all tables from the selected database.
  4. Load data from the selected table.
  5. Use paging to navigation.
  6. Use buttons such as Add/Update, Commit, and Delete to insert/update or delete. You can delete/update/insert multiple records.

Here are some code blocks I'll explain. This function sets the database objects required throughout the application. sqlQuery is dynamically built.

private void SetDataObjects()
{
connection = new SqlConnection(connectionString);
command = new SqlCommand(sqlQuery, connection);
adapter = new SqlDataAdapter(command);
builder = new SqlCommandBuilder(adapter);
ds = new DataSet("MainDataSet");
tempDataSet = new DataSet("TempDataSet");
}

The following two functions load the data and bind it to a datagrid view.I tried to bind a temporary datatable object to datagridview and then update the main table, but I was not able to do so. I used the adapter's Fill() method, which takes the starting record and number of records as input parameters with dataset. I created one temporary dataset to get the total records. I dispose of it immediately. Instead of directly binding the datasource to DataGridView, I added columns manually and then let the rows get bound to them. This let me allow sorting and, in case you do not want to show any columns, you can do it here.

private void btnLoad_Click(object sender, EventArgs e)
{
lblLoadedTable.Text = "Loading data from table " +
cmbTables.Text.Trim();
btnLoad.Enabled = false;
this.Cursor = Cursors.WaitCursor;
try
{
if (userTable != null)
{
userTable.Clear();
}
userDataGridView.DataSource = null;
userDataGridView.Rows.Clear();
userDataGridView.Refresh();
sqlQuery = "SELECT * FROM [" + cmbTables.Text.Trim() + "]";
SetDataObjects();
connection.Open();
ticker.Start();
adapter.Fill(tempDataSet);
totalRecords = tempDataSet.Tables[0].Rows.Count;
tempDataSet.Clear();
tempDataSet.Dispose();
adapter.Fill(ds, 0, 5, cmbTables.Text.Trim());
userTable = ds.Tables[cmbTables.Text.Trim()];

foreach (DataColumn dc in userTable.Columns)
{
DataGridViewTextBoxColumn column =
new DataGridViewTextBoxColumn();
column.DataPropertyName = dc.ColumnName;
column.HeaderText = dc.ColumnName;
column.Name = dc.ColumnName;
column.SortMode = DataGridViewColumnSortMode.Automatic;
column.ValueType = dc.DataType;
userDataGridView.Columns.Add(column);
}
lblLoadedTable.Text = "Data loaded from table: " +
userTable.TableName;
lblTotRecords.Text = "Total records: " + totalRecords;
CreateTempTable(0, int.Parse(cmbNoOfRecords.Text.Trim()));

btnPrevious.Enabled = true;
btnFirst.Enabled = true;
btnPrevious.Enabled = true;
btnNext.Enabled = true;
btnLast.Enabled = true;
btnAdd.Enabled = true;
btnUpdate.Enabled = true;
btnDelete.Enabled = true;
cmbNoOfRecords.Enabled = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
connection.Close();
btnLoad.Enabled = true;
this.Cursor = Cursors.Default;
prgProgress.Value = 0;
prgProgress.Update();
prgProgress.Refresh();
ticker.Stop();
}
}

This method actually binds the data to DataGridView and calls for all paging functions. Depending upon the current index and all, those records are fetched.

private void CreateTempTable(int startRecord, int noOfRecords)
{
if (startRecord == 0 || startRecord < 0)
{
btnPrevious.Enabled = false;
startRecord = 0;
}
int endRecord = startRecord + noOfRecords;
if (endRecord >= totalRecords)
{
btnNext.Enabled = false;
isLastPage = true;
endRecord = totalRecords;
}
currentPageStartRecord = startRecord;
currentPageEndRecord = endRecord;
lblPageNums.Text = "Records from " + startRecord + " to "
+ endRecord+ " of " + totalRecords;
currentIndex = endRecord;

try
{
userTable.Rows.Clear();
if (connection.State == ConnectionState.Closed)
{
connection.Open();
}
adapter.Fill(ds, startRecord, noOfRecords, cmbTables.Text.Trim());
userTable = ds.Tables[cmbTables.Text.Trim()];
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
connection.Close();
}

userDataGridView.DataSource = userTable.DefaultView;
userDataGridView.AllowUserToResizeColumns = true;
}

Here is one of the sample methods that gets SQL server instances asynchronously. After BeginInvoke(), the user is free to perform any task. The call back function will catch the response. This is how you can invoke a method asynchronously by using a delegate.

private void btnLoadSqlServers_Click(object sender, EventArgs e)
{
ticker.Start();
btnLoadSqlServers.Enabled = false;
this.Cursor = Cursors.WaitCursor;
cmbSqlServers.Items.Clear();
called = CallFor.SqlServerList;
intlDelg.BeginInvoke(new AsyncCallback(CallBackMethod), intlDelg);
}

Here is the call back method that will handle all call backs from different methods. When you use an async architecture, the call back is always on a new thread other than the parent one. This new thread will not able to access the controls on the parent thread. Therefore, you need to shift the call stack to the parent thread; this can be done by using the control.InvokeRequired and control.Invoke(). The following method shows how to do that.

private void CallBackMethod(IAsyncResult result)
{
if (this.InvokeRequired)
{
this.Invoke(new AsyncDelegate(CallBackMethod), result);
}
else
{
try
{
prgProgress.Value = prgProgress.Maximum;
switch (called)
{
case CallFor.SqlServerList:
string[] sqlServers = intlDelg.EndInvoke(result);
cmbSqlServers.Items.AddRange(sqlServers);
if (cmbSqlServers.Items.Count > 0)
{
cmbSqlServers.Sorted = true;
cmbSqlServers.SelectedIndex = 0;
}
this.Cursor = Cursors.Default;
btnLoadSqlServers.Enabled = true;
txtUserName.Select();
txtUserName.Focus();
break;
case CallFor.SqlDataBases:
string[] sqlDatabases = intlDelg.EndInvoke(result);
cmbAllDataBases.Items.AddRange(sqlDatabases);
if (cmbAllDataBases.Items.Count > 0)
{
cmbAllDataBases.Sorted = true;
cmbAllDataBases.SelectedIndex = 0;
}
this.Cursor = Cursors.Default;
btnGetAllDataBases.Enabled = true;
break;
case CallFor.SqlTables:
reader = command.EndExecuteReader(result);
cmbTables.Items.Clear();
while (reader.Read())
{
cmbTables.Items.Add(reader[0].ToString());
}
if (cmbTables.Items.Count > 0)
{
cmbTables.Sorted = true;
cmbTables.SelectedIndex = 0;
grpDataManipulate.Enabled = true;
}
else
{
grpDataManipulate.Enabled = false;
}
break;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
if (called == CallFor.SqlTables)
{
btnGetAllTables.Enabled = true;
this.Cursor = Cursors.Default;
}
prgProgress.Value = 0;
prgProgress.Refresh();
ticker.Stop();
}
}
}

Conclusion

This way, you easily can manipulate the DataGridView. You have to use the datasource that is directly bound to DataGridView. Async calling will be very efficient when loading huge amounts of data. Please let me know if you have any queries.

About the Author
Dear Friends, I'm from Pune and curently working with Rapidigm - A Fujitsu Consulting Company. I'm having more than 4 years of exp in software field and have worked on areas like ASP.NET, C#, .NET remoting, web services, pocket pc applciations. I'm a brainbench certified software engineer in .NET framework, C#, ADO.NET and ASP.NET. If you like any of my articles or you want to suggest some changes and improve the way I code, write articles feel free to mail me at: jayantdotnet@gmail.com

Downloads

  • DataGridView_manipulation_src.zip - Source code for download
  • Friday, July 6, 2007

    Purpose of Programming

    A prominent purpose of programming languages is to provide instructions to a computer. As such, programming languages differ from most other forms of human expression in that they require a greater degree of precision and completeness. When using a natural language to communicate with other people, human authors and speakers can be ambiguous and make small errors, and still expect their intent to be understood. However, computers do exactly what they are told to do, and cannot understand the code the programmer "intended" to write. The combination of the language definition, the program, and the program's inputs must fully specify the external behavior that occurs when the program is executed.

    Many languages have been designed from scratch, altered to meet new needs, combined with other languages, and eventually fallen into disuse. Although there have been attempts to design one "universal" computer language that serves all purposes, all of them have failed to be accepted in this role.[7] The need for diverse computer languages arises from the diversity of contexts in which languages are used:

    • Programs range from tiny scripts written by individual hobbyists to huge systems written by hundreds of programmers.
    • Programmers range in expertise from novices who need simplicity above all else, to experts who may be comfortable with considerable complexity.
    • Programs must balance speed, size, and simplicity on systems ranging from microcontrollers to supercomputers.
    • Programs may be written once and not change for generations, or they may undergo nearly constant modification.
    • Finally, programmers may simply differ in their tastes: they may be accustomed to discussing problems and expressing them in a particular language.

    One common trend in the development of programming languages has been to add more ability to solve problems using a higher level of abstraction. The earliest programming languages were tied very closely to the underlying hardware of the computer. As new programming languages have developed, features have been added that let programmers express ideas that are more removed from simple translation into underlying hardware instructions. Because programmers are less tied to the needs of the computer, their programs can do more computing with less effort from the programmer. This lets them write more programs in the same amount of time.[8]

    Natural language processors have been proposed as a way to eliminate the need for a specialized language for programming. However, this goal remains distant and its benefits are open to debate. Edsger Dijkstra took the position that the use of a formal language is essential to prevent the introduction of meaningless constructs, and dismissed natural language programming as "foolish."[9] Alan Perlis was similarly dismissive of the idea.[10]

    What is Programming ?


    A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like human languages, are defined through the use of syntactic and semantic rules, to determine structure and meaning respectively.Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely. Some authors restrict the term "programming language" to those languages that can express all possible algorithms;[1] sometimes the term "computer language" is used for more limited artificial languages.

    Programming Languages

    Array languages

    See also: :Category:Array_programming_languages

    Array programming (also known as vector or multidimensional languages) generalize operations on scalars to apply transparently to vectors, matrices, and higher dimensional arrays.

    * A+
    * Analytica
    * APL
    * F
    * FISh
    * Fortran 90 and later versions
    * IDL
    * J
    * K
    * MATLAB
    * Octave
    * NESL
    * Nial
    * PDL
    * ZPL
    * SAC

    Aspect-oriented languages

    * AspectC++
    * AspectJ
    * CaesarJ
    * Common Lisp
    * Compose*
    * JAsCo (and AWED)
    * ObjectTeams

    Assembly languages

    See also: :Category:Assembly languages

    Assembly languages directly correspond to a machine language (see below) in order to allow machine code instructions to be written in a form understandable by humans. Assembly languages allow programmers to use symbolic addresses which are later converted to absolute addresses by the assembler. Most assemblers also allow for macros and symbolic constants.

    * ASEM-51 [1]
    * a56 (for Motorola DSP56000 DSPs, DSP56k series)
    * AKI (AvtoKod "Inzhener", "Engineer's Autocode" for Minsk family of computers)
    * ASCENT (ASsembler for CENTral Processor Unit of Control Data Corporation computer systems pre-COMPASS)
    * ASPER (ASsembler for PERipheral Processor Units of Control Data Corporation computer systems pre-COMPASS)
    * BAL (Basic AssembLer) - for IBM System/360 and later mainframe systems
    * C-- (name used by a few languages that bring C language closer to Assembly)
    * COMPASS (COMPrehensive ASSembler)
    * D (multiparadigm curly-brace language with built-in inline assembler)
    * Emu8086 [2] (x86 assembler and Intel's 8086 microprocessor emulator)
    * EDTASM (Microsoft editor/assembler for Motorola 6809 on the Color Computer)
    * FAP (FORTRAN Assembly Program, for IBM 709, 7090, 7094 mainframes)
    * FASM (Flat Assembler; IA-32, IA-64)
    * GAS (GNU Assembler)
    * HLA (High Level Assembly)
    * HLASM (High Level Assembler, for mainframes)
    * Linoleum (for cross platform use)
    * MACRO-11 (for DEC PDP-11)
    * MACRO-20 (for DEC DECSYSTEM-20)
    * MACRO-32 (for DEC VAX)
    * MASM (Microsoft Macro Assembler)
    * MI (Machine Interface, compile-time intermediate language)
    * MIPS ( for MIPS architecture) Microprocessor without Interlocked Pipeline Stages
    * Motorolla 68k Assembly ( for Motorola 68k ) Assembly Language for Motorolla 68k family of CPUs
    * NASM (Netwide Assembler)
    * NEAT (National's Electronic Autocoder Technique), for NCR computers, evolved into NEAT/3
    * PAL-III (for DEC PDP-8)
    * PASM (for Parrot virtual machine)
    * RosAsm (32 bit Assembler; The Bottom Up Assembler)
    * Sphinx C-- (mixes Assembly commands with C-like structures)
    * SSK (Sistema Simvolicheskogo Kodirovaniya, or "System of symbolic coding") for Minsk family of computers
    * TASM (Turbo Assembler, Borland)

    Authoring languages

    * Bigwig (web design language)
    * Coursewriter
    * PILOT
    * TUTOR

    Command line interface languages

    Command line interface (CLI) languages are also called batch languages, or job control languages. Examples:

    * 4DOS (extended command-line shell for IBM PCs)
    * bash (the "Bourne-Again" shell from GNU/FSF)
    * Ch (C-compatible shell)
    * CHAIN (Datapoint)
    * CLIST (MVS Command List)
    * csh (C-like shell from Bill Joy at UC Berkeley)
    * DCL DIGITAL Command Language - standard CLI language for VMS (DEC, Compaq, HP)
    * DOS batch language (standard CLI/batch language for the IBM PC running DR-DOS, MS-DOS, or PC-DOS before Windows)
    o EA_QB_Command
    * EXEC
    * EXEC 2
    * JCL (punch card-oriented batch control language for IBM/360 family mainframes)
    * ksh (a standard Unix shell, written by David Korn)
    * REXX
    * sh (the standard Unix shell, written by Stephen Bourne)
    * Winbatch (Windows batch file language)
    * Windows PowerShell (Microsoft .NET-based CLI)
    * zsh (a Unix shell)

    Compiled languages

    These are languages typically processed by compilers, though theoretically any language can be compiled or interpreted. See also compiled language.

    * Ada (multi-purpose language)
    * ALGOL (extremely influential language design. The second high level language compiler.)
    o SMALL Machine Algol Like Language
    * BASIC (some dialects, including the first version of Dartmouth BASIC)
    * C (one of the most widely-used procedural programming languages)
    * C++
    * C# (compiled into Intermediate Language bytecode)
    * CLEO (Clear Language for Expressing Orders) used the compiler for the British Leo computers
    * CLush (Lush)
    * COBOL
    * Common Lisp
    * Corn
    * Curl
    * D
    * Delphi (Borland's Object Pascal development system)
    * DIBOL (Digital Interactive Business Oriented Language)
    * Eiffel (object-oriented language developed by Bertrand Meyer)
    o Sather
    o Ubercode
    * Forth (professional systems, like VFX and SwiftForth)
    * Fortran (the first high level, compiled, language, from IBM, John Backus, et al)
    * Java (originally from Sun Microsystems; usually compiled into JVM bytecode although true native-code compiled versions exist)
    * JOVIAL
    * Nemerle (compiled into Intermediate Language bytecode)
    * Objective-C
    * Pascal (most implementations)
    * ppC++
    * Scheme (some implementations, e.g. Gambit)
    * ML
    o Standard ML
    + Alice
    o Ocaml
    * Turing
    * Urq
    * Visual Basic (from Microsoft)
    * Visual Foxpro
    * Visual Prolog
    * WinDev

    Concurrent languages

    See also: :Category:Concurrent_programming_languages

    Message passing languages provide language constructs for concurrency. The predominant paradigm for concurrency in mainstream languages such as Java is shared memory concurrency based on monitors. Concurrent languages that make use of message passing have generally been inspired by CSP or the π-calculus, but have had little commercial success, except for Ada and Erlang. Ada is a multipurpose language and concurrent programming is only one option available.

    * Ada (multi-purpose language)
    * Afnix – concurrent access to data is protected automatically (previously called Aleph, but unrelated to Alef)
    * Alef – concurrent language with threads and message passing, used for systems programming in early versions of Plan 9 from Bell Labs
    * ChucK – domain specific programming language for audio, precise control over concurrency and timing
    * Cilk – a concurrent C
    * Cω – C Omega, a research language extending C#, uses asynchronous communication
    * Concurrent Pascal (by Brinch-Hansen)
    * Corn
    * Curry
    * E – uses promises, ensures deadlocks cannot occur
    * Eiffel (through the SCOOP mechanism, Simple Concurrent Object-Oriented Computation)
    * Erlang – uses asynchronous message passing with nothing shared
    * Java
    o Join Java – concurrent language based on Java
    o X10
    * Join-calculus
    * Joule – dataflow language, communicates by message passing
    * Limbo – relative of Alef, used for systems programming in Inferno (operating system)
    * MultiLisp – Scheme variant extended to support parallelism
    * occam – influenced heavily by Communicating Sequential Processes (CSP).
    o occam-π – a modern variant of occam, which incorporates ideas from Milner's π-calculus
    * Oz – multiparadigm language, supports shared-state and message-passing concurrency, and futures
    o Mozart Programming System – multiplatform Oz
    * Pict – essentially an executable implementation of Milner's π-calculus
    * SALSA – actor language with token-passing, join, and first-class continuations for distributed computing over the Internet
    * SR – research language

    Curly-bracket languages

    See also: :Category:Curly bracket programming languages

    The curly bracket programming languages have a syntax that defines statement blocks using the "curly bracket" or "brace" characters { and }. All these languages descend from or are strongly influenced by C. Examples of curly-bracket languages include:

    * ABCL/c+
    * Alef
    o Limbo
    * AutoHotkey
    * AWK
    * BCPL
    * C - developed circa 1970 at Bell Labs
    * C shell (csh)
    * C++
    * C#
    * Ch - embeddable C/C++ interpreter
    * ChucK - audio programming language
    * Cilk - concurrent C for multithreaded parallel programming
    * Coyote - safer C variant to lower the likelihood of some common errors, e.g., buffer overflows
    * Cyclone - safer C variant
    * D - C/C++ variant
    * DINO
    * E
    * ECMAScript
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript
    o JScript
    o MDMscript
    * Frink
    * ICI
    * Java
    o Groovy
    o Join Java
    o X10
    * LPC
    * Nemerle - combines C# and ML features, provides syntax extension capabilities
    * Perl
    * PHP
    * Pico
    * Pike
    * ppC++
    * Suneido
    * SuperCollider
    * TorqueScript
    * UnrealScript
    * Windows PowerShell (Microsoft .NET-based CLI)
    * Yorick

    Dataflow languages

    Dataflow languages rely on a (usually visual) representation of the flow of data to specify the program. Frequently used for reacting to discrete events or for processing streams of data. Examples of dataflow languages include:

    * Hartmann pipelines
    * G (used in LabVIEW)
    * Max
    * Prograph
    * Pure data
    * VEE
    * VisSim

    Data-oriented languages

    Data-oriented languages provide powerful ways of searching and manipulating the relations that have been described as entity relationship tables which map one set of things into other sets. Examples of data-oriented languages include:

    * Clarion
    * Clipper (programming language)
    * dBase a relational database access language
    * M (an ANSI standard general purpose language with specializations for database work.)
    * SPARQL
    * SQL
    * Tutorial D, see also The Third Manifesto
    * Visual Foxpro native rdbms engine, object oriented, functional, RAD
    * WebQL

    Data-structured languages

    See also: :Category:Data-structured programming languages

    Data-structured languages are those where logic is structured in ways similar to their data. Such languages are generally well suited to reflection and introspection. There are three main types:

    * Array-based
    * List-based
    * Stack-based

    Assembly languages which statically link data inline with instructions can also be considered data-structured, in the most primitive way.

    Declarative languages

    See also: :Category:Declarative programming languages

    Declarative languages describe a problem rather than defining a solution. Declarative programming stands in contrast to imperative programming via imperative programming languages, where serial orders (imperatives) are given to a computer. In addition to the examples given just below, all (pure) functional and logic-based programming languages are also declarative. In fact, "functional" and "logical" constitute the usual subcategories of the declarative category.

    * ABSET
    * Analytica
    * Lustre
    * MetaPost
    * Prolog
    * SQL
    * XSL Transformations

    Esoteric languages

    An esoteric programming language is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke.

    * Befunge
    * Brainfuck
    * Chef
    * FALSE
    * INTERCAL
    * Shakespeare
    * Whitespace
    * Malbolge
    * Lolcode
    * merd

    Extension languages

    Extension programming languages are languages intended to be embedded into another program and used to harness its features in extension scripts.

    * AutoLISP (specific to AutoCAD)
    * CAL
    * Guile
    * Visual Basic for Applications
    * Lua

    etc.)

    * Python (Maya and other 3-D animation packages)
    * REXX
    * Tcl

    Fourth-generation languages

    Fourth-generation programming languages are high-level languages built around database systems. They are generally used in commercial environments.

    * ABAP
    * ADMINS
    * BuildProfessional
    * CorVision
    * CSC's GraphTalk
    * Easytrieve report generator (now CA-Easytrieve Plus)
    * Focus
    * GEMBASE
    * Informix-4GL / Aubit-4GL
    * LINC
    * MAPPER (Unisys/Sperry) now part of BIS
    * MARK-IV (Sterling/Informatics) now VISION:BUILDER of CA
    * Oracle Express 4GL
    * Revolution (not based on a database; still, the goal is to work at a higher level of abstraction than 3GLs)
    * SAS
    * Today
    * Ubercode (VHLL, or very high level language)
    * Uniface (programming language)
    * Visual DataFlex
    * Visual Foxpro

    Functional languages

    See also: :Category:Functional languages

    Functional programming languages define programs and subroutines as mathematical functions. Many so-called functional languages are "impure", containing imperative features. Not surprisingly, many of these languages are tied to mathematical calculation tools. Functional languages include:

    * APL
    * Charity
    * Clean (purely functional)
    * CodeSimian
    * Curl
    * Curry
    * Erlang
    * F#
    * Haskell (purely functional)
    o CAL
    * J
    * Joy
    * Kite
    * Lisp
    o Common Lisp
    o Dylan
    o Logo
    o Scheme
    * Lush
    * Maple
    * Mathematica
    * ML
    o Standard ML
    + Alice
    o Ocaml
    * Nemerle
    * Opal
    * OPS5
    * Poplog
    * Q
    * REFAL
    * Spreadsheets

    Interactive mode languages

    Interactive mode languages act as a kind of shell: expressions or statements can be entered one at a time, and the result of their evaluation is seen immediately.

    * BASIC (some dialects)
    * Forth
    * Haskell (with the GHCi interpreter)
    * M (an ANSI standard general purpose language)
    * Maple
    * ML
    * Python
    * Ruby (with irb)
    * Tcl (with the Tcl shell, tclsh)
    * Windows PowerShell (Microsoft .NET-based CLI)

    Interpreted languages

    Interpreted languages are programming languages which programs may be executed from source code form, by an interpreter.

    * APL
    * AutoIt scripting language
    * BASIC (some dialects)
    * CodeSimian
    * Databus (later versions added optional compiling)
    * Eiffel (via "Melting Ice Technology" in EiffelStudio)
    * Forth (interactive shell only; otherwise compiled to native or threaded code)
    * Frink
    * J
    * Lisp (early versions, pre-1962, and some experimental ones; production Lisp systems are compilers, but many of them still provide an interpreter if needed)
    * Lua (programming language)
    * Lush
    * M (an ANSI standard general purpose language)
    * Maple
    * Pascal (early implementations)
    * PostScript
    * Python
    * REXX
    * Spin programming language
    * The SDYPAIKSSVDAYSF Programming Language
    * TorqueScript
    * VBScript
    * Windows PowerShell (Microsoft .NET-based CLI)
    * Some scripting languages (below)

    Iterative languages

    Languages built around or offering generators

    * Aldor
    * Alphard
    * CLU
    * Eiffel, through "agents"
    * Icon
    * IPL-v
    * Lua
    * Lush
    * Python
    * Sather

    List-based languages – LISPs

    List-based languages are a type of data-structured language that are based upon the list data structure.

    * Joy
    * Lisp
    o Common Lisp
    o Arc
    o CodeSimian (like Lisp, but made with Java)
    o Dylan
    o Scheme
    o Logo
    * Lush
    * Tcl
    * TRAC

    Little languages

    Little languages serve a specialized problem domain.

    * apply is a domain-specific language for image processing on parallel and conventional architectures
    * awk can serve as a prototyping language for C, because the syntax is similar
    * SQL has only a few keywords, and not all the constructs needed for a full programming language

    Logic-based languages

    See also: :Category:Logic programming languages

    Logic-based languages specify a set of attributes that a solution must have, rather than a set of steps to obtain a solution. Examples:

    * ALF
    * Curry
    * Janus
    * Leda
    * Oz
    o Mozart Programming System a multiplatform Oz
    * Poplog
    * Prolog (formulates data and the program evaluation mechanism as a special form of mathematical logic called Horn logic and a general proving mechanism called logical resolution)
    o Mercury (based on Prolog)
    o Strawberry Prolog (standard Prolog with some extensions)
    o Visual Prolog (object-oriented Prolog extension)
    * ROOP

    Machine languages

    Machine languages are directly executable by a computer's CPU. They are typically formulated as bit patterns, usually represented in octal or hexadecimal. Each group of npatterns (often 1 or more bytes) causes the circuits in the CPU to execute one of the fundamental operations of the hardware. The activation of specific electrical inputs (eg, CPU package pins for microprocessors), and logical settings for CPU state values, control the processor's computation. Individual machine languages are processor specific and are not portable. They are (essentially) always defined by the CPU developer, not by 3rd parties. The symbolic version, the processor's assembly language, is also defined by the developer, in most cases. Since processors come in families which are based on a shared architecture, the same basic assembly language style can often be used for more than one CPU. Each of the following CPUs served as the basis for a family of processors:

    * ARM
    * Intel 80x86
    * IBM 360
    * Intel 8008/8080/8085
    * MIPS R2000|R3000
    * MOS Tech 6502
    * Motorola 680x
    * Motorola 680x0
    * National 32032
    * Power Architecture - (POWER and PowerPC)
    * StrongARM
    * Sun SPARC, UltraSPARC

    Macro languages

    See also: :Category:Macro programming languages

    Macro languages embed small pieces of executable code inside a piece of free-form text.

    * C preprocessor
    * m4 (originally from AT&T, bundled with Unix)
    * PHP
    * SMX
    * Stage 2

    Scripting languages such as Tcl and ECMAScript (ActionScript, DMDScript, E4X, JavaScript, JScript) have been embedded into applications so that they behave like macro languages.

    Metaprogramming languages

    Metaprogramming is writing of programs that write or manipulate other programs (or themselves) as their data or that do part of the work that is otherwise done at run time during compile time. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually.

    * Curl
    * Forth
    * Lisp
    * Maude
    * Nemerle
    * Python

    Multiparadigm languages

    Multiparadigm languages support more than one programming paradigm. They allow a program to use more than one programming style. The goal is to allow programmers to use the best tool for a job, admitting that no one paradigm solves all problems in the easiest or most efficient way.

    * Ada (concurrent, distributed, generic (template metaprogramming), imperative, object-oriented (class-based))
    * ALF (functional, logic)
    * APL (functional, imperative)
    * BETA (functional, imperative, object-oriented (class-based))
    * C++ (generic, imperative, object-oriented (class-based))
    * ChucK (imperative, object-oriented, time-based, concurrent, on-the-fly)
    * Common Lisp (functional, imperative, object-oriented (class-based), aspect-oriented (user may add further paradigms, e.g., logic))
    * Corn (concurrent, generic, imperative, object-oriented (class-based))
    * Curl (functional, imperative, object-oriented (class-based), metaprogramming)
    * Curry (concurrent, functional, logic)
    * D (generic, imperative, object-oriented (class-based))
    * Dylan (functional, object-oriented (class-based))
    * ECMAScript (functional, imperative, object-oriented (prototype-based))
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript
    o JScript
    * Eiffel (imperative, object-oriented (class-based), generic)
    * J (functional, imperative, object-oriented (class-based))
    * LabVIEW (dataflow, visual)
    * Lasso (macro, object-oriented (prototype-based), procedural, scripting)
    * Lava (object-oriented (class-based), visual)
    * Leda (functional, imperative, logic, object-oriented (class-based))
    * Lua (functional, imperative, object-oriented (prototype-based))
    * Maple
    * Metaobject protocols (object-oriented (class-based, prototype-based))
    * Nemerle (functional, object-oriented (class-based), imperative, metaprogramming)
    * Objective Caml (functional, imperative, object-oriented (class-based))
    * Oz (functional (evaluation: eager, lazy), logic, constraint, imperative, object-oriented (class-based), concurrent, distributed)
    o Mozart Programming System (multiplatform Oz)
    * Object Pascal (imperative, object-oriented (class-based))
    * Perl (imperative, functional (can't be purely functional), object-oriented, class-oriented, aspect-oriented (through modules))
    * PHP (imperative, object-oriented)
    * Pliant (functional, imperative, object-oriented (class-based))
    * Poplog (functional, imperative, logic)
    * ppC++ (imperative, object-oriented (class-based))
    * Prograph (dataflow, object-oriented (class-based), visual)
    * Python (functional, object-oriented (class-based))
    * REBOL (functional, object-oriented (prototype-based))
    * ROOP (imperative, logic, object-oriented (class-based), rule-based)
    * Ruby (functional, object-oriented (class-based))
    * SISAL (concurrent, dataflow, functional)
    * Spreadsheets (functional, visual)
    * Tcl (functional, imperative, object-oriented (class-based))

    Numerical analysis

    * Algae
    * Seneca an Oberon variant

    Non-English-based languages

    See also: :Category:Non-English-based programming languages

    Non-English-based programming languages do not use English keywords.

    * ARLOGO - Arabic
    * Chinese BASIC - Chinese
    * Fjölnir - Icelandic
    * HPL - Hebrew
    * Lexico - Spanish
    * Rapira - Russian
    * Glagol - Russian
    * var'aq - Klingon

    Object-oriented class-based languages

    Class-based Object-oriented programming languages support objects defined by their class. Class definitions include member data. Polymorphic functions parameterized by the class of some of their arguments are typically called methods.

    In languages with single dispatch, classes typically also include method definitions. In languages with multiple dispatch, methods are defined by generic functions. There are exceptions where single dispatch methods are generic functions (e.g. Bigloo's object system).

    Multiple dispatch

    * Common Lisp
    * Dylan
    * Goo
    * Cecil

    Single dispatch

    * Actor
    * Ada 95 (multi-purpose language)
    * BETA
    * C++
    * C#
    * Chrome
    * ChucK
    * ColdFusion
    * Corn
    * Curl
    * D
    * Delphi
    * ECMAScript (originally from Sun and Netscape)
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript
    o JScript
    o MDMscript
    * Eiffel
    o Sather
    o Ubercode
    * F-Script
    * Fortran 2003
    * Fortress
    * J
    * Java (closely related to C++, but with built-in garbage collection, removal of unsafe features and some advanced ones, compilation to universally runnable 'bytecode', protective sandbox for security -- originally from Sun Microsystems)
    o Groovy
    o Join Java
    o X10
    * Kite
    * Lava
    * Lua
    * Modula-2 (data abstraction, information hiding, strong typing, full modularity -- from N Wirth)
    o Modula-3 (added more object oriented features to Modula-2)
    o Objective Modula-2 (Modula-2 with Smalltalk message passing, following the Objective-C object model)
    * Moto
    * Nemerle
    * NetRexx
    * Oberon-2 (full object orientation equivalence in an original, strongly typed, Wirthian manner)
    * Object Pascal
    * Object REXX
    * Objective-C (a superset of C adding a Smalltalk derived object model and message passing syntax)
    * Objective Caml
    * Oz
    o Mozart Programming System
    * Perl 5
    * PHP
    * Pliant
    * PowerBuilder
    * ppC++
    * Prograph
    * Python (object oriented interpretive language)
    * Revolution (programmer does not get to pick the objects)
    * Ruby (object oriented interpretive language)
    * Simula (the first object oriented language, from Norway)
    * Smalltalk (pure object-orientation, originally from Xerox PARC)
    o Bistro
    o F-Script
    o Little Smalltalk
    o Squeak
    o VisualAge
    o VisualWorks
    * SPIN
    * SuperCollider
    * VBScript (Microsoft Office 'macro scripting' language)
    * Visual Basic
    * Visual DataFlex
    * Visual Foxpro
    * Visual Prolog
    * XOTcl

    Object-oriented prototype-based languages

    Prototype-based languages are object-oriented languages where the distinction between classes and instances have been removed:

    * ABCL/1
    * ABCL/R
    * ABCL/R2
    * ABCL/c plus
    * ActionScript
    * Agora
    * Cecil
    * CodeSimian
    * ECMAScript
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript (first named Mocha, then LiveScript)
    o JScript
    * Etoys in Squeak
    * Io
    * Lisaac
    * MOO
    * NewtonScript
    * Maple
    * Obliq
    * REBOL
    * Self (the first prototype-based language, derived from Smalltalk)
    * Slate
    * TADS

    Off-side rule languages

    Off-side rule languages are those where blocks are formed, indicated, by their indentation.

    * ISWIM, the abstract language that introduced the rule
    * ABC, Python's parent
    o Python
    * Miranda, Haskell's parent
    o Haskell
    + Curry
    * Occam
    * Pliant
    * SPIN

    Procedural languages

    Procedural programming languages are based on the concept of the unit and scope (the data viewing range of an executable code statement). A procedural program is composed of one or more units or modules, either user coded or provided in a code library; each module is composed of one or more procedures, also called a function, routine, subroutine, or method, depending on the language. Examples of procedural languages include:

    * Ada (multi-purpose language)
    * ALGOL (extremely influential language design. The second high level language compiler.)
    o SMALL Machine Algol Like Language
    * BASIC (BASICs are innocent of most modularity in (especially) versions prior to about 1990)
    * BLISS
    * C
    * C++ (C with objects + much else)
    * C# (from Microsoft, a next generation Java/C++ like language)
    * ChucK (C/Java-like syntax, with new syntax elements for time and parallelism)
    * ColdFusion
    * COBOL
    * Component Pascal (an Oberon-2 variant)
    * Curl
    * D
    * Delphi
    * ECMAScript
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript (first named Mocha, then LiveScript)
    o JScript
    * Eiffel
    * Fortran (better modularity in later Standards)
    o F
    * FPC Pascal (Pascal dialect)
    * HyperTalk
    * Java
    o Groovy
    o Join Java
    * JOVIAL
    * Lasso
    * Modula-2 (fundamentally based on modules)
    * Oberon-1 and Oberon-2 (improved, smaller, faster, safer follow-ons for Modula-2)
    o Component Pascal
    o Lagoona
    o Seneca
    * MATLAB
    * M (more modular in its first release than a language of the time should have been; the standard has become still more modular since then)
    * Nemerle
    * Occam
    * Pascal (successor to Algol60 and predecessor of Modula-2)
    o Object Pascal
    * Perl
    * PL/C
    * PL/I (large general purpose language, originally for IBM mainframes)
    * Rapira
    * VBScript
    * Visual Basic
    * Visual Foxpro

    Reflective languages

    Reflective languages let programs examine and possibly modify their high level structure at runtime. This is most common in high-level virtual machine programming languages like Smalltalk, and less common in lower-level programming languages like C. Languages and platforms supporting reflection:

    * Aspect-oriented
    * Befunge
    * ChucK
    * CodeSimian
    * Curl
    * ECMAScript
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript
    o JScript
    * Eiffel
    * Forth
    * Java
    o Java Virtual Machine
    o Groovy
    o Join Java
    o X10
    * Maple
    * Lisp
    o Common Lisp
    o Dylan
    o Logo
    o Scheme
    * Lua
    * Maude system
    * .NET Common Language Runtime
    * Objective-C
    * Objective Modula-2
    * Perl
    * PHP
    * Pico
    * Pliant
    * Poplog
    o POP-11
    * Prolog
    * Python
    * REBOL
    * Ruby
    * Smalltalk (pure object-orientation, originally from Xerox PARC)
    o Bistro
    o F-Script
    o Little Smalltalk
    o Self
    o Squeak
    o VisualAge
    o VisualWorks
    * Snobol
    * Tcl
    o XOTcl

    Rule-based languages

    Rule-based languages instantiate rules when activated by conditions in a set of data. Of all possible activations, some set will be selected and the statements belonging to those rules will be executed. Examples of rule-based languages include:

    * Clips
    * Constraint Handling Rules
    * Jess
    * OPS5
    * Prolog

    Scripting languages

    "Scripting language" has two apparently different, but in fact similar meanings. In a traditional sense, scripting languages are designed to automate frequently used tasks that usually involve calling or passing commands to external programs. Many complex application programs allow users to implement custom functions by providing them with built-in languages. Those which are of interpretive type, are often called scripting languages.

    More recently many of these applications have chosen to "build in" traditional scripting languages, such as Perl or Visual Basic, but there are quite a few "native" scripting languages still in use. Many scripting languages are compiled to bytecode and then this (usually) platform independent bytecode is run through a virtual machine (compare to Java).

    * AWK
    * AppleScript
    * BeanShell
    * Ch (Embeddable C/C++ interpreter)
    * CLIST
    * ColdFusion
    * ECMAScript
    o ActionScript
    o DMDScript
    o E4X
    o JavaScript (first named Mocha, then LiveScript)
    o JScript
    * EXEC
    * EXEC 2
    * F-Script
    * Frink
    * Game Maker Language (GML)
    * ICI
    * Io
    * JASS
    * Java
    o Groovy
    o Join Java
    * Lua
    * MAXScript
    * MEL
    * Mondrian
    * Perl
    * PHP (intended for Web servers)
    * Python
    * REXX
    * Ruby
    * Sed
    * Tcl
    * TorqueScript
    * Revolution
    * VBScript
    * Windows PowerShell (Microsoft .NET-based CLI)
    * Many shell command languages such as the UNIX shell or DCL on VMS have powerful scripting capabilities.

    Stack-based languages

    See also: :Category:Stack-oriented programming languages

    Stack-based languages are a type of data-structured language that are based upon the stack data structure.

    * colorForth
    * Forth
    * Factor
    * Poplog via its implementation language POP-11
    * PostScript
    * RPL
    * Urq

    Synchronous languages

    See also: :Category:Synchronous programming languages

    Synchronous programming languages are optimized for programming reactive systems, systems that are often interrupted and must respond quickly. Many such systems are also called realtime systems, and are found often in embedded uses. Examples:

    * Argos
    * Averest
    * Esterel
    * LEA
    * Lustre
    * Signal
    * SyncCharts

    Syntax handling languages

    * GNU bison (FSF's version of Yacc)
    * GNU Flex (FSF's version of Lex)
    * Lex (Lexical analysis, from Bell Labs)
    * M4
    * yacc (yet another compiler compiler, from Bell Labs)
    * javacc
    * Coco/R (EBNF with semantics)

    Visual languages

    See also: :Category:Visual programming languages

    Visual programming languages let users specify programs in a two-(or more)-dimensional way, instead of as one-dimensional text strings, via graphic layouts of various types.

    * CODE
    * Eiffel (program design from BON or UML diagrams, with back-and-forth facilities (round-trip engineering) through EiffelStudio)
    * Fabrik
    * Hyperpascal
    * LabVIEW
    * Lava
    * Limnor
    * Mindscript — software visualization and development environment, open source
    * Max
    * Pict
    * Prograph
    * Pure Data
    * Quartz Composer
    * Simulink
    * Spreadsheets
    * Subtext
    * Tinkertoy
    * VEE
    * VisSim
    * VVVV

    Some dataflow languages are also visual languages.

    Wirth languages

    Computer scientist Niklaus Wirth designed and implemented several influential languages.

    * Algol W
    * Modula
    * Modula-2 (and Modula 3, etc. variants)
    o Obliq Modula 3 variant
    * Oberon (Oberon and Oberon-2)
    o Component Pascal
    o Lagoona
    o Seneca
    * Pascal
    o Object Pascal (original name for Borland Delphi language)

    XML-based languages

    These are languages based on or that operate on XML. Although the big-boy equivalents of Oracle/PostgreSQL/MSSQL don't yet exist for XML, there are languages to navigate through it and its more tree-oriented structure.

    * ECMAScript E4X
    * Jelly
    * XPath
    * XQuery
    * XSLT
    * Cω

    Thursday, July 5, 2007

    VB Code Library 1.7.5.24







    VB Code Library








    VB Code Library is a powerful multi-language source code Library with the following benefits:

    1. Built-in library with 50,000++ lines of code
    2. Quick and powerful search engine
    3. Powerful printing capability
    4. Password protection & strong 448 bits encryption (optional)
    5. User notes & attachments handling
    6. Favorites & rating support
    7. Full integration with *all* major programming IDEs

    And much more!

    Platforms: Win98 WinME WinXP WinNT 4.x Windows2000 Windows2003


    Download

    RightWebPage 0.8







    RightWebPage









    RightWebPage is a free software that verifies and corrects many aspects of conformance of Web sites to International Standard ISO/IEC 23026:2006 - Software Engineering - Recommended Practice for the Internet - Web Site Engineering, Web Site Management, and Web Site Life Cycle

    Platforms: Windows2000 WinXP Windows2003 Windows Vista Starter Windows Vista Home Basic Windows Vista Home Premium Windows Vista Business Windows Vista Enterprise Windows Vista Ultimate


    Download

    MS SQL Converter 1.01






    MS SQL Converter









    MS SQL Converter will lighten your work with databases. Using it you can easily convert tables to data formats (xml, dbf, txt and csv) and sql. In few steps you will create reports in xls, doc, html, pdf. MS SQL Converter allows you to change the selected captions to the ones you need or set header or footer for your files. Download your free evaluation copy now to get all the benefits.

    Platforms: Win95 Win98 WinME WinXP Windows2000 Windows2003


    Download

    Audio Converter 2.2






    Audio Converter







    AudioConverter programme is created for solving different problems with audio. The programme allows to make the conversion in of popular audio formats & codecs. It is ideal for conversion WMA to Mp3, AVI to Mp3 etc. Great variety of settings and convenient presets will surely satisfy any beginner or an audio gourmet. You can easily prepare your audio collection for using in PC, iPod, Mobile telephone, DVD/CD/Flash player, Auto Audio system.

    Platforms: Win98 WinME WinXP Windows2000 Windows2003 Windows Vista Home Premium


    Download

    MediaLion DVD Ripper 3.5.5 Buil







    MediaLion DVD Ripper








    MediaLion DVD Ripper is powerful DVD ripping software which helps you rip DVD to VCD, DivX, AVI, MPEG, VOB, MP3 and other popular video and audio formats with super fast DVD ripping speed and excellent quality. Compared with other DVD ripping software, it has more settings you can customize, such as rip DVD by custom file size, split output file to fit your CD-R, rip DVD's any segment, select target subtitle and audio track, etc.

    Platforms: Win98 WinME WinXP Windows2000 Windows2003 Windows Media Center Edition 2005 Windows Vista Starter Windows Vista Home Basic Windows Vista Home Premium Windows Vista Business Windows Vista Enterprise Windows Vista Ultimate Windows Vista Home Basic x64 Windo


    Download

    Apollo DivX to DVD Creator 4.5.6







    Apollo DivX to DVD Creator







    Apollo DivX to DVD Creator transcodes and burns internet movie files into DVD disc. With DVD encoding and burning engine integrated you can easily Merge up to 4 hours of multiple movies or episodic files to standard MPEG2 Video and burn it into a DVD+R/RW and DVD-R/RW disc that playable on car or home DVD player.

    Platforms: Win95 Win98 WinME WinXP Windows2000 Windows2003 Windows Vista Starter Windows Vista Home Basic Windows Vista Home Premium Windows Vista Business Windows Vista Enterprise Windows Vista Ultimate Windows Vista Home Basic x64 Windows Vista Home Premium x64


    Download

    Apollo MPEG to DVD Burner 3.7.5







    Apollo MPEG to DVD Burner








    Apollo MPEG to DVD Burner is a user-friendly MPEG/MPG video files to DVD burner software that can convert and join MPEG/MPG/VCD/SVCD video files and burn into DVD+R/RW and DVD-R/RW disc that playable on car or home DVD player, all you need to do is just one-click of your mouse. supports both NTSC and PAL TV system.Supports widescreen and standard TV. It's a 1 click solution to burn DVD movie from your VCD/SVCD collection.

    Platforms: Win95 Win98 WinME WinXP Windows2000 Windows2003 Windows Vista Starter Windows Vista Home Basic Windows Vista Home Premium Windows Vista Business Windows Vista Enterprise Windows Vista Ultimate Windows Vista Home Basic x64 Windows Vista Home Premium x64



    Download