This disclosure relates to object-oriented programming and, more particularly, to object constructors for generic frameworks.
Software applications in object-oriented programming often require that objects of classes be instantiated with a set of attributes. Object-oriented frameworks, used to unify portions of code to reduce development and maintenance efforts, may be used to instantiate an object for a software application. In many instances, the framework may contain a basic set of class attributes for each class utilized by the application. Thus, when the application requires an instance of a particular class, the framework is called to instantiate the object with this basic set of attributes. The framework utilizes a generic data constructor to create an instance of the class. Should the software application utilize additional attributes not present in the framework, these attributes are set outside of the framework environment and constructor, when the object is available to the application. Therefore, the object attributes may not be consistent with those attributes in the software application even if the additional attributes are set immediately after object instantiation within the framework.
This disclosure provides various embodiments of software for managing object instantiation between a software application and a generic framework through, for example, a data constructor. In one implementation, the software requests the framework to instantiate an object using a generic class constructor, transmits a set of additional attributes for the object to the framework, and receives an instantiated object from the framework. The instantiated object attributes include the additional attributes sent to the framework. In some cases, the software calls the framework to validate a previously instantiated object and then calls the framework to instantiate another object of the class with additional attributes. The application then transmits the additional attributes for the second object to the framework.
In another implementation, software receives a first call to instantiate a first object based on a class using an associated generic class constructor and receives a second call to instantiate a second object using the associated generic class constructor. This software then receives a first set of additional attributes for the first object and instantiates the first object, the instantiated first object including the first set of additional attributes. In one example, the software may be a static method of setting the additional attributes in the object of the particular class. Thus, static attributes of the particular class are copied to the instantiated object in the framework and each instance of the class contains the same static attributes.
Moreover, some or all of these aspects may be further included in respective systems or other devices for executing, implementing, or otherwise supporting a software application that can create instances of the class within the framework with varying attributes. The details of these and other aspects and embodiments of the disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the various embodiments will be apparent from the description and drawings, as well as from the claims.
Referring to illustrated
Turning to the illustrated embodiment, system 100 includes or is communicably coupled with server 102, one or more clients 104, and one or more service providers or vendors 106, at least some of which communicate across network 112. Server 102 comprises an electronic computing device operable to receive, transmit, process, and store data associated with system 100. Each computer is generally intended to encompass any suitable processing device. For example, although
Illustrated server 102 includes a local memory 120. Memory 120 may include any memory or database module and may take the form of volatile or non-volatile memory including, without limitation, magnetic media, optical media, random access memory (RAM), read-only memory (ROM), removable media, or any other suitable local or remote memory component. Illustrated memory 120 includes one or more developed objects 140. But memory 120 may also include any other appropriate data such as VPN applications or services, firewall policies, a security or access log, print or other reporting files, HTML files or templates, data classes or object interfaces, child software applications or sub-systems, and others.
Illustrated server 102 also includes a processor 125. Processor 125 executes instructions and manipulates data to perform the operations of server 102. Processor 125 is, for example, a central processing unit (CPU), a blade, an application specific integrated circuit (ASIC), or a field-programmable gate array (FPGA). Although
At a high level, application 130 is any application, program, module, process, or other software that may utilize, change, delete, generate, or is otherwise associated with the developed objects 140 according to the present disclosure. In certain cases, system 100 may implement a composite application 130, as described in
More specifically, as illustrated in
Processor 125 may also execute a development environment 110, which generally is any software application designed to help develop software application 130 (as well as any related components, modules, and such) for clients 104 or other third-parties. Further, development environment 110 allows a developer to develop, update, etc., applications or objects. Although development environment 110 is illustrated in
Illustrated processor 125 also includes a framework 116, which generally unifies portions of software code to reduce development efforts and code maintenance. More specifically, framework 116 may be an object-oriented generic framework that instantiates one or more objects, or entities, using a generic data, or class constructor. Once instantiated by framework 116, objects may be developed objects 140 residing in memory 120. Further, framework 116 may receive one or more calls from application 130 to instantiate objects with the set of predefined attributes located on framework 116. In addition to instantiating the object with the set of predefined attributes, framework 116 may receive a set of additional attributes from application 130, which are also set as instance attributes of the instantiated object. This helps ensure that the instantiated object is consistent, i.e. the attributes of the object reflect the additional attributes located in application 130.
In another embodiment, the generic constructor of the class sought to be instantiated may ensure that a previous call to the framework 116 to instantiate the object of the class was performed correctly. In this embodiment, a correct instantiation of the object occurs when the attributes of the instantiated object are consistent with predefined attributes located on framework 116, as well as additional attributes located on application 130.
Server 102 may also include an interface 117 for communicating with other computer systems, such as clients 104, over network 112 in a client-server or other distributed environment. In certain embodiments, server 102 receives data from internal or external senders through interface 117 for storage in memory 120 and/or processing by processor 125. Generally, interface 117 comprises logic encoded in software and/or hardware in a suitable combination and operable to communicate with network 112. More specifically, interface 117 may comprise software supporting one or more communications protocols associated with communications network 112 or hardware operable to communicate physical signals.
Network 112 facilitates wireless or wireline communication between computer server 102 and any other local or remote computer, such as clients 104. Network 112 may be all or a portion of an enterprise or secured network. In another example, network 112 may be a VPN merely between server 102 and client 104 across wireline or wireless link. Such an example wireless link may be via 802.11a, 802.11b, 802.11g, 802.11n, 802.20, WiMax, and many others. While illustrated as a single or continuous network, network 112 may be logically divided into various sub-nets or virtual networks without departing from the scope of this disclosure, so long as at least portion of network 112 may facilitate communications between server 102 and at least one client 104. In another example, some vendors 106 may represent local vendors 106, which physically interact with client 104 without the use of network 112. In other words, network 112 encompasses any internal or external network, networks, sub-network, or combination thereof operable to facilitate communications between various computing components in system 100. Network 112 may communicate, for example, Internet Protocol (IP) packets, Frame Relay frames, Asynchronous Transfer Mode (ATM) cells, voice, video, data, and other suitable information between network addresses. Network 112 may include one or more local area networks (LANs), radio access networks (RANs), metropolitan area networks (MANs), wide area networks (WANs), all or a portion of the global computer network known as the Internet, and/or any other communication system or systems at one or more locations. In certain embodiments, network 112 may be a secure network associated with the enterprise and certain remote clients 104.
Client 104 is any computing device operable to connect or communicate with server 102 or network 112 using any communication link. At a high level, each client 104 includes or executes at least GUI 136 and comprises an electronic computing device operable to receive, transmit, process, and store any appropriate data associated with system 100. While not illustrated here, client 104 typically includes local memory or is coupled with some relatively remote or distributed memory that may be quickly accessed. It will be understood that there may be any number of clients 104 communicably coupled to server 102. Further, “client,” “business,” and “user” may be used interchangeably as appropriate without departing from the scope of this disclosure. Moreover, for ease of illustration, each client 104 is described in terms of being used by one user. But this disclosure contemplates that many users may use one computer or that one user may use multiple computers. In certain situations, users may include owners, bookkeepers, as well as third party or outside accountants.
As used in this disclosure, client 104 is any person, department, organization, small business, enterprise, or any other entity that may use or request others to use system 100, namely, application 130. For simplicity, client 104 may encompass a personal computer, touch screen terminal, workstation, network computer, kiosk, wireless data port, smart phone, personal data assistant (PDA), one or more processors within these or other devices, or any other suitable processing device used by or for the benefit of client 104. For example, client 104 may be a PDA operable to wirelessly connect with an external or unsecured network. In another example, client 104 may comprise a laptop that includes an input device, such as a keypad, touch screen, mouse, or other device that can accept information, and an output device that conveys information associated with the operation of server 102 or clients 104, including digital data, visual information, or GUI 136. Both the input device and output device may include fixed or removable storage media, such as a magnetic computer disk, CD-ROM, or other suitable media to both receive input from and provide output to users of clients 104 through the display, namely, the client portion of GUI or application interface 136.
GUI 136 comprises a graphical user interface operable to allow the user of client 104 to interface with at least a portion of system 100 for any suitable purpose, such as viewing application or other transaction data. Generally, GUI 136 provides the particular user with an efficient and user-friendly presentation of data provided by or communicated within system 100. GUI 136 may comprise a plurality of customizable frames or views having interactive fields, pull-down lists, and buttons operated by the user. For example, GUI 136 is operable to display certain developed objects 140 in a user-friendly form based on the displayed data. GUI 136 may also present a plurality of portals or dashboards. For example, GUI 136 may display a portal that allows users to view, create, and manage historical and real-time reports, including role-based reporting and such. Generally, historical reports provide critical information on what has happened, including static or canned reports that require no input from the user and dynamic reports that quickly gather run-time information to generate the report. Of course, reports may be in any appropriate output format including PDF, HTML, and printable text. Real-time dashboards often provide table and graph information on the current state of the data, which may be supplemented by business objects. GUI 136 is often configurable, supporting a combination of tables and graphs (bar, line, pie, status dials, etc.), and is able to build real-time dashboards, where developed object 140 (as well the displayed application or transaction data) may be relocated, resized, and such. It should be understood that the term graphical user interface may be used in the singular or in the plural to describe one or more graphical user interfaces and each of the displays of a particular graphical user interface. Indeed, reference to GUI 136 may indicate a reference to the front-end or a component of application 130, as well as the particular interface accessible via client 104, as appropriate, without departing from the scope of this disclosure. Therefore, GUI 136 contemplates any graphical user interface, such as a generic web browser or touch screen that processes information in system 100 and efficiently presents the results to the user. Server 102 can accept data from client 104 via the web browser (e.g., Microsoft Internet Explorer or Netscape Navigator) and return the appropriate HTML or XML responses to the browser using network 112.
It will be understood that these methods are for illustration purposes only and that the described or similar processes and techniques may be performed at any appropriate time, including concurrently, individually, or in combination. In addition, many of the steps in this flowchart may take place simultaneously and/or in different orders than as shown. For example, the framework 116 may receive additional attributes from application 130 subsequent to or concurrent to instantiating the object. Moreover, system 100 may use or implement similar methods with additional steps, fewer steps, and/or different steps, so long as the methods remain appropriate. For example, framework 116 may receive calls from one or more applications 130 to instantiate one or more objects. Upon receiving a second call, framework 116 may receive yet another set of additional attributes from application 130. In this manner, framework 116 may instantiate another object with the second set of additional attributes. Of course, framework 116 may instantiate the object of the particular class using the generic data constructor without setting additional attributes. Finally, framework 116 may instantiate one or more objects, with each object being an instance of a separate class.
In another example of a similar method, application 130 may request framework 116 to validate the object previously instantiated with additional attributes. Upon such a request, framework 116 utilizes the generic class constructer to validate the previously instantiated object, i.e. confirm that the attributes in the instantiated object match the additional attributes in application 130.
Although this disclosure has been described in terms of certain embodiments and generally associated methods, alterations and permutations of these embodiments and methods will be apparent to those skilled in the art. Accordingly, the above description of example embodiments does not define or constrain this disclosure. Other changes, substitutions, and alterations are also possible without departing from the scope of this disclosure.