Introduction Visual Programming

1y ago
8 Views
2 Downloads
502.86 KB
32 Pages
Last View : 11d ago
Last Download : 3m ago
Upload by : Evelyn Loftin
Transcription

Visual ProgrammingIntroductionP.Urutrhiran

Visual ProgrammingUNIVOTECVisual Programming Language (VPL) mean?A visual programming language (VPL) is a programminglanguage that uses graphical elements and figures todevelop a program.A VPL employs techniques to design a software programin two or more dimensions, and includes graphicalelements, text, symbols and icons within its programmingcontext.A visual programming language is also known as anexecutable graphics language.2

UNIVOTECA visual language can be one of a few types, such asicon-based languages, diagramming languages andform-based language.The graphics or icons included within a visual programserve as input, activities, connections and/or output ofthe program.3

ProgrammingProgramming language semantics and syntax are used whenconstructing an application. Thus, programming requiresknowledge of application domains, algorithms andprogramming language expertise.Programming language logic differs by developer. From a highlevel, good code can be evaluated with factors such as:Robustness: Focuses on program continuation capability,regardless of errors or incorrect data.Reliability: Focuses on correct design and algorithmimplementation.Efficiency: Focuses on memory, hardware or otherproperties used to optimize programs.Readability: Proper documentation and indentationavailability, which provides insight to other programdevelopers or designers.4UNIVOTEC

Introduction to C#.Net FrameworkProgrammingC# History (brief)Compiling ProcessCategories of Programming Errors5UNIVOTEC

What is .NET?It is a platform for developing managed softwareTraditional compilation process, the executable file isbinary and can be directly executed by the operatingsystemIn the managed environment of .NET, the file producedby the compiler is not an executable code6Advanced .Net Programming B.Tech (Software)UNIVOTEC

An AssemblyAn Assembly contains intermediate language andmetadata rather than binary code.This intermediate language is called MicrosoftIntermediate Language (MSIL), which is commonlyreferred to as IL.IL is a high-level, component-basedassembly language.7Advanced .Net Programming B.Tech (Software)UNIVOTEC

What is a Framework?Framework is a defined support structure in whichanother software project can be organized anddevelopedIt is the skeleton upon which various objects areintegrated for a given solution8Advanced .Net Programming B.Tech (Software)UNIVOTEC

.NET FrameworkC#VB.NETC .NETUNIVOTECOtherCommon Language SpecificationFramework Class LibraryASP.NETWeb ServicesWindows FormsWeb FormsASP.NET Application ServicesControlsDrawingWindows Application sticsEtc.Common Language RuntimeMemoryManagement9Common TypeSystemLifecycle MonitoringOperating SystemAdvanced .Net Programming B.Tech (Software)VisualStudio.NET

.NET FrameworkUNIVOTECWhen we write code we use a managed programming language such asvisual C#, Visual BasicThis code is then compiled.The compiled code at run time sits on top of and makes use of five layersThe five main layers areBase Class Library (BCL).NET 2.0.NET 3.0.NET 3.5.NET 4.0.NET 4.5.NET 4.6.NET 4.7.NET 4.810Advanced .Net Programming B.Tech (Software)

NET Framework libraryThis is also known as Class Library or ApplicationApplication Programming Interface (API)Class library is divided into two partsFrame Class Library (FCL)Base Class Library (BCL)11Advanced .Net Programming B.Tech (Software)UNIVOTEC

The .NET Framework Class Library (FCL)UNIVOTEC.NET has an extensive library, offering literally thousandsof reusable types.Organized into namespaces, the FCL contains codesupporting all the .NET technologies, such as WindowsForms, Windows Presentation Foundation, ASP.NET,ADO.NET, Windows Workflow, and WindowsCommunication Foundation.In addition, the FCL has numerous cross-languagetechnologies, including file I/O, networking, textmanagement, and diagnostics12Advanced .Net Programming B.Tech (Software)

