Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture 01 - Object oriented with visual programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

z

Object oriented
with visual
programming
M. Y Abdur Rahman
z
Module content

1. Understand object-oriented concepts

2. Basic object-oriented programming concepts

3. Object-oriented programming design

4. C# and the .NET Framework

5. Overview of C# Programming

6. Variables and Types

7. Methods (Functions)

8. Arrays

9. Object Oriented Programming

10. Developing GUI Applications

11. Creating a Students Registration System


z
Introduction Microsoft .NET
▪ A software framework or a programming infrastructure developed by
Microsoft.

▪ It is used to build, run applications and services that use .NET


technologies like desktop application as well as web services

▪ A general-purpose development platform for any kind of app or workload

▪ Provides key capabilities for building high quality apps


❑ Support for modern programming languages

❑ Provides a comprehensive programming model for building all kinds of


applications.
z
A Framework.

▪ A framework is a set of rules, guidelines and best practices that


are followed to get the desired results. A testing framework should
have the features listed below:
▪ Should support more than one browser.

▪ Should run on multiple platforms.

▪ Should run on multiple programming languages like Java, Python,


C#, Ruby and so on.

▪ Efficient handling of test data.

▪ Test case creation and updating are easy and maintainable.


z
Microsoft .NET Framework

C# .NET JSCRIPT .NET

▪ This frame work VB . NET WINDOWS


supports more than 60 POWERSHELL
programming C++ .NET IRON RUBY
languages where 11
are designed and
J# .NET IRON PYTHON
developed by F# .NET C OMEGA
Microsoft.
ASLM (Abstract State
Machine Language)
z

Question 1:

▪ List down 5 different frameworks.

▪ List down 5 different IDE’s.

▪ List down 5 different

▪ List down 5 tools and technologies.


z

• .NET Framework 4.5.2


Microsoft .NET versions
• .NET Framework 4.5.1
• .NET Framework 4.8
• .NET Framework 4.5 • .NET Framework 4.7.2
• .NET Framework 4 • .NET Framework 4.7.1
• .NET Framework 4.7
• .NET Framework 3.5
• .NET Framework 4.6.2
• .NET Framework 3.0 • .NET Framework 4.6.1
• .NET Framework 2.0 • .NET Framework 4.6

• .NET Framework 1.1

• .NET Framework 1.0 - 2002


z
New Features in Microsoft .NET
▪ Runtime JIT and NGEN improvements.
versions
All bugs fixed and many code generation based performance optimization.

▪ Base class library updated Zlib. (From version 4.5)

