230 likes | 694 Views
CIS 338: Client/Server Application Development with Visual Basic.NET. Dr. Ralph D. Westfall April, 2011. What Can Computers Do?. Individual exercise: identify things that can't be done without computers (impossible/impractical)? How can computers do such things?
E N D
CIS 338: Client/Server Application Development with Visual Basic.NET Dr. Ralph D. Westfall April, 2011
What Can Computers Do? • Individual exercise: • identify things that can't be done without computers (impossible/impractical)? • How can computers do such things? • capabilities of computers: examples of? • doing same things better • doing new things (couldn't do before)
Programming Languages • How many in the world? • see The Language List • How many have multiple web pages devoted to them? • another list (180+ entries, but a fair amount of overlap)
A "Perfect" Language? • Buzz group exercise: • Identify desirable features/advantages: • for the student/learner, or for the experienced programmer? • for amateurs (use once in a while), or for professionals (use all the time)? • for organizations, businesses? • in general?
Visual Basic.NET in Context • When viewing the following slides, and through the remainder of this course, think about: • what computers can do? • features/capabilities that programming languages should have?
C/S with VB.NET Overview • What is client/server computing? • How does Visual Basic.NET relate to client/server computing? • Introduction to Visual Basic.NET • objects • integrated development environment • program code • advantages and disadvantages
Client/Server Computing • services – data, computations, etc. • server(s) – computer(s) that provides services • client – computer that gets services • messages to server(s) requesting services • advantage = efficiency • clients & server(s) each what do best
Client/Server Advantages • relative to mainframe systems • GUI (WIMP) easier for users to work with • flexible: easier to adapt to different environments/different types of use • interoperability: easier to share data with other applications • scalability: can work with limited activity, or with larger volumes/high traffic
Client/Server Examples • web servers (Apache, IIS) • lots of HTML, some audio, video, etc. files • send files over Internet when requested • handle login security • Email servers and email clients • PC clients • show/play files on screen and speakers • encrypt data to send to server
Client/Server Examples - 2 • database server • fast access to large amounts of data • high-level validation • security • PC client • data entry • low-level validation • showing reports created from server data
VB.NET and Client/Server • object oriented programming (OOP) • built-in objects handle many of details • component assembly approach (like Lego) • VB.NET object for client user interface • forms, menus, reports/printing • [demonstration of form/controls] • VB.NET objects for interacting with server • database connection, records from database
Visual Basic.NET Code • modeled on the BASIC and Java languages • Java and JavaScript look more like C/C++ • BASIC stands for: beginners all-purpose symbolic instruction code • control structures (different from Java, etc.) • sequence (one instruction after another) • selection (if … then … else, select case …) • repetition (looping: for…next, do while…) • transfer of control (subroutines, functions)
Visual Basic.NET Code - 2 • built-in functions • e.g., CInt (convert to integer), CStr (convert to string), Now (date/time), Round (to integer or decimal values), IsNumeric (tells if a value is a number) • numerous data types • 8 (!) integers, 3 decimals, Boolean, String, character • compiled into MSIL code
Visual Basic.NET Code - 3 • With … End With
Advantages of VB 6 • works with Windows • 95% of OS (operating system) market • popular • 3 million VB developers in world (.NET?) • used by many larger organizations • easy to learn to write small applications • creating forms, adding controls, writing simple code
More Advantages of VB 6 • high productivity • does a lot of things for you automatically • suitable for rapid application development • prototyping "quick and dirty" sample systems • developing complete systems • Rapid Application Development (RAD)
Even More Advantages of VB 6 • can be a component of scalable, multi-platform systems • VB front end to almost any hardware/database platform • multi-tier architectures • works with the Internet • compiled ActiveX controls work with IE • ASP.NET works with many browsers
Disadvantages of VB 6 • different from, not “elegant” like Java, C/C++ (VB.NET much better on this) • slower performance than C/C++ • less features/power than C/C++, Java • less control over operating system and other lower level computer activities • Microsoft support ended 2008
More Disadvantages of VB 6 • too easy to learn? • bad systems developed by inexperienced developers • harder languages (C/C++, Java, VB.NET) are more impressive to recruiters
Advantages of VB.NET • completely object oriented • .NET Framework makes code interoperable with code written in other languages • more powerful than VB 6 • more esthetic? (looks like Java) • Visual Studio.NET is a very powerful development tool
Disadvantages of VB.NET • harder to learn than VB 6 • syntax is more detailed • substantial differences from VB 6 • not as easy to work with? • if you turn error checking (Option Strict) on, Visual Studio forces you to write code according to the syntax requirements • but keeping error checking on helps you develop code that is less likely to crash