Download presentation
Presentation is loading. Please wait.
1
The Object-Oriented Thought Process Chapter 13
Objects in Web Services, Mobile Apps, and Hybrids
2
Evolution of Distributed Computing
Developers today need to understand how to create all the latest, coolest innovations and integrate these innovations with a lot of legacy technologies. This means that there is always a need to maintain a variety of current and legacy systems. Just think of all the COBOL code written decades ago that is still a vital piece of many companies’ IT infrastructure.
3
Distributed Computing
Distributed computing includes many technologies, including the following : • HTML • EDI • RPC • CORBA • DCOM • XML • SOAP • Web services • ReST
4
Object-Based Scripting Languages
Remember that C++ is considered to be object-based because object-oriented concepts are not necessarily enforced. You can write a non-object-oriented C program using a C++ compiler. There is also a class of languages called scripting languages—JavaScript, VBScript, ASP, JSP, PHP, Perl, and Python all fall into this category.
5
Client Security Because anyone can bring up a web browser, it would be very foolish to let the client (browser) access the database directly. Thus, when the client needs to inspect or update the database, it must request the operation from the server. This is a basic security issue.
6
Redundant Validation It is important to note that validation should be done on both ends for any web applications. There are ways for clients to post results directly to a server without the client validation, or they could shut off the client script and still submit bad values.
7
JavaScript To understand the power of the scripting languages, we must first understand the limitations of HTML. HTML is a markup language that provides functionality, not inherent programming capabilities. There is no way in HTML to program an IF statement or a loop. Thus, in the early days of HTML, there was little if any way to validate data on the client side.
8
Java Versus JavaScript
Although Java and JavaScript are both based on C syntax, they are not directly related. Whereas languages like Java and C# exist as independent application entities, on the client side JavaScript is normally considered to “live” within the confines of a browser. However, JavaScript files can exist independently as external code file and libraries (jQuery for example).
9
Objects in a Web Page There are many ways you can utilize objects within an HTML file for use in a web page. Objects can be implemented via a scripting language, as in a JavaScript validation. External objects can also be included within an HTML file. There are many examples of these external objects. Some play various media, like music and movies. Others can execute objects created by third-party software such as PowerPoint or Flash.
10
JavaScript Objects Object programming is inherent to the process of JavaScript programming. Although many names, such as component, widgets, controls, and so on, describe the parts of a user interface, they all relate to the functionality of an object.
11
JavaScript Objects You can use several objects to create this web page. Consider the following web page objects: The text box The button The form Each of these has properties and methods.
12
Web Page Controls Many types of objects can be embedded directly into an HTML document. Web page controls consist of a wide array of prebuilt objects. To utilize these objects, an <object> tag is provided. As an example, we will use a Slider control to include in a simple web page: <object classid=”clsid:F08DF D1-B16A-00C0F ” id=”Slider1” width=”100” height=”50”>
13
Browser Compatibility
As always, be aware that not all objects work with all browsers or on all operating systems.
14
Distributed Objects and the Enterprise
Perhaps the most basic definition of enterprise computing is that it’s essentially distributed computing. Distributed computing is just what the name implies, a distributed group of computers working together over a network. In this context, a network can be a proprietary network or the Internet.
15
The Common Object Request Broker Architecture (CORBA)
CORBA made a major contribution to the development community as the Internet was first becoming a major force in the marketplace in the mid 1990s. The main premise of CORBA is this: Using a standard protocol, CORBA allows programs from different vendors to communicate with each other.
16
The Common Object Request Broker Architecture (CORBA)
CORBA, and similar technologies like DCOM, can be considered the middleware for a variety of computer software applications. Basically, middleware provides services that allow application processes to interact with each other over a network. These systems are often referred to as multi-tiered systems.
17
Wrappers As we explained earlier in the book, one common use of objects is that of a wrapper. Today there are a lot of applications written on legacy systems. In many cases, changing these legacy applications is either impractical or not cost-effective. One elegant way to connect legacy applications to newer distributed systems is to create an object wrapper that interfaces with the legacy system.
18
Internet Inter-ORB Protocol
Just as HTTP is the protocol for web page transactions, Internet Inter-ORB Protocol (IIOP) is a protocol for distributed objects that can be written in a variety of programming languages. IIOP is a fundamental piece of standards like CORBA and Java RMI.
19
Web Services Definition
At this point in time, we will use the W3C general definition of a web service: A “client and a server that communicate using XML messages using the SOAP (Simple Object Access Protocol) standard.”
20
RPC Remote procedure calls (RPC) are a communication process that allows the invocation of (object) services from another computer on a shared network. When the systems are indeed object-oriented, RPC can also be called remote method invocation (RMI). The method call is seamless in the sense that the developer never knows (or doesn’t need to know) whether the service is local or remote.
21
SOAP SOAP is a communication protocol used for sending messages over the Internet. SOAP Is theoretically platform and language independent and is based on XML. communicates between applications using the HTTP protocol, because it is common for user client applications to utilize browsers. extends the functionality of HTTP to provide more functional web services.
22
Representational State Transfer (ReST)
ReST is a stateless protocol that basically relies on HTTP. Because HTTP is the foundation of the Internet itself, in many ways it can be said that the Internet’s architecture is based on ReST, often called RESTful architectures.
23
Representational State Transfer (ReST)
The fundamental feature of ReST is that it uses HTTP requests to create, update, read, and delete data. As a result, ReST can be utilized in place of other technologies, such as RPC, or web services, like SOAP, because it provides all the necessary underlying functionality. In short, ReST is a lightweight approach to web services.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.