Facebook Pixel Code
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.

Objects, properties, methods and the three tier application architecture Essay Example

Show related essays

Objects, properties, methods and the three tier application architecture

This is a preview of the 4-page document
Read full text

Equally, the methods offer an insight into the operations that are allowed on the properties associated with the class.The three tier architecture refers to a coding approach that is common place in object oriented languages like C# (Ecmfa Conference, Cabot & Rubin, 2014). In brief, the concept separates application programs into tiers namely presentation tier, business tier as well as data tier in order to simplify the maintenance process for the involved codes. The presentation tier refers to the layer in which end-users interact with the application program covering aspects such as design tools used in representing information to end-users, user interfaces along with the supporting code. The business tier represents the layer within which business rules are defined and acts as a bridge between the presentation tier and the data tier. The data primarily refers to the server that hosts the data that supports the application program. An example of three tier architecture is shown in the figure below.Apart from its ability maintain the system maintenance process and its support for movement to newer graphical environments with little hassle, the logical separations that the three tier layer creates allows varied developers to work on the resulting logical components thus reducing the development time of the three tier-based application programs. Further, the business tier allows for enforcement of security measures that could be relevant to the application program in questions (Patel, 2001). In particular, this could encompass issues like implementing role based authentication and validation of end-user inputs against instances of SQL injection and cross site scripting (Mueller, 2009). Thus, the three-tier approach to development renders the supporting database more secured. Finally, the three tier approach to coding encourages code reuse considering that it is possible defining a single business logic once inside the business layer then share the selfsame logic among numerous components of the presentation tier.Encapsulation refers to an attempt to hide data implementation through restriction of an end user’s access to mutators and accessors. Abstraction is the process of ensuring that all classes feature names that make sense in addition to bearing every relevant aspect while eliminating the extraneous perspectives of the class. Finally, re-use refers to the

This is a preview of the 4-page document
Open full text


Cabot, J., & Rubin, J. (2014). Modelling foundations and applications: 10th European Conference, ECMFA 2014, held as part of STAF 2014, York, UK, July 21-25, 2014. Proceedings.

Farrell, J. 2009. Microsoft Visual C# 2008: an introduction to object-oriented programming. Australia, Course Technology Cengage Learning.

Gamma, E., Helm, R., & Johnson, R. 2007. Design patterns: elements of reusable object-oriented software. Boston, Mass, Addison-Wesley.

Meyer-stabley, B. 2009. Touch of Class Learning to Program Well with Objects and Contracts. Berlin, Heidelberg, Springer-Verlag Berlin Heidelberg.

Mueller, J. P. 2009. Design and Development Expert One on One. New York: John Wiley & Sons.

Leung, H. 2008. Advances in Web based learning--ICWL 2007: 6th international conference, Edinburgh, UK, August 15-17, 2007 : revised papers. Berlin, Springer.

Patel, D. 2001. OOIS 2000: 6th International Conference on Object Oriented Information Systems 18-20 December 2000, London, UK. London [u.a.], Springer.


Appendix 1: An illustration of classes and objects

public class Customer


Private string emailAddress;

Public void setEmailAddress (string emailAddress)





To code snippet shown below illustrates how the above class can be instantiated to create a customer object.


Customer customer1 = new Customer ();



Appendix 2: A program code for a user registration system illustrating the use of the three tier architecture.

Supposing we were to implement a simple three-tier based registration system for customers at an E-pharmaceutical store, we would have the registration module broken down as shown below.

Code Snippet for Implementing the Presentation Tier

<form id="contactfm" runat="server">

<tr><td> EmailAddress </td>

             <td><asp:TextBox ID="txtEmailAddress " Width="121px" runat="server"></asp:TextBox>




                    <td> Phone Contact   </td>


            <asp:TextBox ID="txtPhoneContact" Width="131px" runat="server"></asp:TextBox>



<asp:Button ID="BtnRegister" runat="server" Width="90px" Text="SAVE ENTRIES" onClick="BtnSave_Click" />


Code Snippet for Implementing the Business Tier

//import all the relevant classes

namespace E-pharmaceutical

public class Customers {

Private string _emailAddress;

Private string _phoneContact;

Public string emailAddress


set {

//define the relevant validation rules here



Public string phoneContact



//define the relevant business rules here



//if all validation steps successful, call the data tier to save the user-supplied information


Code Snippet for Implementing the Data tier

//import all the relevant classes

namespace E-pharmaceutical

public class CustomerDA


//include database connection codes that relate to the DB supporting your application



//instantiate the SqlCommand

Command.CommandType = CommandType.StoredProcedure;

cmd.Parametes.Addwithvalue(“@emailAddress”,connectinobject. EmailAddress);

cmd.Parametes.Addwithvalue(“@phoneContact”,connectinobject. phoneContact);

int Res=command.ExecuteNonQuery();

command.Dispose //dispose the sql command object




Catch any exceptions and notify the end user of the same.


}//end of the class CustomerDA

Close ✕
Tracy Smith Editor&Proofreader
Expert in: Logic & Programming, Mathematics, Formal science & Physical science
Hire an Editor
Matt Hamilton Writer
Expert in: Logic & Programming, Statistics, Physics
Hire a Writer
preview essay on Objects, properties, methods and the three tier application architecture
WE CAN HELP TO FIND AN ESSAYDidn't find an essay?

Please type your essay title, choose your document type, enter your email and we send you essay samples

Contact Us