Base Class Library (BCL)Fundamental or rudimentary low level classes that coverbasic programming features used in any type of .NETapplication.Eg: Collections, types, debugging, diagnostics, managingthreads, manipulating strings.The .NET Framework's Base Class Library provides userinterface, data access, database connectivity,cryptography, web application development, numericalgorithms, and network communications.Oldest part of the library13Advanced .Net Programming B.Tech (Software)UNIVOTEC

Common .NET FCL/BCL Namespaces14Advanced .Net Programming B.Tech (Software)UNIVOTEC

Common Language Runtime (CLR)UNIVOTECPrograms written for the .NET Framework execute in asoftware environment, known as the Common LanguageRuntime (CLR)Virtual machine – Executes our managed code atrun-timeThe six layers are executed at runtime by CLRThe CLR runs on the operating system, which in turnruns on the hardwareCLR manages code execution at runtimeMemory management, thread management, etc.15Advanced .Net Programming B.Tech (Software)

Common Language RuntimeCore aspect of the .NET frameworkPurpose: To provide a languageneutral platform for applicationdevelopmentWe can compile in a variety oflanguages such as C#, VB etcUsing appropriate compiler wouldthen compile the source code into alanguage neutral commonrepresentation called byte codeThis generates a DLL or an EXE(called an assembly)This contains the managed codeThe managed code is loaded at runtime by CLR (Runtime engine)CLR takes the managed code anddoes a JIT compilation to create thenative code16Advanced .Net Programming B.Tech (Software)UNIVOTEC

ProgrammingUNIVOTECProgram – a set of detailed, step-by-stepinstructions that directs the computer to process datainto information.Programming is combination of art and science,because you may code a program however you like aslong as you follow the language’s rules.Programming language – a set of rules (syntax)and commands that provides a way of telling thecomputer what operations to perform.Programmer – designs algorithm and converts it intocomputer instructions and tests programs as developed.17

Programming CategoriesObject-Oriented Programming (OOP)Emphasis is on identifying objects in a problem (student, faculty, etc).Objects are then categorized into classes (person).Classes are used in programs to create and manipulate objects.ObjCustomer new clsCustomer;Procedural ProgrammingEmphasis is on identifying the procedures or steps to solve a problemand then creating a program as the solution.Event ProgrammingUsually related to GUI programming.Program reacts to events, such as a user clicking on a mouse.All of these techniques will be used throughout ourC#.NET.18UNIVOTEC

History of C#In 2000 Microsoft released the .Net programmingplatform.Microsoft included it’s new language C#(pronounced C-Sharp).Roots are in C, C , and Java.Net includes a rich library of pre-built componentsthat are shared among the .Net languages such asVisual Basic (VB).If you know VB, you should recognize some of theclasses and methods that are used in C#.19UNIVOTEC

IDE SoftwareUNIVOTECC# programs are created in a GUI IDE .GUI : Graphical User InterfaceIDE : Integrated Development EnvironmentC# IDE provides the tools and capabilities to create verypowerful and flexible programs.Can create Forms, Classes, Programs, Databaseconnections, and many other things.The IDE includes a smart editor, compiler, linker, anddebugger.20

C# Form21UNIVOTEC

C# Methods22UNIVOTEC

Key Elements of a C# ProgramDesign the forms (user interface).Design the methods that will be executed.Create forms using various control objects.Write methods that react to object events.Each statement must end with a semi-colon.Most blocks of code required an open and closebrace { }.23private void calculateButton Click( ){int intQuanity;decimal decPrice;}UNIVOTEC

C# to Machine LanguageC# programs are typed in as text.Programs have a .cs extension.CS1Form.csForm Resources have a .resx extension.CS1Form.resxMust be converted to machine language.How?By compiling 24UNIVOTEC

Compiler and LinkerUNIVOTECCompilerVerifies the program is coded with commands it recognizesand that the proper syntax was used.Creates an object file (machine language).LinkerCombines the program’s object file with object code ofstandard routines from the library.Creates the final executable file (.exe).In the .Net Framework, Common Language Runtime (CLR)is the linker.25

IDE Language (MSIL)Common Language Runtime(CLR)26Syntax ErrorsWarningsLibraryObjectsCS1.exein memoryUNIVOTEC