They have used the native version of Zlib which is a native ecternal compression
library used for data compression from the given site (http://zlib.net) .

▪ Runtime – Antimalware Scanning for all assemblies. ( .Net Farmwork 4.8 on


windows 10 triggers scans for those assemblies by windows defender and
many other antimalware solutions that implements the Antimalware Scan
Interface)
z
New Features in Microsoft .NET
versions
▪ WCF (Windows Communication Foundation) – To build service oriented
applications. Can be used to send data as asynchronous message
from in service end point to another.
z
New Features in Microsoft .NET
versions Cont..
▪ WPF(Windows Presentation Foundation) – Microsoft development tool for
web development and rich client application. With WPF the developers
cause XAML(extensible Application Markup Language: to create custom
controls, graphics. 3D images and animations that are not available in
traditional HTML ).
z
New Features in Microsoft
.NET versions Cont..

▪ Microsoft Azure

▪ IT is formally known as
windows azure, Ms public
cloud computing platform. It
provides a range of cloud
services, including those for
compute, analytics, storage
and networking. Users can
pick and choose from thses
services to develop and
scale new applications, or
run existing applications in
the public cloud.
z
New Features in Microsoft .NET versions
Cont..
▪ Universal Windows Platform
Development: One platform,
Many devices – Through
this Windows 10 provides a
unified store to reach every
device running Windows 10.
Windows run on single,
unified core across devices
– mobile, desktop, and
Xbox. They can be reached
with one codebase and
adapt it at runtime as
needed.
z
Design principles
➢ Language Independence,

❑ Common Type System(CTS) defines all possible data types and


programming constructs supported by CLR and how they may or
may not interact with each other

❑ Framework supports the exchange of types and object instances


between libraries and applications written using any .NET language

➢ Portability

❑ Possible for third parties to create compatible implementations of


the framework and its language on other platforms.
z

Security Memory Management


Design principles Framework has its own Handle memory management
cont. security mechanism with two
general features
itself.
• By detecting of when
• Code access security(CAS) memory can be safely freed
• Validation and verification Instantiations of .NET
types(objects) are allocated
from the managed heap; a
pool of memory managed by
CLR.
z

Design principles cont.

▪ Simplified Deployment
▪ Framework includes design features and tool which help manage the
installation of computer software.

▪ Performance
▪ When an application is first launched using its just-in-time compiler, and
caches the executable program into the .NET native image cache
▪ Due to caching, the application launched faster for subsequent
launches.
z Concept- .NET Execution Model

VB C#

Compiler Compiler
Un managed
components
Assembly IL Assembly IL

Common Language Runtime

Standard JIT compiler

Native code

OS
z

▪ A compiler is a special program that translates a programming language's


source code into machine code, bytecode or another programming
language.

▪ The difference between compiler and assembler is that a compiler is used


to convert high-level programming language code into machine language
code. On the other hand, an assembler converts assembly level language
code into machine language code.
z
Common Language Runtime(CLR)

▪ The Common Language Runtime, the virtual machine component of Microsoft


.NET Framework, manages the execution of .NET programs.

▪ It is the core component of .NET framework

▪ Virtual machine component of .NET framework

▪ Responsible for managing:


▪ Executing of .NET programs, convert the CIL/MSIL code into native machine
language code
Source code z Bytecode Native code

C# compiler
C#

CLR
VB .NET compiler Native code
VB .NET
CIL code

Other other compiler


.NET
language
s

Compiler time Run time

CLR converts CIL Common Intermediate language to native code


z
Benefits of CLR
▪ Performance improvements. The ability to easily use components developed in other
languages.

▪ Extensible types provided by a class library.

▪ Language features such as inheritance, interfaces and overloading for object-oriented


programming.

▪ Support for structured exception handling

▪ Support for customer attributes.

▪ Garbage collection

▪ Use of delegates instead of function pointers for increased type safety and security
z Base Class Library(BCL)
▪ The .NET framework class library(FCL) provides the core functionality of .NET
framework architecture. The .NET FCL includes a huge collection of reusable classes,
interfaces, and value type that expedite and optimize the development process and
provides access to the system functionality

▪ The Base Class Library (BCL) is literally that, the base. It contains basic, fundamental
types like System. String and System. Date Time .

▪ Biggest benefits of writing managed code-from a developer’s point o view.

▪ You can either instantiate objects of .NET base class or derive your own classes from
them

▪ To start a thread, call the start() method of the thread class.

▪ To disable a text box- the enable property of a text box object to “false”
z
Microsoft Intermediate Language(MSIL)
▪ Call it as
▪ Intermediate Language(IL)

❖ A language that is generated from programming source code, but that cannot be directly
executed by the CPU. Also called "bytecode," "p-code," "pseudocode" or "pseudo language,"

▪ Common Intermediate Language(CIL)

❖ CIL (Common Intermediate Language) is a bytecode and the language of the . NET platform
into which are compiled source code written in high level languages.

▪ During the compile time the compiler convert the source code into MSIL.

▪ During the runtime, the CLR’s Just In Time(JIT) compiler converts the MSIL code into
native code to the operating system.(4.6 framework)
z Common Type System(CTS)

▪ Common type system(CTS) describes a set of types that can be used in different .Net
languages in common. That is, the common Type System(CTS) ensure that objects written
in different .Net languages can interact with each other.

▪ Date type defined in two different languages get compiled to a common data type.

▪ Useful:
▪ When we want code in one languages to be called in other language.

▪ Practical demonstration:

▪ Creating same application in C# and VB.Net and then compare the IL code of both
application Datatype of both IL code is same.
z
Common Language Specification
(CLS)

▪ Subset of CTS When there is a situation to communicate objects


written in different .Net complaint languages, those objects must
expose the features that are common to all the languages.

▪ CLS is a set of rules or guidelines.


▪ When any programming language adheres to there set of rules it
can be consumed by any .Net language CTS.
z
Asp.net
▪ Technology for building powerful, dynamic web applications.

▪ Part of the .Net framework.

▪ Provides the easy way to build, deploy & run web application on any browser.

▪ ASP.NET works on top of the HTTP protocol and uses the HTTP commands and
policies to set a browsers-to-server two-way communication and corporations.

▪ The ASP.Net application codes could be written in either of the following languages:
▪ C#.Net, VB.Net, JavaScript,J#
z
Active X data objects(ADO.net)
▪ A set of classes that expose data access service to the .NET
program.

▪ Provides consistent access to data sources such as:


❖ Microsoft SQL server

❖ Data source exposed through OLE DB(Object Linking and


Embedding, Database) and XML

▪ Data-sharing consumer applications can use ADO.net to


connect to data source and retrieve, manipulate and update
data.
z

Thank You

You might also like