SyntaxThere are several languages to choose from.Each language has a set of commands that can be used.Each language has a set of syntax rules that must befollowed.Syntax determines many things - like how commands areentered and how each command should end (period,semi-colon, etc).27UNIVOTEC

Three Categories of ErrorsSyntax Errors and WarningsLogic ErrorsRun-time ErrorsActually are logic errors.28UNIVOTEC

Syntax Errors & WarningsDetected by compiler.Violation of grammar rules.Mistyped command.Compiler tells you what the error isor what it thinks it is.Compiler tries to tell you where the erroroccurred.WarningsPasses syntax rules but not normally coded this way.Programmer should check for possible logic error.29UNIVOTEC

Logic ErrorsDetected and corrected by programmer.Program designed or written incorrectly.Output generated does NOT match expected output.Simple to very complex.Using * (multiply) instead of (add)Test, test, test and verify results.This is where programmers earn their money.30UNIVOTEC

Run-time ErrorsUsually discovered by user, but corrected byprogrammer.Program terminates unexpectedly.Error: access violation Usually based on a logic error.Divide by zeroUsers do something programmer didn’t expectthem to do.Processing unexpected input, such asletters instead of numbers.Users need to document what they were doingwhen the error occurred to help programmer.31UNIVOTEC

SummarySoftware Development Life Cycle (SDLC)# HistoryCompiling ProcessCategories of Errors32UNIVOTEC

A visual programming language (VPL) is a programming language that uses graphical elements and figures to develop a program. A VPL employs techniques to design a software program in two or more dimensions, and includes graphical elements, text, symbols and icons within its programming context. A visual programming language is also known as an

Related Documents:

Visual Basic is a third-generation event-driven programming language first released by Microsoft in 1991. The versions of visual basic in shown below: The final version of the classic Visual Basic was Visual Basic 6. Visual Basic 6 is a user-friendly programming language designed for beginners. In 2002, Microsoft released Visual Basic.NET (VB .

Visual Basic - Chapter 2 Mohammad Shokoohi * Adopted from An Introduction to Programming Using Visual Basic 2010, Schneider. 2 Chapter 2 –Visual Basic, Controls, and Events 2.1 An Introduction to Visual Basic 2.2 Visual Basic Controls 2.3 Visual Basic Events. 3 2.1 An Introduction to

What Visual Basic is not H Visual Basic is not, a powerful programming language that enables you to do anything you want. H Visual Basic is not, elegant or fast. H Visual Basic is not, a replacement for C. H Visual Basic is not, anything like any other programming language you have ever used.

Structure programming has been the traditional way of programming. Procedural Programming If you have taken a course in C, Visual Basic, Pascal, FORTRAN, Cobol etc. the programs you wrote were Procedural. In procedural programming, the focus of the programs was to solve a problem.

Programming Visual Basic .NET Dave Grundgeiger Publisher: O'Reilly First Edition January 2002 ISBN: 0-596-00093-6, 464 pages Published just in time for the first release of Visual Basic Studio .NET, Programming Visual Basic .NET is a programmer's complete guide to Visual Basic .NET.

Text-Based And Visual-Based Programming Input Methods 212 pands the visual programming function to Minecraft. It reported that this tool results in improved recognition of programming. Although this study compared the visual program function to text en-vironments, a significant difference was not detected (Zorn, Wingrave, Charbonneau, & LaViola,

Programming in Visual Basic 2010 This book is an introduction to programming using Microsoft’s Visual Basic .NET 2010. It is intended for novice programmers with little or no programming experience or no experience

15th AMC ! 8 1999 5 Problems 17, 18, and 19 refer to the following: Cookies For a Crowd At Central Middle School the 108 students who take the AMC! 8 meet in the evening to talk about prob-lems and eat an average of two cookies apiece. Walter and Gretel are baking Bonnie’s Best Bar Cookies this year. Their recipe, which makes a pan of 15 cookies, list these items: 11 2 cups of our, 2 eggs .